inventaire fonctionnel #13
This commit is contained in:
8
entities/interactables/scripts/actions/get_seed.gd
Normal file
8
entities/interactables/scripts/actions/get_seed.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
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")
|
||||
1
entities/interactables/scripts/actions/get_seed.gd.uid
Normal file
1
entities/interactables/scripts/actions/get_seed.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://j5xvcabrspyb
|
||||
@@ -1,8 +1,8 @@
|
||||
extends InteractableAction
|
||||
class_name WaterPlantAction
|
||||
|
||||
func action(_p: Player, _i : Interactable):
|
||||
if _i is Plant:
|
||||
_i.watered = true
|
||||
func action(_p: Player, i : Interactable):
|
||||
if i is Plant:
|
||||
i.watered = true
|
||||
else :
|
||||
printerr("No plant selected or interactable is not a plant")
|
||||
Reference in New Issue
Block a user