Dev pour la beta 1.4

* Changements de la texture des cristaux de Talion dans tous les assets 3D pour correspondre aux assets 2D
* Ajout d'un évenement en fin de région, une résurgence de Talion qui décontamine et fait looter les plantes mature aux alentours
* Ajout d'un path finding sur le mouvement du robot
* Modification du flow des actions à la souris : ajout d'un nouveau son, d'un icône à l'emplacement de l'action
* Modification du nombre et de l'ordre de mutation débloquées
* Augmentation de la valeur maximale de zoom
* Modification des scores à atteindre dans les premières régions
* Modification de l'interface du vaisseau, laissant apparaitre une roadmap plus claire, et laissant inspecter l'inventaire actuel
* Modification de l'icône d'action dans les scènes 3D
* Augmentation de la zone d'écart entre les plantes, et augmentation du taux de zone fertile en conséquence
* La station de recharge devient inutilisable après la fin de la région
* Ajout d'une transparence lors de la sélection d'objets derrières d'autres objets
* Les plantes juvéniles donneront toujours une graine si coupées
* Ajout d'un bouclage sur les couleurs des mutations
* Fix des hitbox des plantes pour l'inspection à la souris
* Fix de plusieurs bugs sur la manipulation de l'inventaire
* Ajout de nombreux screenshots d'utilisation des outils lors du tutoriel
* Amélioration mineure de la traduction/wording
This commit is contained in:
2026-05-17 02:29:55 +02:00
parent 73b0bf2d33
commit 8efe8bce36
126 changed files with 1955 additions and 463 deletions

View File

