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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Phorids are now a pref option for species #3310

Closed
wants to merge 4 commits into from
Closed
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
1 change: 0 additions & 1 deletion code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define issynth(A) (is_species(A, /datum/species/synth))
#define ismilsynth(A) (is_species(A, /datum/species/synth/military))
#define islizard(A) (is_species(A, /datum/species/lizard))
#define isplasmaman(A) (is_species(A, /datum/species/plasmaman))
#define ispodperson(A) (is_species(A, /datum/species/pod))
#define isflyperson(A) (is_species(A, /datum/species/fly))
#define isjellyperson(A) (is_species(A, /datum/species/jelly))
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,9 @@
#define PROSTHETIC_AMPUTATED "amputated"
#define PROSTHETIC_ROBOTIC "prosthetic"

#define PREF_VARIANT_NONE "None"
#define PREF_VARIANT_FBP "FBP"
#define PREF_VARIANT_PHORID "Phorid"

#define NOT_SYNTHETIC FALSE
#define IS_SYNTHETIC TRUE
2 changes: 1 addition & 1 deletion code/controllers/subsystem/traumas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ SUBSYSTEM_DEF(traumas)
phobia_species = list(
"lizards" = typecacheof(list(/datum/species/lizard)),
"birds" = typecacheof(list(/datum/species/kepori)),
"skeletons" = typecacheof(list(/datum/species/skeleton, /datum/species/plasmaman)),
"skeletons" = typecacheof(list(/datum/species/skeleton)),
"conspiracies" = typecacheof(list(/datum/species/abductor, /datum/species/lizard)),
"robots" = typecacheof(list(/datum/species/android, /datum/species/ipc)),
"aliens" = typecacheof(list(
Expand Down
8 changes: 4 additions & 4 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
stored_dna.species = mrace //not calling any species update procs since we're a brain, not a monkey/human


/mob/living/carbon/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, robotic = FALSE)
/mob/living/carbon/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, variant = PREF_VARIANT_NONE)
if(mrace && has_dna())
var/datum/species/new_race
if(ispath(mrace))
Expand All @@ -345,15 +345,15 @@
quirks_to_remove -= quirks_resolved
for(var/quirk_type in quirks_to_remove)
remove_quirk(quirk_type)
dna.species.on_species_gain(src, old_species, pref_load, robotic)
dna.species.on_species_gain(src, old_species, pref_load, variant)
if(ishuman(src))
qdel(language_holder)
var/species_holder = initial(mrace.species_language_holder)
language_holder = new species_holder(src)
update_atom_languages()

/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, robotic = FALSE)
robotic ||= fbp
/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE, variant = PREF_VARIANT_NONE)
is_variant ||= variant
..()
if(icon_update)
update_hair()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/plasma_fist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

/datum/martial_art/plasma_fist/proc/Apotheosis(mob/living/carbon/human/A, mob/living/carbon/human/D)
A.say("APOTHEOSIS!!", forced="plasma fist")
A.set_species(/datum/species/plasmaman)
// A.set_species(/datum/species/plasmaman) // FIX ME LATER!!!!!!
A.dna.species.species_traits += TRAIT_BOMBIMMUNE
A.unequip_everything()
A.underwear = "Nude"
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/gulag_teleporter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The console is located at computer/gulag_teleporter.dm
return
strip_occupant()
var/mob/living/carbon/human/prisoner = occupant
if(!isplasmaman(prisoner) && jumpsuit_type)
if(!(prisoner.is_variant == PREF_VARIANT_PHORID) && jumpsuit_type)
prisoner.equip_to_appropriate_slot(new jumpsuit_type)
if(shoes_type)
prisoner.equip_to_appropriate_slot(new shoes_type)
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/scan_gate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
scan_species = /datum/species/lizard
if(SCANGATE_FLY)
scan_species = /datum/species/fly
if(SCANGATE_PLASMAMAN)
scan_species = /datum/species/plasmaman
// if(SCANGATE_PLASMAMAN)
// scan_species = /datum/species/plasmaman // FIX ME LATER!!!!!!
if(SCANGATE_MOTH)
scan_species = /datum/species/moth
if(SCANGATE_JELLY)
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
if(!isnull(medipen_type))
new medipen_type(src)

