🎉
This commit is contained in:
commit
94bfe2754e
107 changed files with 2557 additions and 0 deletions
27
ItemSink.gd
Normal file
27
ItemSink.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
extends Building
|
||||
class_name ItemSink
|
||||
|
||||
@onready var sink_sprite: Sprite2D = $Sprite2D
|
||||
|
||||
func _ready():
|
||||
super()
|
||||
|
||||
if sink_sprite:
|
||||
sink_sprite.modulate = Color("darkred")
|
||||
|
||||
func _on_grid_position_changed():
|
||||
super()
|
||||
|
||||
name = "ItemSink_%s,%s" % [current_grid_pos.x, current_grid_pos.y]
|
||||
|
||||
# Sink can always accept
|
||||
func can_accept_item() -> bool:
|
||||
return true
|
||||
|
||||
func handle_item_entry(item: Item, remaining_delta_from_previous: float = 0.0):
|
||||
print("ItemSink handle_item_entry at %s consumed item: %s" % [current_grid_pos, item.type])
|
||||
item.queue_free()
|
||||
|
||||
func handle_item(item: Item):
|
||||
print("ItemSink handle_item at %s consumed item: %s" % [current_grid_pos, item.type])
|
||||
item.queue_free()
|
||||
Loading…
Add table
Add a link
Reference in a new issue