From be57f08dfd42f616fba275c5a75fb2f0ab77ae18 Mon Sep 17 00:00:00 2001 From: LethalGhost Date: Thu, 6 Jul 2017 05:02:29 +0500 Subject: [PATCH] Get rid of monkey game mode tails --- code/__defines/gamemode.dm | 1 - .../objects/items/devices/radio/electropack.dm | 2 +- code/game/objects/items/devices/scanners.dm | 17 ++++++----------- code/game/objects/items/weapons/weaponry.dm | 3 +-- code/modules/mining/mine_turfs.dm | 5 ++--- code/modules/power/turbine.dm | 10 ++++------ 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm index b4f2b87758e..fd74d310f71 100644 --- a/code/__defines/gamemode.dm +++ b/code/__defines/gamemode.dm @@ -40,7 +40,6 @@ #define MODE_CHANGELING "changeling" #define MODE_CULTIST "cultist" #define MODE_HIGHLANDER "highlander" -#define MODE_MONKEY "monkey" #define MODE_RENEGADE "renegade" #define MODE_REVOLUTIONARY "revolutionary" #define MODE_LOYALIST "loyalist" diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index bb0a7300b46..7b628fa496c 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -44,7 +44,7 @@ //..() if(usr.stat || usr.restrained()) return - if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf))))) + if(usr.contents.Find(master) || (isturf(loc) && in_range(src, usr))) usr.set_machine(src) if(href_list["freq"]) var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"])) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index d8a002e4007..7955ce117bd 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -25,7 +25,7 @@ REAGENT SCANNER var/mode = 1; -/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user) if ((CLUMSY in user.mutations) && prob(50)) user << text("You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) @@ -36,8 +36,7 @@ REAGENT SCANNER user.show_message("Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("Body Temperature: ???", 1) return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "You don't have the dexterity to do this!" + if(!user.IsAdvancedToolUser()) return flick("health2", src) user.visible_message("[user] has analyzed [M]'s vitals.","You have analyzed [M]'s vitals.") @@ -208,11 +207,9 @@ REAGENT SCANNER return atmosanalyzer_scan(src, air, user) /obj/item/device/analyzer/attack_self(mob/user as mob) - - if (user.stat) + if(user.stat) return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "You don't have the dexterity to do this!" + if(!user.IsAdvancedToolUser()) return analyze_gases(src, user) @@ -251,8 +248,7 @@ REAGENT SCANNER /obj/item/device/mass_spectrometer/attack_self(mob/user as mob) if (user.stat) return - if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "You don't have the dexterity to do this!" + if (!user.IsAdvancedToolUser()) return if(reagents.total_volume) var/list/blood_traces = list() @@ -302,8 +298,7 @@ REAGENT SCANNER return if (user.stat) return - if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "You don't have the dexterity to do this!" + if (!user.IsAdvancedToolUser()) return if(!istype(O)) return diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 2816b868d1e..5dffa617b47 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -26,8 +26,7 @@ user << "You've been silenced!" return - if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - user << "You don't have the dexterity to do this!" + if(!user.IsAdvancedToolUser()) return if ((CLUMSY in user.mutations) && prob(50)) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 94582ab0704..113b4df3764 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -115,10 +115,9 @@ new /obj/effect/mineral(src, mineral) //Not even going to touch this pile of spaghetti -/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob) +/turf/simulated/mineral/attackby(obj/item/weapon/W, mob/living/user) - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" + if (!user.IsAdvancedToolUser()) return if (istype(W, /obj/item/device/core_sampler)) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 5bcb6ec7356..d405d374ae5 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -178,14 +178,12 @@ ..() if(stat & BROKEN) return - if (usr.stat || usr.restrained() ) + if(usr.stat || usr.restrained() ) + return + if(!usr.IsAdvancedToolUser()) return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - if(!istype(usr, /mob/living/silicon/ai)) - usr << "\red You don't have the dexterity to do this!" - return - if (( usr.machine==src && ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) + if(get_dist(src, usr) <= 1 || isAI(usr)) if( href_list["close"] )