mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] Fixes restraint alerts doing nothing when clicked. (#3534)
* Fixes restraint alerts doing nothing when clicked. (#57034) * Fixes restraint alerts doing nothing when clicked. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -98,6 +98,9 @@
|
||||
var/override_alerts = FALSE //If it is overriding other alerts of the same type
|
||||
var/mob/owner //Alert owner
|
||||
|
||||
/// Boolean. If TRUE, the Click() proc will attempt to Click() on the master first if there is a master.
|
||||
var/click_master = TRUE
|
||||
|
||||
|
||||
/atom/movable/screen/alert/MouseEntered(location,control,params)
|
||||
if(!QDELETED(src))
|
||||
@@ -660,7 +663,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
|
||||
//OBJECT-BASED
|
||||
|
||||
/atom/movable/screen/alert/restrained/buckled
|
||||
/atom/movable/screen/alert/buckled
|
||||
name = "Buckled"
|
||||
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
|
||||
icon_state = "buckled"
|
||||
@@ -668,10 +671,12 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
/atom/movable/screen/alert/restrained/handcuffed
|
||||
name = "Handcuffed"
|
||||
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
|
||||
click_master = FALSE
|
||||
|
||||
/atom/movable/screen/alert/restrained/legcuffed
|
||||
name = "Legcuffed"
|
||||
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
|
||||
click_master = FALSE
|
||||
|
||||
/atom/movable/screen/alert/restrained/Click()
|
||||
. = ..()
|
||||
@@ -687,7 +692,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
if((living_owner.mobility_flags & MOBILITY_MOVE) && (living_owner.last_special <= world.time))
|
||||
return living_owner.resist_restraints()
|
||||
|
||||
/atom/movable/screen/alert/restrained/buckled/Click()
|
||||
/atom/movable/screen/alert/buckled/Click()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
@@ -768,7 +773,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
if(LAZYACCESS(modifiers, SHIFT_CLICK)) // screen objects don't do the normal Click() stuff so we'll cheat
|
||||
to_chat(usr, "<span class='boldnotice'>[name]</span> - <span class='info'>[desc]</span>")
|
||||
return FALSE
|
||||
if(master)
|
||||
if(master && click_master)
|
||||
return usr.client.Click(master, location, control, params)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
M.set_buckled(src)
|
||||
M.setDir(dir)
|
||||
buckled_mobs |= M
|
||||
M.throw_alert("buckled", /atom/movable/screen/alert/restrained/buckled)
|
||||
M.throw_alert("buckled", /atom/movable/screen/alert/buckled)
|
||||
M.set_glide_size(glide_size)
|
||||
post_buckle_mob(M)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user