summaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/grainseeds.lua
blob: 0068f49b12203674900360bc483170446e08aae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--The grain seeds

ITEM = {}

ITEM.Name = "Grain Seeds"
ITEM.Description = "Something you can plant, or mash up into flour"
ITEM.Icon = "items/seed_grain.png"
ITEM.UniqueData = false


--Things needed to make something plantable
ITEM.GrowTime = math.random( 60, 180 )
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)

GMS.RegisterResource(ITEM)