Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes species defines #22236

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,37 @@
#define ALL_NON_ROBOTIC (MOB_ORGANIC|MOB_INORGANIC|MOB_UNDEAD)
#define ALL_BIOTYPES (MOB_ORGANIC|MOB_INORGANIC|MOB_ROBOTIC|MOB_UNDEAD)

// Defines for Species IDs. Used to refer to the name of a species, for things like bodypart names or species preferences.
#define SPECIES_ABDUCTOR "abductor"
#define SPECIES_ANDROID "android"
#define SPECIES_DULLAHAN "dullahan"
#define SPECIES_ETHEREAL "ethereal"
#define SPECIES_FELINE "felinid"
#define SPECIES_FLYPERSON "fly"
#define SPECIES_HUMAN "human"

#define SPECIES_JELLYPERSON "jelly"
#define SPECIES_SLIMEPERSON "slime"
#define SPECIES_LUMINESCENT "lum" //for some reason it's just lum in our codebase and i don't want to break stuff by changing it
#define SPECIES_STARGAZER "stargazer"
#define SPECIES_LIZARD "lizard"
#define SPECIES_LIZARD_ASH "ashlizard"
#define SPECIES_LIZARD_ASH_SHAMAN "ashlizardshaman"
#define SPECIES_LIZARD_DRACONID "draconid"

#define SPECIES_NIGHTMARE "nightmare"
#define SPECIES_MOTH "moth"
#define SPECIES_MUSHROOM "mush"
#define SPECIES_PLASMAMAN "plasmaman"
#define SPECIES_PODPERSON "pod"
#define SPECIES_SHADOW "shadow"
#define SPECIES_SKELETON "skeleton"
#define SPECIES_SNAIL "snail"
#define SPECIES_VAMPIRE "vampire"
#define SPECIES_ZOMBIE "zombie"
#define SPECIES_ZOMBIE_INFECTIOUS "memezombie"
#define SPECIES_ZOMBIE_KROKODIL "krokodil_zombie"

//Organ defines for carbon mobs
#define ORGAN_ORGANIC 1
#define ORGAN_ROBOTIC 2
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/{yogs_defines}/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#define MONKIFY_BLOOD_COEFFICIENT (BLOOD_VOLUME_MONKEY/BLOOD_VOLUME_GENERIC) //the ratio of monkey to human blood volume so a 100% blood volume monkey will not instantly die when you turn it into a human with ~58% blood volume

#define SPECIES_DARKSPAWN "darkspawn"
#define SPECIES_IPC "ipc"
#define SPECIES_POLYSMORPH "polysmorph"
#define SPECIES_PRETERNIS "preternis"
#define SPECIES_VOX "vox"

#define BUTT_SPRITE_VOX "vox"
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
var/mob/living/carbon/human/H
if(ishuman(M.current))
H = M.current
return M.current.stat != DEAD && !issilicon(M.current) && !isbrain(M.current) && (!H || H.dna.species.id != "memezombies")
return M.current.stat != DEAD && !issilicon(M.current) && !isbrain(M.current) && (!H || H.dna.species.id != SPECIES_ZOMBIE_INFECTIOUS)
else if(isliving(M.current))
if(isAI(M.current))
var/mob/living/silicon/ai/AI = M.current
Expand Down
2 changes: 1 addition & 1 deletion code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@

/datum/quirk/nyctophobia/on_process()
var/mob/living/carbon/human/H = quirk_holder
if((H.dna.species.id in list("shadow", "nightmare", "darkspawn")) || is_darkspawn_or_thrall(H))
if(isshadowperson(H) || is_darkspawn_or_thrall(H))
return //we're tied with the dark, so we don't get scared of it; don't cleanse outright to avoid cheese
var/turf/T = get_turf(quirk_holder)
var/lums = T.get_lumcount()
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/clock_cult/clock_cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Credit where due:
var/plasmaman //We use this to determine if we should activate internals in post_equip()

/datum/outfit/servant_of_ratvar/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(H.dna.species.id == "plasmaman") //Plasmamen get additional equipment because of how they work
if(H.dna.species.id == SPECIES_PLASMAMAN) //Plasmamen get additional equipment because of how they work
head = /obj/item/clothing/head/helmet/space/plasmaman
uniform = /obj/item/clothing/under/plasmaman //Plasmamen generally shouldn't need chameleon suits anyways, since everyone expects them to wear their fire suit
r_hand = /obj/item/tank/internals/plasmaman/belt/full
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
brutedam = round(tracked_mob.getBruteLoss(),1)

