Added status lights on power station. Adjusted the crafting bench item holder positions
This commit is contained in:
1 parent
5fca5d0a04
commit
bb4da72c47
3 files changed
+39
-1
No files matched your search
@@ -6,11 +6,18 @@ export var time_to_generate : float = 120
|
||||
export var current_holding : int = 0 setget set_current_holding
|
||||
var current_timer : float = 0
|
||||
|
||||
var rtg_lights = []
|
||||
|
||||
func set_current_holding(new_value):
|
||||
current_holding = new_value
|
||||
if new_value > 0:
|
||||
for light in rtg_lights:
|
||||
light.activate()
|
||||
$CointCount.text = "Charge Count: %d" % current_holding
|
||||
|
||||
func _ready():
|
||||
rtg_lights = get_tree().get_nodes_in_group("rtg_lights")
|
||||
assert(rtg_lights != null)
|
||||
set_current_holding(current_holding)
|
||||
|
||||
func _process(delta):
|
||||
@@ -39,4 +46,6 @@ func on_player_interact(player) -> bool:
|
||||
|
||||
player.modify_inventory("coins", charges)
|
||||
$sounds/charge_get.play()
|
||||
for light in rtg_lights:
|
||||
light.warn()
|
||||
return true
|
||||
Reference in new issue
Block a user