[s] Fixes altclick exploits
This commit is contained in:
committed by
CitadelStationBot
parent
7f7bea7468
commit
f4685cfe01
@@ -724,13 +724,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)
|
||||
|
||||
@@ -787,13 +787,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)
|
||||
|
||||
@@ -879,10 +879,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()
|
||||
..()
|
||||
|
||||
@@ -377,23 +377,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
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user