mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-06 03:41:21 +01:00
f905cfc020
This adds throw_alert() and /obj/screen/alert, a system that allows you to do custom hud alerts for any variety of things from "You're too cold!" to mecha status indicators for the pilot. There's quite a few things that actually got replaced; the fire/oxy/tox/co2 alerts are all now just alerts, as is nutrition. The xenochimera feral indicator would probably be a good candidate for conversion, but I didn't touch it in this PR. There's also a number of new alerts, such as blindness, highness, legcuffed, buckled, handcuffed, and probably some more I missed; read code/_onclick/hud/alert.dm and see for yourself! Additionally, a number of tweaks have been done to resisting code, to make it so that there's an indicator when you're buckled or handcuffed, and can just click the alert to start resisting. This includes a refactor that combines the logic for lockers, holders, micros escaping from shoes, and struggling in a gut all into one proc, called container_resist(). This means that vore bellies actually no longer need the resist override, but it's been left in place just in case someone finds something else they want to use it for. Also, the health and internals indicator got moved down one tile each. Needed room for the alerts. If we add the oxygen tank action buttons from /tg/ and remove the internals indicator, the health indicator can go back where it was originally.
71 lines
2.4 KiB
Plaintext
71 lines
2.4 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
|
|
|
/obj/item/weapon/implant/freedom
|
|
name = "freedom implant"
|
|
desc = "Use this to escape from those evil Red Shirts."
|
|
implant_color = "r"
|
|
var/activation_emote = "chuckle"
|
|
var/uses = 1.0
|
|
|
|
|
|
/obj/item/weapon/implant/freedom/New()
|
|
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
|
src.uses = rand(1, 5)
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/implant/freedom/trigger(emote, mob/living/carbon/source as mob)
|
|
if (src.uses < 1)
|
|
return 0
|
|
|
|
if (emote == src.activation_emote)
|
|
src.uses--
|
|
to_chat(source, "You feel a faint click.")
|
|
if (source.handcuffed)
|
|
var/obj/item/weapon/W = source.handcuffed
|
|
source.handcuffed = null
|
|
if(source.buckled && source.buckled.buckle_require_restraints)
|
|
source.buckled.unbuckle_mob()
|
|
source.update_handcuffed()
|
|
if (source.client)
|
|
source.client.screen -= W
|
|
if (W)
|
|
W.loc = source.loc
|
|
dropped(source)
|
|
if (W)
|
|
W.layer = initial(W.layer)
|
|
if (source.legcuffed)
|
|
var/obj/item/weapon/W = source.legcuffed
|
|
source.legcuffed = null
|
|
source.update_inv_legcuffed()
|
|
if (source.client)
|
|
source.client.screen -= W
|
|
if (W)
|
|
W.loc = source.loc
|
|
dropped(source)
|
|
if (W)
|
|
W.layer = initial(W.layer)
|
|
return
|
|
|
|
/obj/item/weapon/implant/freedom/post_implant(mob/source)
|
|
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
|
to_chat(source, "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.")
|
|
|
|
/obj/item/weapon/implant/freedom/get_data()
|
|
var/dat = {"
|
|
<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Freedom Beacon<BR>
|
|
<b>Life:</b> optimum 5 uses<BR>
|
|
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
|
<HR>
|
|
<b>Implant Details:</b> <BR>
|
|
<b>Function:</b> Transmits a specialized cluster of signals to override handcuff locking
|
|
mechanisms<BR>
|
|
<b>Special Features:</b><BR>
|
|
<i>Neuro-Scan</i>- Analyzes certain shadow signals in the nervous system<BR>
|
|
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
|
|
life can drive down to only 1 use.<HR>
|
|
No Implant Specifics"}
|
|
return dat
|