Equilibrage, amélioration du tutoriel et de la clarté des éléments de gameplay
* Rajout d'une région supplémentaire pour finir le jeu, et renommage de la dernière map en "Base Borea" * Amélioration de la clarté du détecteur * Les objectifs du tutoriel et les indications de jeu apparaissent désormais en haut de l'écran * Changement des étapes du tutoriel * Amélioration de la lisibilité du voyage dans le vaisseau (avec un décompte de distance jusqu'à la fin du jeu) * Changement de la génération de map : la zone fertile est désormais uniquement au centre de la carte, les chunks sont également plus petits * Changement des objectifs à réaliser ainsi que des recharges, seule 8 par région désormais * Les modificateurs de région n'évoluent plus
This commit is contained in:
@@ -6,46 +6,17 @@
|
||||
[ext_resource type="Script" uid="uid://bj4d1x8n8ina" path="res://entities/interactable_3d/interactable_3d.gd" id="1_vlkbw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdvegfgvp7053" path="res://stages/3d_scenes/cockpit_scene/assets/3d/furnitures/screen_1.blend" id="2_awdc5"]
|
||||
[ext_resource type="Texture2D" uid="uid://cgmxjom200bej" path="res://common/icons/chevrons-up.svg" id="2_vlkbw"]
|
||||
[ext_resource type="Script" uid="uid://ccb06rayqowp3" path="res://stages/terrain/region/scripts/modifiers/region_modifier.gd" id="3_xy0a5"]
|
||||
[ext_resource type="Script" uid="uid://ddk7j5b8p51dk" path="res://stages/terrain/region/scripts/region_parameter.gd" id="4_2d2u0"]
|
||||
[ext_resource type="Script" uid="uid://3o33x8mesgrn" path="res://stages/terrain/region/scripts/modifiers/arid_modifier.gd" id="4_v8ur5"]
|
||||
[ext_resource type="Script" uid="uid://b4eimt3v08jhc" path="res://common/game_data/scripts/run/run_point.gd" id="5_v8ur5"]
|
||||
[ext_resource type="Texture2D" uid="uid://l2xplg72hs6j" path="res://common/icons/map-pin.svg" id="6_qbi61"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_2ofl5"]
|
||||
[ext_resource type="PackedScene" uid="uid://cs5gir1u8jbrg" path="res://stages/3d_scenes/cockpit_scene/holo_content.tscn" id="7_f7ho8"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="8_f5peh"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="9_2kujw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="12_stoj6"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsgmxvuphn73c" path="res://common/icons/arrow-narrow-down.svg" id="13_5d7hc"]
|
||||
[ext_resource type="PackedScene" uid="uid://crbjmwumboelw" path="res://gui/game/inventory_gui/inventory_3d.tscn" id="17_inbnt"]
|
||||
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://entities/player/inventory/scripts/item.gd" id="18_qm808"]
|
||||
[ext_resource type="Script" uid="uid://fnu2d6wna4yc" path="res://entities/player/inventory/scripts/inventory.gd" id="19_kh1yg"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_f7ho8"]
|
||||
script = ExtResource("4_v8ur5")
|
||||
metadata/_custom_type_script = "uid://3o33x8mesgrn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_inbnt"]
|
||||
script = ExtResource("4_2d2u0")
|
||||
region_name = "Uwoqos"
|
||||
region_seed = 1461307588
|
||||
modifiers = Array[ExtResource("3_xy0a5")]([SubResource("Resource_f7ho8")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qm808"]
|
||||
script = ExtResource("5_v8ur5")
|
||||
region_parameter = SubResource("Resource_inbnt")
|
||||
position = 0.00886304526180577
|
||||
metadata/_custom_type_script = "uid://b4eimt3v08jhc"
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_cvt2p"]
|
||||
viewport_path = NodePath("DestinationScreen/SubViewport")
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_gbmux"]
|
||||
frequency = 1.0
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5d7hc"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
albedo_color = Color(0.8566341, 0.5852838, 1.1551381e-06, 0.6431373)
|
||||
viewport_path = NodePath("Holo/SubViewport")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5d7hc"]
|
||||
viewport_path = NodePath("StatusScreen/SubViewport")
|
||||
@@ -205,77 +176,46 @@ metadata/_custom_type_script = "uid://fnu2d6wna4yc"
|
||||
[node name="Dashboard" type="Node3D" unique_id=1374334508]
|
||||
script = ExtResource("1_2q8cl")
|
||||
main_screen_icon = ExtResource("2_vlkbw")
|
||||
main_screen_label = "Take Off"
|
||||
destination_label = "South"
|
||||
destination_title_label = "DESTINATION"
|
||||
left_destination = SubResource("Resource_qm808")
|
||||
right_destination = SubResource("Resource_qm808")
|
||||
main_screen_text = null
|
||||
stop_name = null
|
||||
stop_title = null
|
||||
destination_title = "TO_BOREA_BASE"
|
||||
|
||||
[node name="DestinationScreen" type="Sprite3D" parent="." unique_id=1067303692]
|
||||
[node name="Holo" type="Sprite3D" parent="." unique_id=1067303692]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1.0000002, 0, 8.742278e-08, 0, -1, 0, 0.76403993, 0.9382038)
|
||||
pixel_size = 0.002
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1.0000002, 0, 8.742278e-08, 0, -1, 0, 0.83082896, 0.33655214)
|
||||
pixel_size = 0.004
|
||||
texture = SubResource("ViewportTexture_cvt2p")
|
||||
|
||||
[node name="Planet3dHolo" parent="DestinationScreen" unique_id=866166298 instance=ExtResource("12_stoj6")]
|
||||
transform = Transform3D(-0.1, 0, 8.742278e-09, 0, 0.09999998, 0, -8.742278e-09, 0, -0.1, -1.8938096e-10, 0.24558258, 0.0021662712)
|
||||
radius = 1.0
|
||||
details = 32
|
||||
noise = SubResource("FastNoiseLite_gbmux")
|
||||
height = 0.625
|
||||
terrain_material = SubResource("StandardMaterial3D_5d7hc")
|
||||
water_level = 0.0
|
||||
water_detail = 32
|
||||
|
||||
[node name="Planet3dHoloArrow" type="Sprite3D" parent="DestinationScreen/Planet3dHolo" unique_id=254165077]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(9.996528, -0.1669313, -0.20388591, 0.1532331, 9.977292, -0.65587914, 0.21437156, 0.65252686, 9.976385, 0, 1.6, -1.3)
|
||||
pixel_size = 0.001
|
||||
billboard = 1
|
||||
double_sided = false
|
||||
texture = ExtResource("6_qbi61")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="DestinationScreen" unique_id=471832787]
|
||||
[node name="SubViewport" type="SubViewport" parent="Holo" unique_id=471832787]
|
||||
transparent_bg = true
|
||||
size = Vector2i(300, 70)
|
||||
size = Vector2i(365, 68)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="DestinationScreen/SubViewport" unique_id=599842808]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
[node name="HoloContent" parent="Holo/SubViewport" unique_id=668915500 instance=ExtResource("7_f7ho8")]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -162.0
|
||||
offset_top = -28.0
|
||||
offset_right = 162.0
|
||||
offset_bottom = 28.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -10
|
||||
alignment = 1
|
||||
|
||||
[node name="DestinationTitleLabel" type="Label" parent="DestinationScreen/SubViewport/VBoxContainer" unique_id=1315386326]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "DESTINATION"
|
||||
label_settings = ExtResource("1_sp2xx")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="DestinationLabel" type="Label" parent="DestinationScreen/SubViewport/VBoxContainer" unique_id=348899780]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "South"
|
||||
label_settings = ExtResource("1_sp2xx")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
stop_name = ""
|
||||
|
||||
[node name="StatusScreen" type="Sprite3D" parent="." unique_id=1257606535]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1.0000002, 0, 8.742278e-08, 0, -1, 0, 0.8631269, 0.18221188)
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1.0000002, 0, 8.742278e-08, 0, -1, 0, 1.0703605, 0.35432142)
|
||||
modulate = Color(1, 0, 0.43137255, 1)
|
||||
pixel_size = 0.003
|
||||
texture = SubResource("ViewportTexture_5d7hc")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="StatusScreen" unique_id=1357189828]
|
||||
transparent_bg = true
|
||||
size = Vector2i(500, 70)
|
||||
size = Vector2i(435, 98)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="StatusScreen/SubViewport" unique_id=2076282975]
|
||||
anchors_preset = 15
|
||||
@@ -291,9 +231,11 @@ alignment = 1
|
||||
[node name="StatusLabel" type="Label" parent="StatusScreen/SubViewport/VBoxContainer" unique_id=86551380]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla "
|
||||
label_settings = ExtResource("1_sp2xx")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="MainScreen" type="Area3D" parent="." unique_id=874806978 node_paths=PackedStringArray("hover_animation_player")]
|
||||
unique_name_in_owner = true
|
||||
@@ -367,7 +309,7 @@ texture = SubResource("ViewportTexture_2ofl5")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="RightScreen/RightScreenAction" unique_id=837587699]
|
||||
transparent_bg = true
|
||||
size = Vector2i(150, 150)
|
||||
size = Vector2i(150, 180)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="RightScreen/RightScreenAction/SubViewport" unique_id=536772063]
|
||||
anchors_preset = 15
|
||||
@@ -391,10 +333,11 @@ stretch_mode = 5
|
||||
[node name="RightScreenActionLabel" type="Label" parent="RightScreen/RightScreenAction/SubViewport/VBoxContainer" unique_id=2019588267]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Uwoqos"
|
||||
text = "Uwoqos Uwoqos "
|
||||
label_settings = ExtResource("1_sp2xx")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="RightScreenStats" type="Sprite3D" parent="RightScreen" unique_id=282782621]
|
||||
unique_name_in_owner = true
|
||||
@@ -524,7 +467,7 @@ texture = SubResource("ViewportTexture_2kujw")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="LeftScreen/LeftScreenAction" unique_id=1596245800]
|
||||
transparent_bg = true
|
||||
size = Vector2i(150, 150)
|
||||
size = Vector2i(150, 180)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LeftScreen/LeftScreenAction/SubViewport" unique_id=306736368]
|
||||
anchors_preset = 15
|
||||
@@ -548,10 +491,11 @@ stretch_mode = 5
|
||||
[node name="LeftScreenActionLabel" type="Label" parent="LeftScreen/LeftScreenAction/SubViewport/VBoxContainer" unique_id=1631525309]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Ujuqyt"
|
||||
text = "Ujuqyt Ujuqyt"
|
||||
label_settings = ExtResource("1_sp2xx")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="LeftScreenStats" type="Sprite3D" parent="LeftScreen" unique_id=2023558675]
|
||||
unique_name_in_owner = true
|
||||
|
||||
81
stages/3d_scenes/cockpit_scene/holo_content.tscn
Normal file
81
stages/3d_scenes/cockpit_scene/holo_content.tscn
Normal file
@@ -0,0 +1,81 @@
|
||||
[gd_scene format=3 uid="uid://cs5gir1u8jbrg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1t0br6cacipb" path="res://stages/3d_scenes/cockpit_scene/scripts/holo_content.gd" id="1_30o21"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_bw0fn"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="1_wkgid"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_30o21"]
|
||||
font = ExtResource("1_wkgid")
|
||||
font_size = 37
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_xsjq0"]
|
||||
font = ExtResource("1_wkgid")
|
||||
font_size = 12
|
||||
|
||||
[sub_resource type="StyleBoxLine" id="StyleBoxLine_f7ho8"]
|
||||
color = Color(1, 1, 1, 1)
|
||||
thickness = 2
|
||||
vertical = true
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_rc8f3"]
|
||||
font = ExtResource("1_wkgid")
|
||||
font_size = 20
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_m4m7o"]
|
||||
font = ExtResource("1_wkgid")
|
||||
font_size = 15
|
||||
|
||||
[node name="HoloContent" type="HBoxContainer" unique_id=668915500]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
alignment = 1
|
||||
script = ExtResource("1_30o21")
|
||||
distance = 0
|
||||
stop_name = "Blatava"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1324145322]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = -2
|
||||
alignment = 1
|
||||
|
||||
[node name="DistanceLabel" type="Label" parent="VBoxContainer" unique_id=414512188]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "0"
|
||||
label_settings = SubResource("LabelSettings_30o21")
|
||||
|
||||
[node name="DistanceTitleLabel" type="Label" parent="VBoxContainer" unique_id=216163419]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "Jusqu'à la Base Boréa"
|
||||
label_settings = SubResource("LabelSettings_xsjq0")
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="." unique_id=124655802]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_bw0fn")
|
||||
theme_override_styles/separator = SubResource("StyleBoxLine_f7ho8")
|
||||
|
||||
[node name="DetailsContainer" type="VBoxContainer" parent="." unique_id=597548757]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="NextStopTitleLabel" type="Label" parent="DetailsContainer" unique_id=578206390]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Prochain arrêt"
|
||||
label_settings = SubResource("LabelSettings_rc8f3")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="NextStopLabel" type="Label" parent="DetailsContainer" unique_id=1819876983]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Blatava"
|
||||
label_settings = SubResource("LabelSettings_m4m7o")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -30,6 +30,7 @@ func _ready():
|
||||
dashboard.left_screen_activated.connect(_on_left_screen_activated)
|
||||
dashboard.right_screen_activated.connect(_on_right_screen_activated)
|
||||
%Exit.clicked.connect(_on_exit_clicked)
|
||||
%Exit.interactable = can_exit()
|
||||
|
||||
handle_dialogs()
|
||||
|
||||
@@ -58,20 +59,26 @@ func move_to_choosen_run_point():
|
||||
GameInfo.game_data.current_run.choose_next_run_point(choosen_run_point)
|
||||
%Gauge3D.progress = 0.
|
||||
|
||||
func can_exit() -> bool:
|
||||
return (
|
||||
not GameInfo.game_data.ship_in_space
|
||||
and GameInfo.game_data.current_region_data != null
|
||||
and not "tutorial" in GameInfo.game_data.current_region_data.flags
|
||||
)
|
||||
|
||||
func _on_main_screen_activated():
|
||||
if GameInfo.game_data.ship_in_space:
|
||||
if GameInfo.game_data.current_run and choosen_run_point:
|
||||
move_to_choosen_run_point()
|
||||
land.emit()
|
||||
%Exit.interactable = GameInfo.game_data.current_region_data != null
|
||||
GameInfo.game_data.ship_in_space = false
|
||||
else :
|
||||
take_off.emit()
|
||||
%Exit.interactable = false
|
||||
GameInfo.game_data.ship_in_space = true
|
||||
if GameInfo.game_data.current_run == null:
|
||||
GameInfo.game_data.start_run()
|
||||
GameInfo.game_data.player_data.energy = GameInfo.game_data.player_data.max_energy
|
||||
%Exit.interactable = can_exit()
|
||||
update_dashboard()
|
||||
|
||||
func _on_left_screen_activated():
|
||||
@@ -88,12 +95,19 @@ func _on_right_screen_activated():
|
||||
|
||||
func _on_exit_clicked():
|
||||
AudioManager.play_sfx("Ship_exit")
|
||||
if not GameInfo.game_data.ship_in_space and GameInfo.game_data.current_region_data != null:
|
||||
if (can_exit()):
|
||||
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"
|
||||
|
||||
var current_run = GameInfo.game_data.current_run
|
||||
|
||||
var can_take_off : bool = (
|
||||
@@ -106,43 +120,40 @@ func update_dashboard():
|
||||
|
||||
if GameInfo.game_data.ship_in_space:
|
||||
dashboard.main_screen_icon = LAND_ICON
|
||||
dashboard.main_screen_label = tr("LAND_SHIP")
|
||||
dashboard.main_screen_interactable = choosen_run_point != null or GameInfo.game_data.current_run == null
|
||||
dashboard.main_screen_text = tr("LAND_SHIP")
|
||||
dashboard.main_screen_interactable = choosen_run_point != null
|
||||
|
||||
dashboard.destination_visible = choosen_run_point != null
|
||||
if choosen_run_point:
|
||||
dashboard.destination_title_label = tr("DESTINATION")
|
||||
dashboard.destination_longitude = float(choosen_run_point.level) / RunData.RUN_POINT_MAX_LEVEL
|
||||
dashboard.destination_label = choosen_run_point.region_parameter.region_name
|
||||
dashboard.stop_title = tr("NEXT_STOP")
|
||||
dashboard.stop_name = choosen_run_point.region_parameter.region_name
|
||||
dashboard.status_text = ""
|
||||
else:
|
||||
dashboard.status_text = tr("CHOOSE_DESTINATION")
|
||||
dashboard.stop_title = tr("LOCATION")
|
||||
dashboard.stop_name = tr("ORBIT")
|
||||
dashboard.status_text = tr("CHOOSE_NEXT_STOP")
|
||||
dashboard.stop_name = ""
|
||||
|
||||
if GameInfo.game_data.current_run:
|
||||
var next_run_points = GameInfo.game_data.current_run.next_run_points
|
||||
if len(next_run_points) > 0:
|
||||
dashboard.left_destination = next_run_points[0]
|
||||
dashboard.left_stop = next_run_points[0]
|
||||
else:
|
||||
dashboard.left_destination = null
|
||||
dashboard.left_stop = null
|
||||
|
||||
if len(next_run_points) > 1:
|
||||
dashboard.right_destination = next_run_points[1]
|
||||
dashboard.right_stop = next_run_points[1]
|
||||
else:
|
||||
dashboard.right_destination = null
|
||||
dashboard.right_stop = null
|
||||
else :
|
||||
|
||||
dashboard.destination_visible = false
|
||||
dashboard.main_screen_icon = TAKE_OFF_ICON
|
||||
dashboard.main_screen_label = tr("TAKE_OFF")
|
||||
dashboard.main_screen_text = tr("TAKE_OFF")
|
||||
dashboard.main_screen_interactable = can_take_off
|
||||
|
||||
dashboard.left_destination = null
|
||||
dashboard.right_destination = null
|
||||
dashboard.left_stop = null
|
||||
dashboard.right_stop = null
|
||||
|
||||
dashboard.destination_visible = current_region_data != null
|
||||
if current_region_data:
|
||||
dashboard.destination_title_label = tr("LOCATION")
|
||||
dashboard.destination_label = current_region_data.region_name
|
||||
dashboard.destination_longitude = float(current_region_data.region_level) / RunData.RUN_POINT_MAX_LEVEL
|
||||
dashboard.stop_title = tr("LOCATION")
|
||||
dashboard.stop_name = current_region_data.region_name
|
||||
|
||||
dashboard.status_text = "" if can_take_off else tr("NO_MORE_ENERGY")
|
||||
|
||||
@@ -13,19 +13,18 @@ signal right_screen_activated
|
||||
signal left_screen_activated
|
||||
|
||||
@export var main_screen_icon : Texture : set = set_main_screen_icon
|
||||
@export var main_screen_label : String : set = set_main_screen_label
|
||||
@export var main_screen_text : String : set = set_main_screen_label
|
||||
@export var main_screen_interactable : bool : set = set_main_screen_interactable
|
||||
|
||||
@export var destination_label : String : set = set_destination_label
|
||||
@export var destination_title_label : String : set = set_destination_title_label
|
||||
@export var destination_visible : bool : set = set_destination_visible
|
||||
|
||||
@export var destination_longitude : float : set = set_destination_longitude
|
||||
@export var stop_name : String : set = set_stop_label
|
||||
@export var stop_title : String : set = set_stop_title_label
|
||||
@export var destination_distance : int
|
||||
@export var destination_title : String : set = set_destination_title
|
||||
|
||||
@export var status_text : String : set = set_status_text
|
||||
|
||||
@export var left_destination : RunPoint = null : set = set_left_destination
|
||||
@export var right_destination : RunPoint = null : set = set_right_destination
|
||||
@export var left_stop : RunPoint = null : set = set_left_stop
|
||||
@export var right_stop : RunPoint = null : set = set_right_stop
|
||||
|
||||
func _ready():
|
||||
%MainScreen.clicked.connect(func(): main_screen_activated.emit())
|
||||
@@ -35,24 +34,30 @@ func _ready():
|
||||
set_main_screen_icon()
|
||||
set_main_screen_label()
|
||||
set_main_screen_interactable()
|
||||
set_destination_label()
|
||||
set_destination_title_label()
|
||||
set_destination_visible()
|
||||
set_destination_longitude()
|
||||
set_stop_label()
|
||||
set_stop_title_label()
|
||||
set_destination_title()
|
||||
set_status_text()
|
||||
set_left_destination()
|
||||
set_right_destination()
|
||||
set_left_stop()
|
||||
set_right_stop()
|
||||
%HoloContent.distance = destination_distance
|
||||
|
||||
if not Engine.is_editor_hint() and GameInfo.game_data.player_data:
|
||||
%Inventory3D.update(GameInfo.game_data.player_data.inventory)
|
||||
|
||||
func _process(_d):
|
||||
if %HoloContent.distance < destination_distance:
|
||||
%HoloContent.distance = ceili(lerp(float(%HoloContent.distance), float(destination_distance), 0.05))
|
||||
else:
|
||||
%HoloContent.distance = floori(lerp(float(%HoloContent.distance), float(destination_distance), 0.05))
|
||||
|
||||
func set_main_screen_icon(v : Texture = main_screen_icon):
|
||||
main_screen_icon = v
|
||||
if is_node_ready():
|
||||
%MainScreenIcon.texture = v
|
||||
|
||||
func set_main_screen_label(v : String = main_screen_label):
|
||||
main_screen_label = v
|
||||
func set_main_screen_label(v : String = main_screen_text):
|
||||
main_screen_text = v
|
||||
if is_node_ready():
|
||||
%MainScreenLabel.text = v
|
||||
|
||||
@@ -62,74 +67,66 @@ func set_main_screen_interactable(v : bool = main_screen_interactable):
|
||||
%MainScreenSprite.visible = v
|
||||
%MainScreen.interactable = v
|
||||
|
||||
func set_destination_label(v := destination_label):
|
||||
destination_label = v
|
||||
func set_stop_label(v := stop_name):
|
||||
stop_name = v
|
||||
if is_node_ready():
|
||||
%DestinationLabel.text = v
|
||||
%HoloContent.stop_name = v
|
||||
|
||||
func set_destination_title_label(v := destination_title_label):
|
||||
destination_title_label = v
|
||||
func set_stop_title_label(v := stop_title):
|
||||
stop_title = v
|
||||
if is_node_ready():
|
||||
%DestinationTitleLabel.text = v
|
||||
%HoloContent.stop_title = v
|
||||
|
||||
func set_destination_visible(v := destination_visible):
|
||||
destination_visible = v
|
||||
func set_destination_title(v := destination_title):
|
||||
destination_title = v
|
||||
if is_node_ready():
|
||||
%DestinationScreen.visible = v
|
||||
|
||||
func set_destination_longitude(v := destination_longitude):
|
||||
destination_longitude = v
|
||||
if is_node_ready():
|
||||
%Planet3dHoloArrow.position = (
|
||||
Vector3.DOWN * (PLANET_3D_HOLO_RADIUS * 2 * destination_longitude - PLANET_3D_HOLO_RADIUS - PLANET_3D_HOLO_ARROW_SIZE)
|
||||
+ Vector3.FORWARD * PLANET_3D_HOLO_RADIUS
|
||||
)
|
||||
%HoloContent.distance_title = v
|
||||
|
||||
func set_status_text(v := status_text):
|
||||
status_text = v
|
||||
if is_node_ready():
|
||||
%StatusLabel.text = v
|
||||
|
||||
func set_left_destination(v := left_destination):
|
||||
left_destination = v
|
||||
func set_left_stop(v := left_stop):
|
||||
left_stop = v
|
||||
if is_node_ready():
|
||||
%LeftScreenAction.visible = left_destination != null
|
||||
%LeftScreen.interactable = left_destination != null
|
||||
%LeftScreenStats.visible = left_destination != null
|
||||
%LeftScreenInfos.visible = left_destination and len(left_destination.region_parameter.modifiers) > 0
|
||||
if left_destination:
|
||||
%LeftScreenAction.visible = left_stop != null
|
||||
%LeftScreen.interactable = left_stop != null
|
||||
%LeftScreenStats.visible = left_stop != null
|
||||
%LeftScreenInfos.visible = left_stop and len(left_stop.region_parameter.modifiers) > 0
|
||||
if left_stop:
|
||||
%LeftScreenActionIcon.texture = LAND_ICON
|
||||
%LeftScreenActionLabel.text = left_destination.region_parameter.get_region_name()
|
||||
%LeftScreenActionLabel.text = left_stop.region_parameter.get_region_name()
|
||||
|
||||
%LeftScreenStat1Icon.texture = GROWTH_ICON
|
||||
%LeftScreenStat1Label.text = str(left_destination.region_parameter.get_objective())
|
||||
%LeftScreenStat1Label.text = str(left_stop.region_parameter.get_objective())
|
||||
|
||||
%LeftScreenStat2Icon.texture = CHARGE_ICON
|
||||
%LeftScreenStat2Label.text = str(left_destination.region_parameter.get_charge())
|
||||
%LeftScreenStat2Label.text = str(left_stop.region_parameter.get_charge())
|
||||
|
||||
if len(left_destination.region_parameter.modifiers) > 0:
|
||||
var modifier : RegionModifier = left_destination.region_parameter.modifiers[0]
|
||||
if len(left_stop.region_parameter.modifiers) > 0:
|
||||
var modifier : RegionModifier = left_stop.region_parameter.modifiers[0]
|
||||
%LeftScreenInfoTitle.text = "%s %d" % [ modifier.get_modifier_name(), modifier.level ]
|
||||
%LeftScreenInfoText.text = modifier.get_description()
|
||||
|
||||
func set_right_destination(v := right_destination):
|
||||
right_destination = v
|
||||
func set_right_stop(v := right_stop):
|
||||
right_stop = v
|
||||
if is_node_ready():
|
||||
%RightScreenAction.visible = right_destination != null
|
||||
%RightScreen.interactable = right_destination != null
|
||||
%RightScreenStats.visible = right_destination != null
|
||||
%RightScreenInfos.visible = right_destination and len(right_destination.region_parameter.modifiers) > 0
|
||||
if right_destination:
|
||||
%RightScreenAction.visible = right_stop != null
|
||||
%RightScreen.interactable = right_stop != null
|
||||
%RightScreenStats.visible = right_stop != null
|
||||
%RightScreenInfos.visible = right_stop and len(right_stop.region_parameter.modifiers) > 0
|
||||
if right_stop:
|
||||
%RightScreenActionIcon.texture = LAND_ICON
|
||||
%RightScreenActionLabel.text = right_destination.region_parameter.get_region_name()
|
||||
%RightScreenActionLabel.text = right_stop.region_parameter.get_region_name()
|
||||
|
||||
%RightScreenStat1Icon.texture = GROWTH_ICON
|
||||
%RightScreenStat1Label.text = str(right_destination.region_parameter.get_objective())
|
||||
%RightScreenStat1Label.text = str(right_stop.region_parameter.get_objective())
|
||||
|
||||
%RightScreenStat2Icon.texture = CHARGE_ICON
|
||||
%RightScreenStat2Label.text = str(right_destination.region_parameter.get_charge())
|
||||
%RightScreenStat2Label.text = str(right_stop.region_parameter.get_charge())
|
||||
|
||||
if len(right_destination.region_parameter.modifiers) > 0:
|
||||
var modifier : RegionModifier = right_destination.region_parameter.modifiers[0]
|
||||
if len(right_stop.region_parameter.modifiers) > 0:
|
||||
var modifier : RegionModifier = right_stop.region_parameter.modifiers[0]
|
||||
%RightScreenInfoTitle.text = "%s %d" % [ modifier.get_modifier_name(), modifier.level ]
|
||||
%RightScreenInfoText.text = modifier.get_description()
|
||||
|
||||
39
stages/3d_scenes/cockpit_scene/scripts/holo_content.gd
Normal file
39
stages/3d_scenes/cockpit_scene/scripts/holo_content.gd
Normal file
@@ -0,0 +1,39 @@
|
||||
@tool
|
||||
extends HBoxContainer
|
||||
|
||||
@export var distance : int = 20000 : set = set_distance
|
||||
@export var distance_title : String = "TO_BOREA_BASE" : set = set_distance_title
|
||||
@export var stop_name : String = "" : set = set_stop_name
|
||||
@export var stop_title : String = "NEXT_STOP" : set = set_stop_title
|
||||
|
||||
func _ready():
|
||||
set_distance()
|
||||
set_stop_name()
|
||||
set_stop_title()
|
||||
|
||||
func set_distance(v : int = distance):
|
||||
distance = v
|
||||
if is_node_ready():
|
||||
var str_distance = str(distance)
|
||||
var nb_len = len(str_distance)
|
||||
var shift = 0
|
||||
for i in range(nb_len):
|
||||
if i%3 == 0:
|
||||
shift += 1
|
||||
str_distance = str_distance.insert(len(str_distance) - i - 2 - shift," ")
|
||||
%DistanceLabel.text = str_distance
|
||||
|
||||
func set_stop_name(v : String = stop_name):
|
||||
stop_name = v
|
||||
if is_node_ready():
|
||||
%NextStopLabel.text = tr(str(v))
|
||||
|
||||
func set_stop_title(v : String = stop_title):
|
||||
stop_title = v
|
||||
if is_node_ready():
|
||||
%NextStopTitleLabel.text = tr(str(v))
|
||||
|
||||
func set_distance_title(v : String = distance_title):
|
||||
distance_title = v
|
||||
if is_node_ready():
|
||||
%DistanceTitleLabel.text = tr(str(v))
|
||||
@@ -0,0 +1 @@
|
||||
uid://d1t0br6cacipb
|
||||
@@ -115,14 +115,16 @@ camera = NodePath("../../Camera")
|
||||
|
||||
[node name="PassDay" parent="." unique_id=1144772570 instance=ExtResource("3_ktnx3")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="RegionGui" type="CanvasLayer" parent="." unique_id=2024485651]
|
||||
layer = 2
|
||||
|
||||
[node name="Tutorial" parent="RegionGui" unique_id=762436685 node_paths=PackedStringArray("player", "region") instance=ExtResource("2_2f6js")]
|
||||
[node name="Tutorial" parent="RegionGui" unique_id=762436685 node_paths=PackedStringArray("player", "region", "game_gui") instance=ExtResource("2_2f6js")]
|
||||
unique_name_in_owner = true
|
||||
player = NodePath("../../Entities/Player")
|
||||
region = NodePath("../..")
|
||||
game_gui = NodePath("../../GameGui")
|
||||
|
||||
[node name="GameGui" parent="." unique_id=1970837239 instance=ExtResource("4_qdnee")]
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@ const GENERATION_NUMBER = 4
|
||||
|
||||
const NOISE_IMAGE_SIZE := 150
|
||||
|
||||
const MAX_DECONTAMINATION_DISTANCE=2
|
||||
const MAX_TALION_DISTANCE=3
|
||||
const MAX_DECONTAMINATION_DISTANCE=0
|
||||
const MAX_TALION_DISTANCE=2
|
||||
|
||||
const RANDOM_PADDING_NOISE_FREQUENCY := 0.01
|
||||
const ROCK_NOISE_FREQUENCY := 0.01
|
||||
const DECONTAMINATION_NOISE_FREQUENCY := 0.01
|
||||
const ROCK_NOISE_FREQUENCY := 0.005
|
||||
const CRISTAL_NOISE_FREQUENCY := 0.008
|
||||
const DECONTAMINATION_NOISE_FREQUENCY := 0.008
|
||||
|
||||
const CHUNK_RANDOM_PADDING := 2
|
||||
|
||||
@@ -71,7 +72,7 @@ func setup_position():
|
||||
func generate():
|
||||
rock_noise_image = generate_noise(region_data.region_seed + 1, ROCK_NOISE_FREQUENCY)
|
||||
decontamination_noise_image = generate_noise(region_data.region_seed + 2, DECONTAMINATION_NOISE_FREQUENCY)
|
||||
cristal_noise_image = generate_noise(region_data.region_seed + 3, ROCK_NOISE_FREQUENCY)
|
||||
cristal_noise_image = generate_noise(region_data.region_seed + 3, CRISTAL_NOISE_FREQUENCY)
|
||||
random_padding_noise = generate_noise(region_data.region_seed + 10, RANDOM_PADDING_NOISE_FREQUENCY)
|
||||
|
||||
all_tiles = calculate_all_tiles()
|
||||
@@ -169,7 +170,7 @@ func generate_noise(
|
||||
var noise: FastNoiseLite = FastNoiseLite.new()
|
||||
noise.seed = noise_seed
|
||||
noise.noise_type = FastNoiseLite.TYPE_SIMPLEX
|
||||
noise.frequency = 0.01
|
||||
noise.frequency = frequency
|
||||
noise.fractal_type = FastNoiseLite.FRACTAL_NONE
|
||||
noise.fractal_weighted_strength = 1.0
|
||||
noise.offset = Vector3(
|
||||
|
||||
@@ -8,7 +8,7 @@ func get_description() -> String:
|
||||
return tr("ARID_MODIFIER_DESC_TEXT")
|
||||
|
||||
func modify_decontamination_threshold(decontamination_threshold : float) -> float:
|
||||
return decontamination_threshold * (1. - 0.2*level)
|
||||
return decontamination_threshold * (0.5)
|
||||
|
||||
func modify_start_decontamination_zone_radius(start_decontamination_zone_radius : int) -> int:
|
||||
return max(1,roundi(start_decontamination_zone_radius * (1. - 0.2*level)))
|
||||
return max(1,roundi(start_decontamination_zone_radius * (0.5)))
|
||||
@@ -8,4 +8,4 @@ func get_description() -> String:
|
||||
return tr("HARSH_MODIFIER_DESC_TEXT")
|
||||
|
||||
func modify_objective(objective : int) -> int:
|
||||
return roundi(objective * (1. + 0.2*level))
|
||||
return roundi(objective * 1.5)
|
||||
@@ -8,4 +8,4 @@ func get_description() -> String:
|
||||
return tr("HUMID_MODIFIER_DESC_TEXT")
|
||||
|
||||
func modify_charge(charge : int) -> int:
|
||||
return charge - level
|
||||
return charge - 2
|
||||
@@ -8,4 +8,4 @@ func get_description() -> String:
|
||||
return tr("POOR_MODIFIER_DESC_TEXT")
|
||||
|
||||
func modify_cristal_threshold(cristal_threshold : float) -> float:
|
||||
return cristal_threshold * (1. - 0.2*level)
|
||||
return cristal_threshold * 0.5
|
||||
@@ -10,10 +10,10 @@ const TILE_SCALE = 1
|
||||
const TILE_SIZE : int = roundi(TILE_SET.tile_size.x * TILE_SCALE)
|
||||
const SPAWN_OBJECT_RANDOM_MOVEMENT = 200
|
||||
|
||||
const CHUNK_TILE_SIZE : int = 20
|
||||
const CHUNK_TILE_SIZE : int = 10
|
||||
const CHUNK_SIZE = CHUNK_TILE_SIZE * TILE_SIZE
|
||||
const CHUNK_LOAD_DISTANCE : int = 1
|
||||
const CHUNK_UNLOAD_DISTANCE : int = 2
|
||||
const CHUNK_LOAD_DISTANCE : int = 2
|
||||
const CHUNK_UNLOAD_DISTANCE : int = 3
|
||||
|
||||
const MAX_GENERATION_THREAD = 1 # Crash when superior to 1
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ extends Resource
|
||||
class_name RegionParameter
|
||||
|
||||
const DEFAULT_ROCK_THRESHOLD = 0.3
|
||||
const DEFAULT_DECONTAMINATION_THRESHOLD = 0.15
|
||||
const DEFAULT_CRISTAL_THRESHOLD = 0.06
|
||||
const DEFAULT_CHARGE = 10
|
||||
const DEFAULT_DECONTAMINATION_THRESHOLD = 0.4
|
||||
const DEFAULT_CRISTAL_THRESHOLD = 0.1
|
||||
const DEFAULT_CHARGE = 8
|
||||
const DEFAULT_START_DECONTAMINATION_ZONE_RADIUS = 3
|
||||
|
||||
@export var region_name : String
|
||||
@@ -14,7 +14,14 @@ const DEFAULT_START_DECONTAMINATION_ZONE_RADIUS = 3
|
||||
@export var modifiers : Array[RegionModifier]
|
||||
|
||||
static func get_objective_by_level(l : int) -> int:
|
||||
return 10 + 5 * l
|
||||
match l:
|
||||
0: return 5
|
||||
1: return 8
|
||||
2: return 10
|
||||
3: return 15
|
||||
4: return 20
|
||||
5: return 30
|
||||
_: return get_objective_by_level(l-1) + (l-3) * 5
|
||||
|
||||
func _init(
|
||||
_level = 0,
|
||||
|
||||
@@ -23,6 +23,12 @@ rock_tiles_data = SubResource("Resource_ame7t")
|
||||
decontamination_tiles_data = SubResource("Resource_0rtv3")
|
||||
metadata/_custom_type_script = "uid://cx30nvq8b34lj"
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_ct7cr"]
|
||||
frequency = 0.0071
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_0rtv3"]
|
||||
noise = SubResource("FastNoiseLite_ct7cr")
|
||||
|
||||
[node name="TestChunk" type="Node2D" unique_id=990498648]
|
||||
|
||||
[node name="Chunk" type="Node2D" parent="." unique_id=709095052]
|
||||
@@ -50,3 +56,6 @@ script = ExtResource("1_mhr83")
|
||||
region_data = SubResource("Resource_tiw8g")
|
||||
chunk_coord = Vector2i(1, 1)
|
||||
metadata/_custom_type_script = "uid://d2ixbaa2uqlv4"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1962434767]
|
||||
texture = SubResource("NoiseTexture2D_0rtv3")
|
||||
|
||||
Reference in New Issue
Block a user