summaryrefslogtreecommitdiff
path: root/gamemode/shared.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-07 16:28:16 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-07 16:28:16 -0400
commit0a134b81cc62e25cdf1e94f014b5c460e14c4dd1 (patch)
treea9c4ac1bd7ed39a4a3d805e38b0662592a7bbb42 /gamemode/shared.lua
parentb913f79c19c2ab92a73996b3be4e5f8c1dd7e0ac (diff)
downloadgmstranded-0a134b81cc62e25cdf1e94f014b5c460e14c4dd1.tar.gz
gmstranded-0a134b81cc62e25cdf1e94f014b5c460e14c4dd1.tar.bz2
gmstranded-0a134b81cc62e25cdf1e94f014b5c460e14c4dd1.zip
Various refactoring
Diffstat (limited to 'gamemode/shared.lua')
-rw-r--r--gamemode/shared.lua39
1 files changed, 2 insertions, 37 deletions
diff --git a/gamemode/shared.lua b/gamemode/shared.lua
index 5588e1f..585cd0e 100644
--- a/gamemode/shared.lua
+++ b/gamemode/shared.lua
@@ -244,6 +244,8 @@ end
function GM:CanTool( ply, tr, mode )
+ if ( !table.HasValue(GMS.AllowedStools, mode) && !ply:IsAdmin()) then ply:SendMessage( "This tool is prohibited.", 3, Color( 200, 0, 0, 255 ) ) return false end
+
if ( mode == "gms_rope" ) then
if ( SERVER && ply:GetResource( "Rope" ) < 1 ) then ply:SendMessage( "You need rope to use this tool.", 3, Color( 200, 0, 0, 255 ) ) return false end
if ( CLIENT && ( !Resources[ "Rope" ] || Resources[ "Rope" ] < 1 ) ) then return false end
@@ -254,8 +256,6 @@ function GM:CanTool( ply, tr, mode )
if ( CLIENT && ( !Resources[ "Welder" ] || Resources[ "Welder" ] < 1 ) ) then return false end
end
- if ( table.HasValue( GMS.ProhibitedStools, mode ) && !ply:IsAdmin() ) then ply:SendMessage( "This tool is prohibited.", 3, Color( 200, 0, 0, 255 ) ) return false end
-
local ent = tr.Entity
if ( !IsValid( ent ) && ent:GetClass() != "worldspawn" ) then return end
@@ -862,41 +862,6 @@ GMS.StructureEntities = {
"gms_runicinfuser"
}
-GMS.ProhibitedStools = {
- "hydraulic",
- "motor",
- "muscle",
- "nail",
- "pulley",
- "slider",
- "balloon",
- "rope", // We use gms_rope
- "button",
- "duplicator",
- "dynamite",
- "emitter",
- "hoverball",
- "ignite",
- "keepupright",
- "magnetise",
- //"nocollide",
- "physprop",
- "spawner",
- "thruster",
- "turret",
- "wheel",
- "eyeposer",
- "faceposer",
- "finger",
- "inflator",
- "statue",
- "trails",
- "camera",
- "paint",
- "rtcamera",
- "rb655_lightsaber"
-}
-
GMS.AllWeapons = {
"gms_stonepickaxe",
"gms_stonehatchet",