Skip to content

Commit

Permalink
Полностью переработал спринглок модуль, добавил улучшенную версию, до…
Browse files Browse the repository at this point in the history
…бавил технологию, которая позволяет строить улучшенные версии спринглока и ЕМП-щита (BlueMoon-Labs#684)
  • Loading branch information
VladOS-0 authored Jan 9, 2024
1 parent 5d72927 commit 3eae6d5
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 60 deletions.
61 changes: 4 additions & 57 deletions code/modules/mod/modules/modules_maint.dm
Original file line number Diff line number Diff line change
@@ -1,62 +1,9 @@
//Maint modules for MODsuits

///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 || methods == PATCH || methods == 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)
/**
* BLUEMOON REMOVAL - в связи с переработкой модуля пружинных замков (/obj/item/mod/module/springlock), всё связанное с ним
* перенесено в отдельный файл (code\modules\mod\modules\modules_springlock.dm)
**/

///Rave Visor - Pointless

Expand Down
447 changes: 447 additions & 0 deletions code/modules/mod/modules/modules_springlock.dm

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions code/modules/research/designs/mod_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,19 @@
materials = list(/datum/material/iron = 2500, /datum/material/glass = 2000, /datum/material/bluespace = 2000)
build_path = /obj/item/mod/module/anomaly_locked/teleporter
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE

// BLUEMOON ADD START - новые (старые) модули для модсьюта
/datum/design/module/mod_advanced_springlock
name = "Electronic exoskeleton module"
id = "mod_springlock_advanced"
materials = list(/datum/material/iron = 9500, /datum/material/titanium = 4000, /datum/material/glass = 2000, /datum/material/bluespace = 1000)
build_path = /obj/item/mod/module/springlock/advanced
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE

/datum/design/module/mod_advanced_emp_shield
name = "Advanced EMP shield module"
id = "mod_emp_shield_advanced"
materials = list(/datum/material/iron = 1500, /datum/material/uranium = 2000, /datum/material/diamond = 2000, /datum/material/bluespace = 2000)
build_path = /obj/item/mod/module/emp_shield/advanced
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
// BLUEMOON ADD END
13 changes: 13 additions & 0 deletions code/modules/research/techweb/nodes/mod_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,16 @@
"mod_teleporter",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)

// BLUEMOON ADD START - новые (старые) модули для модсьюта
/datum/techweb_node/mod_superior
id = "mod_superior"
display_name = "Superior Modular Suits"
description = "Constructively upgraded versions of old modules which can greately enhance modular suit usefulness."
prereq_ids = list("mod_anomaly")
design_ids = list(
"mod_springlock_advanced",
"mod_emp_shield_advanced",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
// BLUEMOON ADD END
Binary file modified icons/obj/clothing/modsuit/mod_modules.dmi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions modular_splurt/code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
// Get worn items
var/items = get_contents()

// BLUEMOON ADD START - нельзя сбросить включенный модсьют
var/obj/item/mod/control/modsuit = get_item_by_slot(ITEM_SLOT_BACK)
if(modsuit && istype(modsuit) && modsuit.active)
to_chat(src, "<span class='warning'>Включенный модсьют не даёт сбросить одежду!</span>")
return
// BLUEMOON ADD END

// Iterate over worn items
for(var/obj/item/item_worn in items)
// Ignore non-mob (storage)
Expand Down
7 changes: 4 additions & 3 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3221,6 +3221,7 @@
#include "code\modules\mod\modules\modules_science.dm"
#include "code\modules\mod\modules\modules_security.dm"
#include "code\modules\mod\modules\modules_service.dm"
#include "code\modules\mod\modules\modules_springlock.dm"
#include "code\modules\mod\modules\modules_supply.dm"
#include "code\modules\mod\modules\modules_visor.dm"
#include "code\modules\modular_computers\laptop_vendor.dm"
Expand Down Expand Up @@ -4379,9 +4380,9 @@
#include "modular_bluemoon\vagabond\code\tyler_durden.dm"
#include "modular_bluemoon\vagabond\code\wheelchair_resprite.dm"
#include "modular_bluemoon\vagabond\code\modules\mob\dead\new_player\sprite_accessories\tails.dm"
#include "modular_bluemoon\vlad0s_staff\code\synth_drinks.dm"
#include "modular_bluemoon\vlad0s_staff\code\synth_drinks_containers.dm"
#include "modular_bluemoon\vlad0s_staff\code\synth_drinks_recipes.dm"
#include "modular_bluemoon\vlad0s_staff\code\synthdrinks\synth_drinks.dm"
#include "modular_bluemoon\vlad0s_staff\code\synthdrinks\synth_drinks_containers.dm"
#include "modular_bluemoon\vlad0s_staff\code\synthdrinks\synth_drinks_recipes.dm"
#include "modular_citadel\code\datums\components\souldeath.dm"
#include "modular_citadel\code\datums\status_effects\chems.dm"
#include "modular_citadel\code\game\objects\effects\temporary_visuals\souldeath.dm"
Expand Down

0 comments on commit 3eae6d5

Please sign in to comment.