if(!isplasmaman(loc))
new internal_type(src)
// if(!(loc.is_variant == PREF_VARIANT_PHORID))
// new internal_type(src) // FIX ME LATER!!!!!!
else
new /obj/item/tank/internals/plasmaman/belt(src)

Expand Down Expand Up @@ -831,10 +831,10 @@
new /obj/item/clothing/mask/breath(src)
new /obj/item/reagent_containers/hypospray/medipen(src)

if(!isplasmaman(loc))
new /obj/item/tank/internals/emergency_oxygen(src)
else
new /obj/item/tank/internals/plasmaman/belt(src)
// if(!(loc.is_variant == PREF_VARIANT_PHORID)) // FIX ME LATER!!!!!!
new /obj/item/tank/internals/emergency_oxygen(src)
// else
// new /obj/item/tank/internals/plasmaman/belt(src)

/obj/item/storage/box/rubbershot
name = "box of rubber shots"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@
var/obj/item/reagent_containers/food/cookiealt = /obj/item/reagent_containers/food/snacks/cookie
if(isskeleton(H))
cookiealt = /obj/item/reagent_containers/food/condiment/milk
else if(isplasmaman(H))
else if((H.is_variant == PREF_VARIANT_PHORID))
cookiealt = /obj/item/reagent_containers/food/condiment/milk
else if(iselzuose(H))
cookiealt = /obj/item/reagent_containers/food/snacks/energybar
Expand Down
6 changes: 3 additions & 3 deletions code/modules/awaymissions/corpse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@
outfit = /datum/outfit/job/miner
icon_state = "corpseminer"

/obj/effect/mob_spawn/human/plasmaman
mob_species = /datum/species/plasmaman
outfit = /datum/outfit/plasmaman
// /obj/effect/mob_spawn/human/plasmaman
// mob_species = /datum/species/plasmaman
// outfit = /datum/outfit/plasmaman // FIX ME LATER!!!!!!

/obj/effect/mob_spawn/human/botanist
outfit = /datum/outfit/job/botanist
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 @@ -209,7 +209,7 @@
var/list/robo_parts = list()//keep a reference of robotic parts so we know if we can turn them into a plasmaman
var/mob/living/carbon/human/PP = L
var/S = PP.dna.species
if(istype(S, /datum/species/plasmaman) || istype(S, /datum/species/android)) //ignore plasmamen/robotic species
if(istype(S, /datum/species/android)) //ignore plasmamen/robotic species istype(S, /datum/species/plasmaman) // FIX ME LATER!!!!!!
continue

for(var/BP in PP.bodyparts)
Expand All @@ -234,7 +234,7 @@
"<span class='userdanger'>You scream out in pain as your [NB] melts down to the bone, leaving an eerie plasma-like glow where flesh used to be!</span>")
if(!plasma_parts.len && !robo_parts.len) //a person with no potential organic limbs left AND no robotic limbs, time to turn them into a plasmaman
PP.IgniteMob()
PP.set_species(/datum/species/plasmaman)
// PP.set_species(/datum/species/plasmaman) // FIX ME LATER!!!!!!
PP.visible_message(
"<span class='warning'>[L] bursts into a brilliant purple flame as [L.p_their()] entire body is that of a skeleton!</span>",
"<span class='userdanger'>Your senses numb as all of your remaining flesh is turned into a purple slurry, sloshing off your body and leaving only your bones to show in a vibrant purple!</span>")
Expand Down
39 changes: 30 additions & 9 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
BODY_ZONE_L_LEG = PROSTHETIC_NORMAL,
BODY_ZONE_R_LEG = PROSTHETIC_NORMAL
)
var/fbp = FALSE
var/species_variant = PREF_VARIANT_NONE
var/phobia = "spiders"
var/preferred_smoke_brand = PREF_CIG_SPACE
var/list/alt_titles_preferences = list()
Expand Down Expand Up @@ -912,9 +912,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</tr></table>"

