summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/sprout.lua
blob: 3afb7310229e89c316e5968c7a837e6adffb9d78 (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 = 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)