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

@@ -11,12 +11,10 @@ func get_color_image(ind: int) -> Image:
if color_images.size() == 0:
color_images.resize(color_textures.size())
if color_images[ind] == null:
print("get image")
color_images[ind] = color_textures[ind].get_image()
return color_images[ind]
func get_outline_image() -> Image:
if outline_image == null:
print("get image outilne")
outline_image = outline_texture.get_image()
return outline_image

View File

@@ -6,6 +6,8 @@ const ACTION_ICON = preload("res://common/icons/swipe-down.svg")
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
const ONE_TIME_ICON = preload("res://common/icons/circle-number-1.svg")
const DEFAULT_PRESS_TIME = 0.7
enum ItemType {TOOL_ITEM, CONSUMABLE_ITEM}
@export var name: String : get = get_item_name
@@ -36,6 +38,12 @@ func get_usage_zone_radius() -> int:
func is_usage_need_proximity() -> bool:
return true
func is_action_need_press_time() -> bool:
return get_energy_used() > 0
func get_action_press_time() -> float:
return DEFAULT_PRESS_TIME
func get_usage_object_affected(_i : InspectableEntity) -> bool:
return false

View File

@@ -22,6 +22,9 @@ func get_usage_zone_radius() -> int:
func is_usage_need_proximity() -> bool:
return false
func is_action_need_press_time() -> bool:
return true
func can_use(_player : Player, _zone: Player.ActionZone) -> bool:
return true

View File

@@ -96,11 +96,10 @@ func score_update(with_animation = true):
func state_update(region_data : RegionData):
if region_data.state == RegionData.State.SUCCEEDED:
print("C'est gagné !!")
%Alert.text = "SHIP_IS_READY_TO_TAKE_OFF"
if "tutorial" in region_data.flags:
%Alert.text = "TUTORIAL_FINISHED"
%Alert.modulate = Color("25C147")
%Alert.modulate = Color("ffa617ff")
%Alert.appear()
elif region_data.state == RegionData.State.FAILED:
%Alert.text = "NO_RECHARGE_LEFT"
@@ -108,7 +107,6 @@ func state_update(region_data : RegionData):
%Alert.appear()
else:
%Alert.disappear()
print(region_data.state == RegionData.State.FAILED)
%GiveUpButton.visible = region_data.state == RegionData.State.FAILED
func plant_changing_score(plant_data: PlantData, amount : int):

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bhsew2amu3ydx"
path="res://.godot/imported/action_press_time.wav-94144a74154abd8dae9e5128d23613dc.sample"
[deps]
source_file="res://gui/pointer/assets/sounds/action_press_time.wav"
dest_files=["res://.godot/imported/action_press_time.wav-94144a74154abd8dae9e5128d23613dc.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View File

@@ -4,6 +4,7 @@
[ext_resource type="Texture2D" uid="uid://bspffyprdywgc" path="res://gui/pointer/assets/cursors/pointer.svg" id="2_q4bvb"]
[ext_resource type="AudioStream" uid="uid://bym03qp4n6vep" path="res://gui/pointer/assets/sounds/click.wav" id="3_kj0cm"]
[ext_resource type="Texture2D" uid="uid://djb52fosgmv4j" path="res://common/icons/left_click.svg" id="3_pshoq"]
[ext_resource type="AudioStream" uid="uid://bhsew2amu3ydx" path="res://gui/pointer/assets/sounds/action_press_time.wav" id="3_tof6i"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="4_b4uwv"]
[ext_resource type="Script" uid="uid://c60a1bjcuj4hd" path="res://common/vfx/circle/scripts/circle.gd" id="5_b4uwv"]
[ext_resource type="PackedScene" uid="uid://3ss8pvhsackj" path="res://gui/game/card/card_visualiser.tscn" id="6_7j4mj"]
@@ -18,6 +19,19 @@
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="14_efnoc"]
[ext_resource type="Texture2D" uid="uid://df0y0s666ui4h" path="res://icon.png" id="15_dtmaq"]
[sub_resource type="Gradient" id="Gradient_tdpeg"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.018099548, 0.40723982, 0.7058824, 0.97737557)
colors = PackedColorArray(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_tof6i"]
gradient = SubResource("Gradient_tdpeg")
width = 50
height = 50
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1, 0.5)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6eft6"]
shader = ExtResource("7_wgcdp")
shader_parameter/fov = 90.0
@@ -67,10 +81,34 @@ layer = 128
unique_name_in_owner = true
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
mouse_filter = 2
[node name="ActionProgressPlayer" type="AudioStreamPlayer" parent="InspectorCanvasLayer/Inspector" unique_id=276634191]
unique_name_in_owner = true
stream = ExtResource("3_tof6i")
volume_db = -5.0
pitch_scale = 4.0
bus = &"Sfx"
[node name="ActionProgressBar" type="TextureProgressBar" parent="InspectorCanvasLayer/Inspector" unique_id=55992280]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -19.0
offset_top = -17.0
offset_right = 41.0
offset_bottom = 43.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
value = 66.0
fill_mode = 4
texture_progress = SubResource("GradientTexture2D_tof6i")
[node name="Container" type="VBoxContainer" parent="InspectorCanvasLayer/Inspector" unique_id=319962477]
layout_mode = 0
offset_left = 28.0

