mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MISSED MIRROR] Generic Crew-Available Status Readout Module - Continued (#22277)
* self mirror real * trimmed fat --------- Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com> Co-authored-by: Bloop <vinylspiders@gmail.com>
This commit is contained in:
co-authored by
Hatterhat
Bloop
parent
f9abf2daa1
commit
76d520723c
@@ -317,7 +317,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,
|
||||
|
||||
@@ -166,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"
|
||||
|
||||
@@ -20,17 +20,23 @@
|
||||
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)
|
||||
. = ..()
|
||||
@@ -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
|
||||
|
||||
@@ -289,46 +289,18 @@
|
||||
empulse(src, heavy_range = 4, light_range = 6)
|
||||
drain_power(use_power_cost)
|
||||
|
||||
///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 went unfortunately out of fashion; \
|
||||
and right into the arachnid grip of the Spider Clan. This 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."
|
||||
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"
|
||||
|
||||
/obj/item/mod/module/status_readout/add_ui_data()
|
||||
. = ..()
|
||||
.["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
|
||||
/// Ninja Status Readout - Like the normal status display (see the base type), but with a clock.
|
||||
/obj/item/mod/module/status_readout/ninja
|
||||
name = "MOD Spider Clan status readout module"
|
||||
desc = "A once-common module, this technology unfortunately went out of fashion in the safer regions of space; \
|
||||
and, according to the extra markings on this particular unit's casing, right into the arachnid grip of the Spider Clan. \
|
||||
Like other similar units, this one hooks into the suit's spine, and is 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. This one comes with a clock that calibrates to the \
|
||||
local system time, and an operational ID number display. The vital monitor's speaker has been removed."
|
||||
show_time = TRUE
|
||||
death_sound = null
|
||||
death_sound_volume = null
|
||||
|
||||
///Energy Net - Ensnares enemies in a net that prevents movement.
|
||||
/obj/item/mod/module/energy_net
|
||||
|
||||
Reference in New Issue
Block a user