11 lines
379 B
GDScript
11 lines
379 B
GDScript
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) |