Et toujours du dev pour la béta
* Evolution de l'histoire avec de nouveaux dialogues, une plus grande durée de vie du jeu, des nouvelles zones d'histoire... * Suppression du mode infini * Ajout d'un écran des mutations découvertes * Ajout d'un nouveau mécanisme de respawn situé dans le vaissau * Ajout de 2 nouveaux modificateurs de région * Quatre nouveaux artefacts * Visuel de la décontamination de la planète 3D en cours de la partie * Ajout d'une annonce visuelle des scène du jeu * Fix sur la mutation Généreux pour être en accord avec sa description * Amélioration de l'effet de la mutation Purification * Fix de la mutation sociale aux niveau supérieurs * Ajout d'un effet visuel de réacteur sur le joueur 3D * Fix sur l'annonce de nouveaux objets qui se déclenchaient à une nouvelle run * Amélioration des animation et des informations données dans le vaisseau * Correction mineure des traductions
This commit is contained in:
@@ -1,8 +1,39 @@
|
||||
@abstract
|
||||
extends Resource
|
||||
class_name Scene
|
||||
|
||||
@export var scene_id : String
|
||||
@export_file_path() var scene_path : String
|
||||
@export var mouse_captured := false
|
||||
@export var need_terrain_generated := false
|
||||
@export var need_to_be_saved = true
|
||||
const DEFAULT_SCENE_ICON = preload("res://common/icons/globe.svg")
|
||||
|
||||
var scene_id : String : get = get_scene_id
|
||||
var scene_path : String : get = get_scene_path
|
||||
var mouse_captured : bool : get = is_mouse_captured
|
||||
var need_terrain_generated :bool : get = is_terrain_generated
|
||||
var need_to_be_saved : bool : get = is_needed_to_be_saved
|
||||
var need_to_announce : bool : get = is_needed_to_be_announced
|
||||
var icon : Texture : get = get_scene_icon
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return ""
|
||||
|
||||
@abstract func get_scene_path() -> String
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return false
|
||||
|
||||
func is_terrain_generated() -> bool:
|
||||
return false
|
||||
|
||||
func is_needed_to_be_saved() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return false
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr(get_scene_id())
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return DEFAULT_SCENE_ICON
|
||||
|
||||
func _on_generated(_generated_scene : Node):
|
||||
pass
|
||||
@@ -1,7 +1,5 @@
|
||||
extends Node
|
||||
|
||||
@export var scenes : Array[Scene]
|
||||
|
||||
signal scene_loaded(scene : Scene)
|
||||
signal scene_node_ready(scene : Scene)
|
||||
|
||||
@@ -11,25 +9,8 @@ var generating_node = false
|
||||
var next_scene_node : Node
|
||||
@onready var current_scene_node : Node = get_tree().root.get_children().back()
|
||||
|
||||
func search_scenes(scene_id : String) -> Scene:
|
||||
var scene_pos : int = scenes.find_custom(
|
||||
func (s : Scene):
|
||||
return s.scene_id == scene_id
|
||||
)
|
||||
if scene_pos == -1:
|
||||
return null
|
||||
else :
|
||||
return scenes[scene_pos]
|
||||
|
||||
func change_to_scene_id(scene_id : String, with_loading = true):
|
||||
var scene = search_scenes(scene_id)
|
||||
|
||||
if not scene:
|
||||
printerr("Scene %s not found" % scene_id)
|
||||
return
|
||||
|
||||
if not loading_scene:
|
||||
change_to_scene(scene, with_loading)
|
||||
func _ready():
|
||||
%SceneAnnounce.hide()
|
||||
|
||||
func change_to_scene(scene : Scene, with_loading = true):
|
||||
if loading_scene or generating_node:
|
||||
@@ -94,6 +75,16 @@ func _process(_delta):
|
||||
if next_scene_node.is_generated:
|
||||
generating_node = false
|
||||
scene_node_ready.emit()
|
||||
announce_scene(actual_scene)
|
||||
actual_scene._on_generated(next_scene_node)
|
||||
elif next_scene_node.is_node_ready():
|
||||
generating_node = false
|
||||
scene_node_ready.emit(actual_scene)
|
||||
announce_scene(actual_scene)
|
||||
actual_scene._on_generated(next_scene_node)
|
||||
|
||||
func announce_scene(scene : Scene):
|
||||
if scene.need_to_announce:
|
||||
%SceneTitle.text = scene.get_scene_title()
|
||||
%SceneIcon.texture = scene.get_scene_icon()
|
||||
%SceneAnnounceAnimationPlayer.play("announce")
|
||||
20
common/scene_manager/scripts/scenes/astra_scene.gd
Normal file
20
common/scene_manager/scripts/scenes/astra_scene.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Scene
|
||||
class_name AstraScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "ASTRA"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/astra_base/astra_base.tscn"
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr("ASTRA_FACTORY")
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return preload("res://common/icons/building-factory-2.svg")
|
||||
1
common/scene_manager/scripts/scenes/astra_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/astra_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://gyo84wyg8cy0
|
||||
11
common/scene_manager/scripts/scenes/borea_scene.gd
Normal file
11
common/scene_manager/scripts/scenes/borea_scene.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends Scene
|
||||
class_name BoreaScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "BOREA_BASE"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/borea_base/borea_base.tscn"
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
1
common/scene_manager/scripts/scenes/borea_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/borea_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://0lbebb57m1vb
|
||||
20
common/scene_manager/scripts/scenes/cockpit_scene.gd
Normal file
20
common/scene_manager/scripts/scenes/cockpit_scene.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Scene
|
||||
class_name CockpitScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "COCKPIT"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/cockpit_scene/cockpit_scene.tscn"
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr("INTERNODE")
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return preload("res://common/icons/rocket.svg")
|
||||
1
common/scene_manager/scripts/scenes/cockpit_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/cockpit_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://8topyewe3juk
|
||||
20
common/scene_manager/scripts/scenes/garage_scene.gd
Normal file
20
common/scene_manager/scripts/scenes/garage_scene.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Scene
|
||||
class_name GarageScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "GARAGE"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/ship_garage/ship_garage.tscn"
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr("ASTRA_SHIP_GARAGE")
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return preload("res://common/icons/rocket.svg")
|
||||
1
common/scene_manager/scripts/scenes/garage_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/garage_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://3m1wltyvx0hp
|
||||
8
common/scene_manager/scripts/scenes/intro_scene.gd
Normal file
8
common/scene_manager/scripts/scenes/intro_scene.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Scene
|
||||
class_name IntroScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "INTRO"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/intro/intro.tscn"
|
||||
1
common/scene_manager/scripts/scenes/intro_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/intro_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ca755sowjsqtp
|
||||
30
common/scene_manager/scripts/scenes/region_scene.gd
Normal file
30
common/scene_manager/scripts/scenes/region_scene.gd
Normal file
@@ -0,0 +1,30 @@
|
||||
extends Scene
|
||||
class_name RegionScene
|
||||
|
||||
@export var region_data : RegionData
|
||||
|
||||
func _init(
|
||||
_rd : RegionData = null
|
||||
):
|
||||
region_data = _rd
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "REGION"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/terrain/region/region.tscn"
|
||||
|
||||
func is_terrain_generated() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func get_scene_title() -> String:
|
||||
if region_data:
|
||||
return region_data.region_name
|
||||
return ""
|
||||
|
||||
func _on_generated(generated_scene : Node):
|
||||
var region : Region = generated_scene as Region
|
||||
region.finish_generation()
|
||||
1
common/scene_manager/scripts/scenes/region_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/region_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://degjtx6n43ta4
|
||||
91
common/scene_manager/scripts/scenes/relay_base_scene.gd
Normal file
91
common/scene_manager/scripts/scenes/relay_base_scene.gd
Normal file
@@ -0,0 +1,91 @@
|
||||
extends Scene
|
||||
class_name RelayBaseScene
|
||||
|
||||
@export var base_name : String
|
||||
@export var base_number : String
|
||||
@export var is_spawning : bool
|
||||
|
||||
const DEAD_ORCHID_SCENE = preload("res://entities/player_3d/dead_orchid.tscn")
|
||||
|
||||
func _init(
|
||||
_base_name : String = "",
|
||||
_base_number : String = "",
|
||||
_is_spawning : bool = false,
|
||||
):
|
||||
base_name = _base_name
|
||||
base_number = _base_number
|
||||
is_spawning = _is_spawning
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/relay_base/relay_base.tscn"
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr("RELAY_BASE_X") % tr(base_name)
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return preload("res://common/icons/route.svg")
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func _on_generated(generated_scene : Node):
|
||||
var relay_base := generated_scene as RelayBase
|
||||
relay_base.base_name = base_name
|
||||
relay_base.base_number = base_number
|
||||
|
||||
if is_spawning:
|
||||
AudioManager.play_sfx("Respawn")
|
||||
spawn_player(relay_base)
|
||||
spawn_dead_orchid(relay_base)
|
||||
relay_base.exit_scene = CockpitScene.new()
|
||||
else:
|
||||
relay_base.exit_scene = RegionScene.new(GameInfo.game_data.current_region_data)
|
||||
handle_orchid_save(relay_base)
|
||||
|
||||
|
||||
func spawn_player(relay_base : RelayBase):
|
||||
var incubators := relay_base.get_incubators()
|
||||
var possible_incubators : Array[Incubator] = []
|
||||
var choosen_incubator : Incubator = null
|
||||
for i in range(len(incubators)):
|
||||
var incubator = incubators[i]
|
||||
if i in GameInfo.game_data.incubator_used:
|
||||
incubator.used = true
|
||||
else:
|
||||
possible_incubators.append(incubator)
|
||||
if len(possible_incubators):
|
||||
choosen_incubator = possible_incubators.pick_random()
|
||||
GameInfo.game_data.incubator_used.append(
|
||||
incubators.find(choosen_incubator)
|
||||
)
|
||||
else:
|
||||
choosen_incubator = incubators.pick_random()
|
||||
|
||||
choosen_incubator.used = true
|
||||
relay_base.player.global_position = choosen_incubator.global_position + Vector3.UP
|
||||
relay_base.player.rotation.y = choosen_incubator.rotation.y
|
||||
|
||||
func spawn_dead_orchid(relay_base : RelayBase):
|
||||
var dead_orchid := DEAD_ORCHID_SCENE.instantiate() as Node3D
|
||||
relay_base.add_child(dead_orchid)
|
||||
if GameInfo.game_data.dead_orchid_position == Vector3.ZERO:
|
||||
dead_orchid.global_position = relay_base.orchid_saver.global_position + Vector3.UP * 0.5
|
||||
dead_orchid.rotation.y = -90
|
||||
else:
|
||||
dead_orchid.position = GameInfo.game_data.dead_orchid_position
|
||||
dead_orchid.rotation = GameInfo.game_data.dead_orchid_rotation
|
||||
relay_base.orchid_saver.active = false
|
||||
relay_base.dead_orchid = dead_orchid
|
||||
|
||||
func handle_orchid_save(relay_base : RelayBase):
|
||||
relay_base.orchid_saved.connect(
|
||||
func ():
|
||||
GameInfo.game_data.finish_story_step()
|
||||
var new_story_step = GameInfo.game_data.progression_data.get_story_step()
|
||||
SceneManager.change_to_scene(
|
||||
new_story_step.get_respawn_scene()
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cnpm8ciojdjxf
|
||||
11
common/scene_manager/scripts/scenes/title_scene.gd
Normal file
11
common/scene_manager/scripts/scenes/title_scene.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends Scene
|
||||
class_name TitleScene
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "TITTLE"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/title_screen/title_screen.tscn"
|
||||
|
||||
func is_needed_to_be_saved() -> bool:
|
||||
return false
|
||||
1
common/scene_manager/scripts/scenes/title_scene.gd.uid
Normal file
1
common/scene_manager/scripts/scenes/title_scene.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dn1psyrjkcynd
|
||||
31
common/scene_manager/scripts/scenes/vending_machine_scene.gd
Normal file
31
common/scene_manager/scripts/scenes/vending_machine_scene.gd
Normal file
@@ -0,0 +1,31 @@
|
||||
extends Scene
|
||||
class_name VendingMachineScene
|
||||
|
||||
@export var vending_machine_room_seed = 0
|
||||
|
||||
func _init(
|
||||
_vmrs : int = 0
|
||||
):
|
||||
vending_machine_room_seed = _vmrs
|
||||
|
||||
func get_scene_id() -> String:
|
||||
return "VENDING_MACHINE"
|
||||
|
||||
func get_scene_path() -> String:
|
||||
return "res://stages/3d_scenes/vending_machine_room/vending_machine_room.tscn"
|
||||
|
||||
func is_mouse_captured() -> bool:
|
||||
return true
|
||||
|
||||
func is_needed_to_be_announced() -> bool:
|
||||
return true
|
||||
|
||||
func get_scene_title() -> String:
|
||||
return tr("VENDING_MACHINE_ROOM")
|
||||
|
||||
func get_scene_icon() -> Texture:
|
||||
return preload("res://common/icons/building-store.svg")
|
||||
|
||||
func _on_generated(generated_scene : Node):
|
||||
var vending_machine_room : VendingMachineRoom = generated_scene as VendingMachineRoom
|
||||
vending_machine_room.setup_room(vending_machine_room_seed)
|
||||
@@ -0,0 +1 @@
|
||||
uid://b8gdowt2oavcy
|
||||
Reference in New Issue
Block a user