//species check
if (ishumanbasic(tracked_mob))
if (ishumanbasic(tracked_mob)) //this should really just pull the species name or something rather than having all these checks
species = "Human"
if (ispreternis(tracked_mob))
species = "Robot"
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/limbgrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
circuit = /obj/item/circuitboard/machine/limbgrower

/// The category of limbs we're browing in our UI.
var/selected_category = "human"
var/selected_category = SPECIES_HUMAN
/// If we're currently printing something.
var/busy = FALSE
/// How efficient our machine is. Better parts = less chemicals used and less power used. Range of 1 to 0.25.
Expand All @@ -24,7 +24,7 @@
/// Our internal techweb for limbgrower designs.
var/datum/techweb/stored_research
/// All the categories of organs we can print.
var/list/categories = list("human", "lizard", "moth", "plasmaman", "ethereal", "polysmorph", "vox", "other")
var/list/categories = list(SPECIES_HUMAN, SPECIES_LIZARD, SPECIES_MOTH, SPECIES_PLASMAMAN, SPECIES_ETHEREAL, SPECIES_POLYSMORPH, SPECIES_VOX, "other")
//yogs grower a little different because we're going to allow meats to be converted to synthflesh because hugbox
var/list/accepted_biomass = list(
/obj/item/reagent_containers/food/snacks/meat/slab/monkey = 25,
Expand Down Expand Up @@ -255,9 +255,9 @@
/// The limb we're making with our buildpath, so we can edit it.
var/obj/item/bodypart/limb = new buildpath(loc)
/// Species with greyscale limbs.
var/list/greyscale_species = list("human", "lizard", "ethereal")
var/list/greyscale_species = list(SPECIES_HUMAN, SPECIES_LIZARD, SPECIES_ETHEREAL)
if(selected_category in greyscale_species) //Species with greyscale parts should be included here
if(selected_category == "human") //humans don't use the full colour spectrum, they use random_skin_tone
if(selected_category == SPECIES_HUMAN) //humans don't use the full colour spectrum, they use random_skin_tone
limb.skin_tone = random_skin_tone()
else
limb.species_color = random_short_color()
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/teleporter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
log_game("[M] ([key_name(M)]) was turned into a fly person")
if(ishuman(M))//don't remove people from the round randomly you jerks
var/mob/living/carbon/human/human = M
if(human.dna && human.dna.species.id == "human")
if(human.dna && human.dna.species.id == SPECIES_HUMAN)
to_chat(M, span_italics("You hear a buzzing in your ears."))
human.set_species(/datum/species/fly)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
. += "Some <B>feet</B>."
else if(species == "monkey")
. += "[icon2html('icons/mob/monkey.dmi', user, "monkey1")] Some <B>monkey paws</B>."
else if(species == "human")
else if(species == SPECIES_HUMAN)
. += "[icon2html('icons/mob/human_parts.dmi', user, "default_human_l_leg")] Some <B>human feet</B>."
else
. += "[icon2html('icons/mob/human_parts.dmi', user, "[species]_l_leg")] Some <B>[species] feet</B>."
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/spawners/mystery_box.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
/datum/species/preternis/zombie
name = "Low-Functioning Preternis"
id = "preterniszombie"
limbs_id = "preternis"
limbs_id = SPECIES_PRETERNIS
inherent_traits = list(TRAIT_NOBREATH, TRAIT_NOHUNGER, TRAIT_RADIMMUNE, TRAIT_MEDICALIGNORE, TRAIT_NO_BLOOD_REGEN, TRAIT_STABLELIVER, TRAIT_STABLEHEART, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE, TRAIT_FAKEDEATH, TRAIT_STUNIMMUNE, TRAIT_NODEATH)
mutanthands = /obj/item/zombie_hand
var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg')
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/mirror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@

/obj/structure/mirror/magic/lesser/New()
choosable_races = GLOB.roundstart_races.Copy()
if(!("felinid" in choosable_races))
choosable_races += "felinid"
if(!(SPECIES_FELINE in choosable_races))
choosable_races += SPECIES_FELINE
..()

/obj/structure/mirror/magic/badmin/New()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/eldritch_cult/eldritch_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,15 @@
BP.dismember(BURN)
if(PENANCE_SKELETON)
var/obj/item/bodypart/BP
while(!BP || BP.species_id == "skeleton")
while(!BP || BP.species_id == SPECIES_SKELETON)
if(!LAZYLEN(unspooked_limbs))
to_chat(C, span_warning("Something you did managed to break brazil limb sacrificing stuff, make a bug report!"))
return
var/target_zone = pick_n_take(unspooked_limbs)
BP = C.get_bodypart(target_zone)
var/obj/item/bodypart/replacement_part = new BP.type
replacement_part.max_damage = 15
replacement_part.species_id = "skeleton"
replacement_part.species_id = SPECIES_SKELETON
replacement_part.original_owner = "inside"
replacement_part.replace_limb(owner)
C.visible_message(span_warning("The skin on [owner]'s [BP] suddenly melts off, revealing bone!"), span_warning("The skin and muscle on your [BP] is suddenly melted off!"))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/awaymissions/mission_code/snowdin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
robo_parts += NN
if(NN.body_zone == BODY_ZONE_HEAD) //don't add the head to the list, just transform them into an plasmaman when it's the only thing left
continue
if(NN.status == BODYPART_ORGANIC && !(NN.species_id == "plasmaman" || NN.species_id == "husk")) //getting every organic, non-plasmaman limb (augments/androids are immune to this)
if(NN.status == BODYPART_ORGANIC && !(NN.species_id == SPECIES_PLASMAMAN || NN.species_id == "husk")) //getting every organic, non-plasmaman limb (augments/androids are immune to this)
plasma_parts += NN

if(prob(35)) //checking if the delay is over & if the victim actually has any parts to nom
Expand All @@ -229,7 +229,7 @@
else
PP.visible_message(span_warning("[L]'s [NB] melts down to the bone!"))
var/obj/item/bodypart/replacement_part = new NB.type
replacement_part.species_id = "plasmaman"
replacement_part.species_id = SPECIES_PLASMAMAN
replacement_part.original_owner = "plasma river"
replacement_part.replace_limb(PP)
qdel(NB)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences/middleware/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
dummy.equipOutfit(/datum/outfit/job/assistant/consistent, visualsOnly = TRUE)
dummy.dna.species.prepare_human_for_preview(dummy)
var/icon/dummy_icon = getFlatIcon(dummy)
var/list/lazy_icons_species = list("moth", SPECIES_VOX)//no idea why it fails to render properly the normal way
var/list/lazy_icons_species = list(SPECIES_MOTH, SPECIES_VOX)//no idea why it fails to render properly the normal way
if(dummy.dna.species.id in lazy_icons_species)
dummy_icon = null
dummy_icon = icon('icons/mob/human.dmi', "[dummy.dna.species.id]")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
randomize_by_default = FALSE

/datum/preference/choiced/species/deserialize(input, datum/preferences/preferences)
return GLOB.species_list[sanitize_inlist(input, get_choices_serialized(), "human")]
return GLOB.species_list[sanitize_inlist(input, get_choices_serialized(), SPECIES_HUMAN)]

/datum/preference/choiced/species/serialize(input)
var/datum/species/species = input
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/beekeeping/beebox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


/mob/living/carbon/human/bee_friendly()
if(dna && dna.species && dna.species.id == "pod") //bees pollinate plants, duh.
if(ispodperson(src)) //bees pollinate plants, duh.
return TRUE
if (wear_suit && head && istype(wear_suit, /obj/item/clothing) && istype(head, /obj/item/clothing))
var/obj/item/clothing/CS = wear_suit
Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@

//This reads Command placement exceptions in code/controllers/configuration/entries/game_options to allow non-Humans in specified Command roles. If the combination of species and command role is invalid, default to Human.
if(CONFIG_GET(keyed_list/job_species_whitelist)[type] && !splittext(CONFIG_GET(keyed_list/job_species_whitelist)[type], ",").Find(H.dna.species.id))
if(H.dna.species.id != "human")
if(H.dna.species.id != SPECIES_HUMAN)
H.set_species(/datum/species/human)
H.apply_pref_name(/datum/preference/name/backup_human, preference_source)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
threatcount += 2

//Check for nonhuman scum
if(dna && dna.species.id && dna.species.id != "human")
if(dna && dna.species.id && dna.species.id != SPECIES_HUMAN)
threatcount += 1

//mindshield implants imply trustworthyness
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@
if(0 to NUTRITION_LEVEL_STARVING)
combined_msg += span_danger("You're starving!")

if(dna.species.id == "skeleton")
if(isskeleton(src))
var/obj/item/clothing/under/under = w_uniform
if((!under || under.adjusted) && (!wear_suit))
play_xylophone()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/species/abductor
name = "Abductor"
id = "abductor"
id = SPECIES_ABDUCTOR
say_mod = "gibbers"
possible_genders = list(PLURAL)
species_traits = list(NOBLOOD,NOEYESPRITES)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/species/android
name = "Android"
id = "android"
id = SPECIES_ANDROID
say_mod = "states"
bubble_icon = BUBBLE_ROBOT
possible_genders = list(PLURAL, NEUTER)
Expand Down
10 changes: 5 additions & 5 deletions code/modules/mob/living/carbon/human/species_types/dullahan.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/species/dullahan
name = "Dullahan"
id = "dullahan"
id = SPECIES_DULLAHAN
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,HAS_FLESH,HAS_BONE)
inherent_traits = list(TRAIT_NOHUNGER,TRAIT_NOBREATH)
Expand All @@ -10,7 +10,7 @@
mutanteyes = /obj/item/organ/eyes/dullahan
mutanttongue = /obj/item/organ/tongue/dullahan
mutantears = /obj/item/organ/ears/dullahan
limbs_id = "human"
limbs_id = SPECIES_HUMAN
skinned_type = /obj/item/stack/sheet/animalhide/human
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | ERT_SPAWN

