Adds a message when trying to move while buckled (#30233)

* Shows a warning to the player trying to move while buckled.

* Adds cooldown.

* Moves the relaymove()-based message to atoms.dm

* Adds a custom buckled alert icon.

* Arranged screen_alert.dmi contents into an alphabetical order.
This commit is contained in:
kingofkosmos
2017-09-07 18:11:41 +03:00
committed by Jordan Brown
parent 65bb0a3e32
commit 4e260ab1ec
4 changed files with 7 additions and 5 deletions

View File

@@ -633,6 +633,7 @@ so as to remain in compliance with the most up-to-date laws."
/obj/screen/alert/restrained/buckled
name = "Buckled"
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
icon_state = "buckled"
/obj/screen/alert/restrained/handcuffed
name = "Handcuffed"
@@ -698,4 +699,3 @@ so as to remain in compliance with the most up-to-date laws."
severity = 0
master = null
screen_loc = ""

View File

@@ -29,6 +29,7 @@
var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
var/datum/proximity_monitor/proximity_monitor
var/buckle_message_cooldown = 0
/atom/New(loc, ...)
//atom creation method that preloads variables at creation
@@ -292,7 +293,10 @@
to_chat(user, "Nothing.")
SendSignal(COMSIG_PARENT_EXAMINE, user)
/atom/proc/relaymove()
/atom/proc/relaymove(mob/user)
if(buckle_message_cooldown <= world.time)
buckle_message_cooldown = world.time + 50
to_chat(user, "<span class='warning'>You can't move while buckled to [src]!</span>")
return
/atom/proc/contents_explosion(severity, target)

View File

@@ -62,7 +62,7 @@
M.setDir(dir)
buckled_mobs |= M
M.update_canmove()
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
post_buckle_mob(M)
return TRUE
@@ -131,5 +131,3 @@
"<span class='italics'>You hear metal clanking.</span>")
add_fingerprint(user)
return M

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 110 KiB