View File

@@ -9,7 +9,7 @@ const ZONE_DEACTIVATED_COLOR = Color.REBECCA_PURPLE
const CARD_VISUALISATION_TIME = 0.3
const CARD_UP_PADDING = 50
@export var default_cursor : Texture2D
var current_inspect : Node = null
@@ -22,58 +22,23 @@ var current_selected_item : Item = null
var have_energy_to_use_item : bool = false
var could_use_item : bool = false
var can_use_item : bool = false
var press_time := 0.
var press_action_done := false
func _ready():
Input.set_custom_mouse_cursor(default_cursor)
%Action.visible = false
func _input(_event):
if player:
if Input.is_action_just_pressed("move_pointer"):
player.try_move(
player.get_global_mouse_position()
)
if Input.is_action_just_pressed("drop"):
player.drop_item()
if Input.is_action_just_pressed("action"):
if current_inspect is InventoryGuiItemMouseDetector:
GameInfo.game_data.player_data.inventory.set_current_item(inspected.index)
elif can_interact:
var interactable = current_inspect as Interactable
player.try_interact(interactable)
elif can_use_item:
player.try_use_item(
player.data.inventory.get_item(),
player.get_global_mouse_position()
)
func _process(delta):
if player:
process_player_actions(delta)
else :
%ActionProgressBar.value = 0.
if current_inspect != inspected:
time_last_inspected += delta
%Inspector.position = get_viewport().get_mouse_position()
if player:
can_interact = (
current_inspect
and current_inspect is Interactable
and player.can_interact(current_inspect)
)
current_selected_item = player.data.inventory.get_item()
could_use_item = (
current_selected_item
and player.preview_could_use_item(current_selected_item)
)
have_energy_to_use_item = (
current_selected_item
and player.has_energy_to_use_item(current_selected_item)
)
can_use_item = could_use_item and have_energy_to_use_item
if current_selected_item and SceneManager.actual_scene.scene_id == "REGION":
%ActionZone.radius = current_selected_item.usage_zone_radius
%ActionZone.color = ZONE_ACTIVATED_COLOR if can_use_item else ZONE_DEACTIVATED_COLOR
@@ -86,6 +51,75 @@ func _process(delta):
update_inspector()
func process_player_actions(delta : float):
can_interact = (
current_inspect
and current_inspect is Interactable
and player.can_interact(current_inspect)
)
current_selected_item = player.data.inventory.get_item()
could_use_item = (
current_selected_item
and player.preview_could_use_item(current_selected_item)
)
have_energy_to_use_item = (
current_selected_item
and player.has_energy_to_use_item(current_selected_item)
)
can_use_item = could_use_item and have_energy_to_use_item
if Input.is_action_pressed("move_pointer"):
player.try_move(
player.get_global_mouse_position()
)
if Input.is_action_just_pressed("drop"):
player.drop_item()
if (
Input.is_action_pressed("action")
):
if (
can_use_item
and current_selected_item.is_action_need_press_time()
and not press_action_done
and not can_interact
and not current_inspect is InventoryGuiItemMouseDetector
):
press_time += delta
%ActionProgressBar.value = press_time/current_selected_item.get_action_press_time() * 100
if not %ActionProgressPlayer.playing:
%ActionProgressPlayer.play()
%ActionProgressPlayer.pitch_scale = 1. / (current_selected_item.get_action_press_time() / %ActionProgressPlayer.stream.get_length())
if press_time > current_selected_item.get_action_press_time():
player.try_use_item(
current_selected_item,
player.get_global_mouse_position()
)
press_action_done = true
else:
press_action_done = false
press_time = 0
%ActionProgressPlayer.playing = false
%ActionProgressBar.value = 0.
if Input.is_action_just_pressed("action"):
if current_inspect is InventoryGuiItemMouseDetector:
GameInfo.game_data.player_data.inventory.set_current_item(inspected.index)
elif can_interact:
var interactable = current_inspect as Interactable
player.try_interact(interactable)
elif can_use_item and not current_selected_item.is_action_need_press_time():
player.try_use_item(
current_selected_item,
player.get_global_mouse_position()
)
func inspect(node: Node):
if current_inspect and current_inspect != node and current_inspect.has_method("inspect"):
current_inspect.inspect(false)
@@ -131,7 +165,7 @@ func update_card():
func update_inspector():
if player:
if player and not get_tree().paused:
if can_interact and current_inspect and current_inspect is Interactable:
%Action.visible = true
%ActionText.text = current_inspect.interact_text()

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()

