Ajout d'un effet visuel sur les nouvelles graines, et dev en cours de l'imprimante 3D

This commit is contained in:
2026-06-22 20:16:27 +02:00
parent af91337017
commit 5bdf8db609
17 changed files with 166 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ var icon: Texture2D : get = get_icon
var pointer: Texture2D : get = get_pointer
@export var usage_zone_radius: int = 5 : get = get_usage_zone_radius
@export var energy_usage : int = 1 : get = get_energy_used
@export var has_been_inspected : bool = false
func get_item_name() -> String:
return name
@@ -104,3 +105,6 @@ func card_info() -> CardInfo:
func get_particles() -> Array[EffectParticles.Parameters]:
return []
func get_rarity_color() -> Color:
return Color.WHITE

View File

@@ -40,11 +40,9 @@ func use_text() -> String:
return tr("HARVEST")
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
print(zone)
var areas = get_usage_objects_affected(zone.get_affected_areas(), zone)
if len(areas) > 0:
return true
print("nope")
return false
func use(player : Player, zone : Player.ActionZone) -> bool:

View File

@@ -160,6 +160,15 @@ func get_particles() -> Array[EffectParticles.Parameters]:
return param
func get_rarity_color() -> Color:
var higher_rarity : int = -1
var higher_color : Color = Color.WHITE
for m in plant_mutations:
if m.get_rarity() > higher_rarity:
higher_rarity = m.get_rarity()
higher_color = PlantMutation.get_rarity_color(higher_rarity)
return higher_color
static func generate_first_mutations(rarity := 0) -> Array[PlantMutation]:
if rarity < 0: