ajout de la plant champ et suppression de la texture planted (ajout de la graine à la place) #55
This commit is contained in:
11
entities/plants/scripts/plant_effects/produce_seeds.gd
Normal file
11
entities/plants/scripts/plant_effects/produce_seeds.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends PlantEffect
|
||||
class_name ProduceSeedsEffect
|
||||
|
||||
@export_file var produce_types_path : Array[String] = []
|
||||
@export var produce_number : Array[int] = [1]
|
||||
|
||||
func effect(plant):
|
||||
for _i in range(produce_number.pick_random()):
|
||||
if len(produce_types_path):
|
||||
var seed_plant_type = load(produce_types_path.pick_random())
|
||||
plant.loot_seed(seed_plant_type)
|
||||
@@ -0,0 +1 @@
|
||||
uid://ceqx5va1ormau
|
||||
Reference in New Issue
Block a user