mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-02-07 07:09:10 +00:00
* biting off more than I can chew, but I feel like hurting myself * more shit * progress continues, moral stays sameish * bite of 2587 * mod_theme down, but probably broken * 385 errors, 16 warnings, zero tgui interactions * 292 19 * final strech to buggy mess, break time * it compiles. It almost fucking certainly doesnt work, but it compiles * fudhsciffubgsbgpgb actions not working as should for modules * fuck it we'll just open the pr as we work on it * icons work now * tgui stuff * more progress * JUDGEMENT * IT LIVES. TGUI LIVES. Special thanks to Sirryan and my brother. * jetpacks, gps, and go do what exo-suits yourself * almost ready * sorry to whoever has to review this * should work™️ * should be good now * pushing changes so I can do reviews next * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * lore™️ Adds illegals level to modsuit parts from syndicate. * early returns * and these illegals * no uplink reference idiot * mod inhands are a good idea * this is needed for inhands nerd * Bomb detector working, modsutis cover ears. skin things * overslotting removal, cyborg charging, ert loadout for gamma * duplicated signal * modsuit themes, removes broken mister / bad base type module, 2 cores in robotics. * tether module, orb module, holster stuff * built in no slip, cheaper 87 * removes modules already installed, engineer ert get jetpack, equip into modsuit storage * comments spaces and duplicate flags * Some adjustments and thoughts on armor, heads get guns because they are cool like that / looting command members armor * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Compile TGUI, slowdown adjustment, Modsuit to MODsuit * sonar, do after, more equipment, acid handling * overlay bugs / ERT / DS suits autodeploy * middle click action buttons * traders, sec modsuit energy nerf * surplus weighting * Kinesis module. * Pathfinder module, kinesis balance, blueprint for pathfinder and kinesis * more power / unused module removed * name, ds fix, pre equipped to cc suit * depot / grammer * ok should be good™️ * overslot, dupe gun, missing suit storage * stealth nerf, new kit * gun stuff / ds theme * bio armor is gone * let me push changes please thank you * makes shocks work right * copies over some changes TG made to module prices after porting * Merge remote-tracking branch 'upstream/master' into Because-I-hate-myself-and-someone-has-to-try-it- * sirryans changes Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Control define, ERT / DS have gloves / boots again. * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * More changes * god I hate tgui. Why do all the bundles live underground, instead of in my basement? * she updates my master till I testmerge * modsuits can recharge again * fixes a lot of shit * Ready for TM probably * sure fuck it whatever that makes sense I guess * the pinpointer works better™️ * Another storage module bug fix * hair and medical stuff * fuck fuck fuck * fixes sonar * Bag exploit fixes / plasma runtimes / ear nerf * dna lock improvement / cryostorage * whoops * Ball form second cooldown wasn't helping, no more infinite cores * she springs my lock till I ***SNAP*** * plasmaman no longer die * fixes modsuit emp issues * atmos no longer fucking dies * Fixes, module printing, and a restriction on newly constructed modsuits * Inventory code my hated * WOOO PREFERENCE CODE WOOOOO * icons my hated * fix for mods / spaceproof shit * holy shit whhhyyyyy * backpack first * Update mod_theme.dm * prevent infinite gun arms / infinite modsuit cores / syndicate modules * fixes tm error * scream loudly if species sprites break. They shouldn't, but, you know. * deconflicted with luck * converts to refit for species * fix pathfinder * fixes modsuits being funky power wise * lockboxes :gatto: , as well as DN-MP shield lock, and slight nerf to atmos modsuit * nerfs the atmos modsuit * magboots for ds / CC modsuit * downside of autosave: typing in wrong window saves bad stuff * Gamma ERT have internal cameras again. * spellcheck when * ah fuck * yes delete the null that works * whoops * fixes error / description * un vulps your cannon * fixes tails disapeering on base modsuits * space to underscore * tgui fix / tajaran * springlock buff, cryopod fix * u helps * WHO PUTS A GUN IN ITEMS * tgui moment * mining modsuit nerf / hidden holster module * PAIN * UNATHI TIDE STATION WIDE * I love special code * slightly dense * shark jumpscare * fixes ghost item, fixes springlock being bad * YIPPEEEE IT WORKED * she decons my flict * pain * ebbas days are numbered :^) * hidden * r-r-r-ebuild * fixes more bugs * qwerty, you are dense * fixes gps * fix mulebot crate * level fix * adds back icon * moving storage, fix bug, modules activate / deactivate message * yeah * yeah * yeah™️ * steels requests * windoors no longer make pathfinder module explode * chat spam * oil slicks + modsuits * whoops * bag check * ofc * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/datums/uplink_items/uplink_nuclear.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/modules/module_pathfinder.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
442 lines
16 KiB
Plaintext
442 lines
16 KiB
Plaintext
//General modules for MODsuits
|
|
|
|
///Storage - Adds a storage component to the suit.
|
|
/obj/item/mod/module/storage
|
|
name = "MOD storage module"
|
|
desc = "What amounts to a series of integrated storage compartments and specialized pockets installed across \
|
|
the surface of the suit, useful for storing various bits, and or bobs."
|
|
icon_state = "storage"
|
|
complexity = 3
|
|
incompatible_modules = list(/obj/item/mod/module/storage, /obj/item/mod/module/plate_compression)
|
|
/// Max weight class of items in the storage.
|
|
var/max_w_class = WEIGHT_CLASS_NORMAL
|
|
/// Max combined weight of all items in the storage.
|
|
var/max_combined_w_class = 15
|
|
/// Max amount of items in the storage.
|
|
var/max_items = 7
|
|
var/obj/item/storage/backpack/modstorage/bag
|
|
|
|
/obj/item/mod/module/storage/Initialize(mapload)
|
|
. = ..()
|
|
var/obj/item/storage/backpack/modstorage/S = new(src)
|
|
bag = S
|
|
bag.max_w_class = max_w_class
|
|
bag.max_combined_w_class = max_combined_w_class
|
|
bag.storage_slots = max_items
|
|
bag.source = src
|
|
|
|
/obj/item/mod/module/storage/Destroy()
|
|
QDEL_NULL(bag)
|
|
return ..()
|
|
|
|
|
|
/obj/item/mod/module/storage/on_install()
|
|
mod.bag = bag
|
|
bag.forceMove(mod)
|
|
|
|
/obj/item/mod/module/storage/on_uninstall(deleting = FALSE)
|
|
if(!deleting)
|
|
for(var/obj/I in bag.contents)
|
|
I.forceMove(get_turf(loc))
|
|
bag.forceMove(src)
|
|
mod.bag = null
|
|
return
|
|
qdel(bag)
|
|
UnregisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP)
|
|
|
|
/obj/item/mod/module/storage/on_suit_deactivation(deleting)
|
|
. = ..()
|
|
bag.forceMove(src) //So the pinpointer doesnt lie.
|
|
|
|
/obj/item/mod/module/storage/on_unequip()
|
|
. = ..()
|
|
bag.forceMove(src)
|
|
|
|
/obj/item/mod/module/storage/large_capacity
|
|
name = "MOD expanded storage module"
|
|
desc = "Reverse engineered by Cybersun Industries from Donk Corporation designs, this system of hidden compartments \
|
|
is entirely within the suit, distributing items and weight evenly to ensure a comfortable experience for the user; \
|
|
whether smuggling, or simply hauling."
|
|
icon_state = "storage_large"
|
|
max_combined_w_class = 21
|
|
max_items = 14
|
|
|
|
/obj/item/mod/module/storage/syndicate
|
|
name = "MOD syndicate storage module"
|
|
desc = "A storage system using nanotechnology developed by Donk Corporation, these compartments use \
|
|
esoteric technology to compress the physical matter of items put inside of them, \
|
|
essentially shrinking items for much easier and more portable storage."
|
|
icon_state = "storage_syndi"
|
|
max_combined_w_class = 30
|
|
max_items = 21
|
|
origin_tech = "materials=6;bluespace=5;syndicate=2"
|
|
|
|
/obj/item/mod/module/storage/belt
|
|
name = "MOD case storage module"
|
|
desc = "Some concessions had to be made when creating a compressed modular suit core. \
|
|
As a result, Roseus Galactic equipped their suit with a slimline storage case. \
|
|
If you find this equipped to a standard modular suit, then someone has almost certainly shortchanged you on a proper storage module."
|
|
icon_state = "storage_case"
|
|
complexity = 0
|
|
max_w_class = WEIGHT_CLASS_SMALL
|
|
removable = FALSE
|
|
max_combined_w_class = 21
|
|
max_items = 7
|
|
|
|
/obj/item/mod/module/storage/bluespace
|
|
name = "MOD bluespace storage module"
|
|
desc = "A storage system developed by Nanotrasen, these compartments employ \
|
|
miniaturized bluespace pockets for the ultimate in storage technology; regardless of the weight of objects put inside."
|
|
icon_state = "storage_bluespace"
|
|
max_w_class = WEIGHT_CLASS_GIGANTIC
|
|
max_combined_w_class = 60
|
|
max_items = 21
|
|
|
|
|
|
//Internal
|
|
/obj/item/storage/backpack/modstorage
|
|
name = "mod's storage"
|
|
desc = "Either you tried to spawn a storage mod, or someone fucked up. Unless you are an admin that just tried to spawn something, issue report."
|
|
var/obj/item/mod/module/storage/source
|
|
|
|
/obj/item/storage/backpack/modstorage/Initialize(mapload)
|
|
. = ..()
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/item/storage/backpack/modstorage/Destroy()
|
|
STOP_PROCESSING(SSobj, src)
|
|
return ..()
|
|
|
|
/obj/item/storage/backpack/modstorage/process()
|
|
update_viewers()
|
|
|
|
/obj/item/storage/backpack/modstorage/update_viewers()
|
|
for(var/_M in mobs_viewing)
|
|
var/mob/M = _M
|
|
if(!QDELETED(M) && M.s_active == src && (M in range(1, loc)) && (source.mod.loc == _M || (M in range(1, source.mod)))) //This ensures someone isn't taking it away from the mod unit
|
|
continue
|
|
hide_from(M)
|
|
|
|
|
|
///Ion Jetpack - Lets the user fly freely through space using battery charge.
|
|
/obj/item/mod/module/jetpack
|
|
name = "MOD ion jetpack module"
|
|
desc = "A series of electric thrusters installed across the suit, this is a module highly anticipated by trainee Engineers. \
|
|
Rather than using gasses for combustion thrust, these jets are capable of accelerating ions using \
|
|
charge from the suit's charge. Some say this isn't Cybersun Industries's first foray into jet-enabled suits."
|
|
icon_state = "jetpack"
|
|
module_type = MODULE_TOGGLE
|
|
complexity = 3
|
|
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
|
|
use_power_cost = DEFAULT_CHARGE_DRAIN
|
|
incompatible_modules = list(/obj/item/mod/module/jetpack)
|
|
cooldown_time = 0.5 SECONDS
|
|
overlay_state_inactive = "module_jetpack"
|
|
overlay_state_active = "module_jetpack_on"
|
|
/// Do we stop the wearer from gliding in space.
|
|
var/stabilizers = FALSE
|
|
|
|
/obj/item/mod/module/jetpack/proc/set_stabilizers(new_stabilizers)
|
|
if(stabilizers == new_stabilizers)
|
|
return
|
|
stabilizers = new_stabilizers
|
|
|
|
/obj/item/mod/module/jetpack/get_configuration()
|
|
. = ..()
|
|
.["stabilizers"] = add_ui_configuration("Stabilizers", "bool", stabilizers)
|
|
|
|
/obj/item/mod/module/jetpack/configure_edit(key, value)
|
|
switch(key)
|
|
if("stabilizers")
|
|
set_stabilizers(text2bool(value))
|
|
|
|
/obj/item/mod/module/jetpack/proc/allow_thrust()
|
|
if(!active)
|
|
return
|
|
if(!drain_power(use_power_cost))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/obj/item/mod/module/jetpack/proc/get_user()
|
|
return mod.wearer
|
|
|
|
/obj/item/mod/module/jetpack/on_activation()
|
|
. = ..()
|
|
mod.jetpack_active = TRUE
|
|
|
|
/obj/item/mod/module/jetpack/on_deactivation(display_message, deleting)
|
|
. = ..()
|
|
mod.jetpack_active = FALSE
|
|
|
|
/obj/item/mod/module/jetpack/advanced
|
|
name = "MOD advanced ion jetpack module"
|
|
desc = "An improvement on the previous model of electric thrusters. This one achieves better efficency through \
|
|
mounting of more jets and a red paint applied on it."
|
|
icon_state = "jetpack_advanced"
|
|
overlay_state_inactive = "module_jetpackadv"
|
|
overlay_state_active = "module_jetpackadv_on"
|
|
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.25
|
|
use_power_cost = DEFAULT_CHARGE_DRAIN * 0.5
|
|
origin_tech = "materials=4;magnets=4;engineering=5" //To replace the old hardsuit upgrade jetpack levels.
|
|
|
|
///EMP Shield - Protects the suit from EMPs.
|
|
/obj/item/mod/module/emp_shield
|
|
name = "MOD EMP shield module"
|
|
desc = "A field inhibitor installed into the suit, protecting it against feedback such as \
|
|
electromagnetic pulses that would otherwise damage the electronic systems of the suit or it's modules. \
|
|
However, it will take from the suit's power to do so."
|
|
icon_state = "empshield"
|
|
origin_tech = "materials=6;bluespace=5;syndicate=2"
|
|
complexity = 1
|
|
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
|
|
incompatible_modules = list(/obj/item/mod/module/emp_shield, /obj/item/mod/module/dna_lock)
|
|
|
|
/obj/item/mod/module/emp_shield/on_install()
|
|
mod.emp_proof = TRUE
|
|
|
|
/obj/item/mod/module/emp_shield/on_uninstall(deleting = FALSE)
|
|
mod.emp_proof = FALSE
|
|
|
|
///Flashlight - Gives the suit a customizable flashlight.
|
|
/obj/item/mod/module/flashlight
|
|
name = "MOD flashlight module"
|
|
desc = "A simple pair of configurable flashlights installed on the left and right sides of the helmet, \
|
|
useful for providing light in a variety of ranges and colors. \
|
|
Some survivalists prefer the color green for their illumination, for reasons unknown."
|
|
icon_state = "flashlight"
|
|
module_type = MODULE_TOGGLE
|
|
complexity = 1
|
|
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
|
|
incompatible_modules = list(/obj/item/mod/module/flashlight)
|
|
cooldown_time = 0.5 SECONDS
|
|
overlay_state_inactive = "module_light"
|
|
overlay_state_active = "module_light_on"
|
|
light_color = COLOR_WHITE
|
|
///The light power for the mod
|
|
var/mod_light_range = 4
|
|
///The light range for the mod
|
|
var/mod_light_power = 2
|
|
var/light_on = FALSE
|
|
/// Charge drain per range amount.
|
|
var/base_power = DEFAULT_CHARGE_DRAIN * 0.1
|
|
/// Minimum range we can set.
|
|
var/min_range = 2
|
|
/// Maximum range we can set.
|
|
var/max_range = 5
|
|
|
|
/obj/item/mod/module/flashlight/on_activation()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
active_power_cost = base_power * mod_light_range
|
|
mod.set_light(mod_light_range, mod_light_power, light_color)
|
|
|
|
/obj/item/mod/module/flashlight/on_deactivation(display_message = TRUE, deleting = FALSE)
|
|
mod.set_light(0, mod_light_power, light_color)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
/obj/item/mod/module/flashlight/on_process()
|
|
active_power_cost = base_power * mod_light_range
|
|
return ..()
|
|
|
|
/obj/item/mod/module/flashlight/get_configuration()
|
|
. = ..()
|
|
.["light_color"] = add_ui_configuration("Light Color", "color", light_color)
|
|
.["light_range"] = add_ui_configuration("Light Range", "number", mod_light_range)
|
|
|
|
/obj/item/mod/module/flashlight/configure_edit(key, value)
|
|
switch(key)
|
|
if("light_color")
|
|
value = input(usr, "Pick new light color", "Flashlight Color") as color|null
|
|
if(!value)
|
|
return
|
|
if(is_color_dark(value, 50))
|
|
to_chat(mod.wearer, ("<span class='warning'>That is too dark</span>"))
|
|
return
|
|
light_color = value
|
|
mod.wearer.regenerate_icons()
|
|
if("light_range")
|
|
mod_light_range = (clamp(text2num(value), min_range, max_range))
|
|
mod.set_light(0, mod_light_power, light_color)
|
|
mod_color_overide = light_color
|
|
on_deactivation()
|
|
|
|
///Dispenser - Dispenses an item after a time passes.
|
|
/obj/item/mod/module/dispenser
|
|
name = "MOD burger dispenser module"
|
|
desc = "A rare piece of technology reverse-engineered from a prototype found in a Donk Corporation vessel. \
|
|
This can draw incredible amounts of power from the suit's charge to create edible organic matter in the \
|
|
palm of the wearer's glove; however, research seemed to have entirely stopped at cheeseburgers. \
|
|
Notably, all attempts to get it to dispense Earl Grey tea have failed."
|
|
icon_state = "dispenser"
|
|
module_type = MODULE_USABLE
|
|
complexity = 3
|
|
use_power_cost = DEFAULT_CHARGE_DRAIN * 2
|
|
incompatible_modules = list(/obj/item/mod/module/dispenser)
|
|
cooldown_time = 5 SECONDS
|
|
/// Path we dispense.
|
|
var/dispense_type = /obj/item/reagent_containers/food/snacks/cheeseburger
|
|
/// Time it takes for us to dispense.
|
|
var/dispense_time = 0 SECONDS
|
|
|
|
/obj/item/mod/module/dispenser/on_use()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
if(dispense_time && !do_after(mod.wearer, dispense_time, target = mod.wearer))
|
|
return FALSE
|
|
var/obj/item/dispensed = new dispense_type(mod.wearer.loc)
|
|
mod.wearer.put_in_hands(dispensed)
|
|
playsound(src, 'sound/machines/click.ogg', 100, TRUE)
|
|
drain_power(use_power_cost)
|
|
return dispensed
|
|
|
|
///Thermal Regulator - Regulates the wearer's core temperature.
|
|
/obj/item/mod/module/thermal_regulator
|
|
name = "MOD thermal regulator module"
|
|
desc = "Advanced climate control, using an inner body glove interwoven with thousands of tiny, \
|
|
flexible cooling lines. This circulates coolant at various user-controlled temperatures, \
|
|
ensuring they're comfortable; even if they're some that like it hot."
|
|
icon_state = "regulator"
|
|
module_type = MODULE_TOGGLE
|
|
complexity = 1
|
|
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
|
|
incompatible_modules = list(/obj/item/mod/module/thermal_regulator)
|
|
cooldown_time = 0.5 SECONDS
|
|
/// The temperature we are regulating to.
|
|
var/temperature_setting = BODYTEMP_NORMAL
|
|
/// Minimum temperature we can set.
|
|
var/min_temp = 293.15
|
|
/// Maximum temperature we can set.
|
|
var/max_temp = 318.15
|
|
|
|
/obj/item/mod/module/thermal_regulator/get_configuration()
|
|
. = ..()
|
|
.["temperature_setting"] = add_ui_configuration("Temperature", "number", temperature_setting - T0C)
|
|
|
|
/obj/item/mod/module/thermal_regulator/configure_edit(key, value)
|
|
switch(key)
|
|
if("temperature_setting")
|
|
temperature_setting = clamp(text2num(value) + T0C, min_temp, max_temp)
|
|
|
|
/obj/item/mod/module/thermal_regulator/on_active_process()
|
|
if(mod.wearer.bodytemperature > temperature_setting)
|
|
mod.wearer.bodytemperature = max(temperature_setting, mod.wearer.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
|
else if(mod.wearer.bodytemperature < temperature_setting)
|
|
mod.wearer.bodytemperature = min(temperature_setting, mod.wearer.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
|
|
|
/obj/item/mod/module/dna_lock
|
|
name = "MOD DNA lock module"
|
|
desc = "A module which engages with the various locks and seals tied to the suit's systems, \
|
|
enabling it to only be worn by someone corresponding with the user's exact DNA profile; \
|
|
however, this incredibly sensitive module is shorted out by EMPs. Luckily, stable mutagen has been outlawed."
|
|
icon_state = "dnalock"
|
|
origin_tech = "materials=6;bluespace=5;syndicate=1"
|
|
module_type = MODULE_USABLE
|
|
complexity = 2
|
|
use_power_cost = DEFAULT_CHARGE_DRAIN * 3
|
|
incompatible_modules = list(/obj/item/mod/module/dna_lock, /obj/item/mod/module/emp_shield)
|
|
cooldown_time = 0.5 SECONDS
|
|
/// The DNA we lock with.
|
|
var/dna = null
|
|
|
|
/obj/item/mod/module/dna_lock/on_install()
|
|
RegisterSignal(mod, COMSIG_MOD_ACTIVATE, PROC_REF(on_mod_activation))
|
|
RegisterSignal(mod, COMSIG_MOD_MODULE_REMOVAL, PROC_REF(on_mod_removal))
|
|
RegisterSignal(mod, COMSIG_ATOM_EMP_ACT, PROC_REF(on_emp))
|
|
RegisterSignal(mod, COMSIG_ATOM_EMAG_ACT, PROC_REF(on_emag))
|
|
|
|
/obj/item/mod/module/dna_lock/on_uninstall(deleting = FALSE)
|
|
UnregisterSignal(mod, COMSIG_MOD_ACTIVATE)
|
|
UnregisterSignal(mod, COMSIG_MOD_MODULE_REMOVAL)
|
|
UnregisterSignal(mod, COMSIG_ATOM_EMP_ACT)
|
|
UnregisterSignal(mod, COMSIG_ATOM_EMAG_ACT)
|
|
|
|
/obj/item/mod/module/dna_lock/on_use()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
dna = mod.wearer.dna.unique_enzymes
|
|
drain_power(use_power_cost)
|
|
|
|
/obj/item/mod/module/dna_lock/emp_act(severity)
|
|
. = ..()
|
|
if(mod.emp_proof)
|
|
return
|
|
on_emp(src, severity)
|
|
|
|
/obj/item/mod/module/dna_lock/emag_act(mob/user, obj/item/card/emag/emag_card)
|
|
. = ..()
|
|
on_emag(src, user, emag_card)
|
|
|
|
/obj/item/mod/module/dna_lock/proc/dna_check(mob/user)
|
|
if(!iscarbon(user))
|
|
return FALSE
|
|
if(!dna)
|
|
return TRUE
|
|
if(dna == mod.wearer.dna.unique_enzymes)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/item/mod/module/dna_lock/proc/on_emp(datum/source, severity)
|
|
SIGNAL_HANDLER
|
|
|
|
dna = null
|
|
|
|
/obj/item/mod/module/dna_lock/proc/on_emag(datum/source, mob/user, obj/item/card/emag/emag_card)
|
|
SIGNAL_HANDLER
|
|
|
|
dna = null
|
|
|
|
/obj/item/mod/module/dna_lock/proc/on_mod_activation(datum/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!dna_check(user))
|
|
atom_say("ERROR: User does not match owner DNA")
|
|
return MOD_CANCEL_ACTIVATE
|
|
|
|
/obj/item/mod/module/dna_lock/proc/on_mod_removal(datum/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!dna_check(user))
|
|
atom_say("ERROR: User does not match owner DNA")
|
|
return MOD_CANCEL_REMOVAL
|
|
|
|
/obj/item/mod/module/dna_lock/emp_shield
|
|
name = "MOD DN-MP shield lock"
|
|
desc = "This syndicate module is a combination EMP shield and DNA lock. Provides the best of both worlds, with the weakness of niether."
|
|
icon_state = "dnalock"
|
|
origin_tech = "materials=6;bluespace=5;syndicate=3"
|
|
complexity = 3
|
|
use_power_cost = DEFAULT_CHARGE_DRAIN * 5
|
|
|
|
/obj/item/mod/module/dna_lock/emp_shield/on_install()
|
|
. = ..()
|
|
mod.emp_proof = TRUE
|
|
|
|
/obj/item/mod/module/dna_lock/emp_shield/on_uninstall(deleting = FALSE)
|
|
. = ..()
|
|
mod.emp_proof = FALSE
|
|
|
|
///Plasma Stabilizer - Prevents plasmamen from igniting in the suit
|
|
/obj/item/mod/module/plasma_stabilizer
|
|
name = "MOD plasma stabilizer module"
|
|
desc = "This system essentially forms an atmosphere of its own, within the suit, \
|
|
efficiently and quickly preventing oxygen from causing the user's head to burst into flame. \
|
|
This allows plasmamen to safely remove their helmet, allowing for easier \
|
|
equipping of any MODsuit-related equipment, or otherwise. \
|
|
The purple glass of the visor seems to be constructed for nostalgic purposes."
|
|
icon_state = "plasma_stabilizer"
|
|
complexity = 1
|
|
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
|
|
incompatible_modules = list(/obj/item/mod/module/plasma_stabilizer)
|
|
overlay_state_inactive = "module_plasma"
|
|
|
|
/obj/item/mod/module/plasma_stabilizer/on_equip()
|
|
ADD_TRAIT(mod.wearer, TRAIT_NOSELFIGNITION_HEAD_ONLY, MODSUIT_TRAIT)
|
|
|
|
/obj/item/mod/module/plasma_stabilizer/on_unequip()
|
|
REMOVE_TRAIT(mod.wearer, TRAIT_NOSELFIGNITION_HEAD_ONLY, MODSUIT_TRAIT)
|