Skip to content

Commit

Permalink
[PORT] Various modsuit PRs from /tg/ (#2385)
Browse files Browse the repository at this point in the history
* MOD Complexity rebalance (#76077)

Reduced the cost of a lot of MODules.

Pathfinder 2 -> 1
Tether 3 -> 1
Temperature Regulator 2 -> 1
DNA lock 2 -> 1
Health analyzer 2 -> 1
Sonar 2 -> 1
Microwave beam 2 -> 1
Drill 2 -> 1
All visors (including NV and thermals) 2 -> 1
Circuit Adapter 2 -> 1

The Mining MODsuit has had its complexity increased to 15 and now starts
with the eating apparatus module, with a total base complexity of 10/15
now.

The Prototype MODsuit's active slowdown has been decreased from 1.5 (!)
to 1.

> Reduced the cost of a lot of MODules.

There's lots of cute little MODules here, and they are all despite their
'small' cost far too expensive for them to ever be used. The small
little cost adds up, when you consider that two 2-complexity modules
cost FOUR, which is more than most good modules (that are 3), especially
when storage modules take up 3 complexity already. Think about it like
genetics, imagine if geladikinesis cost 40 instability. It'd be
pointless and just make it not used.

> Pathfinder 2 -> 1

Pathfinder is a little buggy, a bit janky, and still just a commodity,
so this might let captains keep it for themselves more often when
they're kitting out their MOD.

> Tether 3 -> 1

Tether costing 3 complexity is ABSURD. That's as much as the actual ion
jetpacks, and that's for something which you can replace completely with
a fire extinguisher, not even including the tiny 4 tiles tethering
range.

> Temperature Regulator 2 -> 1

This is vital for spacewalking, I really don't know why it's this
expensive. Hell it should be the norm, but whatevs.

> DNA lock 2 -> 1

Nobody's ever going to use this if it can just be EMPed and broken...
especially when it costs 2 complexity, which is the same cost as defibs,
surgical processor, holster, criminal capture..

> Health analyzer 2 -> 1

This is just a health analyzer. A small item that you're paying for the
privilege of being able to have it in your janksuit. It really shouldn't
cost 2 complexity, nobody ever takes this.

> Sonar 2 -> 1

I don't think there's much of a reason for sonar to be 2 complexity. You
might think it's nuts, but sonar really isn't that useful as it's a
windup with a screen-only range. Making it 1 might let it be seen ingame
at some point.

> Microwave beam 2 -> 1

Despite the cool name this just fries food. I don't think that should be
expensive!

> Drill 2 -> 1

The drill module is mostly redundant when by the time you get it,
chances are you have a plasma cutter already which is usually better, if
not as space-efficient. There's also the dumb issue with drilling into
gibtonite which instantly blows it up.

> All visors (including NV and thermals) 2 -> 1

Similarly to the health analyzer, chances are if you HAVE the module you
don't actually *need* it as you're already.. that job.

Additionally, and this is also part of the reason for the NV, thermal,
and even the health analyzer modules, is that traitors/nukies now have
to balance MOD economy alongside TC count, and I can't tell you just how
frustrating it is to buy something and be told I don't have enough
complexity to put it into the MODsuit. I already spent the damn TC!

> Circuit Adapter 2 -> 1

This thing seems pretty useless. All it can really do is open and close
your modsuit, which like, wow okay. No need for it to be expensive.

> The Mining MODsuit has had its complexity increased to 15 and now
starts with the eating apparatus module, with a total base complexity of
10/13 now.

The complexity increase is because for some reason the MODsuit is
already filled to the brim by default, which means that actually
interacting with robotics in any way is thoroughly disincentivized as
you'd need to take so many modules out to do so that it makes the
purchase and interaction pointless. Now you CAN go and ask robotics for
anything you need, though there isn't much a miner would want and value
enough to trek across the station, for now.

Also, it starts with the eating apparatus because it really looked like
it should! The flavor text even talks about miners, it's strange for
that to be there if miners won't use it. It'll also encourage it to
actually be bought more by allowing you to eat through it.

> The Prototype MODsuit's active slowdown has been decreased from 1.5
(!) to 1.

1.5 is a lot, A LOT, of slowdown. For such an incredibly rare mod, it
completely kills the damn thing, even for the charlie station crew! You
can't fight xenos with 1.5 slowdown! Having Kinesis isn't enough of a
reason to cripple it so thoroughly and pointlessly. It's 0.4 now, which
is a nice middleground between 'fast' suits like the medical and
security ones, and the 'slow' ones like civilian, engineering, science.
:cl:
balance: Reduced the complexity cost of a lot of MODules.
balance: Pathfinder 2 -> 1
balance: Tether 3 -> 2
balance: Temperature Regulator 2 -> 1
balance: DNA lock 2 -> 1
balance: Health analyzer 2 -> 1
balance: Sonar 2 -> 1
balance: Microwave beam 2 -> 1
balance: Drill 2 -> 1
balance: All visors (including NV and thermals) 2 -> 1
balance: Circuit Adapter 2 -> 1
balance: The Mining MODsuit has had its complexity increased to 13 and
now starts with the eating apparatus module, with a total base
complexity of 10/13 now.
balance: The Prototype MODsuit's active slowdown has been decreased from
1.5 (!) to 1.
spellcheck: Fixed a type on the energy net module.
/:cl:

* Generic Crew-Available Status Readout Module - Continued (#76117)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/31829017/0019591c-a7f5-4315-8ea7-1ebc1ea96206)
continues and closes tgstation/tgstation#75708
- adds a generic status readout module that doesn't have a round timer
or round ID display
- the health analyzer's info display can now be toggled via a setting 

![image](https://github.com/tgstation/tgstation/assets/31829017/95dc3c2d-26bf-4747-a5ba-dddc5b2a33d2)
- adds the generic status readout module to the advanced medical MODs
node

![image](https://github.com/tgstation/tgstation/assets/31829017/8c065c45-692e-4bf9-901f-5c382fb278b6)

- it has a death sound now yippee (sound and volume are vareditable.
shoutouts to fikou for giving me a sound that was better)
- ninjas still get the one with round timer/ID display
## Why It's Good For The Game
it's a neat little module that tells you things about your spaceman that
you might want to keep track of, like viruses and health and nutritional
status

## Changelog

:cl:
add: A really old data disk with the MOD module designs for the status
readout was recovered, and has been haphazardly hotpatched into the
research networks.
add: Also, the status readout module now plays a sound on death.
qol: The MODsuit health analyzer's info tab health readout can now be
disabled in its settings.
/:cl:

---------

Co-authored-by: Hatterhat <[email protected]>
Co-authored-by: san7890 <[email protected]>

* Atrocinator flips your chat text around (#76618)

![image](https://github.com/tgstation/tgstation/assets/51863163/fd325eeb-f862-4268-8370-4c13c4701c16)

It's funny

:cl: Melbert
add: The Atrocinator will now flip you even more.
/:cl:

* Infiltrator MODs don't have a plasma visor anymore (#76164)

## About The Pull Request

Disables the plasma stabilizer's visor for any MODsuit that has an
infiltrator module

## Why It's Good For The Game

It doesn't make sense that a suit designed for concealing your identity
gave away your species. This changes that, allowing plasmamen to freely
use this MODsuit.

## Changelog

:cl: StaringGasMask
qol: Now plasmamen can use the infiltrator MODsuit without having their
species revealed. The helmet's still not sealed, so remember your mask.
/:cl:

* Failed MOD auto-storage attempts now tell you that it failed (#76673)

## About The Pull Request
title; if you try to retract your suit and it fails to store your suit
slot item (tank/gun/etc) into storage, now it tells you with both a
balloon alert and chat that you dropped something


![image](https://github.com/tgstation/tgstation/assets/31829017/318b3d19-ba74-46ea-a85b-6f620bcb2e19)

![image](https://github.com/tgstation/tgstation/assets/31829017/602ca3bf-ccb0-4f48-a8a6-9faa0b1c1f6c)

## Why It's Good For The Game
"oh shit where'd i put my oxygen tank" (you left it behind 3 Zs ago or
something)

## Changelog

:cl:
qol: When a MOD fails to store something in itself when retracting,
you're now notified in both the chat and by a balloon alert.
/:cl:

Co-authored-by: Hatterhat <[email protected]>

* Removes the hat whitelist from the hat stabilizer mod (#76962)

## About The Pull Request
This PR allows you to use any hat with the hat stabilizer module.
Before, it was limited to a pretty small, very arbitrary list of hats
(captain's hats, centcom hats, and a few gimmicky hats), making it
disappointingly limited to both the captain, and anyone who finds the
thing in maints. I'm guessing this limit was put in place to avoid janky
looking hats, but plasmamen get the exact same thing without the
restriction, and there haven't really been any complaints there. While I
did not test this with every single hat, I *did* test it with every hat
currently in the autodrobe, and there wasn't any jank there, even with
things like wigs, and hats that cover the entire head.
There was also a bug/oversight where the MOD eating apparatus module
didn't properly disable pepper spray protection like it was supposed to.
It was literally just a matter of missing parentheses, so i fixed that
too.

Not super sure what to mark this change as btw (qol? balance? removal?)
so if I should change it, let me know.

## Why It's Good For The Game
Allows both the captain and anyone who finds/steals the module to
actually wear the hats they want to wear, instead of being limited to a
small, mostly arbitrary list of hats, and having less outfit choice that
a plasmaman.
## Changelog
:cl:
qol: You can now use any hat with the hat stabilizer MOD
fix: The MOD eating apparatus module now properly disables pepper spray
protection
/:cl:

---------

Co-authored-by: carlarctg <[email protected]>
Co-authored-by: Hatterhat <[email protected]>
Co-authored-by: Hatterhat <[email protected]>
Co-authored-by: san7890 <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: StaringGasMask <[email protected]>
Co-authored-by: Nick <[email protected]>
  • Loading branch information
8 people authored Jun 24, 2024
1 parent 1b96d9e commit fd3e4a0
Show file tree
Hide file tree
Showing 20 changed files with 257 additions and 176 deletions.
8 changes: 4 additions & 4 deletions code/modules/mod/mod_theme.dm
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
resistance_flags = FIRE_PROOF|LAVA_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
complexity_max = DEFAULT_MAX_COMPLEXITY - 5
complexity_max = DEFAULT_MAX_COMPLEXITY - 2
charge_drain = DEFAULT_CHARGE_DRAIN * 2
allowed_suit_storage = list(
/obj/item/resonator,
Expand Down Expand Up @@ -1293,7 +1293,7 @@
post-void war era modular suit to ever be safely utilized by an operator. This ancient clunker is still functional, \
though it's missing several modern-day luxuries from updated Nakamura Engineering designs. \
Primarily, the suit's myoelectric suit layer is entirely non-existant, and the servos do very little to \
help distribute the weight evenly across the wearer's body, making it slow and bulky to move in. \
help distribute the weight evenly across the wearer's body when the suit is deactivated, making it slow and bulky to move in. \
The internal heads-up display is rendered in nearly unreadable cyan, as the visor suggests, \
leaving the user unable to see long distances. However, the way the helmet retracts is pretty cool."
default_skin = "prototype"
Expand All @@ -1302,8 +1302,8 @@
siemens_coefficient = 0
complexity_max = DEFAULT_MAX_COMPLEXITY + 5
charge_drain = DEFAULT_CHARGE_DRAIN * 2
slowdown_inactive = 2
slowdown_active = 1.5
slowdown_inactive = 1.5
slowdown_active = 1
ui_theme = "hackerman"
inbuilt_modules = list(/obj/item/mod/module/anomaly_locked/kinesis/prebuilt/prototype)
allowed_suit_storage = list(
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mod/mod_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
/obj/item/mod/module/orebag,
/obj/item/mod/module/clamp,
/obj/item/mod/module/drill,
/obj/item/mod/module/mouthhole,
)
default_pins = list(
/obj/item/mod/module/gps,
Expand Down Expand Up @@ -304,7 +305,7 @@
applied_modules = list(
/obj/item/mod/module/storage,
/obj/item/mod/module/noslip,
/obj/item/mod/module/status_readout,
/obj/item/mod/module/status_readout/ninja,
/obj/item/mod/module/stealth/ninja,
/obj/item/mod/module/dispenser/ninja,
/obj/item/mod/module/dna_lock/reinforced,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mod/modules/module_pathfinder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
The implant is stored in the module and needs to be injected in a human to function. \
Nakamura Engineering swears up and down there's airbrakes."
icon_state = "pathfinder"
complexity = 2
complexity = 1
use_power_cost = DEFAULT_CHARGE_DRAIN * 10
incompatible_modules = list(/obj/item/mod/module/pathfinder)
/// The pathfinding implant.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mod/modules/modules_engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
these are only capable of working in zero-gravity environments, a blessing to some Engineers."
icon_state = "tether"
module_type = MODULE_ACTIVE
complexity = 3
complexity = 2
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/tether)
cooldown_time = 1.5 SECONDS
Expand Down
128 changes: 87 additions & 41 deletions code/modules/mod/modules/modules_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@
/obj/item/mod/module/storage/proc/on_chestplate_unequip(obj/item/source, force, atom/newloc, no_move, invdrop, silent)
if(QDELETED(source) || !mod.wearer || newloc == mod.wearer || !mod.wearer.s_store)
return
to_chat(mod.wearer, span_notice("[src] tries to store [mod.wearer.s_store] inside itself."))
if(atom_storage?.attempt_insert(mod.wearer.s_store, mod.wearer, override = TRUE))
mod.wearer.temporarilyRemoveItemFromInventory(mod.wearer.s_store)
if(!atom_storage?.attempt_insert(mod.wearer.s_store, mod.wearer, override = TRUE))
balloon_alert(mod.wearer, "storage failed!")
to_chat(mod.wearer, span_warning("[src] fails to store [mod.wearer.s_store] inside itself!"))
return
to_chat(mod.wearer, span_notice("[src] stores [mod.wearer.s_store] inside itself."))
mod.wearer.temporarilyRemoveItemFromInventory(mod.wearer.s_store)

/obj/item/mod/module/storage/large_capacity
name = "MOD expanded storage module"
Expand Down Expand Up @@ -163,6 +166,68 @@
overlay_state_active = "module_jetpackadv_on"
full_speed = TRUE

///Status Readout - Puts a lot of information including health, nutrition, fingerprints, temperature to the suit TGUI.
/obj/item/mod/module/status_readout
name = "MOD status readout module"
desc = "A once-common module, this technology unfortunately went out of fashion in the safer regions of space; \
and found new life in the research networks of the Periphery. This particular unit hooks into the suit's spine, \
capable of capturing and displaying all possible biometric data of the wearer; sleep, nutrition, fitness, fingerprints, \
and even useful information such as their overall health and wellness. The vitals monitor also comes with a speaker, loud enough \
to alert anyone nearby that someone has, in fact, died."
icon_state = "status"
complexity = 1
use_power_cost = DEFAULT_CHARGE_DRAIN * 0.1
incompatible_modules = list(/obj/item/mod/module/status_readout)
tgui_id = "status_readout"
/// Does this show the round ID and shift time?
var/show_time = FALSE
/// Death sound. May or may not be funny. Vareditable at your own risk.
var/death_sound = 'sound/effects/flatline3.ogg'
/// Death sound volume. Please be responsible with this.
var/death_sound_volume = 50

/obj/item/mod/module/status_readout/add_ui_data()
. = ..()
.["show_time"] = show_time
.["statustime"] = station_time_timestamp()
.["statusid"] = GLOB.round_id
.["statushealth"] = mod.wearer?.health || 0
.["statusmaxhealth"] = mod.wearer?.getMaxHealth() || 0
.["statusbrute"] = mod.wearer?.getBruteLoss() || 0
.["statusburn"] = mod.wearer?.getFireLoss() || 0
.["statustoxin"] = mod.wearer?.getToxLoss() || 0
.["statusoxy"] = mod.wearer?.getOxyLoss() || 0
.["statustemp"] = mod.wearer?.bodytemperature || 0
.["statusnutrition"] = mod.wearer?.nutrition || 0
.["statusfingerprints"] = mod.wearer ? md5(mod.wearer.dna.unique_identity) : null
.["statusdna"] = mod.wearer?.dna.unique_enzymes
.["statusviruses"] = null
if(!length(mod.wearer?.diseases))
return .
var/list/viruses = list()
for(var/datum/disease/virus as anything in mod.wearer.diseases)
var/list/virus_data = list()
virus_data["name"] = virus.name
virus_data["type"] = virus.spread_text
virus_data["stage"] = virus.stage
virus_data["maxstage"] = virus.max_stages
virus_data["cure"] = virus.cure_text
viruses += list(virus_data)
.["statusviruses"] = viruses

return .

/obj/item/mod/module/status_readout/on_suit_activation()
RegisterSignal(mod.wearer, COMSIG_LIVING_DEATH, PROC_REF(death_sound))

/obj/item/mod/module/status_readout/on_suit_deactivation(deleting)
UnregisterSignal(mod.wearer, COMSIG_LIVING_DEATH)

/obj/item/mod/module/status_readout/proc/death_sound(mob/living/carbon/human/wearer)
SIGNAL_HANDLER
if(death_sound && death_sound_volume)
playsound(wearer, death_sound, death_sound_volume, FALSE)

///Eating Apparatus - Lets the user eat/drink with the suit on.
/obj/item/mod/module/mouthhole
name = "MOD eating apparatus module"
Expand All @@ -181,8 +246,8 @@
/obj/item/mod/module/mouthhole/on_install()
former_flags = mod.helmet.flags_cover
former_visor_flags = mod.helmet.visor_flags_cover
mod.helmet.flags_cover &= ~HEADCOVERSMOUTH|PEPPERPROOF
mod.helmet.visor_flags_cover &= ~HEADCOVERSMOUTH|PEPPERPROOF
mod.helmet.flags_cover &= ~(HEADCOVERSMOUTH|PEPPERPROOF)
mod.helmet.visor_flags_cover &= ~(HEADCOVERSMOUTH|PEPPERPROOF)

/obj/item/mod/module/mouthhole/on_uninstall(deleting = FALSE)
if(deleting)
Expand Down Expand Up @@ -358,7 +423,7 @@
ensuring they're comfortable; even if they're some that like it hot."
icon_state = "regulator"
module_type = MODULE_TOGGLE
complexity = 2
complexity = 1
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/thermal_regulator)
cooldown_time = 0.5 SECONDS
Expand Down Expand Up @@ -389,7 +454,7 @@
however, this incredibly sensitive module is shorted out by EMPs. Luckily, cloning has been outlawed."
icon_state = "dnalock"
module_type = MODULE_USABLE
complexity = 2
complexity = 1
use_power_cost = DEFAULT_CHARGE_DRAIN * 3
incompatible_modules = list(/obj/item/mod/module/dna_lock, /obj/item/mod/module/eradication_lock)
cooldown_time = 0.5 SECONDS
Expand Down Expand Up @@ -472,6 +537,11 @@
incompatible_modules = list(/obj/item/mod/module/plasma_stabilizer)
overlay_state_inactive = "module_plasma"

/obj/item/mod/module/plasma_stabilizer/generate_worn_overlay()
if(locate(/obj/item/mod/module/infiltrator) in mod.modules)
return list()
return ..()

/obj/item/mod/module/plasma_stabilizer/on_equip()
ADD_TRAIT(mod.wearer, TRAIT_NOSELFIGNITION_HEAD_ONLY, MOD_TRAIT)

Expand All @@ -484,7 +554,7 @@
/obj/item/mod/module/hat_stabilizer
name = "MOD hat stabilizer module"
desc = "A simple set of deployable stands, directly atop one's head; \
these will deploy under a select few hats to keep them from falling off, allowing them to be worn atop the sealed helmet. \
these will deploy under a hat to keep it from falling off, allowing them to be worn atop the sealed helmet. \
You still need to take the hat off your head while the helmet deploys, though. \
This is a must-have for Nanotrasen Captains, enabling them to show off their authoritative hat even while in their MODsuit."
icon_state = "hat_holder"
Expand All @@ -493,36 +563,9 @@
even though it comes inbuilt into the Magnate/Corporate MODS and spawns in maints, I like the idea of stealing them*/
/// Currently "stored" hat. No armor or function will be inherited, ONLY the icon.
var/obj/item/clothing/head/attached_hat
/// Whitelist of attachable hats, read note in Initialize() below this line
var/static/list/attachable_hats_list

/obj/item/mod/module/hat_stabilizer/Initialize(mapload)
. = ..()
attachable_hats_list = typecacheof(
//List of attachable hats. Make sure these and their subtypes are all tested, so they dont appear janky.
//This list should also be gimmicky, so captains can have fun. I.E. the Santahat, Pirate hat, Tophat, Chefhat...
//Yes, I said it, the captain should have fun.
list(
/obj/item/clothing/head/hats/caphat,
/obj/item/clothing/head/costume/crown,
/obj/item/clothing/head/hats/centhat,
/obj/item/clothing/head/hats/centcom_cap,
/obj/item/clothing/head/costume/pirate,
/obj/item/clothing/head/costume/santa,
/obj/item/clothing/head/utility/hardhat/reindeer,
/obj/item/clothing/head/costume/sombrero/green,
/obj/item/clothing/head/costume/kitty,
/obj/item/clothing/head/costume/rabbitears,
/obj/item/clothing/head/costume/festive,
/obj/item/clothing/head/costume/powdered_wig,
/obj/item/clothing/head/costume/weddingveil,
/obj/item/clothing/head/hats/tophat,
/obj/item/clothing/head/costume/nursehat,
/obj/item/clothing/head/utility/chefhat,
/obj/item/clothing/head/costume/papersack,
/obj/item/clothing/head/caphat/beret,
/obj/item/clothing/head/helmet/space/beret,
))
/// Original cover flags for the MOD helmet, before a hat is placed
var/former_flags
var/former_visor_flags

/obj/item/mod/module/hat_stabilizer/on_suit_activation()
RegisterSignal(mod.helmet, COMSIG_ATOM_EXAMINE, PROC_REF(add_examine))
Expand Down Expand Up @@ -552,14 +595,15 @@
if(!mod.active)
balloon_alert(user, "suit must be active!")
return
if(!is_type_in_typecache(hitting_item, attachable_hats_list))
balloon_alert(user, "this hat won't fit!")
return
if(attached_hat)
balloon_alert(user, "hat already attached!")
return
if(mod.wearer.transferItemToLoc(hitting_item, src, force = FALSE, silent = TRUE))
attached_hat = hitting_item
former_flags = mod.helmet.flags_cover
former_visor_flags = mod.helmet.visor_flags_cover
mod.helmet.flags_cover |= attached_hat.flags_cover
mod.helmet.visor_flags_cover |= attached_hat.visor_flags_cover
balloon_alert(user, "hat attached, right-click to remove")
mod.wearer.update_clothing(mod.slot_flags)

Expand All @@ -579,6 +623,8 @@
else
balloon_alert_to_viewers("the hat falls to the floor!")
attached_hat = null
mod.helmet.flags_cover = former_flags
mod.helmet.visor_flags_cover = former_visor_flags
mod.wearer.update_clothing(mod.slot_flags)

///Sign Language Translator - allows people to sign over comms using the modsuit's gloves.
Expand Down
7 changes: 6 additions & 1 deletion code/modules/mod/modules/modules_maint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
playsound(src, 'sound/effects/curseattack.ogg', 50)
mod.wearer.AddElement(/datum/element/forced_gravity, NEGATIVE_GRAVITY)
RegisterSignal(mod.wearer, COMSIG_MOVABLE_MOVED, PROC_REF(check_upstairs))
RegisterSignal(mod.wearer, COMSIG_MOB_SAY, PROC_REF(on_talk))
ADD_TRAIT(mod.wearer, TRAIT_SILENT_FOOTSTEPS, MOD_TRAIT)
check_upstairs() //todo at some point flip your screen around

Expand All @@ -300,7 +301,7 @@
if(deleting)
playsound(src, 'sound/effects/curseattack.ogg', 50)
qdel(mod.wearer.RemoveElement(/datum/element/forced_gravity, NEGATIVE_GRAVITY))
UnregisterSignal(mod.wearer, COMSIG_MOVABLE_MOVED)
UnregisterSignal(mod.wearer, list(COMSIG_MOVABLE_MOVED, COMSIG_MOB_SAY))
step_count = 0
REMOVE_TRAIT(mod.wearer, TRAIT_SILENT_FOOTSTEPS, MOD_TRAIT)
var/turf/open/openspace/current_turf = get_turf(mod.wearer)
Expand Down Expand Up @@ -334,3 +335,7 @@
QDEL_IN(mod.wearer, FLY_TIME)

#undef FLY_TIME

/obj/item/mod/module/atrocinator/proc/on_talk(datum/source, list/speech_args)
SIGNAL_HANDLER
speech_args[SPEECH_SPANS] |= "upside_down"
25 changes: 18 additions & 7 deletions code/modules/mod/modules/modules_medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,30 @@
but it's up to you to do something with it."
icon_state = "health"
module_type = MODULE_ACTIVE
complexity = 2
complexity = 1
use_power_cost = DEFAULT_CHARGE_DRAIN
incompatible_modules = list(/obj/item/mod/module/health_analyzer)
cooldown_time = 0.5 SECONDS
tgui_id = "health_analyzer"
/// Scanning mode, changes how we scan something.
var/mode = HEALTH_SCAN
/// Do we relay the wearer's health data to the info tab? Mainly useful for turning off if you also have a status readout.
var/show_vitals = TRUE
/// List of all scanning modes.
var/static/list/modes = list(HEALTH_SCAN, WOUND_SCAN, CHEM_SCAN)

/obj/item/mod/module/health_analyzer/add_ui_data()
. = ..()
.["userhealth"] = mod.wearer?.health || 0
.["usermaxhealth"] = mod.wearer?.getMaxHealth() || 0
.["userbrute"] = mod.wearer?.getBruteLoss() || 0
.["userburn"] = mod.wearer?.getFireLoss() || 0
.["usertoxin"] = mod.wearer?.getToxLoss() || 0
.["useroxy"] = mod.wearer?.getOxyLoss() || 0
.["show_vitals"] = show_vitals
if(show_vitals)
.["userhealth"] = mod.wearer?.health || 0
.["usermaxhealth"] = mod.wearer?.getMaxHealth() || 0
.["userbrute"] = mod.wearer?.getBruteLoss() || 0
.["userburn"] = mod.wearer?.getFireLoss() || 0
.["usertoxin"] = mod.wearer?.getToxLoss() || 0
.["useroxy"] = mod.wearer?.getOxyLoss() || 0

return .

/obj/item/mod/module/health_analyzer/on_select_use(atom/target)
. = ..()
Expand All @@ -50,11 +56,16 @@
/obj/item/mod/module/health_analyzer/get_configuration()
. = ..()
.["mode"] = add_ui_configuration("Scan Mode", "list", mode, modes)
.["show_vitals"] = add_ui_configuration("Self Vitals Display", "bool", show_vitals)

return .

/obj/item/mod/module/health_analyzer/configure_edit(key, value)
switch(key)
if("mode")
mode = value
if("show_vitals")
show_vitals = value

#undef HEALTH_SCAN
#undef WOUND_SCAN
Expand Down
Loading

0 comments on commit fd3e4a0

Please sign in to comment.