@@ -7,6 +7,7 @@
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_aao0q"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="4_yjj5u"]
[ext_resource type="Script" uid="uid://bqisp5hjs06rj" path="res://gui/game/announce/scripts/announce_inspectable.gd" id="6_aao0q"]
[ext_resource type="Texture2D" uid="uid://df0y0s666ui4h" path="res://icon.png" id="7_aao0q"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="9_b6hac"]
[sub_resource type="ViewportTexture" id="ViewportTexture_huxc5"]
@@ -27,7 +28,7 @@ font_size = 50
font_color = Color(1, 0.6509804, 0.09019608, 1)
[sub_resource type="ViewportTexture" id="ViewportTexture_aao0q"]
viewport_path = NodePath("AnnounceContainer/ObjectVisualiser/SubViewport")
viewport_path = NodePath("AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport")
[sub_resource type="Animation" id="Animation_aao0q"]
length = 0.001
@@ -178,6 +179,7 @@ layout_mode = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Particles" type="TextureRect" parent="." unique_id=691167186]
z_index = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -232,33 +234,76 @@ text = "Pelle"
label_settings = SubResource("LabelSettings_6qyp1")
horizontal_alignment = 1
[node name="ObjectVisualiser" type="TextureRect" parent="AnnounceContainer" unique_id=1529068201]
[node name="HBoxContainer" type="GridContainer" parent="AnnounceContainer" unique_id=802355154]
layout_mode = 2
size_flags_horizontal = 4
theme_override_constants/h_separation = 87
columns = 3
[node name="Control" type="VBoxContainer" parent="AnnounceContainer/HBoxContainer" unique_id=316081338]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
alignment = 1
[node name="AnnounceDesc" type="RichTextLabel" parent="AnnounceContainer/HBoxContainer/Control" unique_id=1675704602]
unique_name_in_owner = true
layout_mode = 2
theme_override_fonts/normal_font = ExtResource("4_aao0q")
theme_override_fonts/bold_font = ExtResource("4_aao0q")
theme_override_fonts/bold_italics_font = ExtResource("4_aao0q")
theme_override_fonts/italics_font = ExtResource("4_aao0q")
theme_override_fonts/mono_font = ExtResource("4_aao0q")
theme_override_font_sizes/normal_font_size = 20
theme_override_font_sizes/bold_font_size = 20
theme_override_font_sizes/bold_italics_font_size = 20
theme_override_font_sizes/italics_font_size = 20
theme_override_font_sizes/mono_font_size = 20
bbcode_enabled = true
text = "This tool is used to blablablabla"
fit_content = true
autowrap_mode = 2
horizontal_alignment = 1
[node name="ObjectVisualiser" type="TextureRect" parent="AnnounceContainer/HBoxContainer" unique_id=1529068201]
unique_name_in_owner = true
z_index = 2
layout_mode = 2
size_flags_horizontal = 4
mouse_filter = 0
texture = SubResource("ViewportTexture_aao0q")
stretch_mode = 5
script = ExtResource("6_aao0q")
[node name="SubViewport" type="SubViewport" parent="AnnounceContainer/ObjectVisualiser" unique_id=403959884]
[node name="SubViewport" type="SubViewport" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser" unique_id=403959884]
own_world_3d = true
transparent_bg = true
size = Vector2i(300, 300)
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=986671004]
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=986671004]
unique_name_in_owner = true
transform = Transform3D(0.5251642, 0.51167643, -0.6798119, -0.8508927, 0.32199714, -0.4149924, 0.0065870024, 0.7963845, 0.6045711, 0, 0, 0)
transform = Transform3D(-0.054461285, 0.73170173, 0.6795513, -0.8508927, 0.32199714, -0.4149924, -0.52245957, -0.6008157, 0.60510355, 0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1788331074]
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=1788331074]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1)
keep_aspect = 0
current = true
fov = 20.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=296795988]
[node name="WorldEnvironment" type="WorldEnvironment" parent="AnnounceContainer/HBoxContainer/ObjectVisualiser/SubViewport" unique_id=296795988]
environment = ExtResource("4_yjj5u")
[node name="Control3" type="VBoxContainer" parent="AnnounceContainer/HBoxContainer" unique_id=1699222883]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
alignment = 1
[node name="AnnounceImage" type="TextureRect" parent="AnnounceContainer/HBoxContainer/Control3" unique_id=291872035]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("7_aao0q")
expand_mode = 4
stretch_mode = 5
[node name="OkButton" type="Button" parent="AnnounceContainer" unique_id=56162930]
unique_name_in_owner = true
layout_mode = 2

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctthl6arolwgv"
path="res://.godot/imported/detector.png-5b74af2127c132dd4b571fa880e19088.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/announce/screenshots/detector.png"
dest_files=["res://.godot/imported/detector.png-5b74af2127c132dd4b571fa880e19088.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dprd77l2y7c3u"
path="res://.godot/imported/fork.png-d60826a524b93f90b3c53fad53cb4507.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/announce/screenshots/fork.png"
dest_files=["res://.godot/imported/fork.png-d60826a524b93f90b3c53fad53cb4507.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://idqv6f2w46h4"
path="res://.godot/imported/pickaxe.png-581e6e1ec785ec3f6ccdd57812a72d40.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/announce/screenshots/pickaxe.png"
dest_files=["res://.godot/imported/pickaxe.png-581e6e1ec785ec3f6ccdd57812a72d40.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -2,12 +2,21 @@
extends Resource
class_name AnnouceObject
var desc := ""
var image : Texture = null
@abstract func get_3d_object() -> Node3D
@abstract func get_title() -> String
@abstract func get_text() -> String
func get_desc() -> String:
return desc
func get_image() -> Texture:
return image
@abstract func get_card_info() -> CardInfo
@abstract func _on_dismiss()

View File

@@ -6,8 +6,14 @@ const ITEM_3D_SCENE = preload("res://gui/game/inventory_gui/inventory_item/inven
@export var tool_item : Item
func _init(_tool_item : Item):
func _init(
_tool_item : Item,
_image : Texture = null,
_desc := _tool_item.get_description(),
):
tool_item = _tool_item
desc = _desc
image = _image
func get_3d_object() -> Node3D:
var new_object = ITEM_3D_SCENE.instantiate() as InventoryItem3D

View File

@@ -21,75 +21,86 @@ const YELLOW_COLOR = Color("e29f32")
const RED_COLOR = Color("f20058")
func _ready():
set_announce_object()
%OkButton.button_down.connect(_on_ok_button_down)
hide()
set_announce_object()
%OkButton.button_down.connect(_on_ok_button_down)
hide()
GameInfo.game_data.player_data.inventory.tool_added.connect(
func (i : Item):
if not i.name in GameInfo.game_data.item_announced:
announce_objects.append(AnnounceTool.new(i))
GameInfo.game_data.item_announced.append(i.name)
)
GameInfo.game_data.player_data.inventory.tool_added.connect(
func (i : Item):
if not i.name in GameInfo.game_data.item_announced:
announce_objects.append(AnnounceTool.new(i, get_screenshots_for_item(i)))
GameInfo.game_data.item_announced.append(i.name)
)
func _process(delta):
if announce_object == null and not visible and len(announce_objects) > 0:
announce_object = announce_objects.pop_front()
update_rotation(delta)
if announce_object == null and not visible and len(announce_objects) > 0:
announce_object = announce_objects.pop_front()
update_rotation(delta)
func get_screenshots_for_item(i : Item) -> Texture:
if i is Pickaxe:
return preload("res://gui/game/announce/screenshots/pickaxe.png")
if i is Detector:
return preload("res://gui/game/announce/screenshots/detector.png")
if i is Fork:
return preload("res://gui/game/announce/screenshots/fork.png")
return null
func update_rotation(delta):
if visible:
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):
rotating = true
prev_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_released("action"):
rotating = false
object_acceleration = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
if visible:
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):
rotating = true
prev_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_released("action"):
rotating = false
object_acceleration = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
var object_rotation = object_acceleration
var object_rotation = object_acceleration
if rotating:
object_rotation = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
prev_mouse_pos = next_mouse_pos
else :
object_acceleration = object_acceleration.lerp(DEFAULT_OBJECT_ACCELERATION, 0.1)
if rotating:
object_rotation = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
prev_mouse_pos = next_mouse_pos
else :
object_acceleration = object_acceleration.lerp(DEFAULT_OBJECT_ACCELERATION, 0.1)
%AnnouceObject.rotate(Vector3.UP, object_rotation.x * delta)
%AnnouceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
%AnnouceObject.rotate(Vector3.UP, object_rotation.x * delta)
%AnnouceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
func set_announce_object(object := announce_object):
if is_node_ready() and object:
for children in %AnnouceObject.get_children():
children.queue_free()
if is_node_ready() and object:
for children in %AnnouceObject.get_children():
children.queue_free()
%AnnouceObject.add_child(object.get_3d_object())
%AnnouceObject.rotation = Vector3.ZERO
%AnnounceTitle.text = object.get_title()
%AnnounceText.text = object.get_text()
%ObjectVisualiser.info = object.get_card_info()
%AnnouceObject.add_child(object.get_3d_object())
%AnnouceObject.rotation = Vector3.ZERO
%AnnounceTitle.text = object.get_title()
%AnnounceText.text = object.get_text()
%AnnounceDesc.text = object.get_desc()
%AnnounceImage.texture = object.get_image()
%ObjectVisualiser.info = object.get_card_info()
if not visible:
%AnimationPlayer.play("appear")
Pointer.action_disabled = true
AudioManager.play_sfx("Reveal")
elif object == null and visible:
%AnimationPlayer.play_backwards("appear")
get_tree().create_timer(0.2).timeout.connect( # Put a delay to not interfere with the ok button click
func():
Pointer.action_disabled = false
)
announce_object = object
if not visible:
%AnimationPlayer.play("appear")
Pointer.action_disabled = true
AudioManager.play_sfx("Reveal")
elif object == null and visible:
%AnimationPlayer.play_backwards("appear")
get_tree().create_timer(0.2).timeout.connect( # Put a delay to not interfere with the ok button click
func():
Pointer.action_disabled = false
)
announce_object = object
func _on_ok_button_down():
if announce_object:
announce_object._on_dismiss()
announce_object = null
if announce_object:
announce_object._on_dismiss()
announce_object = null

View File

@@ -10,6 +10,9 @@
script = ExtResource("3_ixa47")
metadata/_custom_type_script = "uid://bq7admu4ahs5r"
[sub_resource type="BoxShape3D" id="BoxShape3D_1uxm0"]
size = Vector3(0.21289063, 0.22167969, 0.2841797)
[sub_resource type="Gradient" id="Gradient_ixa47"]
offsets = PackedFloat32Array(0, 0.84549356)
colors = PackedColorArray(0.002722778, 0.0025074463, 0.012722934, 1, 0.0627451, 0.05882353, 0.16862746, 1)
@@ -41,12 +44,14 @@ height = 14
fill_from = Vector2(0, 1)
fill_to = Vector2(0, 0)
[sub_resource type="BoxShape3D" id="BoxShape3D_1uxm0"]
size = Vector3(0.21289063, 0.22167969, 0.2841797)
[node name="InventoryItem3d" type="Node3D" unique_id=797856392]
[node name="InventoryItem3d" type="Area3D" unique_id=1974785723]
script = ExtResource("1_nsad1")
item = SubResource("Resource_g1uf8")
interactable = null
inspectable = true
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=2020875183]
shape = SubResource("BoxShape3D_1uxm0")
[node name="Model" parent="." unique_id=1055300734 instance=ExtResource("2_1uxm0")]
@@ -59,12 +64,14 @@ texture = SubResource("GradientTexture2D_g1uf8")
[node name="ItemScreen" type="Sprite3D" parent="." unique_id=1128109703]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.08962244)
visible = false
transparent = false
texture = SubResource("GradientTexture2D_jdjjl")
[node name="ToolScreen" type="Sprite3D" parent="." unique_id=1384339729]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.08962244)
visible = false
transparent = false
texture = SubResource("GradientTexture2D_gj8fm")
@@ -79,35 +86,36 @@ unique_name_in_owner = true
[node name="ParticleSprite1" type="Sprite3D" parent="ParticleSprites" unique_id=811884632]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.04235574, -0.03381054, -0.105405755)
visible = false
pixel_size = 0.001
texture = ExtResource("5_g1uf8")
[node name="ParticleSprite2" type="Sprite3D" parent="ParticleSprites" unique_id=1076243108]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.042, -0.034, -0.105)
visible = false
pixel_size = 0.001
texture = ExtResource("6_jdjjl")
[node name="ParticleSprite3" type="Sprite3D" parent="ParticleSprites" unique_id=490761808]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0029564463, -0.034, -0.105)
visible = false
pixel_size = 0.001
texture = ExtResource("6_jdjjl")
[node name="ParticleSprite4" type="Sprite3D" parent="ParticleSprites" unique_id=1224179780]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.04235574, 0.04323736, -0.105405755)
visible = false
pixel_size = 0.001
texture = ExtResource("5_g1uf8")
[node name="ParticleSprite5" type="Sprite3D" parent="ParticleSprites" unique_id=241043116]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.042, 0.043047898, -0.105)
visible = false
pixel_size = 0.001
texture = ExtResource("6_jdjjl")
[node name="ParticleSprite6" type="Sprite3D" parent="ParticleSprites" unique_id=1794865960]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0029564463, 0.043047898, -0.105)
visible = false
pixel_size = 0.001
texture = ExtResource("6_jdjjl")
[node name="Area3D" type="Area3D" parent="." unique_id=426596211]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=2020875183]
shape = SubResource("BoxShape3D_1uxm0")

