mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
add springlock module
This commit is contained in:
@@ -138,31 +138,31 @@
|
||||
playsound(src, 'sound/machines/synth_no.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, frequency = 6000)
|
||||
return TRUE
|
||||
|
||||
if(do_after(wearer, MOD_ACTIVATION_STEP_TIME, target = wearer, required_mobility_flags = NONE))
|
||||
if(do_after(wearer, activation_step_time, target = wearer, required_mobility_flags = NONE))
|
||||
to_chat(wearer, span_notice("[boots] [active ? "relax their grip on your legs" : "seal around your feet"]."))
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
seal_part(boots, seal = !active)
|
||||
else
|
||||
return toggle_activate_fail()
|
||||
if(do_after(wearer, MOD_ACTIVATION_STEP_TIME, target = wearer, required_mobility_flags = NONE))
|
||||
if(do_after(wearer, activation_step_time, target = wearer, required_mobility_flags = NONE))
|
||||
to_chat(wearer, span_notice("[gauntlets] [active ? "become loose around your fingers" : "tighten around your fingers and wrists"]."))
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
seal_part(gauntlets, seal = !active)
|
||||
else
|
||||
return toggle_activate_fail()
|
||||
if(do_after(wearer, MOD_ACTIVATION_STEP_TIME, target = wearer, required_mobility_flags = NONE))
|
||||
if(do_after(wearer, activation_step_time, target = wearer, required_mobility_flags = NONE))
|
||||
to_chat(wearer, span_notice("[chestplate] [active ? "releases your chest" : "cinches tightly against your chest"]."))
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
seal_part(chestplate,seal = !active)
|
||||
else
|
||||
return toggle_activate_fail()
|
||||
if(do_after(wearer, MOD_ACTIVATION_STEP_TIME, target = wearer, required_mobility_flags = NONE))
|
||||
if(do_after(wearer, activation_step_time, target = wearer, required_mobility_flags = NONE))
|
||||
to_chat(wearer, span_notice("[helmet] hisses [active ? "open" : "closed"]."))
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
seal_part(helmet, seal = !active)
|
||||
else
|
||||
return toggle_activate_fail()
|
||||
if(do_after(wearer, MOD_ACTIVATION_STEP_TIME, target = wearer, required_mobility_flags = NONE))
|
||||
if(do_after(wearer, activation_step_time, target = wearer, required_mobility_flags = NONE))
|
||||
to_chat(wearer, span_notice("Systems [active ? "shut down. Parts unsealed. Goodbye" : "started up. Parts sealed. Welcome"], [wearer]."))
|
||||
if(ai)
|
||||
to_chat(ai, span_notice("<b>SYSTEMS [active ? "DEACTIVATED. GOODBYE" : "ACTIVATED. WELCOME"]: \"[ai]\"</b>"))
|
||||
@@ -247,5 +247,4 @@
|
||||
seal_part(part, seal = TRUE)
|
||||
finish_activation(on = TRUE)
|
||||
|
||||
#undef MOD_ACTIVATION_STEP_TIME
|
||||
#undef MOD_ACTIVATION_STEP_FLAGS
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
var/slowdown_inactive = 2
|
||||
/// Slowdown of the MOD when active.
|
||||
var/slowdown_active = 1
|
||||
/// How long this MOD takes each part to seal.
|
||||
var/activation_step_time = MOD_ACTIVATION_STEP_TIME
|
||||
/// MOD cell.
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
/// MOD helmet.
|
||||
|
||||
@@ -1,6 +1,62 @@
|
||||
//Maint modules for MODsuits
|
||||
|
||||
///Springlock Mechanism - Nope
|
||||
///Springlock Mechanism - allows your modsuit to activate faster, but reagents are very dangerous.
|
||||
/obj/item/mod/module/springlock
|
||||
name = "MOD springlock module"
|
||||
desc = "A module that spans the entire size of the MOD unit, sitting under the outer shell. \
|
||||
This mechanical exoskeleton pushes out of the way when the user enters and it helps in booting \
|
||||
up, but was taken out of modern suits because of the springlock's tendency to \"snap\" back \
|
||||
into place when exposed to humidity. You know what it's like to have an entire exoskeleton enter you?"
|
||||
icon_state = "springlock"
|
||||
complexity = 3 // it is inside every part of your suit, so
|
||||
incompatible_modules = list(/obj/item/mod/module/springlock)
|
||||
|
||||
/obj/item/mod/module/springlock/on_install()
|
||||
mod.activation_step_time *= 0.5
|
||||
|
||||
/obj/item/mod/module/springlock/on_uninstall(deleting = FALSE)
|
||||
mod.activation_step_time *= 2
|
||||
|
||||
/obj/item/mod/module/springlock/on_suit_activation()
|
||||
RegisterSignal(mod.wearer, COMSIG_ATOM_EXPOSE_REAGENTS, .proc/on_wearer_exposed)
|
||||
|
||||
/obj/item/mod/module/springlock/on_suit_deactivation(deleting = FALSE)
|
||||
UnregisterSignal(mod.wearer, COMSIG_ATOM_EXPOSE_REAGENTS)
|
||||
|
||||
///Signal fired when wearer is exposed to reagents
|
||||
/obj/item/mod/module/springlock/proc/on_wearer_exposed(atom/source, list/reagents, datum/reagents/source_reagents, methods, volume_modifier, show_message, from_gas)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!reagents.len)
|
||||
return
|
||||
if(!(methods & (VAPOR|PATCH|TOUCH)))
|
||||
return //remove non-touch reagent exposure
|
||||
to_chat(mod.wearer, span_danger("[src] makes an ominous click sound..."))
|
||||
playsound(src, 'sound/items/modsuit/springlock.ogg', 75, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/snap_shut), rand(3 SECONDS, 5 SECONDS))
|
||||
RegisterSignal(mod, COMSIG_MOD_ACTIVATE, .proc/on_activate_spring_block)
|
||||
|
||||
///Signal fired when wearer attempts to activate/deactivate suits
|
||||
/obj/item/mod/module/springlock/proc/on_activate_spring_block(datum/source, user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
balloon_alert(user, "springlocks aren't responding...?")
|
||||
return MOD_CANCEL_ACTIVATE
|
||||
|
||||
///Delayed death proc of the suit after the wearer is exposed to reagents
|
||||
/obj/item/mod/module/springlock/proc/snap_shut()
|
||||
UnregisterSignal(mod, COMSIG_MOD_ACTIVATE)
|
||||
if(!mod.wearer) //while there is a guaranteed user when on_wearer_exposed() fires, that isn't the same case for this proc
|
||||
return
|
||||
mod.wearer.visible_message("[src] inside [mod.wearer]'s [mod.name] snaps shut, mutilating the user inside!", span_userdanger("*SNAP*"))
|
||||
mod.wearer.emote("scream")
|
||||
playsound(mod.wearer, 'sound/effects/snap.ogg', 75, TRUE, frequency = 0.5)
|
||||
playsound(mod.wearer, 'sound/effects/splat.ogg', 50, TRUE, frequency = 0.5)
|
||||
mod.wearer.client?.give_award(/datum/award/achievement/misc/springlock, mod.wearer)
|
||||
mod.wearer.apply_damage(500, BRUTE, forced = TRUE, spread_damage = TRUE, sharpness = SHARP_POINTY) //boggers, bogchamp, etc
|
||||
if(!HAS_TRAIT(mod.wearer, TRAIT_NODEATH))
|
||||
mod.wearer.death() //just in case, for some reason, they're still alive
|
||||
flash_color(mod.wearer, flash_color = "#FF0000", flash_time = 10 SECONDS)
|
||||
|
||||
///Rave Visor - Pointless
|
||||
|
||||
|
||||
@@ -890,6 +890,7 @@
|
||||
R.reaction_turf(A, R.volume * volume_modifier, show_message, from_gas)
|
||||
if("OBJ")
|
||||
R.reaction_obj(A, R.volume * volume_modifier, show_message)
|
||||
SEND_SIGNAL(A, COMSIG_ATOM_EXPOSE_REAGENTS, cached_reagents, src, method, volume_modifier, show_message, from_gas)
|
||||
|
||||
/datum/reagents/proc/holder_full()
|
||||
if(total_volume >= maximum_volume)
|
||||
|
||||
Reference in New Issue
Block a user