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

@@ -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