From 4820a793f8c9a504510a6b6bf4d8b4c6391cd6cc Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 22 Apr 2016 15:33:10 -0400 Subject: Refactored planting process code --- gamemode/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gamemode/init.lua') 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 -- cgit v1.2.3-70-g09d2