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
@@ -17,7 +17,7 @@ func _init(size : int = 1):
seeds_size = size
func current_is_tool() -> bool:
return current_item_ind <= len(tools)
return current_item_ind < len(tools)
func set_current_item(new_ind: int):
if new_ind < 0:
+1 -1
View File
@@ -44,7 +44,7 @@ func is_action_need_press_time() -> bool:
func get_action_press_time() -> float:
return DEFAULT_PRESS_TIME
func get_usage_object_affected(_i : InspectableEntity) -> bool:
func get_usage_object_affected(_i : Area2D) -> bool:
return false
func is_one_time_use():
@@ -21,7 +21,7 @@ func get_energy_used() -> int:
func get_usage_zone_radius() -> int:
return 10
func get_usage_object_affected(i : InspectableEntity) -> bool:
func get_usage_object_affected(i : Area2D) -> bool:
return i is Plant
func use_text() -> String:
@@ -63,10 +63,10 @@ func get_energy_used() -> int:
return 1
func get_usage_zone_radius() -> int:
return 35
return 50
func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant
func get_usage_object_affected(i : Area2D) -> bool:
return i is PlantSprite
func use_text() -> String:
return tr("PLANT_%s") % plant_name
@@ -82,10 +82,19 @@ func can_use(player : Player, zone : Player.ActionZone) -> bool:
var is_there_a_plant_here = false
for area in zone.get_affected_areas():
if area is Plant:
if area is PlantSprite:
is_there_a_plant_here = true
return not is_there_a_plant_here and player.region.is_coords_decontaminated(zone.get_tiles())
var plant_tiles = Math.get_tiles_in_circle(
zone.get_global_position(),
20
)
return (
not is_there_a_plant_here
and player.region.is_coords_decontaminated(plant_tiles)
and not player.region.is_coords_rocky(plant_tiles)
)
func use(player : Player, zone : Player.ActionZone) -> bool:
if player.region == null:
@@ -17,7 +17,7 @@ func get_icon() -> Texture2D:
func get_usage_zone_radius() -> int:
return SHOVEL_ZONE_RADIUS
func get_usage_object_affected(i : InspectableEntity) -> bool:
func get_usage_object_affected(i : Area2D) -> bool:
return i is Plant
func use_text() -> String:
+35 -1
View File
@@ -9,11 +9,23 @@
[ext_resource type="AudioStream" uid="uid://cv5avkd3qekt7" path="res://common/audio_manager/assets/sfx/movement/movement.wav" id="7_qiwj3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_sglur"]
radius = 27.0
radius = 13.0
[sub_resource type="CircleShape2D" id="CircleShape2D_abrql"]
radius = 40.0
[sub_resource type="Gradient" id="Gradient_qiwj3"]
offsets = PackedFloat32Array(0.37339056, 0.49785408)
colors = PackedColorArray(0.043137256, 0.050980393, 0.15686275, 0, 0.043137256, 0.050980393, 0.15686275, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_26q78"]
gradient = SubResource("Gradient_qiwj3")
width = 600
height = 600
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
[sub_resource type="AtlasTexture" id="AtlasTexture_fkugw"]
atlas = ExtResource("4_bls4j")
region = Rect2(3048, 0, 762, 1080)
@@ -113,6 +125,9 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_bectd"]
blend_mode = 1
[sub_resource type="Curve" id="Curve_fkugw"]
_data = [Vector2(0, 0.14473677), 0.0, 0.0, 0, 0, Vector2(0.972549, 0.2654798), 0.0, 0.0, 0, 0]
point_count = 2
@@ -253,6 +268,12 @@ position = Vector2(-2.3841858e-07, -7.999996)
scale = Vector2(0.29154927, 0.29154924)
texture = ExtResource("2_fkugw")
[node name="Fog" type="Sprite2D" parent="." unique_id=1590893330]
z_index = 10
position = Vector2(0.99999994, -17)
scale = Vector2(8, 8)
texture = SubResource("GradientTexture2D_26q78")
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037]
unique_name_in_owner = true
position = Vector2(0.99999994, -17)
@@ -267,6 +288,7 @@ wanted_orientation = 2
[node name="Light" type="Sprite2D" parent="PlayerSprite" unique_id=1768327734]
modulate = Color(0.70603025, 0.5959886, 0.33971557, 0.09019608)
z_index = -1
material = SubResource("CanvasItemMaterial_bectd")
scale = Vector2(16.093441, 16.093441)
texture = ExtResource("5_8fjmc")
@@ -290,3 +312,15 @@ bus = &"Sfx"
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=793749564]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_qiwj3")
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="." unique_id=1282043308]
unique_name_in_owner = true
simplify_path = true
simplify_epsilon = 4.223
path_search_max_polygons = 1000
avoidance_enabled = true
radius = 500.0
debug_use_custom = true
debug_path_custom_color = Color(0.5882353, 0.7019608, 0.85882354, 0.3019608)
debug_path_custom_point_size = 0.0
debug_path_custom_line_width = 1.0
+84 -19
View File
@@ -5,6 +5,7 @@ const ACTION_AREA_UPDATE_TIME=0.05 # When creating an action_zone, we make sure
const MAX_REACH = 100
const HOLDING_ITEM_SPRITE_SIZE = 20.
const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2
const SPEED = 350
signal player_updated(player: Player)
signal upgraded
@@ -12,7 +13,6 @@ signal upgraded
var terrain : Terrain
var region : Region :
get(): return terrain if terrain is Region else null
@export var speed = 350
var data : PlayerData
var last_action_area_movement_timer : float = 100.
@@ -22,7 +22,13 @@ var controlling_player : bool = false :
controlling_player = v
velocity = Vector2.ZERO
var instruction : Instruction = null
var instruction : Instruction = null :
set(i):
if instruction and is_node_ready():
instruction.abort(self)
instruction = i
if instruction and is_node_ready():
instruction.spawn_indicator(self)
@onready var preview_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
@onready var action_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
@@ -81,7 +87,7 @@ func _process(delta):
instruction = null
input_direction = calculate_direction_instruction_direction()
velocity = input_direction * speed
velocity = input_direction * SPEED
turn_animate(input_direction)
move_preview_zone(get_global_mouse_position())
@@ -106,8 +112,11 @@ func calculate_direction_instruction_direction() -> Vector2:
instruction.position.distance_to(global_position) > (MAX_REACH - 1.)
or instruction is MoveInstruction
)
):
return self.global_position.direction_to(instruction.position)
):
if %NavigationAgent2D.target_position != instruction.position:
%NavigationAgent2D.target_position = instruction.position
return to_local(%NavigationAgent2D.get_next_path_position()).normalized()
# return self.global_position.direction_to(instruction.position)
return Vector2.ZERO
func calculate_direction_input_direction() -> Vector2:
@@ -147,8 +156,8 @@ func try_interact(interactable : Interactable):
func try_move(move_to : Vector2):
instruction = MoveInstruction.new(move_to)
func can_pick_item(item: Item):
return item.type == Item.ItemType.TOOL_ITEM || !data.inventory.is_full() || !data.inventory.current_is_tool()
func can_pick_item(_item: Item):
return true
func pick_item(item : Item):
if item.type != Item.ItemType.TOOL_ITEM && data.inventory.is_full():
@@ -163,13 +172,23 @@ func pick_item(item : Item):
func drop_item():
var ind_to_drop := data.inventory.current_item_ind
while (
(data.inventory.get_item(ind_to_drop) == null or ind_to_drop < len(data.inventory.tools))
and ind_to_drop < len(data.inventory.get_all_items()) - 1
if (
data.inventory.get_item(ind_to_drop) == null or ind_to_drop < len(data.inventory.tools)
):
ind_to_drop += 1
var item_to_drop = data.inventory.pop_item(ind_to_drop)
if item_to_drop:
var possible_ind : Array = range(
len(data.inventory.tools),
len(data.inventory.tools) + data.inventory.seeds_size
).filter(
func (i): return data.inventory.get_item(i) != null
)
if len(possible_ind):
ind_to_drop = possible_ind.pop_back()
else:
return
var item_to_drop : Item = data.inventory.pop_item(ind_to_drop)
if item_to_drop and item_to_drop.type != Item.ItemType.TOOL_ITEM:
terrain.drop_item(item_to_drop, global_position)
AudioManager.play_sfx("Drop")
region.save()
@@ -239,11 +258,10 @@ func setup_preview_zone(item : Item):
return preview_zone
elif preview_zone:
preview_zone.destroy()
preview_zone = null
if item:
preview_zone = await generate_action_zone(item)
else:
preview_zone = null
func setup_action_zone(zone_position : Vector2, item: Item) -> ActionZone:
if action_zone:
@@ -259,8 +277,11 @@ func move_preview_zone(zone_position : Vector2):
class Instruction:
const INDICATOR_COLOR := Color("#96B3DB")
var position : Vector2
var need_movement : bool = true
var indicator := Sprite2D.new()
func _init(_pos : Vector2):
position = _pos
@@ -270,8 +291,46 @@ class Instruction:
func do(_player : Player):
pass
func indicator_texture():
return preload("res://common/icons/map-pin.svg")
func indicator_size():
return 40
func indicator_shift():
return Vector2.ZERO
func spawn_indicator(player : Player):
indicator.texture = indicator_texture()
indicator.texture = indicator_texture()
indicator.scale = Vector2(
1./(float(indicator_texture().get_width())/indicator_size()),
1./(float(indicator_texture().get_height())/indicator_size())
)
indicator.modulate = Color(
INDICATOR_COLOR.r,
INDICATOR_COLOR.g,
INDICATOR_COLOR.b,
0.
)
player.get_parent().add_child(indicator)
indicator.global_position = position + indicator_shift()
player.get_tree().create_tween().tween_property(indicator, "modulate:a", 0.8, 0.2)
func abort(player : Player):
indicator.queue_free()
class MoveInstruction extends Instruction:
func indicator_shift():
return Vector2.UP * 50
func can_be_done(player : Player):
return player.global_position.distance_to(position) < 10.
@@ -289,7 +348,10 @@ class ItemActionInstruction extends Instruction:
not item.is_usage_need_proximity() or
player.global_position.distance_to(position) < player.MAX_REACH
)
func indicator_texture():
return item.icon
func do(player : Player):
player.use_item(item)
@@ -303,13 +365,16 @@ class InteractableInstruction extends Instruction:
func can_be_done(player : Player):
return player.global_position.distance_to(position) < player.MAX_REACH
func indicator_texture():
return preload("res://common/icons/hand-grab.svg")
func do(player : Player):
interactable.interact(player)
class ActionZone:
var item : Item = null
var area : Area2D = Area2D.new()
var affected_areas : Array[InspectableEntity]= []
var affected_areas : Array[Area2D]= []
func _init(_i : Item):
item = _i
@@ -330,9 +395,9 @@ class ActionZone:
func update_preview_on_affected_area():
var detected_areas = get_affected_areas()
clear_preview_on_affected_area()
var new_affected_areas : Array[InspectableEntity] = []
var new_affected_areas : Array[Area2D] = []
for a in detected_areas:
if a is InspectableEntity and item.get_usage_object_affected(a):
if a is Area2D and item.get_usage_object_affected(a) and a.has_method("affect_preview"):
a.affect_preview(true)
new_affected_areas.append(a)
affected_areas = new_affected_areas