dat += "<h3>Prosthetic Limbs</h3>"
dat += "<a href='?_src_=prefs;preference=fbp'>Full Body Prosthesis: [fbp ? "Yes" : "No"]</a><br>"
dat += "<a href='?_src_=prefs;preference=species_variant'>Species Variant: [species_variant]</a><br>"

if(!fbp)
if(species_variant == PREF_VARIANT_NONE)
dat += "<a href='?_src_=prefs;preference=toggle_random;random_type=[RANDOM_PROSTHETIC]'>Random Prosthetic: [(randomise[RANDOM_PROSTHETIC]) ? "Yes" : "No"]</a><br>"

dat += "<table>"
Expand Down Expand Up @@ -2156,8 +2156,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
facial_hairstyle = random_facial_hairstyle(gender)
hairstyle = random_hairstyle(gender)

if("fbp")
fbp = !fbp
if("species_variant")
var/selectAdj = input(user, "To what variant of your species?", "Character Preference", species_variant) as null|anything in pref_species.special_variants
if(selectAdj)
species_variant = selectAdj

if("limbs")
if(href_list["customize_limb"])
Expand Down Expand Up @@ -2486,7 +2488,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)

character.exowear = exowear

character.fbp = fbp
character.is_variant = species_variant

character.flavor_text = features["flavor_text"] //Let's update their flavor_text at least initially

Expand All @@ -2506,9 +2508,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)

//prosthetics work for vox and kepori and update just fine for everyone
character.dna.features = features.Copy()
character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE, robotic = fbp)
character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE, variant = species_variant)

if(!fbp)
if(species_variant == PREF_VARIANT_NONE)
for(var/pros_limb in prosthetic_limbs)
var/obj/item/bodypart/old_part = character.get_bodypart(pros_limb)
if(old_part)
Expand All @@ -2527,7 +2529,26 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(old_part)
old_part.drop_limb(TRUE)
qdel(old_part)
character.regenerate_limb(pros_limb, robotic = TRUE)
character.regenerate_limb(pros_limb, variant = PREF_VARIANT_FBP)
if(species_variant == PREF_VARIANT_PHORID) // copies phorid behavior. this is a hack but i'm not competent enough to make something better
character.dna.species.inherent_biotypes |= ~MOB_ORGANIC|MOB_MINERAL
character.dna.species.species_traits += list(NOBLOOD, NOTRANSSTING, NOHUSK)
var/list/phorid_traits = list(TRAIT_RESISTCOLD, TRAIT_RADIMMUNE, TRAIT_GENELESS, TRAIT_NOHUNGER, TRAIT_ALWAYS_CLEAN)
character.dna.species.inherent_traits += phorid_traits
for(var/trait in phorid_traits)
ADD_TRAIT(character, trait, SPECIES_TRAIT)
character.dna.species.breathid = "tox"
character.dna.species.damage_overlay_type = ""

if(species_variant == PREF_VARIANT_FBP) // copies some IPC behavior
character.dna.species.inherent_biotypes |= ~MOB_ORGANIC|MOB_ROBOTIC
character.dna.species.species_traits = list(NOTRANSSTING, NO_DNA_COPY, TRAIT_EASYDISMEMBER, NOZOMBIE, MUTCOLORS, NOHUSK, NO_BONES)
var/list/fbp_traits = list(TRAIT_RESISTCOLD, TRAIT_VIRUSIMMUNE, TRAIT_NOBREATH, TRAIT_RADIMMUNE, TRAIT_GENELESS, TRAIT_LIMBATTACHMENT, TRAIT_METALLIC)
character.dna.species.inherent_traits += fbp_traits
for(var/trait in fbp_traits)
ADD_TRAIT(character, trait, SPECIES_TRAIT)
character.dna.species.exotic_bloodtype = "Coolant"
character.dna.blood_type = get_blood_type("Coolant")

