From bbb44629599fe350af802332e66d005c0c09eca0 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 5 May 2016 22:01:19 -0400 Subject: Finished makeing sproutes plantable --- gamemode/itemsystem/items/sprout.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gamemode/itemsystem/items/sprout.lua b/gamemode/itemsystem/items/sprout.lua index 9b8714b..3afb731 100644 --- a/gamemode/itemsystem/items/sprout.lua +++ b/gamemode/itemsystem/items/sprout.lua @@ -6,6 +6,16 @@ ITEM.Description = "Something you can craft with!" ITEM.Icon = "test.png" ITEM.UniqueData = false +ITEM.GrowTime = 1 +ITEM.OnGrow = function(self, aor, owner) + local ent = ents.Create( "gms_tree" ) + ent:SetPos( self:GetPos() ) + ent:Spawn() + ent.GMSAutoSpawned = true + ent:SetNetworkedString( "Owner", "World" ) +end + +genericMakePlantable(ITEM) genericMakeDroppable(ITEM) GMS.RegisterResource(ITEM) -- cgit v1.2.3-70-g09d2