ajout des actions demandant un clic long et dev des region modifier

This commit is contained in:
2026-02-27 13:45:31 +01:00
parent e942250918
commit 8879c9d42b
18 changed files with 334 additions and 78 deletions

View File

@@ -6,6 +6,10 @@
[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="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="8_f5peh"]
@@ -13,10 +17,26 @@
[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"]
[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.008863045261805778
metadata/_custom_type_script = "uid://b4eimt3v08jhc"
[sub_resource type="ViewportTexture" id="ViewportTexture_cvt2p"]
viewport_path = NodePath("DestinationScreen/SubViewport")
[sub_resource type="FastNoiseLite" id="FastNoiseLite_5d7hc"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_kh1yg"]
frequency = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5d7hc"]
@@ -79,6 +99,13 @@ viewport_path = NodePath("RightScreen/RightScreenStats/SubViewport")
font = ExtResource("8_f5peh")
font_size = 20
[sub_resource type="ViewportTexture" id="ViewportTexture_stoj6"]
viewport_path = NodePath("RightScreen/RightScreenInfos/SubViewport")
[sub_resource type="LabelSettings" id="LabelSettings_2d2u0"]
font = ExtResource("8_f5peh")
font_size = 20
[sub_resource type="SphereShape3D" id="SphereShape3D_2q8cl"]
[sub_resource type="Animation" id="Animation_2kujw"]
@@ -124,6 +151,9 @@ viewport_path = NodePath("LeftScreen/LeftScreenAction/SubViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_2q8cl"]
viewport_path = NodePath("LeftScreen/LeftScreenStats/SubViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_h8fs1"]
viewport_path = NodePath("LeftScreen/LeftScreenInfos/SubViewport")
[sub_resource type="SphereShape3D" id="SphereShape3D_2kujw"]
[sub_resource type="Animation" id="Animation_cvt2p"]
@@ -169,7 +199,8 @@ main_screen_icon = ExtResource("2_vlkbw")
main_screen_label = "Take Off"
destination_label = "South"
destination_title_label = "DESTINATION"
status_text = "<null>"
left_destination = SubResource("Resource_qm808")
right_destination = SubResource("Resource_qm808")
[node name="DestinationScreen" type="Sprite3D" parent="." unique_id=1067303692]
unique_name_in_owner = true
@@ -181,7 +212,7 @@ texture = SubResource("ViewportTexture_cvt2p")
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_5d7hc")
noise = SubResource("FastNoiseLite_kh1yg")
height = 0.625
terrain_material = SubResource("StandardMaterial3D_5d7hc")
water_level = 0.0
@@ -313,7 +344,6 @@ libraries/ = SubResource("AnimationLibrary_2ofl5")
unique_name_in_owner = true
transform = Transform3D(0.6401096, -0.4515857, -0.6215544, 0, 0.809017, -0.58778524, 0.76828337, 0.37624705, 0.51785964, -0.7, 0.5, -0.15)
script = ExtResource("1_vlkbw")
interactable = false
hover_animation_player = NodePath("HoverAnimationPlayer")
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
@@ -323,7 +353,6 @@ transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
[node name="RightScreenAction" type="Sprite3D" parent="RightScreen" unique_id=1289027629]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -1.509958e-07, 0, 1.0000002, 0, 1.509958e-07, 0, -1, -0.18746918, -0.04759717, -0.04654131)
visible = false
pixel_size = 0.002
texture = SubResource("ViewportTexture_2ofl5")
@@ -353,7 +382,7 @@ 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 = "Uqoneso"
text = "Uwoqos"
label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
@@ -361,7 +390,6 @@ vertical_alignment = 1
[node name="RightScreenStats" type="Sprite3D" parent="RightScreen" unique_id=282782621]
unique_name_in_owner = true
transform = Transform3D(-1, -5.5879354e-08, 1.1920929e-07, -2.9802322e-08, 0.86602557, -0.50000024, -2.0861626e-07, -0.5000001, -0.86602545, -0.14474958, 0.2707073, -0.057207607)
visible = false
pixel_size = 0.002
texture = SubResource("ViewportTexture_f5peh")
@@ -397,7 +425,7 @@ stretch_mode = 5
[node name="RightScreenStat1Label" type="Label" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat1" unique_id=965157290]
unique_name_in_owner = true
layout_mode = 2
text = "10"
text = "0"
label_settings = SubResource("LabelSettings_2kujw")
horizontal_alignment = 1
vertical_alignment = 1
@@ -417,11 +445,52 @@ stretch_mode = 5
[node name="RightScreenStat2Label" type="Label" parent="RightScreen/RightScreenStats/SubViewport/HBoxContainer/RightScreenStat2" unique_id=1607645733]
unique_name_in_owner = true
layout_mode = 2
text = "10"
text = "0"
label_settings = SubResource("LabelSettings_2kujw")
horizontal_alignment = 1
vertical_alignment = 1
[node name="RightScreenInfos" type="Sprite3D" parent="RightScreen" unique_id=449647859]
unique_name_in_owner = true
transform = Transform3D(-0.9902686, -2.9802322e-08, -0.13917324, 0, 1.0000002, -1.4901161e-08, 0.13917324, 5.9604645e-08, -0.99026823, 0.293737, 0.079518735, -0.035522263)
pixel_size = 0.002
texture = SubResource("ViewportTexture_stoj6")
[node name="SubViewport" type="SubViewport" parent="RightScreen/RightScreenInfos" unique_id=606992481]
transparent_bg = true
size = Vector2i(117, 138)
[node name="HBoxContainer" type="VBoxContainer" parent="RightScreen/RightScreenInfos/SubViewport" unique_id=112944532]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_constants/separation = 10
[node name="RightScreenInfoTitle" type="Label" parent="RightScreen/RightScreenInfos/SubViewport/HBoxContainer" unique_id=1621744309]
unique_name_in_owner = true
layout_mode = 2
text = "Hello"
label_settings = SubResource("LabelSettings_2d2u0")
horizontal_alignment = 1
autowrap_mode = 2
[node name="RightScreenInfoText" type="RichTextLabel" parent="RightScreen/RightScreenInfos/SubViewport/HBoxContainer" unique_id=2134092583]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/normal_font_size = 14
theme_override_font_sizes/bold_font_size = 14
theme_override_font_sizes/bold_italics_font_size = 14
theme_override_font_sizes/italics_font_size = 14
theme_override_font_sizes/mono_font_size = 14
bbcode_enabled = true
text = "Lorem ipsum dolor sir amet"
fit_content = true
horizontal_alignment = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="RightScreen" unique_id=1017949170]
shape = SubResource("SphereShape3D_2q8cl")
@@ -432,7 +501,6 @@ libraries/ = SubResource("AnimationLibrary_cvt2p")
unique_name_in_owner = true
transform = Transform3D(-0.6401098, -0.4515857, -0.6215544, 0, -0.809017, 0.58778524, 0.7682836, -0.37624705, -0.51785964, 0.7, 0.5, -0.15)
script = ExtResource("1_vlkbw")
interactable = false
hover_animation_player = NodePath("HoverAnimationPlayer")
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
@@ -442,7 +510,6 @@ transform = Transform3D(-0.99999976, 0, 0, 0, -1, 0, 0, 0, -0.99999994, 0, 0, 0)
[node name="LeftScreenAction" type="Sprite3D" parent="LeftScreen" unique_id=764341277]
unique_name_in_owner = true
transform = Transform3D(1, 1.5099579e-07, 1.509958e-07, 1.509958e-07, -1.0000001, -1.4901158e-07, 1.5099577e-07, 1.4901163e-07, -1, -0.21238875, 0.06833798, 0.06593077)
visible = false
pixel_size = 0.002
texture = SubResource("ViewportTexture_2kujw")
@@ -472,15 +539,14 @@ 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 = "Ocaci"
text = "Ujuqyt"
label_settings = ExtResource("1_sp2xx")
horizontal_alignment = 1
vertical_alignment = 1
[node name="LeftScreenStats" type="Sprite3D" parent="LeftScreen" unique_id=2023558675]
unique_name_in_owner = true
transform = Transform3D(0.9999999, -6.3329935e-08, -1.1920929e-07, 0, -0.8660254, -0.50000006, 2.9802322e-08, 0.50000006, -0.86602545, -0.17741072, -0.26158184, 0.06797934)
visible = false
transform = Transform3D(0.9999999, -1.0058284e-07, -1.1920929e-07, 2.9802322e-08, -0.8660252, -0.50000006, 2.9802322e-08, 0.5000003, -0.86602545, -0.16182363, -0.27932125, 0.064277686)
pixel_size = 0.002
texture = SubResource("ViewportTexture_2q8cl")
@@ -541,6 +607,47 @@ label_settings = SubResource("LabelSettings_2kujw")
horizontal_alignment = 1
vertical_alignment = 1
[node name="LeftScreenInfos" type="Sprite3D" parent="LeftScreen" unique_id=409182409]
unique_name_in_owner = true
transform = Transform3D(0.9902684, 1.2166894e-08, 0.13917312, 0, -0.9999996, 8.7422784e-08, 0.13917315, -8.6571944e-08, -0.9902682, 0.28543925, -0.055610895, 0.046822492)
pixel_size = 0.002
texture = SubResource("ViewportTexture_h8fs1")
[node name="SubViewport" type="SubViewport" parent="LeftScreen/LeftScreenInfos" unique_id=1150656373]
transparent_bg = true
size = Vector2i(117, 138)
[node name="HBoxContainer" type="VBoxContainer" parent="LeftScreen/LeftScreenInfos/SubViewport" unique_id=667177655]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_constants/separation = 10
[node name="LeftScreenInfoTitle" type="Label" parent="LeftScreen/LeftScreenInfos/SubViewport/HBoxContainer" unique_id=743864123]
unique_name_in_owner = true
layout_mode = 2
text = "Hello hella"
label_settings = SubResource("LabelSettings_2d2u0")
horizontal_alignment = 1
autowrap_mode = 2
[node name="LeftScreenInfoText" type="RichTextLabel" parent="LeftScreen/LeftScreenInfos/SubViewport/HBoxContainer" unique_id=101599500]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/normal_font_size = 14
theme_override_font_sizes/bold_font_size = 14
theme_override_font_sizes/bold_italics_font_size = 14
theme_override_font_sizes/italics_font_size = 14
theme_override_font_sizes/mono_font_size = 14
bbcode_enabled = true
text = "Lorem ipsum dolor sir amet"
fit_content = true
horizontal_alignment = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="LeftScreen" unique_id=1983450336]
shape = SubResource("SphereShape3D_2kujw")

View File

@@ -93,6 +93,7 @@ func set_left_destination(v := left_destination):
%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:
%LeftScreenActionIcon.texture = LAND_ICON
%LeftScreenActionLabel.text = left_destination.region_parameter.get_region_name()
@@ -102,6 +103,11 @@ func set_left_destination(v := left_destination):
%LeftScreenStat2Icon.texture = CHARGE_ICON
%LeftScreenStat2Label.text = str(left_destination.region_parameter.get_charge())
if len(left_destination.region_parameter.modifiers) > 0:
var modifier : RegionModifier = left_destination.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
@@ -109,6 +115,7 @@ func set_right_destination(v := right_destination):
%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:
%RightScreenActionIcon.texture = LAND_ICON
%RightScreenActionLabel.text = right_destination.region_parameter.get_region_name()
@@ -118,3 +125,8 @@ func set_right_destination(v := right_destination):
%RightScreenStat2Icon.texture = CHARGE_ICON
%RightScreenStat2Label.text = str(right_destination.region_parameter.get_charge())
if len(right_destination.region_parameter.modifiers) > 0:
var modifier : RegionModifier = right_destination.region_parameter.modifiers[0]
%RightScreenInfoTitle.text = "%s %d" % [ modifier.get_modifier_name(), modifier.level ]
%RightScreenInfoText.text = modifier.get_description()