Feature pour l'alpha 1.3
* Ajout d'un mode infini (pour nos hard core gamers) * Ajout d'un message de découverte d'un nouvel outil * Séparation de la pelle en deux outils : la pioche et la fourche * Amélioration de la lisibilité des capsules d'énergies * Changement léger des texture du sol et de la pierre * Correction d'un bug lors du clic frénétique sur le porte de sortie du vaisseau * Ajout d'un icône de recharge * Fix de la mutation Ancien qui ne s'améliorait pas au niveau 4 + début de dev des artefacts avec un distributeur
This commit is contained in:
@@ -53,7 +53,7 @@ func _ready():
|
||||
|
||||
func story():
|
||||
AudioManager.play_sfx("Respawn")
|
||||
if not INTRO_DIALOG in GameInfo.game_data.dialogs_done:
|
||||
if not INTRO_DIALOG in GameInfo.game_data.dialogs_done and GameInfo.game_data.game_mode == GameData.GameMode.STORY:
|
||||
await get_tree().create_timer(TIME_WITHOUT_PHONE).timeout
|
||||
%Phone.play_audio()
|
||||
await %Phone.clicked
|
||||
@@ -84,7 +84,7 @@ func story():
|
||||
|
||||
func finish_scene():
|
||||
GameInfo.game_data.start_run()
|
||||
if GameInfo.game_data.tutorial_done:
|
||||
if GameInfo.game_data.tutorial_done or GameInfo.game_data.game_mode == GameData.GameMode.INFINITE:
|
||||
GameInfo.game_data.ship_in_space = false
|
||||
SceneManager.change_to_scene_id('COCKPIT')
|
||||
else:
|
||||
|
||||
@@ -11,6 +11,7 @@ signal land
|
||||
|
||||
@onready var dashboard : Dashboard = %Dashboard
|
||||
var choosen_run_point : RunPoint = null
|
||||
var exiting = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@@ -32,14 +33,8 @@ func _ready():
|
||||
%Exit.clicked.connect(_on_exit_clicked)
|
||||
%Exit.interactable = can_exit()
|
||||
|
||||
handle_dialogs()
|
||||
|
||||
var player_has_teleporter : bool = GameInfo.game_data.player_data.inventory.items.find_custom(
|
||||
func (i : Item): return i is ShipPortal
|
||||
) != -1
|
||||
|
||||
if not player_has_teleporter:
|
||||
GameInfo.game_data.player_data.inventory.add_item(ShipPortal.new())
|
||||
if GameInfo.game_data.game_mode == GameData.GameMode.STORY:
|
||||
handle_dialogs()
|
||||
|
||||
func handle_dialogs():
|
||||
if not POST_TUTORIAL_DIALOG_PATH in GameInfo.game_data.dialogs_done:
|
||||
@@ -94,19 +89,24 @@ func _on_right_screen_activated():
|
||||
update_dashboard()
|
||||
|
||||
func _on_exit_clicked():
|
||||
AudioManager.play_sfx("Ship_exit")
|
||||
if (can_exit()):
|
||||
if (can_exit() and not exiting):
|
||||
AudioManager.play_sfx("Ship_exit")
|
||||
exiting = true
|
||||
SceneManager.change_to_scene_id('REGION')
|
||||
|
||||
func update_dashboard():
|
||||
|
||||
var current_region_data = GameInfo.game_data.current_region_data
|
||||
|
||||
if current_region_data and not "tutorial" in current_region_data.flags:
|
||||
dashboard.destination_distance = RunData.RUN_POINT_MAX_LEVEL * 1000 - current_region_data.region_level * 1000
|
||||
else :
|
||||
dashboard.destination_distance = (RunData.RUN_POINT_MAX_LEVEL + 1) * 1000
|
||||
dashboard.destination_title = "TO_BOREA_BASE"
|
||||
if GameInfo.game_data.game_mode == GameData.GameMode.STORY:
|
||||
if current_region_data and not "tutorial" in current_region_data.flags:
|
||||
dashboard.destination_distance = RunData.RUN_POINT_MAX_LEVEL * 1000 - current_region_data.region_level * 1000
|
||||
else :
|
||||
dashboard.destination_distance = (RunData.RUN_POINT_MAX_LEVEL + 1) * 1000
|
||||
dashboard.destination_title = "TO_BOREA_BASE"
|
||||
elif GameInfo.game_data.game_mode == GameData.GameMode.INFINITE:
|
||||
dashboard.destination_distance = 0 if current_region_data == null else current_region_data.region_level * 1000
|
||||
dashboard.destination_title = "TRAVELED_DISTANCE"
|
||||
|
||||
var current_run = GameInfo.game_data.current_run
|
||||
|
||||
|
||||
Reference in New Issue
Block a user