Expand Down Expand Up @@ -116,7 +116,7 @@
/obj/item/organ/tongue/dullahan/handle_speech(datum/source, list/speech_args)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
if(H.dna.species.id == SPECIES_DULLAHAN)
var/datum/species/dullahan/D = H.dna.species
if(isobj(D.myhead.loc))
var/obj/O = D.myhead.loc
Expand Down Expand Up @@ -146,7 +146,7 @@

if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
if(H.dna.species.id == SPECIES_DULLAHAN)
var/datum/species/dullahan/D = H.dna.species
D.update_vision_perspective(H)

Expand Down Expand Up @@ -176,7 +176,7 @@
/obj/item/dullahan_relay/Destroy()
if(!QDELETED(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
if(H.dna.species.id == SPECIES_DULLAHAN)
var/datum/species/dullahan/D = H.dna.species
D.myhead = null
owner.gib()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/datum/species/ethereal
name = "Ethereal"
id = "ethereal"
id = SPECIES_ETHEREAL
attack_verbs = list("burn", "sear")
attack_sound = 'sound/weapons/etherealhit.ogg'
miss_sound = 'sound/weapons/etherealmiss.ogg'
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species_types/felinid.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//Subtype of human
/datum/species/human/felinid
name = "Felinid Human"
id = "felinid"
limbs_id = "human"
id = SPECIES_FELINE
limbs_id = SPECIES_HUMAN
attack_verbs = list("slash")
attack_effect = ATTACK_EFFECT_CLAW
attack_sound = 'sound/weapons/slash.ogg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/species/fly
name = "Flyperson"
plural_form = "Flypeople"
id = "fly"
id = SPECIES_FLYPERSON
say_mod = "buzzes"
species_traits = list(NOEYESPRITES, HAS_FLESH, HAS_BONE)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/species/human
name = "Human"
id = "human"
id = SPECIES_HUMAN
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,HAS_FLESH,HAS_BONE)
default_features = list("mcolor" = "#FFFFFF", "wings" = "None")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Entirely alien beings that seem to be made entirely out of gel. They have three eyes and a skeleton visible within them.
name = "Jellyperson"
plural_form = "Jellypeople"
id = "jelly"
id = SPECIES_JELLYPERSON
default_color = "00FF90"
say_mod = "chirps"
bubble_icon = BUBBLE_SLIME
Expand Down Expand Up @@ -166,7 +166,7 @@
/datum/species/jelly/slime
name = "Slimeperson"
plural_form = "Slimepeople"
id = "slime"
id = SPECIES_SLIMEPERSON
default_color = "00FFFF"
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD)
say_mod = "says"
Expand Down Expand Up @@ -442,7 +442,7 @@
/datum/species/jelly/luminescent
name = "Luminescent"
plural_form = null
id = "lum"
id = SPECIES_LUMINESCENT
say_mod = "says"
var/glow_intensity = LUMINESCENT_DEFAULT_GLOW
var/obj/item/slime_extract/current_extract
Expand Down Expand Up @@ -614,7 +614,7 @@
/datum/species/jelly/stargazer
name = "Stargazer"
plural_form = null
id = "stargazer"
id = SPECIES_STARGAZER
var/datum/action/innate/project_thought/project_thought
var/datum/action/innate/link_minds/link_minds
var/list/mob/living/linked_mobs = list()
Expand Down
Loading
Loading