From 9c78a922004551bb9548ddba6e2b556efb98e362 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 30 Aug 2020 18:11:56 +0200 Subject: [PATCH] Cargo Vaurca (#9783) --- code/__defines/mobs.dm | 8 ++++++++ .../hud/screen_object_types/internals.dm | 4 ++-- code/datums/outfits/ert/kataphract.dm | 4 ++-- code/datums/outfits/ert/tcfl.dm | 2 +- .../ghostroles/spawner/human/kataphract.dm | 4 ++-- code/modules/mob/language/station.dm | 5 +++-- .../mob/living/carbon/human/human_species.dm | 17 ++++++++++++++++ code/modules/mob/living/carbon/human/life.dm | 2 +- .../human/species/station/vaurca/vaurca.dm | 6 +++--- .../station/vaurca/vaurca_subspecies.dm | 10 +++++----- code/modules/organs/subtypes/vaurca.dm | 20 +++++++++---------- .../Chemistry-Reagents-Toxins.dm | 8 ++++---- html/changelogs/geeves-breathing_drones.yml | 8 ++++++++ 13 files changed, 66 insertions(+), 32 deletions(-) create mode 100644 html/changelogs/geeves-breathing_drones.yml diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 31abb718372..9bfa7045e22 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -101,6 +101,14 @@ #define BP_STOMACH "stomach" #define BP_APPENDIX "appendix" +//Vaurca organs +#define BP_NEURAL_SOCKET "neural socket" +#define BP_PHORON_RESERVE "phoron reserve tank" +#define BP_FILTRATION_BIT "filtration bit" +#define BP_PHORON_RESERVOIR "phoron reservoir" +#define BP_VAURCA_LIVER "mechanical liver" +#define BP_VAURCA_KIDNEYS "mechanical kidneys" + //Aut'akh organs #define BP_ANCHOR "anchor" #define BP_HAEMO "haemodynamic" diff --git a/code/_onclick/hud/screen_object_types/internals.dm b/code/_onclick/hud/screen_object_types/internals.dm index 0dd7e244f06..ef9dd903370 100644 --- a/code/_onclick/hud/screen_object_types/internals.dm +++ b/code/_onclick/hud/screen_object_types/internals.dm @@ -36,8 +36,8 @@ breathes = H.species.breath_type nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket") tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store) - if(H.species.has_organ["phoron reserve tank"]) - var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name["phoron reserve tank"] + if(H.species.has_organ[BP_PHORON_RESERVE]) + var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name[BP_PHORON_RESERVE] if(preserve && preserve.air_contents) from = "in" nicename |= "sternum" diff --git a/code/datums/outfits/ert/kataphract.dm b/code/datums/outfits/ert/kataphract.dm index a2b4fdd9b11..cec53c5471a 100644 --- a/code/datums/outfits/ert/kataphract.dm +++ b/code/datums/outfits/ert/kataphract.dm @@ -59,8 +59,8 @@ ) /datum/outfit/admin/ert/kataphract/klax/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - if(H?.wear_mask && H.species.has_organ["phoron reserve tank"]) - var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name["phoron reserve tank"] + if(H?.wear_mask && H.species.has_organ[BP_PHORON_RESERVE]) + var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name[BP_PHORON_RESERVE] H.internal = preserve H.internals.icon_state = "internal1" diff --git a/code/datums/outfits/ert/tcfl.dm b/code/datums/outfits/ert/tcfl.dm index 9666e84a154..e0c028494e4 100644 --- a/code/datums/outfits/ert/tcfl.dm +++ b/code/datums/outfits/ert/tcfl.dm @@ -16,7 +16,7 @@ . = ..() if(isvaurca(H)) H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vaurca/filter(H), slot_wear_mask) - var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name["phoron reserve tank"] + var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name[BP_PHORON_RESERVE] H.internal = preserve H.internals.icon_state = "internal1" diff --git a/code/modules/ghostroles/spawner/human/kataphract.dm b/code/modules/ghostroles/spawner/human/kataphract.dm index d158b09c153..800ce9f29e2 100644 --- a/code/modules/ghostroles/spawner/human/kataphract.dm +++ b/code/modules/ghostroles/spawner/human/kataphract.dm @@ -122,8 +122,8 @@ ) /datum/outfit/admin/kataphract/klax/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - if(H?.wear_mask && H.species.has_organ["phoron reserve tank"]) - var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name["phoron reserve tank"] + if(H?.wear_mask && H.species.has_organ[BP_PHORON_RESERVE]) + var/obj/item/organ/vaurca/preserve/preserve = H.internal_organs_by_name[BP_PHORON_RESERVE] H.internal = preserve H.internals.icon_state = "internal1" diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index 2cf009d0a1d..ddc4b3b46f3 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -176,7 +176,8 @@ var/new_name = "[pick(list("Ka'","Za'","Ka'"))]" new_name += "[pick(list("Akaix'","Viax'"))]" new_name += "[pick(list("Uyek","Uyit","Avek","Theth","Ztak","Teth","Zir","Yek","Zirk","Ayek","Yir","Kig","Yol","'Zrk","Nazgr","Yet","Nak","Kiihr","Gruz","Guurz","Nagr","Zkk","Zohd","Norc","Agraz","Yizgr","Yinzr","Nuurg","Iii","Lix","Nhagh","Xir","Z'zit","Zhul","Zgr","Na'k","Isk'yet","Aaaa"))]" - new_name += " [pick(list("Zo'ra","Zo'ra","Zo'ra","K'lax"))]" + var/list/hive_names = list("Zo'ra" = 3, "K'lax" = 1, "C'thur" = 1) + new_name += " [pickweight(hive_names)]" return new_name /datum/language/bug/broadcast(var/mob/living/speaker,var/message,var/speaker_mask) @@ -210,7 +211,7 @@ return 0 if(within_jamming_range(other)) return 0 - if(M.internal_organs_by_name["neural socket"]) + if(M.internal_organs_by_name[BP_NEURAL_SOCKET]) return 1 if(M.internal_organs_by_name["blackkois"]) return 1 diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 6bfc0fa9c15..6903441c4c2 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -70,6 +70,23 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) . = ..(mapload, SPECIES_VAURCA_WORKER) src.gender = NEUTER +/mob/living/carbon/human/type_a/cargo/Initialize(mapload) + . = ..() + // Equip mask to allow the drone to breathe + equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vaurca/filter(src), slot_wear_mask) + // Set internals + var/obj/item/organ/vaurca/preserve/P = internal_organs_by_name[BP_PHORON_RESERVE] + internal = P + // Set colour, default is grey, no biggie + var/list/hive = splittext(name, " ") + switch(hive[length(hive)]) + if("K'lax") + change_skin_color(33, 63, 33) + if("C'thur") + change_skin_color(10, 35, 55) + if("Zo'ra") + change_skin_color(111, 21, 21) + /mob/living/carbon/human/type_b/Initialize(mapload) h_style = "Classic Antennae" . = ..(mapload, SPECIES_VAURCA_WARRIOR) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 90262f12a7c..cf3808dba13 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -629,7 +629,7 @@ var/total_phoronloss = 0 for(var/obj/item/I in src) - if(I.contaminated && !(isvaurca(src) && src.species.has_organ["filtration bit"])) + if(I.contaminated && !(isvaurca(src) && src.species.has_organ[BP_FILTRATION_BIT])) total_phoronloss += vsc.plc.CONTAMINATION_LOSS if(!(status_flags & GODMODE)) adjustToxLoss(total_phoronloss) diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm index b1e5148f760..3aad56dc480 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm @@ -93,11 +93,11 @@ stamina_recovery = 2 //slow recovery has_organ = list( - "neural socket" = /obj/item/organ/vaurca/neuralsocket, + BP_NEURAL_SOCKET = /obj/item/organ/vaurca/neuralsocket, BP_LUNGS = /obj/item/organ/internal/lungs/vaurca, - "filtration bit" = /obj/item/organ/vaurca/filtrationbit, + BP_FILTRATION_BIT = /obj/item/organ/vaurca/filtrationbit, BP_HEART = /obj/item/organ/internal/heart/vaurca, - "phoron reserve tank" = /obj/item/organ/vaurca/preserve, + BP_PHORON_RESERVE = /obj/item/organ/vaurca/preserve, BP_LIVER = /obj/item/organ/internal/liver/vaurca, BP_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca, BP_STOMACH = /obj/item/organ/internal/stomach, diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm index a1fcc7fae64..1fc9373a696 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm @@ -145,16 +145,16 @@ ) has_organ = list( - "neural socket" = /obj/item/organ/vaurca/neuralsocket, + BP_NEURAL_SOCKET = /obj/item/organ/vaurca/neuralsocket, BP_LUNGS = /obj/item/organ/internal/lungs/vaurca, BP_HEART = /obj/item/organ/internal/heart/vaurca, - "phoron reservoir" = /obj/item/organ/vaurca/reservoir, - "mechanical liver" = /obj/item/organ/internal/liver/vaurca/robo, - "mechanical kidneys" = /obj/item/organ/internal/kidneys/vaurca/robo, + BP_PHORON_RESERVOIR = /obj/item/organ/vaurca/reservoir, + BP_VAURCA_LIVER = /obj/item/organ/internal/liver/vaurca/robo, + BP_VAURCA_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca/robo, BP_STOMACH = /obj/item/organ/internal/stomach, BP_BRAIN = /obj/item/organ/internal/brain/vaurca, BP_EYES = /obj/item/organ/internal/eyes/vaurca, - "filtration bit" = /obj/item/organ/vaurca/filtrationbit + BP_FILTRATION_BIT = /obj/item/organ/vaurca/filtrationbit ) default_h_style = "Bald" diff --git a/code/modules/organs/subtypes/vaurca.dm b/code/modules/organs/subtypes/vaurca.dm index 56fbd2a25b4..88ae78d9862 100644 --- a/code/modules/organs/subtypes/vaurca.dm +++ b/code/modules/organs/subtypes/vaurca.dm @@ -37,14 +37,14 @@ /obj/item/organ/internal/kidneys/vaurca/robo icon_state = "kidney_vaurca" - organ_tag = "mechanical kidneys" + organ_tag = BP_VAURCA_KIDNEYS robotic = 2 robotic_name = null robotic_sprite = null /obj/item/organ/internal/liver/vaurca/robo icon_state = "liver_vaurca" - organ_tag = "mechanical liver" + organ_tag = BP_VAURCA_LIVER robotic = 2 robotic_name = null robotic_sprite = null @@ -56,22 +56,22 @@ icon_state = "brain_vaurca" /obj/item/organ/vaurca/reservoir - name = "phoron reservoir" - organ_tag = "phoron reservoir" + name = BP_PHORON_RESERVOIR + organ_tag = BP_PHORON_RESERVOIR parent_organ = BP_CHEST icon_state = "phoron_reservoir" robotic = 1 /obj/item/organ/vaurca/filtrationbit - name = "filtration bit" - organ_tag = "filtration bit" + name = BP_FILTRATION_BIT + organ_tag = BP_FILTRATION_BIT parent_organ = BP_HEAD icon_state = "filter" robotic = 2 /obj/item/organ/vaurca/neuralsocket - name = "neural socket" - organ_tag = "neural socket" + name = BP_NEURAL_SOCKET + organ_tag = BP_NEURAL_SOCKET icon_state = "neural_socket" parent_organ = BP_HEAD robotic = 2 @@ -100,8 +100,8 @@ obj/item/organ/vaurca/neuralsocket/process() ..() /obj/item/organ/vaurca/preserve - name = "phoron reserve tank" - organ_tag = "phoron reserve tank" + name = BP_PHORON_RESERVE + organ_tag = BP_PHORON_RESERVE parent_organ = BP_CHEST icon_state = "breathing_app" robotic = 1 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 4b980dd866d..7500492e13f 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -94,15 +94,15 @@ H.adjustToxLoss(-2 * removed) return - if(alien == IS_VAURCA && H.species.has_organ["filtration bit"]) + if(alien == IS_VAURCA && H.species.has_organ[BP_FILTRATION_BIT]) metabolism = REM * 20 //vaurcae metabolise phoron faster than other species - good for them if their filter isn't broken. - var/obj/item/organ/vaurca/filtrationbit/F = H.internal_organs_by_name["filtration bit"] + var/obj/item/organ/vaurca/filtrationbit/F = H.internal_organs_by_name[BP_FILTRATION_BIT] if(isnull(F)) ..() else if(F.is_broken()) ..() - else if(H.species.has_organ["phoron reserve tank"]) - var/obj/item/organ/vaurca/preserve/P = H.internal_organs_by_name["phoron reserve tank"] + else if(H.species.has_organ[BP_PHORON_RESERVE]) + var/obj/item/organ/vaurca/preserve/P = H.internal_organs_by_name[BP_PHORON_RESERVE] if(isnull(P)) return else if(P.is_broken()) diff --git a/html/changelogs/geeves-breathing_drones.yml b/html/changelogs/geeves-breathing_drones.yml new file mode 100644 index 00000000000..39e99ae8be4 --- /dev/null +++ b/html/changelogs/geeves-breathing_drones.yml @@ -0,0 +1,8 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Blank Vaurca Drones ordered from cargo now start with an active filter port, meaning they won't immediately start suffocating." + - bugfix: "Blank Vaurca Drones now start with the correct hive colour." + - rscadd: "C'thur is now one of the possible randomly generated hive names." \ No newline at end of file