From 123847d313ead7fc2f8fe0bd0766f030ecc3f1a4 Mon Sep 17 00:00:00 2001 From: Geeves Date: Fri, 31 Jan 2020 00:58:26 +0200 Subject: [PATCH] IPC Charge Level Status (#8110) --- .../mob/living/carbon/human/human_species.dm | 84 +++++++++++++++++++ html/changelogs/geeves-machinestat.yml | 6 ++ 2 files changed, 90 insertions(+) create mode 100644 html/changelogs/geeves-machinestat.yml diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 5820ce6a1ed..9731679cf17 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -43,6 +43,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) h_style = "blue IPC screen" . = ..(mapload, "Baseline Frame") +/mob/living/carbon/human/machine/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/monkey/Initialize(mapload) . = ..(mapload, "Monkey") @@ -95,15 +101,39 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) /mob/living/carbon/human/industrial/Initialize(mapload) . = ..(mapload, "Hephaestus G1 Industrial Frame") +/mob/living/carbon/human/industrial/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/shell/Initialize(mapload) . = ..(mapload, "Shell Frame") +/mob/living/carbon/human/shell/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_hephaestus/Initialize(mapload) . = ..(mapload, "Hephaestus G2 Industrial Frame") +/mob/living/carbon/human/industrial_hephaestus/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_xion/Initialize(mapload) . = ..(mapload, "Xion Industrial Frame") +/mob/living/carbon/human/industrial_xion/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_xion_remote/Initialize(mapload) . = ..(mapload, "Remote Xion Industrial Frame") @@ -116,6 +146,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) remote_network = "remoterobots" SSvirtualreality.add_robot(src, remote_network) +/mob/living/carbon/human/industrial_xion_remote/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_xion_remote_mech/Initialize(mapload) . = ..(mapload, "Remote Xion Industrial Frame") @@ -125,6 +161,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) if(mind) mind.name = real_name +/mob/living/carbon/human/industrial_xion_remote_mech/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_xion_remote_bunker/Initialize(mapload) . = ..(mapload, "Remote Xion Industrial Frame") @@ -142,15 +184,39 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) remote_network = "bunkerrobots" SSvirtualreality.add_robot(src, remote_network) +/mob/living/carbon/human/industrial_xion_remote_bunker/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_zenghu/Initialize(mapload) . = ..(mapload, "Zeng-Hu Mobility Frame") +/mob/living/carbon/human/industrial_zenghu/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/industrial_bishop/Initialize(mapload) . = ..(mapload, "Bishop Accessory Frame") +/mob/living/carbon/human/industrial_bishop/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/unbranded_frame/Initialize(mapload) . = ..(mapload, "Unbranded Frame") +/mob/living/carbon/human/unbranded_frame/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/unbranded_frame_remote/Initialize(mapload) . = ..(mapload, "Remote Unbranded Frame") @@ -163,6 +229,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) remote_network = "remoterobots" SSvirtualreality.add_robot(src, remote_network) +/mob/living/carbon/human/unbranded_frame_remote/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/unbranded_frame_remote_bunker/Initialize(mapload) . = ..(mapload, "Remote Unbranded Frame") @@ -180,6 +252,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) remote_network = "bunkerrobots" SSvirtualreality.add_robot(src, remote_network) +/mob/living/carbon/human/unbranded_frame_remote_bunker/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/terminator/Initialize(mapload) . = ..(mapload, "Military Frame") add_language(LANGUAGE_SOL_COMMON, 1) @@ -208,6 +286,12 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) src.equip_to_slot_or_del(commando_belt, slot_belt) src.gender = NEUTER +/mob/living/carbon/human/terminator/Stat() + ..() + + if(client?.statpanel == "Status") + stat("Battery Charge: ", "[nutrition]/[max_nutrition]") + /mob/living/carbon/human/terminator mob_size = 30 diff --git a/html/changelogs/geeves-machinestat.yml b/html/changelogs/geeves-machinestat.yml new file mode 100644 index 00000000000..f703fb69fc4 --- /dev/null +++ b/html/changelogs/geeves-machinestat.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "IPCs now display their charge level in the status panel." \ No newline at end of file