if(pref_species.id == "ipc") // If triggered, vox and kepori arms do not spawn in but ipcs sprites break without it as the code for setting the right prosthetics for them is in set_species().
character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
READ_FILE(S["feature_human_tail"], features["tail_human"])
READ_FILE(S["feature_human_ears"], features["ears"])

READ_FILE(S["fbp"], fbp)
READ_FILE(S["species_variant"], species_variant)

//Custom names
for(var/custom_name_id in GLOB.preferences_custom_names)
Expand Down Expand Up @@ -527,7 +527,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
exowear = sanitize_inlist(exowear, GLOB.exowearlist, initial(exowear))
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
fbp = sanitize_integer(fbp, FALSE, TRUE, FALSE)
species_variant = sanitize_inlist(species_variant, pref_species.special_variants)
features["grad_style"] = sanitize_inlist(features["grad_style"], GLOB.hair_gradients_list)
features["grad_color"] = sanitize_hexcolor(features["grad_color"])
features["body_size"] = sanitize_inlist(features["body_size"], GLOB.body_sizes, "Normal")
Expand Down Expand Up @@ -643,7 +643,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_vox_neck_quills"] , features["vox_neck_quills"])
WRITE_FILE(S["feature_elzu_horns"] , features["elzu_horns"])
WRITE_FILE(S["feature_tail_elzu"] , features["tail_elzu"])
WRITE_FILE(S["fbp"] , fbp)
WRITE_FILE(S["species_variant"] , species_variant)

//Flavor text
WRITE_FILE(S["feature_flavor_text"] , features["flavor_text"])
Expand Down
23 changes: 23 additions & 0 deletions code/modules/clothing/outfits/factions/nanotrasen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
satchel = /obj/item/storage/backpack/satchel/cap
duffelbag = /obj/item/storage/backpack/duffelbag/captain
courierbag = /obj/item/storage/backpack/messenger/com
phorid_outfit = /datum/outfit/plasmaman/command

accessory = /obj/item/clothing/accessory/medal/gold/captain

Expand Down Expand Up @@ -97,6 +98,7 @@
satchel = /obj/item/storage/backpack/satchel/cap
duffelbag = /obj/item/storage/backpack/duffelbag/captain
courierbag = /obj/item/storage/backpack/messenger/com
phorid_outfit = /datum/outfit/plasmaman/hos

chameleon_extras = list(
/obj/item/gun/energy/e_gun,
Expand Down Expand Up @@ -130,6 +132,7 @@
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
courierbag = /obj/item/storage/backpack/messenger/sec
phorid_outfit = /datum/outfit/plasmaman/hos
box = /obj/item/storage/box/survival/security

implants = list(/obj/item/implant/mindshield)
Expand Down Expand Up @@ -158,6 +161,7 @@
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
courierbag = /obj/item/storage/backpack/messenger/sec
phorid_outfit = /datum/outfit/plasmaman/security
box = /obj/item/storage/box/survival/security

chameleon_extras = list(/obj/item/gun/energy/disabler, /obj/item/clothing/glasses/hud/security/sunglasses, /obj/item/clothing/head/helmet)
Expand Down Expand Up @@ -186,6 +190,7 @@
satchel = /obj/item/storage/backpack/satchel/sec
duffelbag = /obj/item/storage/backpack/duffelbag/sec
courierbag = /obj/item/storage/backpack/messenger/sec
phorid_outfit = /datum/outfit/plasmaman/warden
box = /obj/item/storage/box/survival/security

chameleon_extras = /obj/item/gun/ballistic/shotgun/automatic/combat/compact
Expand All @@ -212,6 +217,7 @@
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
courierbag = /obj/item/storage/backpack/messenger/engi
phorid_outfit = /datum/outfit/plasmaman/engineering

box = /obj/item/storage/box/survival/engineer
backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1)
Expand Down Expand Up @@ -240,6 +246,7 @@
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
courierbag = /obj/item/storage/backpack/messenger/engi
phorid_outfit = /datum/outfit/plasmaman/ce

