Réparation de bug, paufinnage du rayon tracteur et insert de l'outil dans l'histoire
This commit is contained in:
@@ -17,8 +17,14 @@ func get_icon() -> Texture2D:
|
||||
func get_usage_zone_radius() -> int:
|
||||
return SHOVEL_ZONE_RADIUS
|
||||
|
||||
func get_usage_object_affected(i : Area2D) -> bool:
|
||||
return i is Plant
|
||||
func get_usage_objects_affected(areas : Array[Area2D], zone : Player.ActionZone) -> Array[Area2D]:
|
||||
areas.sort_custom(
|
||||
func (a1,a2): return a1.position.distance_to(zone.area.position) - a2.position.distance_to(zone.area.position)
|
||||
)
|
||||
if len(areas) == 0:
|
||||
return []
|
||||
else:
|
||||
return [areas[0]]
|
||||
|
||||
func use_text() -> String:
|
||||
return tr("DIG")
|
||||
|
||||
Reference in New Issue
Block a user