mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
Click prevention for admin frozen players
This commit is contained in:
@@ -2017,5 +2017,18 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
set waitfor = FALSE
|
||||
return call(source, proctype)(arglist(arguments))
|
||||
|
||||
/proc/IsFrozen(var/atom/A)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
if(L.frozen)
|
||||
return TRUE
|
||||
|
||||
if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if(M.frozen)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/// Waits at a line of code until X is true
|
||||
#define UNTIL(X) while(!(X)) stoplag()
|
||||
|
||||
@@ -73,7 +73,9 @@
|
||||
var/dragged = modifiers["drag"]
|
||||
if(dragged && !modifiers[dragged])
|
||||
return
|
||||
|
||||
if(IsFrozen(A) && !is_admin(usr))
|
||||
to_chat(usr, "<span class='warning'>Interacting with admin-frozen players is not permitted.</span>")
|
||||
return
|
||||
if(modifiers["middle"] && modifiers["shift"] && modifiers["ctrl"])
|
||||
MiddleShiftControlClickOn(A)
|
||||
return
|
||||
|
||||
@@ -519,9 +519,6 @@
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
|
||||
if(!istype(M))
|
||||
return
|
||||
if(H.frozen)
|
||||
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"]
|
||||
|
||||
@@ -880,6 +880,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
if(IsFrozen(src))
|
||||
to_chat(usr, "<span class='boldannounce'>Interacting with admin-frozen players is not permitted.</span>")
|
||||
return
|
||||
if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src))
|
||||
return
|
||||
show_inv(usr)
|
||||
|
||||
Reference in New Issue
Block a user