box = /obj/item/storage/box/survival/engineer
chameleon_extras = /obj/item/stamp/ce
Expand All @@ -261,6 +268,8 @@
satchel = /obj/item/storage/backpack/satchel/eng
duffelbag = /obj/item/storage/backpack/duffelbag/engineering
courierbag = /obj/item/storage/backpack/messenger/engi
phorid_outfit = /datum/outfit/plasmaman/atmospherics

box = /obj/item/storage/box/survival/engineer
backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1)

Expand All @@ -278,6 +287,9 @@
suit = /obj/item/clothing/suit/toggle/labcoat/brig_phys
dcoat = /obj/item/clothing/suit/hooded/wintercoat/security
head = /obj/item/clothing/head/soft/sec/brig_phys

phorid_outfit = /datum/outfit/plasmaman/secmed

implants = list(/obj/item/implant/mindshield)

// Supply //
Expand All @@ -297,6 +309,8 @@
l_hand = /obj/item/clipboard
backpack_contents = list(/obj/item/modular_computer/tablet/preset/cargo=1)

phorid_outfit = /datum/outfit/plasmaman/cargo

chameleon_extras = /obj/item/stamp/qm

//Miner
Expand Down Expand Up @@ -324,6 +338,7 @@
backpack = /obj/item/storage/backpack/explorer
satchel = /obj/item/storage/backpack/satchel/explorer
duffelbag = /obj/item/storage/backpack/duffelbag
phorid_outfit = /datum/outfit/plasmaman/mining
box = /obj/item/storage/box/survival/mining

chameleon_extras = /obj/item/gun/energy/kinetic_accelerator
Expand All @@ -339,6 +354,9 @@
head = /obj/item/clothing/head/nanotrasen/cap/supply
uniform = /obj/item/clothing/under/nanotrasen/supply
dcoat = /obj/item/clothing/suit/hooded/wintercoat/cargo

phorid_outfit = /datum/outfit/plasmaman/cargo

backpack_contents = list(/obj/item/modular_computer/tablet/preset/cargo=1)

// Medical //
Expand All @@ -363,6 +381,7 @@
duffelbag = /obj/item/storage/backpack/duffelbag/med
courierbag = /obj/item/storage/backpack/messenger/med
box = /obj/item/storage/box/survival/medical
phorid_outfit = /datum/outfit/plasmaman/medical

// Paramedic
/datum/outfit/job/nanotrasen/paramedic
Expand All @@ -386,6 +405,7 @@
duffelbag = /obj/item/storage/backpack/duffelbag/med
courierbag = /obj/item/storage/backpack/messenger/para
box = /obj/item/storage/box/survival/medical
phorid_outfit = /datum/outfit/plasmaman/paramedic

chameleon_extras = /obj/item/gun/syringe

Expand Down Expand Up @@ -446,6 +466,7 @@
backpack = /obj/item/storage/backpack/science
satchel = /obj/item/storage/backpack/satchel/tox
courierbag = /obj/item/storage/backpack/messenger/tox
phorid_outfit = /datum/outfit/plasmaman/science

// Roboticist
/datum/outfit/job/nanotrasen/roboticist
Expand All @@ -459,6 +480,8 @@
ears = /obj/item/radio/headset/nanotrasen
glasses = /obj/item/clothing/glasses/welding

phorid_outfit = /datum/outfit/plasmaman/robotics

backpack_contents = list(/obj/item/weldingtool/hugetank)

// Pilot. idk
Expand Down
Loading
Loading