seeding-planets/entities/interactables/scripts/actions/get_seed.gd
2025-08-18 10:32:16 +02:00

8 lines
240 B
GDScript

extends InteractableAction
class_name GetSeedInteraction
func action(p: Player, i : Interactable):
if i is Plant:
p.inventory.add_item(i.seed_item)
else :
printerr("No plant selected or interactable is not a plant")