summaryrefslogtreecommitdiff
path: root/gamemode/init.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-04-22 15:33:10 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-04-22 15:33:10 -0400
commit4820a793f8c9a504510a6b6bf4d8b4c6391cd6cc (patch)
tree9ab751aad126fdba38b3bee0fdb6a8189b9abbc1 /gamemode/init.lua
parent9a50a5880f3d263cd351f4786c222ac7f0b78517 (diff)
downloadgmstranded-4820a793f8c9a504510a6b6bf4d8b4c6391cd6cc.tar.gz
gmstranded-4820a793f8c9a504510a6b6bf4d8b4c6391cd6cc.tar.bz2
gmstranded-4820a793f8c9a504510a6b6bf4d8b4c6391cd6cc.zip
Refactored planting process code
Diffstat (limited to 'gamemode/init.lua')
-rw-r--r--gamemode/init.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/gamemode/init.lua b/gamemode/init.lua
index 80f2b0c..cd72b13 100644
--- a/gamemode/init.lua
+++ b/gamemode/init.lua
@@ -18,8 +18,8 @@ AddCSLuaFile( "cl_hud.lua" )
AddCSLuaFile( "unlocks.lua" )
AddCSLuaFile( "combinations.lua" )
AddCSLuaFile( "combinations2.lua" )
---AddCSLuaFile( "combirenbuy.lua" )
---AddCSLuaFile( "combirensell.lua" )
+AddCSLuaFile( "combirenbuy.lua" )
+AddCSLuaFile( "combirensell.lua" )
AddCSLuaFile( "time_weather.lua" )
AddCSLuaFile( "cl_deathmenu.lua" )
@@ -348,7 +348,9 @@ for k,v in pairs(GM.Plantables) do
return
end
local trm = tr.MatType
- if( (!(trm == MAT_DIRT) and !(trm == MAT_GRASS) and !(trm == MAT_SAND)) or (GMS.IsInWater)) then
+ PrintTable(tr)
+ print(Vector(tr.HitPos))
+ if( (trm != MAT_DIRT) and (trm != MAT_GRASS) and (trm != MAT_SAND) or (GMS.IsInWater(Vector(tr.HitPos)))) then
ply:SendMessage( "You cannot plant on this terrain.", 3, Color( 200, 0, 0, 255 ) )
return
end