View File

@@ -1,5 +1,5 @@
@tool
extends Node3D
extends Interactable3D
class_name InventoryItem3D
enum State { BLACK,ITEM,TOOL }
@@ -43,3 +43,8 @@ func set_state(s := state):
%BlackScreen.visible = state == State.BLACK
%ItemScreen.visible = state == State.ITEM
%ToolScreen.visible = state == State.TOOL
func card_info() -> CardInfo:
if item :
return item.card_info()
return null

View File

@@ -99,7 +99,7 @@ func score_update(with_animation = true):
func state_update(region_data : RegionData):
if region_data.state == RegionData.State.SUCCEEDED:
objective_text = "SHIP_IS_READY_TO_TAKE_OFF"
objective_text = "COLLECT_YOUR_SEEDS_AND_TAKE_OFF"
if GameInfo.game_data.current_run.story_step is TutorialStoryStep:
objective_text = "PASS_THE_MYSTERIOUS_DOOR"
elif region_data.state == RegionData.State.FAILED:

View File

@@ -54,6 +54,5 @@ func _on_controls_pressed():
func _on_give_up_pressed():
if GameInfo.game_data:
SceneManager.change_to_scene(AstraScene.new())
GameInfo.game_data.give_up()
pause = false

View File

@@ -3,9 +3,9 @@
[ext_resource type="Script" uid="uid://vhumsfntpqcl" path="res://gui/pointer/scripts/pointer.gd" id="1_1pe2k"]
[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="AudioStream" uid="uid://cs4y6sinpth8e" path="res://common/audio_manager/assets/sfx/recharge/recharge_capsule_1.wav" id="4_mw4ws"]
[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"]
[ext_resource type="Shader" uid="uid://bqjwmomh851lc" path="res://common/vfx/materials/shaders/skew.gdshader" id="7_wgcdp"]
@@ -90,6 +90,13 @@ volume_db = -5.0
pitch_scale = 4.0
bus = &"Sfx"
[node name="ActionPlayer" type="AudioStreamPlayer" parent="InspectorCanvasLayer/Inspector" unique_id=659884130]
unique_name_in_owner = true
stream = ExtResource("4_mw4ws")
volume_db = -2.0
pitch_scale = 2.0
bus = &"Sfx"
[node name="ActionProgressBar" type="TextureProgressBar" parent="InspectorCanvasLayer/Inspector" unique_id=55992280]
unique_name_in_owner = true
layout_mode = 1
@@ -111,8 +118,8 @@ texture_progress = SubResource("GradientTexture2D_tof6i")
[node name="Container" type="VBoxContainer" parent="InspectorCanvasLayer/Inspector" unique_id=319962477]
layout_mode = 0
offset_left = 28.0
offset_right = 134.0
offset_left = 32.0
offset_right = 138.0
offset_bottom = 79.0
size_flags_horizontal = 0
size_flags_vertical = 0
@@ -123,12 +130,6 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
[node name="MouseImage" type="TextureRect" parent="InspectorCanvasLayer/Inspector/Container/Action" unique_id=530309967]
layout_mode = 2
texture = ExtResource("3_pshoq")
expand_mode = 2
stretch_mode = 5
[node name="ActionEnergyImage" type="TextureRect" parent="InspectorCanvasLayer/Inspector/Container/Action" unique_id=1684096069]
unique_name_in_owner = true
layout_mode = 2

View File

@@ -4,8 +4,10 @@ const DEFAULT_ACTION_COLOR = Color.WHITE
const ENERGY_ACTION_COLOR = Color("ffff2b")
const NO_ENERGY_ACTION_COLOR = Color.RED
const ZONE_OPACITY = 0.4
const ZONE_ACTIVATED_COLOR = Color.TURQUOISE
const ZONE_DEACTIVATED_COLOR = Color.REBECCA_PURPLE
const ZONE_ACTIVATED_COLOR = Color("#96B3DB")
const ZONE_DEACTIVATED_COLOR = Color("#FF006E")
const SEED_CURSOR = preload("res://common/icons/shovel.svg")
const CARD_VISUALISATION_TIME = 0.3
const CARD_UP_PADDING = 50
@@ -99,6 +101,7 @@ func process_player_actions(delta : float):
%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():
%ActionPlayer.play()
player.try_use_item(
current_selected_item,
player.get_global_mouse_position()
@@ -117,10 +120,10 @@ func process_player_actions(delta : float):
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()
)
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"):