diff options
Diffstat (limited to 'gamemode/itemsystem/items/grainseeds.lua')
| -rw-r--r-- | gamemode/itemsystem/items/grainseeds.lua | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/gamemode/itemsystem/items/grainseeds.lua b/gamemode/itemsystem/items/grainseeds.lua index 9b22a0b..5b7ba3c 100644 --- a/gamemode/itemsystem/items/grainseeds.lua +++ b/gamemode/itemsystem/items/grainseeds.lua @@ -5,22 +5,13 @@ ITEM.Description = "Something you can plant, or mash up into flour" ITEM.Icon = "test.png" ITEM.UniqueData = false -local drop1 = function(player) - print("Drop 1 called") -end - -local dropall = function(player) - print("Drop all called") -end -local dropx = function(player) - print("Drop x called") +--Things needed to make something plantable +ITEM.GrowTime = 1 +ITEM.OnGrow = function(self, aor, owner) + GAMEMODE.MakeGenericPlant( owner, self:GetPos() + Vector( math.random( -10, 10 ), math.random( -10, 10 ), 0 ), "models/props_foliage/cattails.mdl" ) end - -ITEM.Actions = {} -ITEM.Actions["Drop"] = {} -ITEM.Actions["Drop"]["Drop 1"] = drop1 -ITEM.Actions["Drop"]["Drop all"] = dropall -ITEM.Actions["Drop"]["Drop X"] = dropx +genericMakePlantable(ITEM) +genericMakeDroppable(ITEM) GMS.RegisterResource(ITEM) |
