summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/sprout.lua
blob: d5ae254909093a91029605d5b277eb71c587b5ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TODO:Make this plantable
ITEM = {}

ITEM.Name = "Sprouts"
ITEM.Description = "Something you can craft with!"
ITEM.Icon = "test.png"
ITEM.UniqueData = false

ITEM.GrowTime = math.random( 60, 180 )
ITEM.OnGrow = function(self, aor, owner)
  local ent = ents.Create( "gms_tree" )
  ent:SetPos( self:GetPos() )
  ent:Spawn()
  ent.GMSAutoSpawned = true
  ent:SetNWString( "Owner", "World" )
end

genericMakePlantable(ITEM)
genericMakeDroppable(ITEM)

GMS.RegisterResource(ITEM)