Adds a message when trying to move while buckled

This commit is contained in:
kingofkosmos
2017-09-07 18:11:41 +03:00
committed by CitadelStationBot
parent 73aaf8a90b
commit dd27a1850a
3 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
@@ -291,7 +292,10 @@
else
to_chat(user, "Nothing.")
/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