From 40fe2de00a258110792d4bbc72ee03c4457bfa39 Mon Sep 17 00:00:00 2001 From: RatFromTheJungle <62520989+RatFromTheJungle@users.noreply.github.com> Date: Sun, 28 Nov 2021 14:23:02 -0500 Subject: [PATCH] [STILL NOT MODULAR] Adding Hemophages (#9681) * Create hemophage.ts * Update scan_gate.dm * Update revenant_abilities.dm * Update species.dm * Update species.dm * Create hemophage.dm * Update SpeciesPage.tsx * Update data.ts * Update DNA.dm * Update is_helpers.dm * Update ScannerGate.js * Update sensor.dm * Update game_options.txt * Update species.dm * Update ScannerGate.js * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update hemophage.dm * Update hemophage.ts * Update hemophage.ts * Update tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update hemophage.ts * Update hemophage.dm * Update hemophage.dm * Update tgstation.dme * Update hemophage.dm * Update hemophage.dm * dont be angry map merge bot please * Update alcohol_reagents.dm * Update alcohol_reagents.dm * final fix Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- code/__DEFINES/~skyrat_defines/DNA.dm | 1 + code/__HELPERS/~skyrat_helpers/is_helpers.dm | 1 + code/game/machinery/scan_gate.dm | 4 + .../revenant/revenant_abilities.dm | 2 +- code/modules/client/preferences/species.dm | 1 + .../nanites/nanite_programs/sensor.dm | 1 + config/game_options.txt | 1 + .../mob/living/carbon/human/species.dm | 5 + .../living/carbon/human/species/hemophage.dm | 91 +++++++++++++++++++ .../chemistry/reagents/alcohol_reagents.dm | 2 +- tgstation.dme | 1 + .../PreferencesMenu/SpeciesPage.tsx | 19 +++- .../tgui/interfaces/PreferencesMenu/data.ts | 2 + .../preferences/species/hemophage.ts | 52 +++++++++++ tgui/packages/tgui/interfaces/ScannerGate.js | 4 + 15 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts diff --git a/code/__DEFINES/~skyrat_defines/DNA.dm b/code/__DEFINES/~skyrat_defines/DNA.dm index 1e9fb43b7be..9e9cef54521 100644 --- a/code/__DEFINES/~skyrat_defines/DNA.dm +++ b/code/__DEFINES/~skyrat_defines/DNA.dm @@ -108,5 +108,6 @@ #define SPECIES_XENO "xeno" #define SPECIES_GHOUL "ghoul" #define SPECIES_TESHARI "teshari" +#define SPECIES_HEMOPHAGE "hemophage" #define SPECIES_MUTANT "mutant" diff --git a/code/__HELPERS/~skyrat_helpers/is_helpers.dm b/code/__HELPERS/~skyrat_helpers/is_helpers.dm index 90190c4de7f..db35b368c9b 100644 --- a/code/__HELPERS/~skyrat_helpers/is_helpers.dm +++ b/code/__HELPERS/~skyrat_helpers/is_helpers.dm @@ -17,6 +17,7 @@ #define isunathi(A) (is_species(A,/datum/species/unathi)) #define isvulpkanin(A) (is_species(A,/datum/species/vulpkanin)) #define isteshari(A) (is_species(A, /datum/species/teshari)) +#define ishemophage(A) (is_species(A, /datum/species/hemophage)) //Antags #define ishorrorling(A) (istype(A, /mob/living/simple_animal/hostile/true_changeling)) #define iscorticalborer(A) (istype(A, /mob/living/simple_animal/cortical_borer)) diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index 29a57ab2443..4c3204c835e 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -30,6 +30,7 @@ #define SCANGATE_SYNTHMAMMAL "synthmammal" #define SCANGATE_SYNTHHUMAN "synthhuman" #define SCANGATE_TESHARI "teshari" +#define SCANGATE_HEMOPHAGE "hemophage" #define SCANGATE_GENDER "Gender" //SKYRAT EDIT END - MORE SCANNER GATE OPTIONS @@ -204,6 +205,8 @@ scan_species = /datum/species/robotic/synthetic_human if(SCANGATE_TESHARI) scan_species = /datum/species/teshari + if(SCANGATE_HEMOPHAGE) + scan_species = /datum/species/hemophage //SKYRAT EDIT END - MORE SCANNER GATE OPTIONS if(is_species(H, scan_species)) beep = TRUE @@ -365,6 +368,7 @@ #undef SCANGATE_SYNTHMAMMAL #undef SCANGATE_SYNTHHUMAN #undef SCANGATE_TESHARI +#undef SCANGATE_HEMOPHAGE #undef SCANGATE_GENDER //SKYRAT EDIT END - MORE SCANNER GATE OPTIONS diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index c1c9caadae4..020a2cd2b6c 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -354,7 +354,7 @@ if(iscarbon(mob)) if(ishuman(mob)) var/mob/living/carbon/human/H = mob - if(H.dna && H.dna.species) + if(H.dna && H.dna.species && !HAS_TRAIT(H, TRAIT_VIRUSIMMUNE)) // SKYRAT EDIT - No more funny purple hair H.dna.species.handle_hair(H,"#1d2953") //will be reset when blight is cured var/blightfound = FALSE for(var/datum/disease/revblight/blight in H.diseases) diff --git a/code/modules/client/preferences/species.dm b/code/modules/client/preferences/species.dm index 4de0d7b84db..fda8b32f51a 100644 --- a/code/modules/client/preferences/species.dm +++ b/code/modules/client/preferences/species.dm @@ -75,6 +75,7 @@ "sexes" = species.sexes, "enabled_features" = species.get_features(), + "veteran_only" = species.veteran_only, ) + diet return data diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm index daa148681f6..1c3f482e56d 100644 --- a/code/modules/research/nanites/nanite_programs/sensor.dm +++ b/code/modules/research/nanites/nanite_programs/sensor.dm @@ -293,6 +293,7 @@ "Dwarf" = /datum/species/dwarf, "IPC" = /datum/species/robotic/ipc, "Teshari" = /datum/species/teshari, + "Hemophage" = /datum/species/hemophage, "Synthetic Lizard" = /datum/species/robotic/synthliz, "Synthetic Mammal" = /datum/species/robotic/synthetic_mammal, "Synthetic Human" = /datum/species/robotic/synthetic_human, // SKYRAT EDIT - END diff --git a/config/game_options.txt b/config/game_options.txt index 986dd94b913..04ab833bf54 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -324,6 +324,7 @@ ROUNDSTART_RACES moth ROUNDSTART_RACES plasmaman #ROUNDSTART_RACES shadow ROUNDSTART_RACES teshari +ROUNDSTART_RACES hemophage ## Races that are better than humans in some ways, but worse in others ROUNDSTART_RACES ethereal diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm index 1f3eec3f016..633d30f68b9 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm @@ -20,6 +20,8 @@ GLOBAL_LIST_EMPTY(customizable_races) var/markings_alpha = 255 ///If a species can always be picked in prefs for the purposes of customizing it for ghost roles or events var/always_customizable = FALSE + /// If a species requires the player to be a Veteran to be able to pick it. + var/veteran_only = FALSE ///Flavor text of the species displayed on character creation screeen var/flavor_text = "No description." ///Does this species have a special set of overlay clothing, and if so, what is the name of the folder under .../clothing/species that contains them? @@ -313,6 +315,9 @@ GLOBAL_LIST_EMPTY(customizable_races) /datum/species/vampire mutant_bodyparts = list() +/datum/species/hemophage + mutant_bodyparts = list() + /datum/species/plasmaman mutant_bodyparts = list() can_have_genitals = FALSE diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm new file mode 100644 index 00000000000..6725656a442 --- /dev/null +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm @@ -0,0 +1,91 @@ +/datum/species/hemophage + name = "Hemophage" + id = SPECIES_HEMOPHAGE + default_color = "FFFFFF" + species_traits = list( + EYECOLOR, + HAIR, + FACEHAIR, + LIPS, + DRINKSBLOOD, + HAS_FLESH, + HAS_BONE, + ) + inherent_traits = list( + TRAIT_ADVANCEDTOOLUSER, + TRAIT_CAN_STRIP, + TRAIT_NOHUNGER, + TRAIT_NOBREATH, + TRAIT_VIRUSIMMUNE, + ) + inherent_biotypes = MOB_UNDEAD | MOB_HUMANOID + mutant_bodyparts = list("wings" = "None") + exotic_bloodtype = "U" + use_skintones = TRUE + mutantheart = /obj/item/organ/heart/vampire + mutanttongue = /obj/item/organ/tongue/vampire + changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT + limbs_id = SPECIES_HUMAN + skinned_type = /obj/item/stack/sheet/animalhide/human + /// Some starter text sent to the vampire initially, because vampires have shit to do to stay alive. + var/info_text = "You are a Hemophage. You will slowly but constantly lose blood if outside of a closet-like object. If inside a closet-like object, you will slowly heal. You may gain more blood by grabbing a live victim and using your drain ability." + /// The shapeshifting action, attached to the datum itself to avoid cloning memes, and other duplicates. + var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/batform + /// Is it currently Halloween and are we the Halloween version? If not, we do not get a batform nor do we burn in the chapel. + var/halloween_version = FALSE + veteran_only = TRUE + +/datum/species/hemophage/check_roundstart_eligible() + if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) // SKYRAT EDIT - sleepy time roundstart check + return TRUE + return ..() + +/datum/species/hemophage/on_species_gain(mob/living/carbon/human/new_vampire, datum/species/old_species) + . = ..() + to_chat(new_vampire, "[info_text]") + new_vampire.update_body(0) + new_vampire.set_safe_hunger_level() + if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + halloween_version = TRUE + if(isnull(batform) && halloween_version) // You can only have a batform during Halloween. + batform = new + new_vampire.AddSpell(batform) + +/datum/species/hemophage/on_species_loss(mob/living/carbon/ex_vampire) + . = ..() + if(!isnull(batform)) + ex_vampire.RemoveSpell(batform) + QDEL_NULL(batform) + +/datum/species/hemophage/spec_life(mob/living/carbon/human/vampire, delta_time, times_fired) + . = ..() + if(vampire.stat == DEAD) + return + if(istype(vampire.loc, /obj/structure/closet) && !istype(vampire.loc, /obj/structure/closet/body_bag)) + vampire.heal_overall_damage(1.5 * delta_time, 1.5 * delta_time, 0, BODYPART_ORGANIC) // Fast, but not as fast due to them being able to use normal lockers. + vampire.adjustToxLoss(-1 * delta_time) // 50% base speed to keep it fair. + vampire.adjustOxyLoss(-2 * delta_time) + vampire.adjustCloneLoss(-0.5 * delta_time) // HARDMODE DAMAGE + return + vampire.blood_volume -= 0.125 * delta_time + if(vampire.blood_volume <= BLOOD_VOLUME_SURVIVE) + to_chat(vampire, span_danger("You ran out of blood!")) + var/obj/shapeshift_holder/holder = locate() in vampire + if(holder) + holder.shape.death() //make sure we're killing the bat if you are out of blood, if you don't it creates weird situations where the bat is alive but the caster is dead. + vampire.death() // Owch! Ran out of blood. + var/area/A = get_area(vampire) + if(istype(A, /area/service/chapel) && halloween_version) // If hemophages have bat form, they cannot enter the church + to_chat(vampire, span_warning("You don't belong here!")) + vampire.adjustFireLoss(10 * delta_time) + vampire.adjust_fire_stacks(3 * delta_time) + vampire.IgniteMob() + + +/obj/effect/proc_holder/spell/targeted/shapeshift/bat + name = "Bat Form" + desc = "Take on the shape a space bat." + invocation = "*snap" + charge_max = 5 SECONDS + cooldown_min = 5 SECONDS + shapeshift_type = /mob/living/simple_animal/hostile/retaliate/bat diff --git a/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 01879b68f7f..00fab192fe1 100644 --- a/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -348,7 +348,7 @@ glass_desc = "Red and white drink for the upper classes or undead." /datum/reagent/consumable/ethanol/velvet_kiss/on_mob_life(mob/living/carbon/M) - if(iszombie(M) || isvampire(M) || isdullahan(M)) //Rare races! + if(iszombie(M) || isvampire(M) || isdullahan(M) || ishemophage(M)) //Rare races! quality = RACE_DRINK else M.adjust_disgust(25) diff --git a/tgstation.dme b/tgstation.dme index 5fd5563507d..b3d0d53ce19 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4538,6 +4538,7 @@ #include "modular_skyrat\modules\customization\modules\mob\living\carbon\human\species\vox.dm" #include "modular_skyrat\modules\customization\modules\mob\living\carbon\human\species\vulpkanin.dm" #include "modular_skyrat\modules\customization\modules\mob\living\carbon\human\species\xeno.dm" +#include "modular_skyrat\modules\customization\modules\mob\living\carbon\human\species\hemophage.dm" #include "modular_skyrat\modules\customization\modules\mob\living\simple_mob\examine.dm" #include "modular_skyrat\modules\customization\modules\reagents\chemistry\reagents.dm" #include "modular_skyrat\modules\customization\modules\reagents\chemistry\reagents\alcohol_reagents.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx index b3b6cbe1e65..76d88f45e96 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx @@ -261,10 +261,16 @@ const SpeciesPageInner = (props: { {species.map(([speciesKey, species]) => { - return ( + // SKYRAT EDIT START - Veteran-only species + let speciesPage = ( ); + if (species.veteran_only && !data.is_veteran) { + let tooltipContent = species.name + " - You need to be a veteran to select this race, apply today!"; + speciesPage = ( + + {speciesPage} + ); + } + return speciesPage; + // SKYRAT EDIT END })} diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts index 9d1be34165f..85fd22a669c 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts @@ -46,6 +46,8 @@ export type ServerSpeciesData = { liked_food: Food[]; disliked_food: Food[]; toxic_food: Food[]; + + veteran_only: boolean; // SKYRAT EDIT - Veteran quirks }; export type Quirk = { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts new file mode 100644 index 00000000000..9b595db2de5 --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/species/hemophage.ts @@ -0,0 +1,52 @@ +import { Species } from "./base"; + +const Hemophage: Species = { + description: "A crewmember afflicted with Hemophagia. Whether it's supernatural or purely through science, is still unknown.", + features: { + good: [{ + icon: "bed", + name: "Locker Brooding", + description: "Hemophages can delay their Thirst and mend their injuries by \ + resting in a sturdy rectangular-shaped object. So THAT'S why they do that!", + }, { + icon: "skull", + name: "Viral Symbiosis", + description: "Hemophages, due to their condition, cannot get infected by \ + other viruses and don't actually require an external source of oxygen \ + to stay alive.", + }, { + icon: "recycle", + name: "Bat Form", + description: "During Halloween, Hemophages can become bats. Bats are very weak, but \ + are great for escaping bad situations. They can also travel through \ + vents, giving Hemophages a lot of access. Just remember that access \ + doesn't equal permission, and people may be unhappy with you showing \ + up uninvited!", + }], + neutral: [], + bad: [{ + icon: "tint", + name: "The Thirst", + description: "In place of eating, Hemophages suffer from the Thirst. \ + Thirst of what? Blood! Their tongue allows them to grab people and drink \ + their blood, and they will suffer severe consequences if they run out. As a note, it doesn't \ + matter whose blood you drink, it will all be converted into your blood \ + type when consumed.", + }, + { + icon: "cross", + name: "Against God and Nature", + description: "During Halloween, almost all higher powers are disgusted by the existence of \ + Hemophages, and entering the chapel is essentially suicide. Do not do it!", + }], + }, + lore: [ + "Though known by many other names, 'Hemophages' are those that have found themselves the host of a bloodthirsty infection. Initially entering their hosts through the bloodstream, or activating after a period of dormancy in infants, this infection initially travels to the chest first. Afterwards, it infects several cells, making countless alterations to their genetic sequence, until it starts rapidly expanding and taking over every nearby organ, notably the heart, lungs, and stomach, forming a massive tumor vaguely reminiscent of an overgrown, coal-black heart, that hijacks them for its own benefit, and in exchange, allows the host to 'sense' the quality, and amount of blood currently occupying their body.", + "While this kills the host initially, the tumor will jumpstart the body and begin functioning as a surrogate to keep their host going. This does confer certain advantages to the host, in the interest of keeping them alive; working anaerobically, requiring no food to function, and extending their lifespan dramatically. However, this comes at a cost, as the tumor changes their host into an obligate hemophage; only the enzymes, and iron in blood being able to fuel them. If they are to run out of blood, the tumor will begin consuming its own host.", + "Historically, Hemophages have caused great societal strife through their very existence. Many have reported dread on having someone reveal they require blood to survive, worse on learning they have been undead, espiecally in 'superstitious' communities. In many places they occupy a sort of second class, unable to live normal lives due to their condition being a sort of skeleton in their closet. Some can actually be found in slaughterhouses or the agricultural industry, gaining easy access to a large supply of animal blood to feed their eternal thirst.", + "Others find their way into mostly-vampiric communities, turning others into their own kind; though, the virus can only transmit to hosts that are incredibly low on blood, taking advantage of their reduced immune system efficiency and higher rate of blood creation to be able to survive the initial few days within their host.", + "\"What the fuck does any of this mean?\" - Doctor Micheals, reading their CentCom report about the new 'hires'.", + ], +}; + +export default Hemophage; diff --git a/tgui/packages/tgui/interfaces/ScannerGate.js b/tgui/packages/tgui/interfaces/ScannerGate.js index 6d7377bf624..421ffa9c420 100644 --- a/tgui/packages/tgui/interfaces/ScannerGate.js +++ b/tgui/packages/tgui/interfaces/ScannerGate.js @@ -107,6 +107,10 @@ const TARGET_SPECIES_LIST = [ name: 'Teshari', value: 'teshari', }, + { + name: 'Hemophage', + value: 'hemophage', + }, ]; const TARGET_GENDER_LIST = [