Ajout des mutation Nettoyage, Ermite, Tropicale, Rhizome et Spontanée
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
extends PlantMutation
|
||||
class_name RhizomeMutation
|
||||
|
||||
const DIG_PARTICLES := preload("res://entities/player/inventory/scripts/items/utils/dig_particles.tscn")
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/alert-triangle.svg")
|
||||
return preload("res://common/icons/pick.svg")
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "RHIZOME"
|
||||
@@ -16,7 +18,17 @@ func get_mutation_description() -> String:
|
||||
})
|
||||
|
||||
func _start_maturation_effect(plant: Plant):
|
||||
plant.region.dig_hole(plant.global_position, get_digging_radius())
|
||||
plant.region.dig_rocks(
|
||||
Math.get_tiles_in_circle(
|
||||
plant.global_position,
|
||||
get_digging_radius() * (Region.TILE_SIZE + Region.TILE_SIZE / 2.)
|
||||
)
|
||||
)
|
||||
|
||||
var particles := (DIG_PARTICLES.instantiate() as DigParticleEmmitter)
|
||||
plant.region.add_child(particles)
|
||||
particles.global_position = plant.get_global_position()
|
||||
particles.emit()
|
||||
|
||||
func get_digging_radius() -> int:
|
||||
return level
|
||||
|
||||
Reference in New Issue
Block a user