new mutations + plant part data structure simplified
This commit is contained in:
22
entities/plants/scripts/plant_mutation/rhizome_mutation.gd
Normal file
22
entities/plants/scripts/plant_mutation/rhizome_mutation.gd
Normal file
@@ -0,0 +1,22 @@
|
||||
extends PlantMutation
|
||||
class_name RhizomeMutation
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/alert-triangle.svg")
|
||||
|
||||
func get_mutation_id() -> String:
|
||||
return "RHIZOME"
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return tr("RHIZOME")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return tr("RHIZOME_EFFECT_TEXT").format({
|
||||
"digging_radius": get_digging_radius()
|
||||
})
|
||||
|
||||
func _start_maturation_effect(plant: Plant):
|
||||
plant.region.dig_hole(plant.global_position, get_digging_radius())
|
||||
|
||||
func get_digging_radius() -> int:
|
||||
return level
|
||||
Reference in New Issue
Block a user