Réparation de bug, paufinnage du rayon tracteur et insert de l'outil dans l'histoire
This commit is contained in:
@@ -32,6 +32,7 @@ var instruction : Instruction = null :
|
||||
|
||||
var just_dropped_item_objects : Array = []
|
||||
var last_just_dropped_item_objects_updated := 0.
|
||||
var last_instruction_done := 0.
|
||||
|
||||
var elapsed_time := 0.
|
||||
|
||||
@@ -89,6 +90,7 @@ func _process(delta):
|
||||
and instruction and instruction.can_be_done(self)
|
||||
):
|
||||
instruction.do(self)
|
||||
last_instruction_done = elapsed_time
|
||||
instruction = null
|
||||
|
||||
|
||||
@@ -97,7 +99,7 @@ func _process(delta):
|
||||
instruction = null
|
||||
input_direction = calculate_direction_instruction_direction()
|
||||
|
||||
if instruction == null and action_zone:
|
||||
if instruction == null and action_zone and elapsed_time > last_instruction_done + 0.1:
|
||||
action_zone.destroy()
|
||||
action_zone = null
|
||||
|
||||
@@ -371,7 +373,7 @@ class Instruction:
|
||||
|
||||
player.get_tree().create_tween().tween_property(indicator, "modulate:a", 0.8, 0.2)
|
||||
|
||||
func abort(player : Player):
|
||||
func abort(_player : Player):
|
||||
indicator.queue_free()
|
||||
|
||||
class MoveInstruction extends Instruction:
|
||||
@@ -467,10 +469,11 @@ class ActionZone:
|
||||
var detected_areas = get_affected_areas()
|
||||
clear_preview_on_affected_area()
|
||||
var new_affected_areas : Array[Area2D] = []
|
||||
for a in detected_areas:
|
||||
if a is Area2D and item.get_usage_object_affected(a) and a.has_method("affect_preview"):
|
||||
a.affect_preview(true)
|
||||
new_affected_areas.append(a)
|
||||
if item:
|
||||
for a in item.get_usage_objects_affected(detected_areas, self):
|
||||
if a.has_method("affect_preview"):
|
||||
a.affect_preview(true)
|
||||
new_affected_areas.append(a)
|
||||
affected_areas = new_affected_areas
|
||||
|
||||
func get_affected_areas() -> Array[Area2D]:
|
||||
|
||||
Reference in New Issue
Block a user