équilibrages, fix et évolutions
* résolution du bug de disparition des items #94 * améliorations définitives dans le camion via compost #88 * ajout de plus d'aléatoire dans le zone de départ * suppression des récompenses de quota (pour l'instant) * équilibrage du gain en graine * ajout de la clarté dans les actions
This commit is contained in:
@@ -10,7 +10,7 @@ func _init(_machine_type : MachineType = null, _machine_level : int = 1):
|
||||
|
||||
func get_item_name() -> String:
|
||||
if machine_type:
|
||||
return machine_type.name + " level " + str(machine_level)
|
||||
return machine_type.name
|
||||
return ""
|
||||
|
||||
func get_description() -> String:
|
||||
|
||||
@@ -25,6 +25,9 @@ func get_energy_used() -> int:
|
||||
func get_usage_zone_radius() -> int:
|
||||
return 30
|
||||
|
||||
func get_usage_object_affected(i : InspectableEntity) -> bool:
|
||||
return i is Plant
|
||||
|
||||
func _init(
|
||||
_plant_type : PlantType = null,
|
||||
_parent_mutation : Array[PlantMutation] = []
|
||||
@@ -43,7 +46,7 @@ func can_use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
return false
|
||||
|
||||
var is_there_a_plant_here = false
|
||||
for area in zone.area.get_overlapping_areas() :
|
||||
for area in zone.get_affected_areas():
|
||||
if area is Plant:
|
||||
is_there_a_plant_here = true
|
||||
|
||||
|
||||
@@ -19,11 +19,14 @@ func get_energy_used() -> int:
|
||||
func get_usage_zone_radius() -> int:
|
||||
return SHOVEL_ZONE_RADIUS
|
||||
|
||||
func get_usage_object_affected(i : InspectableEntity) -> bool:
|
||||
return i is Plant or i is UndergroundLoot
|
||||
|
||||
func use_text() -> String:
|
||||
return "Dig"
|
||||
|
||||
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
||||
var areas = zone.area.get_overlapping_areas()
|
||||
var areas = zone.get_affected_areas()
|
||||
for area in areas :
|
||||
if area is Plant or area is UndergroundLoot:
|
||||
return true
|
||||
@@ -31,7 +34,7 @@ func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
||||
|
||||
func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
dig(
|
||||
zone.area.get_overlapping_areas(),
|
||||
zone.get_affected_areas(),
|
||||
player
|
||||
)
|
||||
|
||||
@@ -42,7 +45,8 @@ func dig(areas: Array[Area2D], player: Player):
|
||||
if area and area is Plant:
|
||||
player.play_sfx("harvest")
|
||||
area.harvest()
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
if area and area is UndergroundLoot:
|
||||
player.play_sfx("dig")
|
||||
area.dig()
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
|
||||
Reference in New Issue
Block a user