diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-30 13:42:44 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-30 13:42:44 -0400 |
| commit | 677682840305841d4538c6f5d5151f36959ae56f (patch) | |
| tree | 5c54da005a0648837f76567fdfb02335a1eced52 /gamemode/itemsystem/common_dropable.lua | |
| parent | 57b9d6d553943190c58b7d5f77d2ee475fe36479 (diff) | |
| download | gmstranded-677682840305841d4538c6f5d5151f36959ae56f.tar.gz gmstranded-677682840305841d4538c6f5d5151f36959ae56f.tar.bz2 gmstranded-677682840305841d4538c6f5d5151f36959ae56f.zip | |
More work on makeing things plantable
Diffstat (limited to 'gamemode/itemsystem/common_dropable.lua')
| -rw-r--r-- | gamemode/itemsystem/common_dropable.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gamemode/itemsystem/common_dropable.lua b/gamemode/itemsystem/common_dropable.lua index 1f4ec7e..2b8446d 100644 --- a/gamemode/itemsystem/common_dropable.lua +++ b/gamemode/itemsystem/common_dropable.lua @@ -1,4 +1,5 @@ function genericMakeDroppable(tbl) + if(SERVER) then return end local drop1 = function(player) genericDropResource(player,tbl.Name,1) end @@ -7,6 +8,9 @@ function genericMakeDroppable(tbl) print("Ammount:" .. Resources[tbl.Name]) genericDropResource(player,tbl.Name,Resources[tbl.Name]) end + local drophalf = function(player) + genericDropResource(player,tbl.Name,math.ceil(Resources[tbl.Name]/2.0)) + end local dropx = function(player) if(SERVER) then return end local frame = vgui.Create( "DFrame" ) @@ -32,6 +36,7 @@ function genericMakeDroppable(tbl) tbl.Actions["Drop"] = {} end tbl.Actions["Drop"]["Drop 1"] = drop1 + tbl.Actions["Drop"]["Drop Half"] = drophalf tbl.Actions["Drop"]["Drop all"] = dropall tbl.Actions["Drop"]["Drop X"] = dropx end |
