summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/grainseeds.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-04-30 15:35:22 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-04-30 15:35:22 -0400
commit603b64b1a93b36f04d25018ec3f53b16dcd84019 (patch)
tree0bd9df6581b745d30f354f12ef420165e57b6bb5 /gamemode/itemsystem/items/grainseeds.lua
parent677682840305841d4538c6f5d5151f36959ae56f (diff)
downloadgmstranded-603b64b1a93b36f04d25018ec3f53b16dcd84019.tar.gz
gmstranded-603b64b1a93b36f04d25018ec3f53b16dcd84019.tar.bz2
gmstranded-603b64b1a93b36f04d25018ec3f53b16dcd84019.zip
Fixed plant eating
Diffstat (limited to 'gamemode/itemsystem/items/grainseeds.lua')
-rw-r--r--gamemode/itemsystem/items/grainseeds.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/gamemode/itemsystem/items/grainseeds.lua b/gamemode/itemsystem/items/grainseeds.lua
index 9057df8..5b7ba3c 100644
--- a/gamemode/itemsystem/items/grainseeds.lua
+++ b/gamemode/itemsystem/items/grainseeds.lua
@@ -5,6 +5,12 @@ ITEM.Description = "Something you can plant, or mash up into flour"
ITEM.Icon = "test.png"
ITEM.UniqueData = false
+
+--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
genericMakePlantable(ITEM)
genericMakeDroppable(ITEM)