Skip to content

Commit

Permalink
Increment kilocycle when departing planet
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Jul 24, 2024
1 parent eb57a6a commit 282fbf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actors/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class_name Player
@export var landing_scene: PackedScene
@export var takeoff_sound: AudioStreamPlayer
@export var bank_account: BankAccount
@export var calendar: Calendar

@onready var ship := get_parent() as Ship

Expand Down Expand Up @@ -229,6 +230,7 @@ func _land() -> void:
self._depart_from_planet())

func _depart_from_planet() -> void:
self.calendar.increment_kilocycle()
self._reset_controls()
self._reset_velocity()
self.takeoff_sound.play()
Expand Down
2 changes: 1 addition & 1 deletion screens/game/game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
[ext_resource type="Script" path="res://mechanics/time/calendar.gd" id="46_cos1s"]

[sub_resource type="Resource" id="Resource_jc1pg"]
resource_local_to_scene = true
script = ExtResource("46_cos1s")
current_kilocycle = 214

Expand Down Expand Up @@ -218,6 +217,7 @@ hyperdrive = SubResource("Resource_xnk78")
hyperspace_scene_switcher = NodePath("../../..")
message_log = NodePath("../../../../InGameGUI/MarginContainer/HBoxContainer/MessageLog")
bank_account = SubResource("Resource_j1y8s")
calendar = SubResource("Resource_jc1pg")

[node name="MinimapCameraRemoteTransform" parent="HyperspaceSceneSwitcher/Sol/PlayerCorvette/Player" index="0"]
remote_path = NodePath("../../../../../MinimapViewport/MinimapCameraTransform")
Expand Down

0 comments on commit 282fbf8

Please sign in to comment.