[s] Fixes altclick exploits (#35456)

* Fixes altclick exploits

* Removed free spam, fixes monkey altclicks

* replaced named args with proper defines

* More cleanup and fixes

* Better yet

* Another exploit fix

* pet carrier fix
This commit is contained in:
ShizCalev
2018-02-11 16:06:12 +13:00
committed by oranges
parent bf1f56e93b
commit bfde5ac057
60 changed files with 115 additions and 133 deletions
@@ -719,13 +719,13 @@
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
if(incapacitated() || lying )
return
return FALSE
if(!Adjacent(M) && (M.loc != src))
if((be_close == 0) && (dna.check_mutation(TK)))
if(tkMaxRangeCheck(src, M))
return 1
return
return 1
return TRUE
return FALSE
return TRUE
/mob/living/carbon/human/resist_restraints()
if(wear_suit && wear_suit.breakouttime)
+4 -3
View File
@@ -784,13 +784,14 @@
/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
if(incapacitated())
return
return FALSE
if(no_dextery)
if(be_close && in_range(M, src))
return 1
return TRUE
else
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
return FALSE
/mob/living/proc/can_use_guns(obj/item/G)
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
@@ -185,6 +185,8 @@
// See software.dm for Topic()
/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
if(be_close && !in_range(M, src))
return FALSE
return TRUE
/mob/proc/makePAI(delold)
@@ -849,10 +849,10 @@
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
if(stat || lockcharge || low_power_mode)
return
return FALSE
if(be_close && !in_range(M, src))
return
return 1
return FALSE
return TRUE
/mob/living/silicon/robot/updatehealth()
..()
@@ -374,23 +374,23 @@
/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE)
if(incapacitated())
return 0
return FALSE
if(no_dextery || dextrous)
if(be_close && !in_range(M, src))
return 0
return FALSE
else
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
return 1
return FALSE
return TRUE
/mob/living/simple_animal/stripPanelUnequip(obj/item/what, mob/who, where)
if(!canUseTopic(who, TRUE))
if(!canUseTopic(who, BE_CLOSE))
return
else
..()
/mob/living/simple_animal/stripPanelEquip(obj/item/what, mob/who, where)
if(!canUseTopic(who, TRUE))
if(!canUseTopic(who, BE_CLOSE))
return
else
..()