This commit is contained in:
PfandBoss
2022-12-10 23:11:38 +01:00
parent 8ce7e3081d
commit 97a70e2737
5 changed files with 23 additions and 7 deletions

View File

@@ -23,12 +23,14 @@ func interact(player):
if currentStashValue < maxStashValue:
currentStashValue += 1
player.clearInventory()
$AudioStreamPlayer2.play()
return
if player.getResource() == 1:
if currentPowderStashValue < maxPowderStashValue:
currentPowderStashValue += 1
player.clearInventory()
$AudioStreamPlayer2.play()
return
return
@@ -38,6 +40,6 @@ func shoot():
currentStashValue -= 1
currentPowderStashValue = 0
currentState = STATE.INACTIVE
$AudioStreamPlayer3D.play(0)
$AudioStreamPlayer.play(0)
return true
return false

View File

@@ -22,6 +22,7 @@ func interact(player):
if (train.current_speed + refuelRate) <= maxSpeed:
train.current_speed += refuelRate
player.clearInventory()
$AudioStreamPlayer.play()
if train.current_speed >= maxSpeed:
train.current_speed = maxSpeed