View File

@@ -168,15 +168,6 @@ position = Vector2(2, 7)
texture = ExtResource("10_ktnx3")
lifetime = 8.0
trail_enabled = true
trail_lifetime = 0.09999999999999999
trail_sections = 16
process_material = SubResource("ParticleProcessMaterial_mlppq")
[node name="Fog" type="GPUParticles2D" parent="Camera" unique_id=1024566195]
position = Vector2(2, 7)
texture = ExtResource("10_ktnx3")
lifetime = 8.0
trail_enabled = true
trail_lifetime = 0.09999999999999999
trail_lifetime = 0.1
trail_sections = 16
process_material = SubResource("ParticleProcessMaterial_mlppq")

View File

@@ -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
return decontamination_threshold * (1. - 0.2*level)
func modify_start_decontamination_zone_radius(start_decontamination_zone_radius : int) -> int:
return start_decontamination_zone_radius
return max(1,roundi(start_decontamination_zone_radius * (1. - 0.2*level)))

View File

@@ -0,0 +1,11 @@
extends RegionModifier
class_name HarshModifier
func get_modifier_name() -> String:
return tr("HARSH")
func get_description() -> String:
return tr("HARSH_MODIFIER_DESC_TEXT")
func modify_objective(objective : int) -> int:
return roundi(objective * (1. + 0.2*level))

View File

@@ -0,0 +1 @@
uid://bhpx4mw3b083h

View File

@@ -0,0 +1,11 @@
extends RegionModifier
class_name HumidModifier
func get_modifier_name() -> String:
return tr("HUMID")
func get_description() -> String:
return tr("HUMID_MODIFIER_DESC_TEXT")
func modify_charge(charge : int) -> int:
return charge - level

View File

@@ -0,0 +1,11 @@
extends RegionModifier
class_name PoorModifier
func get_modifier_name() -> String:
return tr("POOR")
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)

View File

@@ -0,0 +1 @@
uid://dtb1g7st67aox

View File

@@ -211,4 +211,12 @@ ASTRA_FACTORY_TEXT,Production factory of Astra base,Usine de production de la ba
MYSTERIOUS_DOOR,Mysterious Door,Porte mystérieuse
MYSTERIOUS_DOOR_TEXT,"This door has a space ship logo on it... What could it be ?","Cette porte à un logo de vaisseau marqué dessus... Que peut-il y avoir à l'intérieur ?"
BOREA_BASE,Borea Base,Base Boréa
BOREA_BASE_DESC_TEXT,Base where demeter is located,La base où se trouve Demeter
BOREA_BASE_DESC_TEXT,Base where demeter is located,La base où se trouve Demeter
ARID,Arid,Aride
ARID_MODIFIER_DESC_TEXT,Reduce base [b]Fertile Zone[/b] in this region,Réduit la [b]Zone Fertile[/b] de base de la région
HARSH,Harsh,Rude
HARSH_MODIFIER_DESC_TEXT,Increases the [b]Plant Points[/b] needed,Augmente le nombre de [b]Points de Plantes[/b] nécessaires
HUMID,Humid,Humide
HUMID_MODIFIER_DESC_TEXT,Reduce the number of [b]Recharge[/b],Réduit le nombre de [b]Recharge[/b]
POOR,Poor,Pauvre
POOR_MODIFIER_DESC_TEXT,Reduce the number of [b]Talion Veins[/b],Réduit le nombre de [b]Veine de Talion[/b]
1 keys en fr
211 POOR Poor Pauvre
212 POOR_MODIFIER_DESC_TEXT Reduce the number of [b]Talion Veins[/b] Réduit le nombre de [b]Veine de Talion[/b]
213
214
215
216
217
218
219
220
221
222