From 6df77ad80deda620e8d46f37042466c3c6188061 Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Thu, 21 Nov 2024 00:38:36 -0500 Subject: [PATCH] [MIRROR] Death of mutant bodyparts AND external organs (#85137) (#4335) * Death of mutant bodyparts AND external organs (#85137) Removes mutant bodyparts and external organs from the game completely Digitgrade behaviour was mutant bodypart for no reason Cat ears now work with the bodyparts overlay system, same as all the other external organs (since all their behaviour is now just on /organ It doesn't remove all the /external types, but moves all behaviour to /organ. I'll follow up with a PR wiping all the /external organ types, but it's just conflict heaven so not this PR I've also streamlined a lot of duplicate/weird species regeneration code Melbert did the same PR as well but due to a lack of time (?) I have absorbed his PR to double nuke mutant bodyparts Frees us from the chain of unmodular code, and kills my greatest nemesis (after the shuttle meteor murder bug) :cl: Time-Green and MrMelbert Refactor: External organ behaviour has been moved to /organ, ears now use the same system as the other organs Refactor: Mutant bodyparts are dead! This likely does not mean much to the average person but it's very dear to me code: Improves digitgrade handling in preference code /:cl: I have absorbed #85126, using Melberts code to improve and add some missing changes. Mainly improving the functioning of preferences and digitgrade legs. I didn't take over the hairstyle improvements. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> * Fixes missing felinid ear preference (#86553) Closes #86452 :cl: fix: Fixed missing felinid ear preference /:cl: * Spelling Fixes (#86056) Fixes several errors to spelling, grammar, and punctuation. Improves readability and user experience. :cl: spellcheck: fixed a few typos /:cl: * Fix plasmamen having all feature preferences (#86682) Fixes #86622 Plasmamen relevant_external_organ is null, and it then checks if relevant_external_organ is in a list containing nulls I cleared the nulls from get_mut_organs to fix it :cl: fix: Fixes plasmamen having all external organ species preferences /:cl: * Fixes cat ear layering, makes getFlatIcon account for RESET_COLOR on under/overlays (#86757) After the external organ removal pr, cat ears stopped being as weirdly specialcased, and instead just used a `/datum/bodypart_overlay/mutant` subtype. However, this was set up in a way where the inner ears were put on a different layer from the outer ears, leading to wonky layering. In this pr, we revert their layers and instead apply the inner ears as an overlay onto the base ears, fixing this. Thank you Melbert for the idea. o7 Additionally, as this pr tripped the screenshot tests, makes the `getFlatIcon(...)` proc account for `RESET_COLOR` on under/overlays. We do this by making it stop applying the colour after merging all the under/overlays, and instead apply it and the parent color _before_ merging any under/overlays, while proxying the parent color as a new parameter `parentcolor` to any new `getFlatIcon(...)` calls. This coincidentally also fixes usage of `getFlatIcon(...)` on husked bodies, as those also used `RESET_COLOR` for their blood overlay. The screenshot tests had to be updated for this. Fixes #86453. :cl: fix: Fixed cat ears not layering properly. fix: Husked bodies show their blood with the right colours in photographs. /:cl: * Automatic changelog for PR #86757 [ci skip] * Fish infusion (#87030) I'm adding a new infusion ~~(actually four, but two of them are just holders for specific organs tied to a couple fish traits)~~ to the game. As the title says, it's about fish. The infusion is composed of three primary organs, plus another few that can be gotten from fish with specific traits. The primary organs are: - Gills (lungs): Instead of breathing oxygen, you now need to stay wet or breathe water vapor. - fish-DNA infused stomach: Can safely eat raw fish. - fish tail: On its own, it only speeds you up on water turfs, but it has another effect once past the organ set threshold. It also makes you waddle and flop like a fish while crawling (I still gotta finish sprites on this one) Other organs are: - semi-aquatic lungs: A subtype of gills from fish with the 'amphibious' trait, falls back on oxygen if there's no water. Can also be gotten from frogs, axolotl and crabs. - fish-DNA infused liver: From fish with the 'toxic' trait. Uses tetrodotoxin as a healing chem instead of a toxin. Also better tolerance to alcohol if you want to drink like a fish (ba dum tsh). - inky tongue: From fish with the 'ink production' trait. Gives mobs the ability to spit ink on a cooldown, blinding and confusion foes temporarily. The main gimmick of this infusion revolves around being drenched in water to benefit from it, In the case you get the gills organ, this also becomes a necessity, to not suffocate to death (alternatively, you can breathe water vapor, without any benefit). To enable the bonus of the organs set, three organs need to be infused. They can be gills, stomach, tail and/or liver, while the inky tongue doesn't count towards it. Once the threshold is reached, the following bonus are enabled: - Wetness decays a lot slower and resists fire a bit more. - Ink spit becomes stronger, allowing it to very briefly knock down foes. - Fishing bonuses and experience - Resistance to high pressures - Slightly expanded FOV - drinking water and showers mildly heal you over time. - for felinids: You won't hate getting sprayed by water or taking a shower. - While wet: - - If the fish tail is implanted, crawling speed is boosted. - - You no longer slip on wet tiles. - - You also become slippery when lying on the floor. - - You get a very mild damage resistance and passive stamina regeneration, and cool down faster. - - You resist grabs better. - - get a very weak positive moodlet. - However, being dry will make you quite squisher, especially against fire damage, slower and give you a modest negative moodlet. While working on it, I've also noticed a few things that explained why tetrodotoxin (TTX) did jackshit at low doses, because livers have a set toxin tolerance value, below which, any amount of toxin does nothing. Also I've felt like reagents like multiver & co were a bit too strong against a reagent that's supposed to work at very low doses, with slow metabolization, so I've added a couple variables to buff TTX a bit, making it harder to purge and resistant to liver toxin tolerance (also added a bit of lungs damage). I wanted to take a shot at coding a DNA infusion and see how chock-full I could make it. DNA infusions are like a middle point between "aha, small visual trinket" and organs with generally ok effects. I seek to make something a bit more complex ~~(also tied to fishing ofc because that's more or less the recurrent gag of my recent features)~~ primaly focused around the unique theme of being strong when wet and weaker when dry. EDIT: The PR is now ready, have a set of screenshots of the (fairly mid) fish tails (and gills, barely visible) on randomly generated spessman and one consistent joe: ![immagine](https://github.com/user-attachments/assets/a4965508-22e2-4d3a-8523-29fec6bce91e) :cl: add: Added a new infusion to the game: Fish. Its main gimmick revolves around being stronger and slippery when wet while weaker when dry. balance: Buffed tetrodotoxin a little against liver tolerance and purging reagents. /:cl: * Eye wounds, scars and a new ~Pirate~ RP quirk (#87209) Upon getting stabbed in your eyes or having a bullet fly through your head there's a chance (minor for stabbing, extremely low for headshots) you'll receive a new "Eye Puncture" wound which causes profuse bleeding out of your now-empty eye hole. Once healed you'll have to deal with a scar on your eye which cannot be cured and requires surgical replacement. Eye scarring will reduce your eyes' max health by 15, give you a minor screen tint and a fancy visual on your character sprite. Getting scarring on both eyes will turn you completely blind. ![image](https://github.com/user-attachments/assets/c1ae4ff3-6844-405d-819b-9c390511e321) This PR also introduces a new quirk which gives you eye scarring on the eye of your choice and an eyepatch to go alongside it, just make sure that it sits on the right eye. Also added medical(white) subtype of eyepatches to loadout for those who want that version instead. Credits to AnturK on discord for the idea. Its a neat lil' feature that makes the game more immersive, and unlocks more roleplay opportunities for players. New quirk gives access to this feature for players who want to make it a part of their character's backstory (or maybe as a part of permanent scar roleplaying). :cl: add: Getting stabbed or shot in the eyes has a chance of giving you a new wound and a semi-permanent scar, blinding you on one side add: Added new "Scarred Eye" quirk which blinds you on one eye but gives you a fancy eyepatch add: Medical eyepatches have been added to loadout /:cl: --------- Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> * Resprited tails from fish infusion. (#87298) Back when I made #87030 I got a bit lazy when it came to spriting the fish tails and just ported a few ones from furry servers and made them inherit the hair color. Let me tell you, those sprites kinda look bad, and the fact that they've the same colors of hair is kinda... fuzzy, and doesn't sit well with me, like some hairball stuck in a cat's throat. So I took upon myself to actually make them better (and also give gill overlays a couple extra pixels), at the cost of some of my free time and their wagginess, because fuuuuuck wagging animations for anything that isn't a somewhat amorphous fluffy tail. Fish don't wag their tail. They also get one of several blue/grey tints if the owner of the part doesn't have a peculiar skin tone like lizards or ethereals or moffs. Anyway, comparison time: OLD: ![immagine](https://github.com/user-attachments/assets/a4965508-22e2-4d3a-8523-29fec6bce91e) NEW: ![immagine](https://github.com/user-attachments/assets/0f8e80cd-d11f-4fd4-a919-acb7237fa927) Both from byond screenshots but I cut and pasted them in paint instead of asesprite because old habits die hard. Better sprites. Perhaps the selection of blues could be improved a bit idk. :cl: image: resprited fish tails from fish infusion. /:cl: * Makes the game compile, first. * Removes a duplicate loadout entry added by /tg/ (to avoid people's loadouts getting messed up) * Fixed an issue with on_mob_insert() for /datum/bodypart_overlay/mutant * Fixed an issue with the burn datum of the moth wings bodypart_overlay * Fixing digitigrade legs not behaving as they should be * A bunch of Insert->mob_insert and Remove->mob_remove * Okay, now stuff gets colored properly Also ears work properly too! Only thing is that mutant organs on the preferences dummy don't seem to change between character, at least for most of them, which is really annoying. * Properly returns ears to being internal organs * Makes it so preferences can use relevant_mutant_bodyparts again! * Makes organs properly update when changing species * Markings now get removed when they don't need to be there on a limb * Fully renives update_mutant_bodyparts(), as it was basically just update_body_parts() anyway at this point * fix charging implant * Restores the usage of simple bodypart_overlay for the sensory_enhancer and the hackerman_deck, as that was otherwise causing a bunch of runtimes * Returns legs to being a sprite accessory, just for simplicity's sake (I don't want to have to refactor it on our end again) * Fixes xenos not getting their mutant organs because I accidentally nulled the list for no reason :skull: * Makes it so certain organs (in this case, ears) can't be replaced when changing visual preferences, meaning Tesharis/Synths/Slimepeople will get their respective ears, regardless of what visuals they choose for them * Fixes a small mistake with spines in the code * Adds some mutant_bodyparts for the results of the infuser unit test. This might be a hack, but we'll cross that bridge when we get to it in the future. * Adds a "None" option to tail_spines * Allows ears to not constantly runtime because they don't have an accessory_name sometimes, which is a sad consequence of many species not setting their ear sprite sometimes * Should fix CI, hopefully should be the last thing needed for this to work flawlessly from now on (crossing fingers) * This ACTUALLY fixes the changeling transform and transform sting! Hurray! --------- Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: klorpa <30924131+klorpa@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: Fluffles Co-authored-by: GoldenAlpharex --- code/__DEFINES/mobs.dm | 5 +- code/__DEFINES/surgery.dm | 5 + code/__DEFINES/~skyrat_defines/DNA.dm | 1 - code/__HELPERS/duplicating.dm | 2 - .../subsystem/sprite_accessories.dm | 2 - .../bodypart_overlays/bodypart_overlay.dm | 2 +- .../mutant_bodypart_overlay.dm | 30 +- code/datums/dna.dm | 6 +- .../quirks/neutral_quirks/transhumanist.dm | 8 +- code/datums/sprite_accessories.dm | 14 - .../debuffs/dna_transformation.dm | 4 + .../dna_infuser/organ_sets/fly_organs.dm | 1 - .../dna_infuser/organ_sets/fox_organs.dm | 18 -- .../dna_infuser/organ_sets/gondola_organs.dm | 12 +- code/game/objects/items/body_egg.dm | 7 +- code/game/objects/structures/mirror.dm | 1 - code/modules/admin/verbs/manipulate_organs.dm | 5 +- code/modules/admin/verbs/secrets.dm | 2 +- .../antagonists/abductor/equipment/gland.dm | 6 +- .../antagonists/changeling/changeling.dm | 4 +- .../antagonists/changeling/headslug_eggs.dm | 4 +- .../sacrifice_knowledge.dm | 11 +- .../antagonists/nightmare/nightmare_organs.dm | 3 +- .../antagonists/revenant/revenant_blight.dm | 2 - .../modules/client/preferences/_preference.dm | 8 +- .../preferences/species_features/felinid.dm | 2 +- .../preferences/species_features/lizard.dm | 44 ++- .../species_features/mushperson.dm | 2 +- .../experisci/experiment/experiments.dm | 2 +- .../chaplain/chaplain_vorpal_scythe.dm | 2 +- .../equipment/monster_organs/monster_organ.dm | 9 +- .../modules/mob/living/carbon/alien/organs.dm | 5 +- .../mob/living/carbon/carbon_update_icons.dm | 7 +- .../mob/living/carbon/human/_species.dm | 257 ++++-------------- .../living/carbon/human/human_update_icons.dm | 9 +- .../carbon/human/species_types/dullahan.dm | 1 - .../carbon/human/species_types/felinid.dm | 9 +- .../carbon/human/species_types/humans.dm | 1 - .../human/species_types/lizardpeople.dm | 5 +- .../carbon/human/species_types/monkeys.dm | 2 +- .../carbon/human/species_types/mothmen.dm | 10 +- .../carbon/human/species_types/mushpeople.dm | 2 +- .../carbon/human/species_types/podpeople.dm | 4 +- .../carbon/human/species_types/vampire.dm | 1 - code/modules/mod/modules/modules_medical.dm | 3 +- code/modules/surgery/bodyparts/_bodyparts.dm | 17 +- .../surgery/bodyparts/dismemberment.dm | 4 +- code/modules/surgery/bodyparts/helpers.dm | 8 +- code/modules/surgery/organ_manipulation.dm | 30 +- code/modules/surgery/organs/_organ.dm | 10 +- .../{_external_organ.dm => _visual_organs.dm} | 120 ++------ .../surgery/organs/external/restyling.dm | 19 +- .../modules/surgery/organs/external/spines.dm | 4 +- code/modules/surgery/organs/external/tails.dm | 14 +- .../organs/external/wings/functional_wings.dm | 7 +- .../organs/external/wings/moth_wings.dm | 5 +- .../organs/internal/appendix/_appendix.dm | 2 +- .../organs/internal/cyberimp/augments_eyes.dm | 7 +- .../internal/cyberimp/augments_internal.dm | 2 +- .../surgery/organs/internal/ears/_ears.dm | 31 +-- .../surgery/organs/internal/eyes/_eyes.dm | 56 ++-- .../surgery/organs/internal/heart/_heart.dm | 2 +- .../organs/internal/heart/heart_ethereal.dm | 7 +- .../surgery/organs/internal/liver/_liver.dm | 2 +- .../surgery/organs/internal/lungs/_lungs.dm | 9 +- .../organs/internal/stomach/_stomach.dm | 6 +- .../surgery/organs/internal/tongue/_tongue.dm | 26 +- .../internal/vocal_cords/_vocal_cords.dm | 2 - code/modules/surgery/organs/organ_movement.dm | 33 ++- code/modules/unit_tests/dna_infusion.dm | 10 +- .../unit_tests/organ_bodypart_shuffle.dm | 4 +- .../wiremod/shell/brain_computer_interface.dm | 1 - html/changelogs/AutoChangeLog-pr-86757.yml | 5 + .../mutant_bodypart_overlay.dm | 2 +- .../modules/client/preferences/_preference.dm | 5 + .../species_features/digitigrade_legs.dm | 4 +- .../code/modules/mob/living/human/species.dm | 2 +- .../medicine_reagents/medicine_reagents.dm | 2 +- .../code/modules/surgery/organs/_organ.dm | 4 + .../cortical_borer/code/cortical_borer.dm | 4 +- .../evolution_things/empowered_egg.dm | 4 +- .../mob/dead/new_player/sprite_accessories.dm | 16 +- .../new_player/sprite_accessories/ears.dm | 12 +- .../new_player/sprite_accessories/snout.dm | 2 +- .../new_player/sprite_accessories/spines.dm | 4 + .../modules/mob/living/carbon/human/human.dm | 10 +- .../mob/living/carbon/human/species.dm | 14 +- .../species/hemophage/hemophage_tumor.dm | 4 +- .../mob/living/carbon/human/species/lizard.dm | 2 +- .../mob/living/carbon/human/species/xeno.dm | 1 - .../modules/surgery/organs/ears.dm | 24 +- .../modules/surgery/organs/organ.dm | 7 + .../modules/surgery/organs/tails.dm | 2 +- .../modules/surgery/organs/taur_body.dm | 4 +- .../code/additionalemotes/turf_emote.dm | 2 +- .../emotes/code/additionalemotes/turf_list.dm | 2 +- .../modules/modular_implants/code/nifs.dm | 4 +- .../lewd_items/code/lewd_helpers/human.dm | 8 +- modular_skyrat/modules/organs/code/ears.dm | 2 + modular_skyrat/modules/organs/code/tongue.dm | 14 +- .../primitive_catgirls/code/species.dm | 2 +- .../modules/synths/code/bodyparts/ears.dm | 2 + .../modules/synths/code/bodyparts/stomach.dm | 4 +- .../modules/synths/code/species/synthetic.dm | 2 +- .../modules/taur_mechanics/code/constrict.dm | 4 +- tgstation.dme | 3 +- 106 files changed, 481 insertions(+), 680 deletions(-) rename code/modules/surgery/organs/external/{_external_organ.dm => _visual_organs.dm} (74%) create mode 100644 html/changelogs/AutoChangeLog-pr-86757.yml create mode 100644 modular_skyrat/master_files/code/modules/surgery/organs/_organ.dm diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 82301ffb484..08cbd90308e 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -169,7 +169,10 @@ ///The species is forced to have digitigrade legs in generation. #define DIGITIGRADE_FORCED 2 -///Digitigrade's prefs, used in features for legs if you're meant to be a Digitigrade. +// Preferences for leg types +/// Legs that are normal +#define NORMAL_LEGS "Normal Legs" +/// Digitgrade legs that are like bended and uhhh no shoes #define DIGITIGRADE_LEGS "Digitigrade Legs" // Health/damage defines diff --git a/code/__DEFINES/surgery.dm b/code/__DEFINES/surgery.dm index b930c3711de..48d1117241f 100644 --- a/code/__DEFINES/surgery.dm +++ b/code/__DEFINES/surgery.dm @@ -36,6 +36,11 @@ /// Scarring on the left eye #define LEFT_EYE_SCAR (1<<1) +/// Scarring on the right eye +#define RIGHT_EYE_SCAR (1<<0) +/// Scarring on the left eye +#define LEFT_EYE_SCAR (1<<1) + /// Helper to figure out if a limb is organic #define IS_ORGANIC_LIMB(limb) (limb.bodytype & BODYTYPE_ORGANIC) /// Helper to figure out if a limb is robotic diff --git a/code/__DEFINES/~skyrat_defines/DNA.dm b/code/__DEFINES/~skyrat_defines/DNA.dm index fa034ab2d45..3316661e75e 100644 --- a/code/__DEFINES/~skyrat_defines/DNA.dm +++ b/code/__DEFINES/~skyrat_defines/DNA.dm @@ -46,7 +46,6 @@ /// Organ slot external #define ORGAN_SLOT_EXTERNAL_CAP "cap" -#define ORGAN_SLOT_EXTERNAL_EARS "ears_external" // I hate having to do this, hopefully I'll be able to remove this soon with an external ears refactor. #define ORGAN_SLOT_EXTERNAL_FLUFF "fluff" #define ORGAN_SLOT_EXTERNAL_HEAD_ACCESSORY "head_accessory" #define ORGAN_SLOT_EXTERNAL_MOTH_MARKINGS "moth_markings" diff --git a/code/__HELPERS/duplicating.dm b/code/__HELPERS/duplicating.dm index 225dca91fb5..f0f3f9a9fce 100644 --- a/code/__HELPERS/duplicating.dm +++ b/code/__HELPERS/duplicating.dm @@ -15,8 +15,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars, list( "contents", "cooldowns", "_datum_components", - "external_organs", - "external_organs_slot", "group", "hand_bodyparts", "held_items", diff --git a/code/controllers/subsystem/sprite_accessories.dm b/code/controllers/subsystem/sprite_accessories.dm index 8d7017648e9..058a7cc40e1 100644 --- a/code/controllers/subsystem/sprite_accessories.dm +++ b/code/controllers/subsystem/sprite_accessories.dm @@ -47,7 +47,6 @@ SUBSYSTEM_DEF(accessories) // just 'accessories' for brevity var/list/horns_list var/list/frills_list var/list/spines_list - var/list/legs_list var/list/tail_spines_list //Mutant Human bits @@ -135,7 +134,6 @@ SUBSYSTEM_DEF(accessories) // just 'accessories' for brevity frills_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, add_blank = TRUE)[DEFAULT_SPRITE_LIST] spines_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, add_blank = TRUE)[DEFAULT_SPRITE_LIST] tail_spines_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/tail_spines, add_blank = TRUE)[DEFAULT_SPRITE_LIST] - legs_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/legs)[DEFAULT_SPRITE_LIST] caps_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/caps)[DEFAULT_SPRITE_LIST] moth_wings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings)[DEFAULT_SPRITE_LIST] moth_antennae_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae)[DEFAULT_SPRITE_LIST] diff --git a/code/datums/bodypart_overlays/bodypart_overlay.dm b/code/datums/bodypart_overlays/bodypart_overlay.dm index 15e9bd62f44..767214024c6 100644 --- a/code/datums/bodypart_overlays/bodypart_overlay.dm +++ b/code/datums/bodypart_overlays/bodypart_overlay.dm @@ -89,7 +89,7 @@ return TRUE ///Colorizes the limb it's inserted to, if required. -/datum/bodypart_overlay/proc/override_color(rgb_value) +/datum/bodypart_overlay/proc/override_color(obj/item/bodypart/bodypart_owner) CRASH("External organ color set to override with no override proc.") ///Generate a unique identifier to cache with. If you change something about the image, but the icon cache stays the same, it'll simply pull the unchanged image out of the cache diff --git a/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm b/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm index 158bba5eece..1dfb765d970 100644 --- a/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm +++ b/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm @@ -13,6 +13,32 @@ ///Take on the dna/preference from whoever we're gonna be inserted in var/imprint_on_next_insertion = TRUE +/datum/bodypart_overlay/mutant/New(obj/item/organ/attached_organ) + . = ..() + + RegisterSignal(attached_organ, COMSIG_ORGAN_IMPLANTED, PROC_REF(on_mob_insert)) + +/datum/bodypart_overlay/mutant/proc/on_mob_insert(obj/item/organ/parent, mob/living/carbon/receiver) + SIGNAL_HANDLER + + if(!should_visual_organ_apply_to(parent.type, receiver)) + stack_trace("adding a [parent.type] to a [receiver.type] when it shouldn't be!") + + if(imprint_on_next_insertion) //We only want this set *once* + var/feature_name = receiver.dna.features[feature_key] + if (isnull(feature_name)) + /* NOVA EDIT - Customization - ORIGINAL: + feature_name = receiver.dna.species.mutant_organs[parent.type] + */ // NOVA EDIT START + if(!set_appearance_from_dna(receiver.dna)) + set_appearance_from_name(receiver.dna.species.mutant_organs[parent.type]) + // NOVA EDIT END + // NOVA EDIT START - Puts the following line in an else block + else + set_appearance_from_name(feature_name) + // NOVA EDIT END + imprint_on_next_insertion = FALSE + /datum/bodypart_overlay/mutant/get_overlay(layer, obj/item/bodypart/limb) inherit_color(limb) // If draw_color is not set yet, go ahead and do that return ..() @@ -67,7 +93,6 @@ return appearance /datum/bodypart_overlay/mutant/color_image(image/overlay, layer, obj/item/bodypart/limb) - overlay.color = sprite_datum.color_src ? draw_color : null /datum/bodypart_overlay/mutant/added_to_limb(obj/item/bodypart/limb) @@ -108,7 +133,7 @@ alpha = bodypart_owner.alpha // SKYRAT ADDITION - Mutant bodyparts transparency are based on limb transparency switch(color_source) if(ORGAN_COLOR_OVERRIDE) - draw_color = override_color(bodypart_owner.draw_color) + draw_color = override_color(bodypart_owner) if(ORGAN_COLOR_INHERIT) draw_color = bodypart_owner.draw_color if(ORGAN_COLOR_HAIR) @@ -141,3 +166,4 @@ CRASH("External organ [type] couldn't find sprite accessory [accessory_name]!") else CRASH("External organ [type] had fetch_sprite_datum called with a null accessory name!") + diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 035edb86857..1a783739cd2 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -765,9 +765,11 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) dna.features["caps"] = SSaccessories.caps_list[deconstruct_block(get_uni_feature_block(features, DNA_MUSHROOM_CAPS_BLOCK), length(SSaccessories.caps_list))] if(dna.features["pod_hair"]) dna.features["pod_hair"] = SSaccessories.pod_hair_list[deconstruct_block(get_uni_feature_block(features, DNA_POD_HAIR_BLOCK), length(SSaccessories.pod_hair_list))] + if(dna.features["fish_tail"]) + dna.features["fish_tail"] = SSaccessories.tails_list_fish[deconstruct_block(get_uni_feature_block(features, DNA_FISH_TAIL_BLOCK), length(SSaccessories.tails_list_fish))] - for(var/obj/item/organ/external/external_organ in organs) - external_organ.mutate_feature(features, src) + for(var/obj/item/organ/organ in organs) + organ.mutate_feature(features, src) if(icon_update) update_body(is_creating = mutcolor_update) diff --git a/code/datums/quirks/neutral_quirks/transhumanist.dm b/code/datums/quirks/neutral_quirks/transhumanist.dm index ea6494a6b32..aa8ae075df3 100644 --- a/code/datums/quirks/neutral_quirks/transhumanist.dm +++ b/code/datums/quirks/neutral_quirks/transhumanist.dm @@ -127,10 +127,10 @@ else if(isorgan(new_part)) var/obj/item/organ/new_organ = new_part old_part = human_holder.get_organ_slot(new_organ.slot) - if(new_organ.Insert(human_holder, special = TRUE)) - old_part.moveToNullspace() - STOP_PROCESSING(SSobj, old_part) - slot_string = new_organ.name + new_organ.Insert(human_holder, special = TRUE) + old_part.moveToNullspace() + STOP_PROCESSING(SSobj, old_part) + slot_string = new_organ.name /datum/quirk/transhumanist/post_add() if(!slot_string) diff --git a/code/datums/sprite_accessories.dm b/code/datums/sprite_accessories.dm index 5f9869b7dda..6a9edf86565 100644 --- a/code/datums/sprite_accessories.dm +++ b/code/datums/sprite_accessories.dm @@ -34,8 +34,6 @@ * This is the source that this accessory will get its color from. Default is MUTCOLOR, but can also be HAIR, FACEHAIR, EYECOLOR and 0 if none. */ var/color_src = MUTANT_COLOR - /// Decides if this sprite has an "inner" part, such as the fleshy parts on ears. - var/hasinner = FALSE /// Is this part locked from roundstart selection? Used for parts that apply effects. var/locked = FALSE /// Should we center the sprite? @@ -1893,7 +1891,6 @@ /datum/sprite_accessory/ears/cat name = "Cat" icon_state = "cat" - hasinner = TRUE color_src = HAIR_COLOR /datum/sprite_accessory/ears/cat/big @@ -1920,7 +1917,6 @@ icon = 'icons/mob/human/fox_features.dmi' name = "Fox" icon_state = "fox" - hasinner = TRUE color_src = HAIR_COLOR locked = TRUE @@ -2131,16 +2127,6 @@ name = "Aquatic" icon_state = "aqua" -/datum/sprite_accessory/legs //legs are a special case, they aren't actually sprite_accessories but are updated with them. - icon = null //These datums exist for selecting legs on preference, and little else - em_block = TRUE - -/datum/sprite_accessory/legs/none - name = "Normal Legs" - -/datum/sprite_accessory/legs/digitigrade_lizard - name = DIGITIGRADE_LEGS - /datum/sprite_accessory/caps icon = 'icons/mob/human/species/mush_cap.dmi' color_src = HAIR_COLOR diff --git a/code/datums/status_effects/debuffs/dna_transformation.dm b/code/datums/status_effects/debuffs/dna_transformation.dm index 33b6eb1d913..243d20b1917 100644 --- a/code/datums/status_effects/debuffs/dna_transformation.dm +++ b/code/datums/status_effects/debuffs/dna_transformation.dm @@ -33,7 +33,9 @@ // Save the old DNA transforming.dna.copy_dna(old_dna) // Makes them into the new DNA + transforming.visual_only_organs = TRUE // NOVA EDIT ADDITION - Customization new_dna.transfer_identity(transforming) + transforming.visual_only_organs = FALSE // NOVA EDIT ADDITION - Customization transforming.real_name = new_dna.real_name transforming.name = transforming.get_visible_name() transforming.updateappearance(mutcolor_update = TRUE) @@ -44,7 +46,9 @@ var/mob/living/carbon/transforming = owner if(!QDELING(owner)) // Don't really need to do appearance stuff if we're being deleted + transforming.visual_only_organs = TRUE // NOVA EDIT ADDITION - Customization old_dna.transfer_identity(transforming) + transforming.visual_only_organs = FALSE // NOVA EDIT ADDITION - Customization transforming.updateappearance(mutcolor_update = TRUE) transforming.domutcheck() diff --git a/code/game/machinery/dna_infuser/organ_sets/fly_organs.dm b/code/game/machinery/dna_infuser/organ_sets/fly_organs.dm index f86a161b1ce..3ffad6dcba3 100644 --- a/code/game/machinery/dna_infuser/organ_sets/fly_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/fly_organs.dm @@ -137,7 +137,6 @@ //useless organs we throw in just to fuck with surgeons a bit more. they aren't part of a bonus, just the (absolute) state of flies /obj/item/organ/internal/fly desc = FLY_INFUSED_ORGAN_DESC - visual = FALSE /obj/item/organ/internal/fly/Initialize(mapload) . = ..() diff --git a/code/game/machinery/dna_infuser/organ_sets/fox_organs.dm b/code/game/machinery/dna_infuser/organ_sets/fox_organs.dm index 60d4465ce72..3fecac3bb6d 100644 --- a/code/game/machinery/dna_infuser/organ_sets/fox_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/fox_organs.dm @@ -6,22 +6,4 @@ visual = TRUE damage_multiplier = 2 -//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION -/* -/obj/item/organ/internal/ears/fox/on_mob_insert(mob/living/carbon/human/ear_owner) - . = ..() - if(istype(ear_owner) && ear_owner.dna) - color = ear_owner.hair_color - ear_owner.dna.features["ears"] = ear_owner.dna.species.mutant_bodyparts["ears"] = "Fox" - ear_owner.dna.update_uf_block(DNA_EARS_BLOCK) - ear_owner.update_body() - -/obj/item/organ/internal/ears/fox/on_mob_remove(mob/living/carbon/human/ear_owner) - . = ..() - if(istype(ear_owner) && ear_owner.dna) - color = ear_owner.hair_color - ear_owner.dna.species.mutant_bodyparts -= "ears" - ear_owner.update_body() sprite_accessory_override = /datum/sprite_accessory/ears/fox -*/ -//SKYRAT EDIT REMOVAL END diff --git a/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm b/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm index 797c7839b2c..9fcf7e483bb 100644 --- a/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/gondola_organs.dm @@ -34,7 +34,7 @@ Fluoride Stare: After someone says 5 words, blah blah blah... AddElement(/datum/element/noticable_organ, "%PRONOUN_They radiate%PRONOUN_s an aura of serenity.") AddElement(/datum/element/update_icon_blocker) -/obj/item/organ/internal/heart/gondola/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/internal/heart/gondola/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() if(!(FACTION_HOSTILE in receiver.faction)) factions_to_remove += FACTION_HOSTILE @@ -42,7 +42,7 @@ Fluoride Stare: After someone says 5 words, blah blah blah... factions_to_remove += FACTION_MINING receiver.faction |= list(FACTION_HOSTILE, FACTION_MINING) -/obj/item/organ/internal/heart/gondola/Remove(mob/living/carbon/heartless, special, movement_flags) +/obj/item/organ/internal/heart/gondola/mob_remove(mob/living/carbon/heartless, special, movement_flags) . = ..() for(var/faction in factions_to_remove) heartless.faction -= faction @@ -64,11 +64,11 @@ Fluoride Stare: After someone says 5 words, blah blah blah... AddElement(/datum/element/noticable_organ, "%PRONOUN_Their mouth is permanently affixed into a relaxed smile.", BODY_ZONE_PRECISE_MOUTH) AddElement(/datum/element/organ_set_bonus, /datum/status_effect/organ_set_bonus/gondola) -/obj/item/organ/internal/tongue/gondola/Insert(mob/living/carbon/tongue_owner, special, movement_flags) +/obj/item/organ/internal/tongue/gondola/mob_insert(mob/living/carbon/tongue_owner, special, movement_flags) . = ..() tongue_owner.add_mood_event("gondola_zen", /datum/mood_event/gondola_serenity) -/obj/item/organ/internal/tongue/gondola/Remove(mob/living/carbon/tongue_owner, special, movement_flags) +/obj/item/organ/internal/tongue/gondola/mob_remove(mob/living/carbon/tongue_owner, special, movement_flags) tongue_owner.clear_mood_event("gondola_zen") return ..() @@ -87,7 +87,7 @@ Fluoride Stare: After someone says 5 words, blah blah blah... AddElement(/datum/element/noticable_organ, "%PRONOUN_Their left arm has small needles breaching the skin all over it.", BODY_ZONE_L_ARM) AddElement(/datum/element/noticable_organ, "%PRONOUN_Their right arm has small needles breaching the skin all over it.", BODY_ZONE_R_ARM) -/obj/item/organ/internal/liver/gondola/Insert(mob/living/carbon/liver_owner, special, movement_flags) +/obj/item/organ/internal/liver/gondola/mob_insert(mob/living/carbon/liver_owner, special, movement_flags) . = ..() var/has_left = liver_owner.has_left_hand(check_disabled = FALSE) var/has_right = liver_owner.has_right_hand(check_disabled = FALSE) @@ -102,7 +102,7 @@ Fluoride Stare: After someone says 5 words, blah blah blah... RegisterSignal(liver_owner, COMSIG_LIVING_TRY_PULL, PROC_REF(on_owner_try_pull)) RegisterSignal(liver_owner, COMSIG_CARBON_HELPED, PROC_REF(on_hug)) -/obj/item/organ/internal/liver/gondola/Remove(mob/living/carbon/liver_owner, special, movement_flags) +/obj/item/organ/internal/liver/gondola/mob_remove(mob/living/carbon/liver_owner, special, movement_flags) . = ..() UnregisterSignal(liver_owner, list(COMSIG_HUMAN_EQUIPPING_ITEM, COMSIG_LIVING_TRY_PULL, COMSIG_CARBON_HELPED)) diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm index d244d8c55cc..d8b48e0789b 100644 --- a/code/game/objects/items/body_egg.dm +++ b/code/game/objects/items/body_egg.dm @@ -15,15 +15,14 @@ if(iscarbon(loc)) Insert(loc) -/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/egg_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/body_egg/mob_insert(mob/living/carbon/egg_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() - if(!.) - return + egg_owner.add_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT) egg_owner.med_hud_set_status() INVOKE_ASYNC(src, PROC_REF(AddInfectionImages), egg_owner) -/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/egg_owner, special, movement_flags) +/obj/item/organ/internal/body_egg/mob_remove(mob/living/carbon/egg_owner, special, movement_flags) . = ..() egg_owner.remove_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT) egg_owner.med_hud_set_status() diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 90444805c93..6ecf0b1f9f0 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -354,7 +354,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) user.set_facial_haircolor(sanitize_hexcolor(new_face_color), update = FALSE) user.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK) user.update_body_parts() - user.update_mutant_bodyparts() /// SKYRAT EDIT ADDITION - Mirrors are no longer scared of colored ears /obj/structure/mirror/magic/attack_hand(mob/living/carbon/human/user) . = ..() diff --git a/code/modules/admin/verbs/manipulate_organs.dm b/code/modules/admin/verbs/manipulate_organs.dm index bfb5050dafa..6c0a86126b6 100644 --- a/code/modules/admin/verbs/manipulate_organs.dm +++ b/code/modules/admin/verbs/manipulate_organs.dm @@ -18,10 +18,7 @@ ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the orga return organ_to_grant = organs[organ_to_grant] organ_to_grant = new organ_to_grant - if(!organ_to_grant.Insert(carbon_victim)) - to_chat(user, span_notice("[carbon_victim] is unable to carry this organ!")) - qdel(organ_to_grant) - return + organ_to_grant.Insert(carbon_victim) log_admin("[key_name(user)] has added organ [organ_to_grant.type] to [key_name(carbon_victim)]") message_admins("[key_name_admin(user)] has added organ [organ_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]") diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index f3acd741faa..368f6f4d6f4 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -526,7 +526,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w var/forename = names.len > 1 ? names[2] : names[1] var/newname = "[forename]-[pick(honorifics["[H.gender]"])]" H.fully_replace_character_name(H.real_name,newname) - H.update_mutant_bodyparts() + H.update_body_parts() if(animetype == "Yes") var/seifuku = pick(typesof(/obj/item/clothing/under/costume/schoolgirl)) var/obj/item/clothing/under/costume/schoolgirl/I = new seifuku diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm index 89052e02218..d1f240b7f68 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -84,7 +84,7 @@ active_mind_control = FALSE return TRUE -/obj/item/organ/internal/heart/gland/Remove(mob/living/carbon/gland_owner, special, movement_flags) +/obj/item/organ/internal/heart/gland/mob_remove(mob/living/carbon/gland_owner, special, movement_flags) . = ..() active = FALSE if(initial(uses) == 1) @@ -93,10 +93,8 @@ hud.remove_atom_from_hud(gland_owner) clear_mind_control() -/obj/item/organ/internal/heart/gland/Insert(mob/living/carbon/gland_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/heart/gland/mob_insert(mob/living/carbon/gland_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() - if(!.) - return if(special != 2 && uses) // Special 2 means abductor surgery Start() diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 68184fbfe43..244694c7dcc 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -953,8 +953,10 @@ user.regenerate_icons() user.name = user.get_visible_name() current_profile = chosen_profile - // SKYRAT EDIT START + // NOVA EDIT START + user.visual_only_organs = TRUE // NOVA EDIT ADDITION - Customization chosen_dna.transfer_identity(user, TRUE) + user.visual_only_organs = FALSE // NOVA EDIT ADDITION - Customization user.updateappearance(mutcolor_update = TRUE, eyeorgancolor_update = TRUE) user.regenerate_icons() user.name = user.get_visible_name() diff --git a/code/modules/antagonists/changeling/headslug_eggs.dm b/code/modules/antagonists/changeling/headslug_eggs.dm index 8f861aec2ec..75c0881c551 100644 --- a/code/modules/antagonists/changeling/headslug_eggs.dm +++ b/code/modules/antagonists/changeling/headslug_eggs.dm @@ -11,11 +11,11 @@ /// When this egg last got removed from a body. If -1, the egg hasn't been removed from a body. var/removal_time = -1 -/obj/item/organ/internal/body_egg/changeling_egg/Insert(mob/living/carbon/egg_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/body_egg/changeling_egg/mob_insert(mob/living/carbon/egg_owner, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() hatch_time = world.time + (removal_time == -1 ? EGG_INCUBATION_TIME : (hatch_time - removal_time)) -/obj/item/organ/internal/body_egg/changeling_egg/Remove(mob/living/carbon/egg_owner, special, movement_flags) +/obj/item/organ/internal/body_egg/changeling_egg/mob_remove(mob/living/carbon/egg_owner, special, movement_flags) . = ..() removal_time = world.time diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm index e538b700b05..2daa11dd978 100644 --- a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm @@ -419,20 +419,13 @@ usable_organs -= /obj/item/organ/internal/lungs/corrupt // Their lungs are already more cursed than anything I could give them var/total_implant = 1 //BUBBERSTATION CHANGE: ALWAYS 1 INSTEAD OF 2 TO 4. - var/gave_any = FALSE for (var/i in 1 to total_implant) if (!length(usable_organs)) - break + return var/organ_path = pick_n_take(usable_organs) var/obj/item/organ/internal/to_give = new organ_path - if (!to_give.Insert(sac_target)) - qdel(to_give) - else - gave_any = TRUE - - if (!gave_any) - return + to_give.Insert(sac_target) new /obj/effect/gibspawner/human/bodypartless(get_turf(sac_target)) sac_target.visible_message(span_boldwarning("Several organs force themselves out of [sac_target]!")) diff --git a/code/modules/antagonists/nightmare/nightmare_organs.dm b/code/modules/antagonists/nightmare/nightmare_organs.dm index 5c675643964..4aaacb77e5f 100644 --- a/code/modules/antagonists/nightmare/nightmare_organs.dm +++ b/code/modules/antagonists/nightmare/nightmare_organs.dm @@ -65,9 +65,10 @@ /obj/item/organ/internal/heart/nightmare name = "heart of darkness" desc = "An alien organ that twists and writhes when exposed to light." + visual = TRUE icon_state = "demon_heart-on" base_icon_state = "demon_heart" - visual = TRUE + color = COLOR_CRAYON_BLACK decay_factor = 0 // No love is to be found in a heart so twisted. diff --git a/code/modules/antagonists/revenant/revenant_blight.dm b/code/modules/antagonists/revenant/revenant_blight.dm index dcbc9bc8181..13a1ff7e1d6 100644 --- a/code/modules/antagonists/revenant/revenant_blight.dm +++ b/code/modules/antagonists/revenant/revenant_blight.dm @@ -19,7 +19,6 @@ if(affected_mob) affected_mob.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#1d2953") if(affected_mob.dna && affected_mob.dna.species) - affected_mob.dna.species.handle_mutant_bodyparts(affected_mob) affected_mob.set_haircolor(null, override = TRUE) to_chat(affected_mob, span_notice("You feel better.")) ..() @@ -66,7 +65,6 @@ affected_mob.adjustStaminaLoss(22.5 * seconds_per_tick, updating_stamina = FALSE) new /obj/effect/temp_visual/revenant(affected_mob.loc) if(affected_mob.dna && affected_mob.dna.species) - affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953") affected_mob.set_haircolor("#1d2953", override = TRUE) affected_mob.visible_message(span_warning("[affected_mob] looks terrifyingly gaunt..."), span_revennotice("You suddenly feel like your skin is wrong...")) affected_mob.add_atom_colour("#1d2953", TEMPORARY_COLOUR_PRIORITY) diff --git a/code/modules/client/preferences/_preference.dm b/code/modules/client/preferences/_preference.dm index 8eca4652527..9e3b24e0f69 100644 --- a/code/modules/client/preferences/_preference.dm +++ b/code/modules/client/preferences/_preference.dm @@ -111,10 +111,6 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) /// DOES have random body on, will this already be randomized? var/randomize_by_default = TRUE - /// If the selected species has this in its /datum/species/mutant_bodyparts, - /// will show the feature as selectable. - var/relevant_mutant_bodypart = null - /// If the selected species has this in its /datum/species/body_markings, /// will show the feature as selectable. var/relevant_body_markings = null @@ -336,8 +332,8 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) SHOULD_NOT_SLEEP(TRUE) if ( \ - !isnull(relevant_mutant_bodypart) \ - || !isnull(relevant_inherent_trait) \ + !isnull(relevant_inherent_trait) \ + || !isnull(relevant_mutant_bodypart) /* NOVA EDIT ADDITION - Since we still use relevant_mutant_bodypart, we need it here. */ \ || !isnull(relevant_external_organ) \ || !isnull(relevant_head_flag) \ || !isnull(relevant_body_markings) \ diff --git a/code/modules/client/preferences/species_features/felinid.dm b/code/modules/client/preferences/species_features/felinid.dm index 8bf49fac227..2406f666c6b 100644 --- a/code/modules/client/preferences/species_features/felinid.dm +++ b/code/modules/client/preferences/species_features/felinid.dm @@ -21,7 +21,7 @@ savefile_identifier = PREFERENCE_CHARACTER category = PREFERENCE_CATEGORY_SECONDARY_FEATURES can_randomize = FALSE - relevant_mutant_bodypart = "ears" + relevant_external_organ = /obj/item/organ/internal/ears/cat /datum/preference/choiced/ears/init_possible_values() return assoc_to_keys_features(SSaccessories.ears_list) diff --git a/code/modules/client/preferences/species_features/lizard.dm b/code/modules/client/preferences/species_features/lizard.dm index 2ae38c9ac67..2292e3f3e83 100644 --- a/code/modules/client/preferences/species_features/lizard.dm +++ b/code/modules/client/preferences/species_features/lizard.dm @@ -94,13 +94,51 @@ savefile_key = "feature_lizard_legs" savefile_identifier = PREFERENCE_CHARACTER category = PREFERENCE_CATEGORY_SECONDARY_FEATURES - relevant_mutant_bodypart = "legs" /datum/preference/choiced/lizard_legs/init_possible_values() - return assoc_to_keys_features(SSaccessories.legs_list) + return list(NORMAL_LEGS, DIGITIGRADE_LEGS) /datum/preference/choiced/lizard_legs/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["legs"] = value + // Hack to update the dummy in the preference menu + // (Because digi legs are ONLY handled on species change) + if(!isdummy(target) || target.dna.species.digitigrade_customization == DIGITIGRADE_NEVER) + return + + var/list/correct_legs = target.dna.species.bodypart_overrides.Copy() & list(BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) + + if(value == DIGITIGRADE_LEGS) + correct_legs[BODY_ZONE_R_LEG] = /obj/item/bodypart/leg/right/digitigrade + correct_legs[BODY_ZONE_L_LEG] = /obj/item/bodypart/leg/left/digitigrade + + for(var/obj/item/bodypart/old_part as anything in target.bodyparts) + if(old_part.change_exempt_flags & BP_BLOCK_CHANGE_SPECIES) + continue + + var/path = correct_legs[old_part.body_zone] + if(!path) + continue + var/obj/item/bodypart/new_part = new path() + new_part.replace_limb(target, TRUE) + new_part.update_limb(is_creating = TRUE) + qdel(old_part) + +/datum/preference/choiced/lizard_legs/is_accessible(datum/preferences/preferences) + if(!..()) + return FALSE + var/datum/species/species_type = preferences.read_preference(/datum/preference/choiced/species) + return initial(species_type.digitigrade_customization) == DIGITIGRADE_OPTIONAL + + +/datum/preference/choiced/lizard_legs/is_accessible(datum/preferences/preferences) + . = ..() + + if(!.) + return + + var/datum/species/species_type = preferences.read_preference(/datum/preference/choiced/species) + + return initial(species_type.digitigrade_customization) & DIGITIGRADE_OPTIONAL /datum/preference/choiced/lizard_snout savefile_key = "feature_lizard_snout" @@ -122,7 +160,7 @@ savefile_key = "feature_lizard_spines" savefile_identifier = PREFERENCE_CHARACTER category = PREFERENCE_CATEGORY_SECONDARY_FEATURES - relevant_mutant_bodypart = "spines" + relevant_external_organ = /obj/item/organ/external/spines /datum/preference/choiced/lizard_spines/init_possible_values() return assoc_to_keys_features(SSaccessories.spines_list) diff --git a/code/modules/client/preferences/species_features/mushperson.dm b/code/modules/client/preferences/species_features/mushperson.dm index 2ed58713079..42ff286e7d1 100644 --- a/code/modules/client/preferences/species_features/mushperson.dm +++ b/code/modules/client/preferences/species_features/mushperson.dm @@ -3,7 +3,7 @@ savefile_key = "feature_mushperson_cap" savefile_identifier = PREFERENCE_CHARACTER category = PREFERENCE_CATEGORY_SECONDARY_FEATURES - relevant_mutant_bodypart = "cap" + relevant_external_organ = /obj/item/organ/external/mushroom_cap /datum/preference/choiced/mushroom_cap/init_possible_values() return assoc_to_keys_features(SSaccessories.caps_list) diff --git a/code/modules/experisci/experiment/experiments.dm b/code/modules/experisci/experiment/experiments.dm index 1ec229cd1cd..c9f4f1b3d1b 100644 --- a/code/modules/experisci/experiment/experiments.dm +++ b/code/modules/experisci/experiment/experiments.dm @@ -387,7 +387,7 @@ if (organ.type == target_species.get_mutant_organ_type_for_slot(organ.slot)) continue else - if ((organ.type in target_species.mutant_organs) || (organ.type in target_species.external_organs)) + if ((organ.type in target_species.mutant_organs)) continue return TRUE return FALSE diff --git a/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm b/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm index b6c36058d08..e6f34b894b3 100644 --- a/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm +++ b/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm @@ -10,7 +10,7 @@ If the scythe isn't empowered when you sheath it, you take a heap of damage and desc = "This shard seems to be directly linked to some sinister entity. It might be your god! It also gives you a really horrible rash when you hold onto it for too long." items_to_create = list(/obj/item/vorpalscythe) -/obj/item/organ/internal/cyberimp/arm/shard/scythe/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/internal/cyberimp/arm/shard/scythe/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() if(receiver.mind) ADD_TRAIT(receiver.mind, TRAIT_MORBID, ORGAN_TRAIT) diff --git a/code/modules/mining/equipment/monster_organs/monster_organ.dm b/code/modules/mining/equipment/monster_organs/monster_organ.dm index 5a7c8caadbb..cf6131fa922 100644 --- a/code/modules/mining/equipment/monster_organs/monster_organ.dm +++ b/code/modules/mining/equipment/monster_organs/monster_organ.dm @@ -36,7 +36,7 @@ icon = 'icons/obj/medical/organs/mining_organs.dmi' icon_state = "hivelord_core" actions_types = list(/datum/action/cooldown/monster_core_action) - visual = FALSE + item_flags = NOBLUDGEON slot = ORGAN_SLOT_MONSTER_CORE organ_flags = ORGAN_ORGANIC @@ -66,10 +66,9 @@ deltimer(decay_timer) return ..() -/obj/item/organ/internal/monster_core/Insert(mob/living/carbon/target_carbon, special = FALSE, movement_flags) +/obj/item/organ/internal/monster_core/mob_insert(mob/living/carbon/target_carbon, special = FALSE, movement_flags) . = ..() - if(!.) - return + if (inert) to_chat(target_carbon, span_notice("[src] breaks down as you try to insert it.")) qdel(src) @@ -80,7 +79,7 @@ target_carbon.visible_message(span_notice("[src] stabilizes as it's inserted.")) return TRUE -/obj/item/organ/internal/monster_core/Remove(mob/living/carbon/target_carbon, special, movement_flags) +/obj/item/organ/internal/monster_core/mob_remove(mob/living/carbon/target_carbon, special, movement_flags) if (!inert && !special) owner.visible_message(span_notice("[src] rapidly decays as it's removed.")) go_inert() diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm index 6335326a1ad..ac9fd81cf97 100644 --- a/code/modules/mob/living/carbon/alien/organs.dm +++ b/code/modules/mob/living/carbon/alien/organs.dm @@ -1,6 +1,5 @@ /obj/item/organ/internal/alien icon_state = "acid" - visual = FALSE food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/acid = 10) /obj/item/organ/internal/alien/plasmavessel @@ -222,11 +221,11 @@ stomach_contents -= source UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_DEATH, COMSIG_QDELETING)) -/obj/item/organ/internal/stomach/alien/Insert(mob/living/carbon/stomach_owner, special, movement_flags) +/obj/item/organ/internal/stomach/alien/mob_insert(mob/living/carbon/stomach_owner, special, movement_flags) RegisterSignal(stomach_owner, COMSIG_ATOM_RELAYMOVE, PROC_REF(something_moved)) return ..() -/obj/item/organ/internal/stomach/alien/Remove(mob/living/carbon/stomach_owner, special, movement_flags) +/obj/item/organ/internal/stomach/alien/mob_remove(mob/living/carbon/stomach_owner, special, movement_flags) UnregisterSignal(stomach_owner, COMSIG_ATOM_RELAYMOVE) return ..() diff --git a/code/modules/mob/living/carbon/carbon_update_icons.dm b/code/modules/mob/living/carbon/carbon_update_icons.dm index b33cb91787a..9f09254f6f0 100644 --- a/code/modules/mob/living/carbon/carbon_update_icons.dm +++ b/code/modules/mob/living/carbon/carbon_update_icons.dm @@ -52,13 +52,8 @@ overlays_standing[cache_index] = null SEND_SIGNAL(src, COMSIG_CARBON_REMOVE_OVERLAY, cache_index, I) -//used when putting/removing clothes that hide certain mutant body parts to just update those and not update the whole body. -/mob/living/carbon/human/proc/update_mutant_bodyparts() - dna?.species.handle_mutant_bodyparts(src) - update_body_parts() - /mob/living/carbon/update_body(is_creating = FALSE) - dna?.species.handle_body(src) //This calls `handle_mutant_bodyparts` which calls `update_mutant_bodyparts()`. Don't double call! + dna?.species.handle_body(src) update_body_parts(is_creating) /mob/living/carbon/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents) diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 96f3dacf670..8483767912b 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -80,10 +80,8 @@ GLOBAL_LIST_EMPTY(features_by_species) BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right, BODY_ZONE_CHEST = /obj/item/bodypart/chest, ) - ///Internal organs that are unique to this race, like a tail. list(typepath of organ 1, typepath of organ 2) + ///Internal organs that are unique to this race, like a tail or other cosmetic organs. list(typepath of organ 1, typepath of organ 2 = "Round"). var/list/mutant_organs = list() - ///List of external organs to generate like horns, frills, wings, etc. list(typepath of organ = "Round Beautiful BDSM Snout"). Still WIP - var/list/external_organs = list() ///Replaces default brain with a different organ var/obj/item/organ/internal/brain/mutantbrain = /obj/item/organ/internal/brain ///Replaces default heart with a different organ @@ -282,7 +280,10 @@ GLOBAL_LIST_EMPTY(features_by_species) if(ORGAN_SLOT_STOMACH) return mutantstomach else - CRASH("Invalid organ slot [slot]") + // Non-standard organs we might have + for(var/obj/item/organ/extra_organ as anything in mutant_organs) + if(initial(extra_organ.slot) == slot) + return extra_organ /** * Corrects organs in a carbon, removing ones it doesn't need and adding ones it does. @@ -298,46 +299,33 @@ GLOBAL_LIST_EMPTY(features_by_species) * * visual_only - boolean, only load organs that change how the species looks. Do not use for normal gameplay stuff */ /datum/species/proc/regenerate_organs(mob/living/carbon/organ_holder, datum/species/old_species, replace_current = TRUE, list/excluded_zones, visual_only = FALSE) - //what should be put in if there is no mutantorgan (brains handled separately) - var/list/organ_slots = list( - ORGAN_SLOT_BRAIN, - ORGAN_SLOT_HEART, - ORGAN_SLOT_LUNGS, - ORGAN_SLOT_APPENDIX, - ORGAN_SLOT_EYES, - ORGAN_SLOT_EARS, - ORGAN_SLOT_TONGUE, - ORGAN_SLOT_LIVER, - ORGAN_SLOT_STOMACH, - ) - - for(var/slot in organ_slots) + for(var/slot in get_all_slots()) var/obj/item/organ/existing_organ = organ_holder.get_organ_slot(slot) var/obj/item/organ/new_organ = get_mutant_organ_type_for_slot(slot) + var/old_organ_type = old_species?.get_mutant_organ_type_for_slot(slot) - if(isnull(new_organ)) // if they aren't suppose to have an organ here, remove it - if(existing_organ) - existing_organ.Remove(organ_holder, special = TRUE) + // if we have an extra organ that before changing that the species didnt have, remove it + if(!new_organ) + if(existing_organ && (old_organ_type == existing_organ.type || replace_current)) + existing_organ.Remove(organ_holder) qdel(existing_organ) continue - // we don't want to remove organs that are not the default for this species - if(!isnull(existing_organ) && !remove_features) // SKYRAT EDIT - Fixes certain species lacking a tongue (Looks at abductor) - if(!isnull(old_species) && existing_organ.type != old_species.get_mutant_organ_type_for_slot(slot)) - continue - else if(!replace_current && existing_organ.type != get_mutant_organ_type_for_slot(slot)) + if(existing_organ && !disallow_customizable_dna_features) // NOVA EDIT CHANGE - Though sometimes we might want to do that. - ORIGINAL: if(existing_organ) + // we dont want to remove organs that were not from the old species (such as from freak surgery or prosthetics) + if(existing_organ.type != old_organ_type && !replace_current) continue - // at this point we already know new_organ is not null - if(existing_organ?.type == new_organ) - continue // we don't want to remove organs that are the same as the new one + // we don't want to remove organs that are the same as the new one + if(existing_organ.type == new_organ) + continue - if(visual_only && !initial(new_organ.visual)) + if(visual_only && (!initial(new_organ.bodypart_overlay) && !initial(new_organ.visual))) continue var/used_neworgan = FALSE new_organ = SSwardrobe.provide_type(new_organ) - var/should_have = new_organ.get_availability(src, organ_holder) + var/should_have = new_organ.get_availability(src, organ_holder) && should_visual_organ_apply_to(new_organ, organ_holder) // Check for an existing organ, and if there is one check to see if we should remove it var/health_pct = 1 @@ -361,46 +349,6 @@ GLOBAL_LIST_EMPTY(features_by_species) if(!used_neworgan) QDEL_NULL(new_organ) - if(!isnull(old_species)) - for(var/mutant_organ in old_species.mutant_organs) - if(mutant_organ in mutant_organs) - continue // need this mutant organ, but we already have it! - - var/obj/item/organ/current_organ = organ_holder.get_organ_by_type(mutant_organ) - if(current_organ) - current_organ.Remove(organ_holder) - QDEL_NULL(current_organ) - - for(var/obj/item/organ/external/external_organ in organ_holder.organs) - // External organ checking. We need to check the external organs owned by the carbon itself, - // because we want to also remove ones not shared by its species. - // This should be done even if species was not changed. - if(external_organ in external_organs) - continue // Don't remove external organs this species is supposed to have. - - external_organ.Remove(organ_holder) - QDEL_NULL(external_organ) - - var/list/species_organs = mutant_organs + external_organs - for(var/organ_path in species_organs) - var/obj/item/organ/current_organ = organ_holder.get_organ_by_type(organ_path) - if(ispath(organ_path, /obj/item/organ/external) && !should_external_organ_apply_to(organ_path, organ_holder)) - if(!isnull(current_organ) && replace_current) - // if we have an organ here and we're replacing organs, remove it - current_organ.Remove(organ_holder) - QDEL_NULL(current_organ) - continue - - if(!current_organ || replace_current) - var/obj/item/organ/replacement = SSwardrobe.provide_type(organ_path) - // If there's an existing mutant organ, we're technically replacing it. - // Let's abuse the snowflake proc that skillchips added. Basically retains - // feature parity with every other organ too. - if(current_organ) - current_organ.before_organ_replacement(replacement) - // organ.Insert will qdel any current organs in that slot, so we don't need to. - replacement.Insert(organ_holder, special=TRUE, movement_flags = DELETE_IF_REPLACED) - /datum/species/proc/worn_items_fit_body_check(mob/living/carbon/wearer) for(var/obj/item/equipped_item in wearer.get_equipped_items(INCLUDE_POCKETS)) var/equipped_item_slot = wearer.get_slot_by_item(equipped_item) @@ -439,10 +387,7 @@ GLOBAL_LIST_EMPTY(features_by_species) if(old_species.type != type) replace_body(human_who_gained_species, src) - // BUBBER EDIT BEGIN - ORGAN REFACTOR - //regenerate_organs(human_who_gained_species, old_species, replace_current = FALSE, visual_only = human_who_gained_species.visual_only_organs) - regenerate_organs(human_who_gained_species, old_species, visual_only = human_who_gained_species.visual_only_organs) - // BUBBER EDIT END + regenerate_organs(human_who_gained_species, old_species, replace_current = human_who_gained_species.visual_only_organs, visual_only = human_who_gained_species.visual_only_organs) // NOVA EDIT - Allows existing organs to be properly removed when regenerating organs - ORIGINAL: regenerate_organs(human_who_gained_species, old_species, replace_current = FALSE, visual_only = human_who_gained_species.visual_only_organs) // Update locked slots AFTER all organ and body stuff is handled human_who_gained_species.hud_used?.update_locked_slots() // Drop the items the new species can't wear @@ -459,17 +404,7 @@ GLOBAL_LIST_EMPTY(features_by_species) //Resets blood if it is excessively high so they don't gib normalize_blood(human_who_gained_species) - if(ishuman(human_who_gained_species)) - var/mob/living/carbon/human/human = human_who_gained_species - for(var/obj/item/organ/external/organ_path as anything in external_organs) - if(!should_external_organ_apply_to(organ_path, human)) - continue - - //Load a persons preferences from DNA - var/obj/item/organ/external/new_organ = SSwardrobe.provide_type(organ_path) - new_organ.Insert(human, special=TRUE, movement_flags = DELETE_IF_REPLACED) - - //add_body_markings(human_who_gained_species) // SKYRAT EDIT REMOVAL - We do this differently + //add_body_markings(human_who_gained_species) // NOVA EDIT REMOVAL - We do this differently if(length(inherent_traits)) human_who_gained_species.add_traits(inherent_traits, SPECIES_TRAIT) @@ -509,10 +444,6 @@ GLOBAL_LIST_EMPTY(features_by_species) for(var/X in inherent_traits) REMOVE_TRAIT(C, X, SPECIES_TRAIT) - for(var/obj/item/organ/external/organ in C.organs) - organ.Remove(C) - qdel(organ) - //If their inert mutation is not the same, swap it out if((inert_mutation != new_species.inert_mutation) && LAZYLEN(C.dna.mutation_index) && (inert_mutation in C.dna.mutation_index)) C.dna.remove_mutation(inert_mutation) @@ -546,7 +477,6 @@ GLOBAL_LIST_EMPTY(features_by_species) * Handles the body of a human * * Handles lipstick, having no eyes, eye color, undergarnments like underwear, undershirts, and socks, and body layers. - * Calls [handle_mutant_bodyparts][/datum/species/proc/handle_mutant_bodyparts] * Arguments: * * species_human - Human, whoever we're handling the body for */ @@ -555,7 +485,7 @@ GLOBAL_LIST_EMPTY(features_by_species) /datum/species/proc/handle_body(mob/living/carbon/human/species_human) species_human.remove_overlay(BODY_LAYER) if(HAS_TRAIT(species_human, TRAIT_INVISIBLE_MAN)) - return handle_mutant_bodyparts(species_human) + return var/list/standing = list() if(!HAS_TRAIT(species_human, TRAIT_HUSK)) @@ -600,107 +530,9 @@ GLOBAL_LIST_EMPTY(features_by_species) species_human.overlays_standing[BODY_LAYER] = standing species_human.apply_overlay(BODY_LAYER) - handle_mutant_bodyparts(species_human) - - - -/** - * Handles the mutant bodyparts of a human - * - * Handles the adding and displaying of, layers, colors, and overlays of mutant bodyparts and accessories. - * Handles digitigrade leg displaying and squishing. - * Arguments: - * * H - Human, whoever we're handling the body for - * * forced_colour - The forced color of an accessory. Leave null to use mutant color. - */ -/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/source, forced_colour) - var/list/bodyparts_to_add = mutant_bodyparts.Copy() - var/list/relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER) - var/list/standing = list() - - source.remove_overlay(BODY_BEHIND_LAYER) - source.remove_overlay(BODY_ADJ_LAYER) - source.remove_overlay(BODY_FRONT_LAYER) - - if(!mutant_bodyparts || HAS_TRAIT(source, TRAIT_INVISIBLE_MAN)) - return - - var/obj/item/bodypart/head/noggin = source.get_bodypart(BODY_ZONE_HEAD) - - - if(mutant_bodyparts["ears"]) - if(!source.dna.features["ears"] || source.dna.features["ears"] == "None" || source.head && (source.head.flags_inv & HIDEHAIR) || (source.wear_mask && (source.wear_mask.flags_inv & HIDEHAIR)) || !noggin || IS_ROBOTIC_LIMB(noggin)) - bodyparts_to_add -= "ears" - - if(!bodyparts_to_add) - return - - var/g = (source.physique == FEMALE) ? "f" : "m" - - for(var/layer in relevent_layers) - var/layertext = mutant_bodyparts_layertext(layer) - - for(var/bodypart in bodyparts_to_add) - var/datum/sprite_accessory/accessory - switch(bodypart) - if("ears") - accessory = SSaccessories.ears_list[source.dna.features["ears"]] - if("legs") - accessory = SSaccessories.legs_list[source.dna.features["legs"]] - - if(!accessory || accessory.icon_state == "none") - continue - - var/mutable_appearance/accessory_overlay = mutable_appearance(accessory.icon, layer = -layer) - - if(accessory.gender_specific) - accessory_overlay.icon_state = "[g]_[bodypart]_[accessory.icon_state]_[layertext]" - else - accessory_overlay.icon_state = "m_[bodypart]_[accessory.icon_state]_[layertext]" - - if(accessory.em_block) - accessory_overlay.overlays += emissive_blocker(accessory_overlay.icon, accessory_overlay.icon_state, source, accessory_overlay.alpha) - - if(accessory.center) - accessory_overlay = center_image(accessory_overlay, accessory.dimension_x, accessory.dimension_y) - - if(!(HAS_TRAIT(source, TRAIT_HUSK))) - if(!forced_colour) - switch(accessory.color_src) - if(MUTANT_COLOR) - accessory_overlay.color = fixed_mut_color || source.dna.features["mcolor"] - if(HAIR_COLOR) - accessory_overlay.color = get_fixed_hair_color(source) || source.hair_color - if(FACIAL_HAIR_COLOR) - accessory_overlay.color = get_fixed_hair_color(source) || source.facial_hair_color - if(EYE_COLOR) - accessory_overlay.color = source.eye_color_left - else - accessory_overlay.color = forced_colour - standing += accessory_overlay - - if(accessory.hasinner) - var/mutable_appearance/inner_accessory_overlay = mutable_appearance(accessory.icon, layer = -layer) - if(accessory.gender_specific) - inner_accessory_overlay.icon_state = "[g]_[bodypart]inner_[accessory.icon_state]_[layertext]" - else - inner_accessory_overlay.icon_state = "m_[bodypart]inner_[accessory.icon_state]_[layertext]" - - if(accessory.center) - inner_accessory_overlay = center_image(inner_accessory_overlay, accessory.dimension_x, accessory.dimension_y) - - standing += inner_accessory_overlay - - source.overlays_standing[layer] = standing.Copy() - standing = list() - - source.apply_overlay(BODY_BEHIND_LAYER) - source.apply_overlay(BODY_ADJ_LAYER) - source.apply_overlay(BODY_FRONT_LAYER) - - update_body_markings(source) -*/ -//SKYRAT EDIT REMOVAL END + update_body_markings(species_human) + */ +//NOVA EDIT REMOVAL END //This exists so sprite accessories can still be per-layer without having to include that layer's //number in their sprite name, which causes issues when those numbers change. @@ -750,7 +582,9 @@ GLOBAL_LIST_EMPTY(features_by_species) var/list/new_features = list() var/static/list/organs_to_randomize = list() - for(var/obj/item/organ/external/organ_path as anything in external_organs) + for(var/obj/item/organ/organ_path as anything in mutant_organs) + if(!organ_path.bodypart_overlay) + continue var/overlay_path = initial(organ_path.bodypart_overlay) var/datum/bodypart_overlay/mutant/sample_overlay = organs_to_randomize[overlay_path] if(isnull(sample_overlay)) @@ -1604,20 +1438,14 @@ GLOBAL_LIST_EMPTY(features_by_species) for (var/preference_type in GLOB.preference_entries) var/datum/preference/preference = GLOB.preference_entries[preference_type] if ( \ -// BUBBER EDIT OR BEGIN - (preference.relevant_mutant_bodypart in mutant_bodyparts) \ - || (preference.relevant_inherent_trait in inherent_traits) \ - || (preference.relevant_external_organ in external_organs) \ -// NEW (preference.relevant_inherent_trait in inherent_traits) \ || (preference.relevant_external_organ in get_mut_organs()) \ -// BUBBER EDIT OR END || (preference.relevant_head_flag && check_head_flags(preference.relevant_head_flag)) \ || (preference.relevant_body_markings in body_markings) \ ) features += preference.savefile_key - for (var/obj/item/organ/external/organ_type as anything in external_organs) + for (var/obj/item/organ/organ_type as anything in mutant_organs) var/preference = initial(organ_type.preference) if (!isnull(preference)) features += preference @@ -1664,13 +1492,24 @@ GLOBAL_LIST_EMPTY(features_by_species) /datum/species/proc/get_snore_sound(mob/living/carbon/human/human) return -// BUBBER EDIT - OR BEGIN +/datum/species/proc/get_mut_organs(include_brain = TRUE) + var/list/mut_organs = list() + mut_organs += mutant_organs + if (include_brain) + mut_organs += mutantbrain + mut_organs += mutantheart + mut_organs += mutantlungs + mut_organs += mutanteyes + mut_organs += mutantears + mut_organs += mutanttongue + mut_organs += mutantliver + mut_organs += mutantstomach + mut_organs += mutantappendix + list_clear_nulls(mut_organs) + return mut_organs + /datum/species/proc/get_types_to_preload() - var/list/to_store = list() - to_store += mutant_organs - for(var/obj/item/organ/external/horny as anything in external_organs) - to_store += horny //Haha get it? - return to_store + return get_mut_organs(FALSE) /* /datum/species/proc/get_mut_organs(include_brain = TRUE) @@ -2290,6 +2129,10 @@ GLOBAL_LIST_EMPTY(features_by_species) /// Update the overlays if necessary /datum/species/proc/update_body_markings(mob/living/carbon/human/hooman) + if(HAS_TRAIT(hooman, TRAIT_INVISIBLE_MAN)) + remove_body_markings(hooman) + return + var/needs_update = FALSE for(var/datum/bodypart_overlay/simple/body_marking/marking as anything in body_markings) if(initial(marking.dna_feature_key) == body_markings[marking]) // dna is same as our species (sort of mini-cache), so no update needed diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index e95b0c5c1d7..055a7f20637 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -159,10 +159,9 @@ There are several things that need to be remembered: my_chest?.worn_uniform_offset?.apply_offset(uniform_overlay) overlays_standing[UNIFORM_LAYER] = uniform_overlay - + update_body_parts() apply_overlay(UNIFORM_LAYER) check_body_shape(BODYSHAPE_DIGITIGRADE, ITEM_SLOT_ICLOTHING) - update_mutant_bodyparts() /mob/living/carbon/human/update_worn_id(update_obscured = TRUE) remove_overlay(ID_LAYER) @@ -603,13 +602,11 @@ There are several things that need to be remembered: my_chest?.worn_suit_offset?.apply_offset(suit_overlay) // SKYRAT EDIT END overlays_standing[SUIT_LAYER] = suit_overlay - update_body_parts() - update_mutant_bodyparts() + update_body_parts() apply_overlay(SUIT_LAYER) check_body_shape(BODYSHAPE_DIGITIGRADE, ITEM_SLOT_OCLOTHING) - /mob/living/carbon/human/update_pockets() if(client && hud_used) var/atom/movable/screen/inventory/inv @@ -678,7 +675,7 @@ There are several things that need to be remembered: apply_overlay(FACEMASK_LAYER) check_body_shape(BODYSHAPE_SNOUTED, ITEM_SLOT_MASK) - update_mutant_bodyparts() //e.g. upgate needed because mask now hides lizard snout + update_body_parts() //e.g. upgate needed because mask now hides lizard snout /mob/living/carbon/human/update_worn_back(update_obscured = TRUE) remove_overlay(BACK_LAYER) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 1d7c328f882..d4dea2abfcc 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -19,7 +19,6 @@ BODY_ZONE_CHEST = /obj/item/bodypart/chest, ) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID - mutant_bodyparts = list("wings" = "None") mutantbrain = /obj/item/organ/internal/brain/dullahan mutanteyes = /obj/item/organ/internal/eyes/dullahan mutanttongue = /obj/item/organ/internal/tongue/dullahan diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm index 7f9dc0feafb..10d4d351092 100644 --- a/code/modules/mob/living/carbon/human/species_types/felinid.dm +++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm @@ -3,12 +3,11 @@ name = "Felinid" id = SPECIES_FELINE examine_limb_id = SPECIES_HUMAN - mutant_bodyparts = list("ears" = "Cat", "wings" = "None") mutantbrain = /obj/item/organ/internal/brain/felinid mutanttongue = /obj/item/organ/internal/tongue/cat /* SKYRAT EDIT REMOVAL - CUSTOMIZATION mutantears = /obj/item/organ/internal/ears/cat - external_organs = list( + mutant_organs = list( /obj/item/organ/external/tail/cat = "Cat", ) */ // SKYRAT EDIT REMOVAL END @@ -165,7 +164,7 @@ // stored_feature_id is only set once (the first time an organ is inserted), so this should be safe. var/obj/item/organ/internal/ears/cat/kitty_ears = new kitty_ears.Insert(soon_to_be_felinid, special = TRUE, movement_flags = DELETE_IF_REPLACED) - if(should_external_organ_apply_to(/obj/item/organ/external/tail/cat, soon_to_be_felinid)) //only give them a tail if they actually have sprites for it / are a compatible subspecies. + if(should_visual_organ_apply_to(/obj/item/organ/external/tail/cat, soon_to_be_felinid)) //only give them a tail if they actually have sprites for it / are a compatible subspecies. var/obj/item/organ/external/tail/cat/kitty_tail = new kitty_tail.Insert(soon_to_be_felinid, special = TRUE, movement_flags = DELETE_IF_REPLACED) @@ -188,8 +187,8 @@ old_tail.Remove(purrbated_human, special = TRUE) qdel(old_tail) // Locate does not work on assoc lists, so we do it by hand - for(var/external_organ in target_species.external_organs) - if(!should_external_organ_apply_to(external_organ, purrbated_human)) + for(var/external_organ in target_species.mutant_organs) + if(!should_visual_organ_apply_to(external_organ, purrbated_human)) continue if(ispath(external_organ, /obj/item/organ/external/tail)) var/obj/item/organ/external/tail/new_tail = new external_organ() diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 49714b7a30f..e63dd0a4d14 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -4,7 +4,6 @@ inherent_traits = list( TRAIT_USES_SKINTONES, ) - mutant_bodyparts = list("wings" = "None") skinned_type = /obj/item/stack/sheet/animalhide/human changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT // payday_modifier = 1 // BUBBER DUMB SHIT REMOVAL diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 609f41ab7ca..1f720451982 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -7,9 +7,8 @@ TRAIT_MUTANT_COLORS, ) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE - mutant_bodyparts = list("body_markings" = "None", "legs" = "Normal Legs") // SKYRAT EDIT CHANGE - ORIGINAL: mutant_bodyparts = list("legs" = "Normal Legs") - //body_markings = list(/datum/bodypart_overlay/simple/body_marking/lizard = "None") // SKYRAT EDIT REMOVAL - We do this our own way - external_organs = list( + mutant_bodyparts = list("body_markings" = "None", "legs" = "Normal Legs") // NOVA EDIT CHANGE - ORIGINAL: body_markings = list(/datum/bodypart_overlay/simple/body_marking/lizard = "None") + mutant_organs = list( /obj/item/organ/external/horns = "None", /obj/item/organ/external/frills = "None", /obj/item/organ/external/snout = "Round", diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index 64f10dc0455..922bfacc8a5 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -3,7 +3,7 @@ /datum/species/monkey name = "\improper Monkey" id = SPECIES_MONKEY - external_organs = list( + mutant_organs = list( /obj/item/organ/external/tail/monkey = "Monkey", ) mutanttongue = /obj/item/organ/internal/tongue/monkey diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 794621cf874..b2da4ab759e 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -3,8 +3,8 @@ plural_form = "Mothmen" id = SPECIES_MOTH inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG - mutant_bodyparts = list("moth_markings" = "None") // SKYRAT EDIT CHANGE - ORIGINAL: body_markings = list(/datum/bodypart_overlay/simple/body_marking/moth = "None") - // external_organs = list(/obj/item/organ/external/wings/moth = "Plain", /obj/item/organ/external/antennae = "Plain") // SKYRAT EDIT REMOVAL - Fixing moths + mutant_bodyparts = list("moth_markings" = "None") // NOVA EDIT CHANGE - ORIGINAL: body_markings = list(/datum/bodypart_overlay/simple/body_marking/moth = "None") + //mutant_organs = list(/obj/item/organ/external/wings/moth = "Plain", /obj/item/organ/external/antennae = "Plain") // NOVA EDIT REMOVAL - Fixing moths meat = /obj/item/food/meat/slab/human/mutant/moth mutanttongue = /obj/item/organ/internal/tongue/moth mutanteyes = /obj/item/organ/internal/eyes/moth @@ -24,12 +24,6 @@ BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/moth, ) -/datum/species/moth/regenerate_organs(mob/living/carbon/C, datum/species/old_species, replace_current= TRUE, list/excluded_zones, visual_only) - . = ..() - if(ishuman(C)) - var/mob/living/carbon/human/H = C - handle_mutant_bodyparts(H) - /datum/species/moth/on_species_gain(mob/living/carbon/human/human_who_gained_species, datum/species/old_species, pref_load) . = ..() RegisterSignal(human_who_gained_species, COMSIG_MOB_APPLY_DAMAGE_MODIFIERS, PROC_REF(damage_weakness)) diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm index 99eb0d756c8..9cf63ea0408 100644 --- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm @@ -6,7 +6,7 @@ fixed_mut_color = "#DBBF92" - external_organs = list(/obj/item/organ/external/mushroom_cap = "Round") + mutant_organs = list(/obj/item/organ/external/mushroom_cap = "Round") inherent_traits = list( TRAIT_MUTANT_COLORS, diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 38e75704795..577e80c9124 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -7,8 +7,8 @@ TRAIT_MUTANT_COLORS, TRAIT_PLANT_SAFE, ) - external_organs = list( - // /obj/item/organ/external/pod_hair = "None", // SKYRAT EDIT REMOVAL - Customization (it messes up unit tests.) + mutant_organs = list( + // /obj/item/organ/external/pod_hair = "None", // NOVA EDIT REMOVAL - Customization (it messes up unit tests.) ) inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_PLANT inherent_factions = list(FACTION_PLANTS, FACTION_VINES) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 111b35cb7f7..d3dfb813520 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -17,7 +17,6 @@ TRAIT_NO_MIRROR_REFLECTION, ) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID - mutant_bodyparts = list("wings" = "None") changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN exotic_bloodtype = "U" blood_deficiency_drain_rate = BLOOD_DEFICIENCY_MODIFIER // vampires already passively lose blood, so this just makes them lose it slightly more quickly when they have blood deficiency. diff --git a/code/modules/mod/modules/modules_medical.dm b/code/modules/mod/modules/modules_medical.dm index 397945f41ef..a0cf2408860 100644 --- a/code/modules/mod/modules/modules_medical.dm +++ b/code/modules/mod/modules/modules_medical.dm @@ -223,8 +223,7 @@ organ_evacced.Remove(target, special = TRUE) organ_evacced.forceMove(get_turf(target)) - if (!organ.Insert(target)) - organ.forceMove(drop_location()) + organ.Insert(target) organ = null ///Patrient Transport - Generates hardlight bags you can put people in. diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 3d981e9751a..dcfda6e31ac 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -987,12 +987,15 @@ if(owner_species && owner_species.specific_alpha != 255) alpha = owner_species.specific_alpha - markings = LAZYCOPY(owner_species.body_markings[body_zone]) - if(aux_zone) - aux_zone_markings = LAZYCOPY(owner_species.body_markings[aux_zone]) - markings_alpha = owner_species.markings_alpha - // SKYRAT EDIT END - recolor_external_organs() + if(body_zone in owner_species.body_markings) + markings = LAZYCOPY(owner_species.body_markings[body_zone]) + if(aux_zone && (aux_zone in owner_species.body_markings)) + aux_zone_markings = LAZYCOPY(owner_species.body_markings[aux_zone]) + markings_alpha = owner_species.markings_alpha + else + markings = list() + // NOVA EDIT END + recolor_bodypart_overlays() return TRUE //to update the bodypart's icon when not attached to a mob @@ -1364,7 +1367,7 @@ QDEL_NULL(current_gauze) ///Loops through all of the bodypart's external organs and update's their color. -/obj/item/bodypart/proc/recolor_external_organs() +/obj/item/bodypart/proc/recolor_bodypart_overlays() for(var/datum/bodypart_overlay/mutant/overlay in bodypart_overlays) overlay.inherit_color(src, force = TRUE) diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 7cd956b5dcc..01ef3b3737c 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -412,12 +412,12 @@ qdel(phantom_loss) //Copied from /datum/species/proc/on_species_gain() - for(var/obj/item/organ/external/organ_path as anything in dna.species.external_organs) + for(var/obj/item/organ/organ_path as anything in dna.species.mutant_organs) //Load a persons preferences from DNA var/zone = initial(organ_path.zone) if(zone != limb_zone) continue - var/obj/item/organ/external/new_organ = SSwardrobe.provide_type(organ_path) + var/obj/item/organ/new_organ = SSwardrobe.provide_type(organ_path) new_organ.Insert(src) update_body_parts() diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 8833f87e28e..dec8efb154e 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -182,8 +182,8 @@ /mob/living/carbon/proc/synchronize_bodytypes() var/all_limb_flags = NONE for(var/obj/item/bodypart/limb as anything in bodyparts) - for(var/obj/item/organ/external/ext_organ in limb) - all_limb_flags |= ext_organ.external_bodytypes + for(var/obj/item/organ/organ in limb) + all_limb_flags |= organ.external_bodytypes all_limb_flags |= limb.bodytype bodytype = all_limb_flags @@ -192,8 +192,8 @@ /mob/living/carbon/proc/synchronize_bodyshapes() var/all_limb_flags = NONE for(var/obj/item/bodypart/limb as anything in bodyparts) - for(var/obj/item/organ/external/ext_organ in limb) - all_limb_flags |= ext_organ.external_bodyshapes + for(var/obj/item/organ/organ in limb) + all_limb_flags |= organ.external_bodyshapes all_limb_flags |= limb.bodyshape bodyshape = all_limb_flags diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index 7e0f5c29b8e..6817f3592a3 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -252,22 +252,20 @@ tool = tool.contents[1] target_organ = tool user.temporarilyRemoveItemFromInventory(target_organ, TRUE) - if(target_organ.Insert(target)) - if(apparatus) - apparatus.icon_state = initial(apparatus.icon_state) - apparatus.desc = initial(apparatus.desc) - apparatus.cut_overlays() - display_results( - user, - target, - span_notice("You insert [tool] into [target]'s [target.parse_zone_with_bodypart(target_zone)]."), - span_notice("[user] inserts [tool] into [target]'s [target.parse_zone_with_bodypart(target_zone)]!"), - span_notice("[user] inserts something into [target]'s [target.parse_zone_with_bodypart(target_zone)]!"), - ) - display_pain(target, "Your [target.parse_zone_with_bodypart(target_zone)] throbs with pain as your new [tool.name] comes to life!") - target_organ.on_surgical_insertion(user, target, target_zone, tool) - else - target_organ.forceMove(target.loc) + target_organ.Insert(target) + if(apparatus) + apparatus.icon_state = initial(apparatus.icon_state) + apparatus.desc = initial(apparatus.desc) + apparatus.cut_overlays() + display_results( + user, + target, + span_notice("You insert [tool] into [target]'s [target.parse_zone_with_bodypart(target_zone)]."), + span_notice("[user] inserts [tool] into [target]'s [target.parse_zone_with_bodypart(target_zone)]!"), + span_notice("[user] inserts something into [target]'s [target.parse_zone_with_bodypart(target_zone)]!"), + ) + display_pain(target, "Your [target.parse_zone_with_bodypart(target_zone)] throbs with pain as your new [tool.name] comes to life!") + target_organ.on_surgical_insertion(user, target, target_zone, tool) else if(current_type == "extract") if(target_organ && target_organ.owner == target) diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index a0eabfd4b03..8584ee16eb1 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -1,4 +1,3 @@ - /obj/item/organ name = "organ" icon = 'icons/obj/medical/organs/organs.dmi' @@ -79,6 +78,9 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) volume = reagent_vol,\ after_eat = CALLBACK(src, PROC_REF(OnEatFrom))) + if(bodypart_overlay) + setup_bodypart_overlay() + /obj/item/organ/Destroy() if(bodypart_owner && !owner && !QDELETED(bodypart_owner)) bodypart_remove(bodypart_owner) @@ -140,7 +142,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) return /obj/item/organ/proc/on_life(seconds_per_tick, times_fired) - CRASH("Oh god oh fuck something is calling parent organ life") + return /obj/item/organ/examine(mob/user) . = ..() @@ -356,8 +358,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) /obj/item/organ/proc/replace_into(mob/living/carbon/new_owner) // BUBBER EDIT - OR BEGIN return Insert(new_owner, special = TRUE, movement_flags = DELETE_IF_REPLACED) -/* - Insert(new_owner, special = TRUE, movement_flags = DELETE_IF_REPLACED) + //Insert(new_owner, special = TRUE, movement_flags = DELETE_IF_REPLACED) /// Get all possible organ slots by checking every organ, and then store it and give it whenever needed @@ -371,4 +372,3 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) all_organ_slots |= initial(an_organ.slot) return all_organ_slots -*/ // BUBBER EDIT - OR END diff --git a/code/modules/surgery/organs/external/_external_organ.dm b/code/modules/surgery/organs/external/_visual_organs.dm similarity index 74% rename from code/modules/surgery/organs/external/_external_organ.dm rename to code/modules/surgery/organs/external/_visual_organs.dm index ee731bf9f62..bb22cd357dc 100644 --- a/code/modules/surgery/organs/external/_external_organ.dm +++ b/code/modules/surgery/organs/external/_visual_organs.dm @@ -1,19 +1,11 @@ -/** -* System for drawing organs with overlays. These overlays are drawn directly on the bodypart, attached to a person or not -* Works in tandem with the /datum/sprite_accessory datum to generate sprites -* Unlike normal organs, we're actually inside a persons limbs at all times +/* +System for drawing organs with overlays. These overlays are drawn directly on the bodypart, attached to a person or not +Works in tandem with the /datum/sprite_accessory datum to generate sprites +Unlike normal organs, we're actually inside a persons limbs at all times */ -/obj/item/organ/external - name = "external organ" - desc = "An external organ that is too external." - - organ_flags = ORGAN_ORGANIC | ORGAN_EDIBLE - visual = TRUE - +/obj/item/organ ///The overlay datum that actually draws stuff on the limb var/datum/bodypart_overlay/mutant/bodypart_overlay - ///If not null, overrides the appearance with this sprite accessory datum - var/sprite_accessory_override /// The savefile_key of the preference this relates to. Used for the preferences UI. var/preference @@ -23,28 +15,24 @@ ///Set to EXTERNAL_BEHIND, EXTERNAL_FRONT or EXTERNAL_ADJACENT if you want to draw one of those layers as the object sprite. FALSE to use your own ///This will not work if it doesn't have a limb to generate its icon with var/use_mob_sprite_as_obj_sprite = FALSE + ///Does this organ have any bodytypes to pass to its bodypart_owner? var/external_bodytypes = NONE ///Does this organ have any bodyshapes to pass to its bodypart_owner? var/external_bodyshapes = NONE + ///Which flags does a 'modification tool' need to have to restyle us, if it all possible (located in code/_DEFINES/mobs) var/restyle_flags = NONE -// BUBBER EDIT - OR BEGIN -/**mob_sprite is optional if you havent set sprite_datums for the object, and is used mostly to generate sprite_datums from a persons DNA -// OR NEW BELOW ///If not null, overrides the appearance with this sprite accessory datum var/sprite_accessory_override /**accessory_type is optional if you haven't set sprite_datums for the object, and is used mostly to generate sprite_datums from a persons DNA -*/ // BUBBER EDIT - OR END * For _mob_sprite we make a distinction between "Round Snout" and "round". Round Snout is the name of the sprite datum, while "round" would be part of the sprite * I'm sorry */ -/obj/item/organ/external/Initialize(mapload, accessory_type) - . = ..() - - bodypart_overlay = new bodypart_overlay() +/obj/item/organ/proc/setup_bodypart_overlay(accessory_type) + bodypart_overlay = new bodypart_overlay(src) // cache_key = jointext(generate_icon_cache(), "_") // SKYRAT EDIT - Species stuff that Goofball ported from /tg/, apparently. Commented for now, to see if I can make it work without it. // SKYRAT EDIT: we have like 145+ fucking dna blocks lmao @@ -66,73 +54,13 @@ if(restyle_flags) RegisterSignal(src, COMSIG_ATOM_RESTYLE, PROC_REF(on_attempt_feature_restyle)) -/obj/item/organ/external/Insert(mob/living/carbon/receiver, special, movement_flags) - . = ..() - receiver.update_body_parts() +/// Some sanity checks, but mostly to check if the person has their preference/dna set to load +/proc/should_visual_organ_apply_to(obj/item/organ/organpath, mob/living/carbon/target) + if(!initial(organpath.bodypart_overlay)) + return TRUE -/obj/item/organ/external/Remove(mob/living/carbon/organ_owner, special, movement_flags) - // SKYRAT EDIT ADDITION START - if(mutantpart_key) - transfer_mutantpart_info(organ_owner, special) - // SKYRAT EDIT ADDITION END - . = ..() - if(!special) - organ_owner.update_body_parts() - -/obj/item/organ/external/mob_insert(mob/living/carbon/receiver, special, movement_flags) - if(!should_external_organ_apply_to(type, receiver)) - stack_trace("adding a [type] to a [receiver.type] when it shouldn't be!") - - . = ..() - - if(!.) - return - - // SKYRAT EDIT ADDITION START - if(mutantpart_key) - copy_to_mutant_bodyparts(receiver, special) - // SKYRAT EDIT ADDITION END - if(bodypart_overlay.imprint_on_next_insertion) //We only want this set *once* - var/feature_name = receiver.dna.features[bodypart_overlay.feature_key] - if (isnull(feature_name)) - if(!bodypart_overlay.set_appearance_from_dna(receiver.dna)) // SKYRAT EDIT CHANGE - ORIGINAL: feature_name = receiver.dna.species.external_organs[type] - bodypart_overlay.set_appearance_from_name(receiver.dna.species.external_organs[type]) // SKYRAT EDIT ADDITION - // SKYRAT EDIT CHANGE START - Puts the following line in an else block - else - bodypart_overlay.set_appearance_from_name(feature_name) - // SKYRAT EDIT CHANGE END - bodypart_overlay.imprint_on_next_insertion = FALSE - - if(external_bodytypes) - receiver.synchronize_bodytypes() - if(external_bodyshapes) - receiver.synchronize_bodyshapes() - - receiver.update_body_parts() - -/obj/item/organ/external/mob_remove(mob/living/carbon/organ_owner, special, moving) - if(!special) - organ_owner.synchronize_bodytypes() - organ_owner.synchronize_bodyshapes() - organ_owner.update_body_parts() - return ..() - -/obj/item/organ/external/on_bodypart_insert(obj/item/bodypart/bodypart) - bodypart.add_bodypart_overlay(bodypart_overlay) - return ..() - -/obj/item/organ/external/on_bodypart_remove(obj/item/bodypart/bodypart) - bodypart.remove_bodypart_overlay(bodypart_overlay) - - if(use_mob_sprite_as_obj_sprite) - update_appearance(UPDATE_OVERLAYS) - - color = bodypart_overlay.draw_color // so a pink felinid doesn't drop a gray tail - return ..() - -/proc/should_external_organ_apply_to(obj/item/organ/external/organpath, mob/living/carbon/target) if(isnull(organpath) || isnull(target)) - stack_trace("passed a null path or mob to 'should_external_organ_apply_to'") + stack_trace("passed a null path or mob to 'should_visual_organ_apply_to'") return FALSE var/datum/bodypart_overlay/mutant/bodypart_overlay = initial(organpath.bodypart_overlay) @@ -145,7 +73,7 @@ return FALSE ///Update our features after something changed our appearance -/obj/item/organ/external/proc/mutate_feature(features, mob/living/carbon/human/human) +/obj/item/organ/proc/mutate_feature(features, mob/living/carbon/human/human) if(!dna_block) return @@ -154,7 +82,7 @@ bodypart_overlay.set_appearance_from_name(feature_list[deconstruct_block(get_uni_feature_block(features, dna_block), feature_list.len)]) ///If you need to change an external_organ for simple one-offs, use this. Pass the accessory type : /datum/accessory/something -/obj/item/organ/external/proc/simple_change_sprite(accessory_type) +/obj/item/organ/proc/simple_change_sprite(accessory_type) var/datum/sprite_accessory/typed_accessory = accessory_type //we only take types for maintainability bodypart_overlay.set_appearance(typed_accessory) @@ -165,10 +93,7 @@ bodypart_owner.update_icon_dropped() //else if(use_mob_sprite_as_obj_sprite) //are we out in the world, unprotected by flesh? -/obj/item/organ/external/on_life(seconds_per_tick, times_fired) - return - -/obj/item/organ/external/update_overlays() +/obj/item/organ/update_overlays() . = ..() if(!use_mob_sprite_as_obj_sprite) @@ -283,17 +208,16 @@ ///Store our old datum here for if our antennae are healed var/original_sprite_datum -/obj/item/organ/external/antennae/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/antennae/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() - if(!.) - return + RegisterSignal(receiver, COMSIG_HUMAN_BURNING, PROC_REF(try_burn_antennae)) RegisterSignal(receiver, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(heal_antennae)) -/obj/item/organ/external/antennae/Remove(mob/living/carbon/organ_owner, special, movement_flags) +/obj/item/organ/external/antennae/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) . = ..() - if(organ_owner) - UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL)) + + UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL)) ///check if our antennae can burn off ;_; /obj/item/organ/external/antennae/proc/try_burn_antennae(mob/living/carbon/human/human) diff --git a/code/modules/surgery/organs/external/restyling.dm b/code/modules/surgery/organs/external/restyling.dm index 0ae13b68c6a..097f8b53bd7 100644 --- a/code/modules/surgery/organs/external/restyling.dm +++ b/code/modules/surgery/organs/external/restyling.dm @@ -1,7 +1,7 @@ //Contains a bunch of procs for different types, but in the end it just lets you restyle the bodypart overlay so that's why it's here ///Helper proc to fetch a list of styles a player might want to restyle their features into during the round : returns list("Cabbage" = /datum/sprite_accessory/cabbage) -/obj/item/organ/external/proc/get_valid_restyles() +/obj/item/organ/proc/get_valid_restyles() var/list/valid_restyles valid_restyles = list() @@ -31,23 +31,18 @@ ///Asks the external organs inside the limb if they can restyle /obj/item/bodypart/proc/attempt_feature_restyle(atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed) var/list/valid_features = list() - for(var/obj/item/organ/external/feature in contents) + for(var/obj/item/organ/feature in contents) if(feature.restyle_flags & restyle_type) valid_features.Add(feature) - var/obj/item/organ/external/target_organ + var/obj/item/organ/target_organ switch(LAZYLEN(valid_features)) if(1) target_organ = valid_features[1] if(2 to INFINITY) var/choose_options = list() - // BUBBER EDIT - OR BEGIN - var/name_to_organ = list() //literally so I dont have to loop again after someones made their choice - for(var/obj/item/organ/external/organ_choice as anything in valid_features) - /* var/name_to_organ = list() //literally so I don't have to loop again after someone's made their choice for(var/obj/item/organ/organ_choice as anything in valid_features) - */ // BUBBER EDIT - OR END choose_options[organ_choice.name] = image(organ_choice) name_to_organ[organ_choice.name] = organ_choice var/picked_option = show_radial_menu(trimmer, original_target, choose_options, radius = 38, require_near = TRUE) @@ -61,13 +56,8 @@ target_organ.attempt_feature_restyle(source, trimmer, original_target, body_zone, restyle_type, style_speed) -// BUBBER EDIT - OR BEGIN -///Invoke async so we dont break signals -/obj/item/organ/external/proc/on_attempt_feature_restyle(atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed) -/* ///Invoke async so we don't break signals /obj/item/organ/proc/on_attempt_feature_restyle(atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed) -*/ // BUBBER EDIT - OR END SIGNAL_HANDLER if(restyle_flags & restyle_type) @@ -76,7 +66,7 @@ to_chat(trimmer, span_warning("This tool is incompatible with the [src.name]!")) ///Restyles the external organ from a list of valid options -/obj/item/organ/external/proc/attempt_feature_restyle(atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed) +/obj/item/organ/proc/attempt_feature_restyle(atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed) var/list/restyles = get_valid_restyles() var/new_style = tgui_input_list(trimmer, "Select a new style", "Grooming", restyles) @@ -90,5 +80,4 @@ span_notice("You successfully change [original_target == trimmer ? "your" : original_target.name + "'s"] [name].") ) - simple_change_sprite(restyles[new_style]) //turn name to type and pass it on diff --git a/code/modules/surgery/organs/external/spines.dm b/code/modules/surgery/organs/external/spines.dm index ade081030d0..c7b49df959f 100644 --- a/code/modules/surgery/organs/external/spines.dm +++ b/code/modules/surgery/organs/external/spines.dm @@ -14,13 +14,13 @@ bodypart_overlay = /datum/bodypart_overlay/mutant/spines -/obj/item/organ/external/spines/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/spines/mob_insert(mob/living/carbon/receiver, special, movement_flags) // If we have a tail, attempt to add a tail spines overlay var/obj/item/organ/external/tail/our_tail = receiver.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL) our_tail?.try_insert_tail_spines(our_tail.bodypart_owner) return ..() -/obj/item/organ/external/spines/Remove(mob/living/carbon/organ_owner, special, movement_flags) +/obj/item/organ/external/spines/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) // If we have a tail, remove any tail spines overlay var/obj/item/organ/external/tail/our_tail = organ_owner.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL) our_tail?.remove_tail_spines(our_tail.bodypart_owner) diff --git a/code/modules/surgery/organs/external/tails.dm b/code/modules/surgery/organs/external/tails.dm index 8116b200887..8944e7474c3 100644 --- a/code/modules/surgery/organs/external/tails.dm +++ b/code/modules/surgery/organs/external/tails.dm @@ -20,7 +20,7 @@ ///The overlay for tail spines, if any var/datum/bodypart_overlay/mutant/tail_spines/tail_spines_overlay -/obj/item/organ/external/tail/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/tail/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() if(.) receiver.clear_mood_event("tail_lost") @@ -34,7 +34,7 @@ // If it's not your tail AND of different species, we are horrified if(IS_WEAKREF_OF(receiver, original_owner)) receiver.add_mood_event("tail_regained", /datum/mood_event/tail_regained_right) - else if(type in receiver.dna.species.external_organs) + else if(type in receiver.dna.species.mutant_organs) receiver.add_mood_event("tail_regained", /datum/mood_event/tail_regained_species) else receiver.add_mood_event("tail_regained", /datum/mood_event/tail_regained_wrong) @@ -66,10 +66,10 @@ tail_spines_overlay.tail_spine_key = tail_spine_key // SKYRAT EDIT ADDITION START if(!bodypart.owner.dna.mutant_bodyparts["spines"]) - bodypart.owner.dna.mutant_bodyparts["spines"][MUTANT_INDEX_NAME] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#886600", "#886600", "#886600")) - // SKYRAT EDIT ADDITION END - var/feature_name = bodypart.owner.dna.mutant_bodyparts["spines"][MUTANT_INDEX_NAME] // SKYRAT EDIT CHANGE - ORIGINAL: var/feature_name = bodypart.owner.dna.features["spines"] //tail spines don't live in DNA, but share feature names with regular spines - tail_spines_overlay.set_appearance_from_dna(bodypart.owner.dna, feature_name, feature_key = "spines") // SKYRAT EDIT CHANGE - ORIGINAL: tail_spines_overlay.set_appearance_from_name(feature_name) + bodypart.owner.dna.mutant_bodyparts["spines"] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#886600", "#886600", "#886600")) + // NOVA EDIT ADDITION END + var/feature_name = bodypart.owner.dna.mutant_bodyparts["spines"][MUTANT_INDEX_NAME] // NOVA EDIT CHANGE - ORIGINAL: var/feature_name = bodypart.owner.dna.features["spines"] //tail spines don't live in DNA, but share feature names with regular spines + tail_spines_overlay.set_appearance_from_dna(bodypart.owner.dna, feature_name, feature_key = "spines") // NOVA EDIT CHANGE - ORIGINAL: tail_spines_overlay.set_appearance_from_name(feature_name) bodypart.add_bodypart_overlay(tail_spines_overlay) /// If we have a tail spines overlay, delete it @@ -87,7 +87,7 @@ organ_owner.clear_mood_event("tail_regained") - if(type in organ_owner.dna.species.external_organs) + if(type in organ_owner.dna.species.mutant_organs) organ_owner.add_mood_event("tail_lost", /datum/mood_event/tail_lost) organ_owner.add_mood_event("tail_balance_lost", /datum/mood_event/tail_balance_lost) diff --git a/code/modules/surgery/organs/external/wings/functional_wings.dm b/code/modules/surgery/organs/external/wings/functional_wings.dm index 775d88247c4..3d0a2a634f2 100644 --- a/code/modules/surgery/organs/external/wings/functional_wings.dm +++ b/code/modules/surgery/organs/external/wings/functional_wings.dm @@ -33,15 +33,14 @@ QDEL_NULL(fly) return ..() -/obj/item/organ/external/wings/functional/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/wings/functional/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() - if(!.) - return + if(QDELETED(fly)) fly = new fly.Grant(receiver) -/obj/item/organ/external/wings/functional/Remove(mob/living/carbon/organ_owner, special, movement_flags) +/obj/item/organ/external/wings/functional/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) . = ..() fly?.Remove(organ_owner) if(wings_open) diff --git a/code/modules/surgery/organs/external/wings/moth_wings.dm b/code/modules/surgery/organs/external/wings/moth_wings.dm index f6b5cc4fdd7..5651602bfdb 100644 --- a/code/modules/surgery/organs/external/wings/moth_wings.dm +++ b/code/modules/surgery/organs/external/wings/moth_wings.dm @@ -126,10 +126,11 @@ var/burnt /datum/bodypart_overlay/mutant/wings/moth/New() - . = ..() - burn_datum = fetch_sprite_datum(burn_datum) + return ..() + + /datum/bodypart_overlay/mutant/wings/moth/get_global_feature_list() return SSaccessories.sprite_accessories["wings"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.moth_wings_list diff --git a/code/modules/surgery/organs/internal/appendix/_appendix.dm b/code/modules/surgery/organs/internal/appendix/_appendix.dm index 4a6d3ddaa8b..420d4efc118 100644 --- a/code/modules/surgery/organs/internal/appendix/_appendix.dm +++ b/code/modules/surgery/organs/internal/appendix/_appendix.dm @@ -6,7 +6,7 @@ name = "appendix" icon_state = "appendix" base_icon_state = "appendix" - visual = FALSE + zone = BODY_ZONE_PRECISE_GROIN slot = ORGAN_SLOT_APPENDIX food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/bad_food = 5) diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm b/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm index d4c4b57d75f..aa67fe0c08d 100644 --- a/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm +++ b/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm @@ -27,14 +27,13 @@ eye_owner.remove_traits(HUD_traits, ORGAN_TRAIT) balloon_alert(eye_owner, "hud enabled") -/obj/item/organ/internal/cyberimp/eyes/hud/Insert(mob/living/carbon/eye_owner, special = FALSE, movement_flags) +/obj/item/organ/internal/cyberimp/eyes/hud/mob_insert(mob/living/carbon/eye_owner, special = FALSE, movement_flags) . = ..() - if(!.) - return + eye_owner.add_traits(HUD_traits, ORGAN_TRAIT) toggled_on = TRUE -/obj/item/organ/internal/cyberimp/eyes/hud/Remove(mob/living/carbon/eye_owner, special, movement_flags) +/obj/item/organ/internal/cyberimp/eyes/hud/mob_remove(mob/living/carbon/eye_owner, special, movement_flags) . = ..() eye_owner.remove_traits(HUD_traits, ORGAN_TRAIT) toggled_on = FALSE diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm index e9f3a88f481..334c8941f6b 100644 --- a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm +++ b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm @@ -2,7 +2,7 @@ /obj/item/organ/internal/cyberimp name = "cybernetic implant" desc = "A state-of-the-art implant that improves a baseline's functionality." - visual = FALSE + organ_flags = ORGAN_ROBOTIC failing_desc = "seems to be broken." var/implant_color = COLOR_WHITE diff --git a/code/modules/surgery/organs/internal/ears/_ears.dm b/code/modules/surgery/organs/internal/ears/_ears.dm index ae8e8dd7bd2..3ff6c5daf65 100644 --- a/code/modules/surgery/organs/internal/ears/_ears.dm +++ b/code/modules/surgery/organs/internal/ears/_ears.dm @@ -4,7 +4,6 @@ desc = "There are three parts to the ear. Inner, middle and outer. Only one of these parts should be normally visible." zone = BODY_ZONE_HEAD slot = ORGAN_SLOT_EARS - visual = FALSE gender = PLURAL healing_factor = STANDARD_ORGAN_HEALING @@ -153,34 +152,11 @@ icon_state = "kitty" visual = TRUE damage_multiplier = 2 - // Keeps track of which cat ears sprite is associated with this. - var/variant = "Cat" -/obj/item/organ/internal/ears/cat/Initialize(mapload, variant_pref) - . = ..() - if(variant_pref) - variant = variant_pref + preference = "feature_human_ears" -//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION -/* -/obj/item/organ/internal/ears/cat/on_mob_insert(mob/living/carbon/human/ear_owner) - . = ..() - if(istype(ear_owner) && ear_owner.dna) - color = ear_owner.hair_color - ear_owner.dna.features["ears"] = ear_owner.dna.species.mutant_bodyparts["ears"] = variant - ear_owner.dna.update_uf_block(DNA_EARS_BLOCK) - ear_owner.update_body() + //dna_block = DNA_EARS_BLOCK // NOVA EDIT REMOVAL - Customization - We have our own system to handle DNA. -// BUBBER EDIT - OR BEGIN -/obj/item/organ/internal/ears/cat/on_mob_remove(mob/living/carbon/human/ear_owner) - . = ..() - if(istype(ear_owner) && ear_owner.dna) - color = ear_owner.hair_color - ear_owner.dna.species.mutant_bodyparts -= "ears" - ear_owner.update_body() -*/ -//SKYRAT EDIT REMOVAL END -/* bodypart_overlay = /datum/bodypart_overlay/mutant/cat_ears /// Bodypart overlay for the horrible cat ears @@ -193,7 +169,7 @@ var/inner_layer = EXTERNAL_FRONT /datum/bodypart_overlay/mutant/cat_ears/get_global_feature_list() - return SSaccessories.ears_list + return SSaccessories.sprite_accessories["ears"] // NOVA EDIT - Customization - ORIGINAL: return SSaccessories.ears_list /datum/bodypart_overlay/mutant/cat_ears/can_draw_on_bodypart(mob/living/carbon/human/human) if((human.head?.flags_inv & HIDEHAIR) || (human.wear_mask?.flags_inv & HIDEHAIR)) @@ -215,7 +191,6 @@ base_ears.overlays += inner_ears return base_ears -*/ // // BUBBER EDIT - OR END /obj/item/organ/internal/ears/penguin name = "penguin ears" diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm index f87647cc6c4..798e0a26691 100644 --- a/code/modules/surgery/organs/internal/eyes/_eyes.dm +++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm @@ -50,27 +50,23 @@ /// indication that the eyes are undergoing some negative effect var/damaged = FALSE /// Native FOV that will be applied if a config is enabled - var/native_fov = FOV_180_DEGREES //SKYRAT EDIT CHANGE - Original FOV_90_DEGREES + var/native_fov = NONE //NOVA EDIT CHANGE - ORIGINAL: var/native_fov = FOV_90_DEGREES /// Scarring on this organ var/scarring = NONE - -/obj/item/organ/internal/eyes/Insert(mob/living/carbon/eye_recipient, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/eyes/mob_insert(mob/living/carbon/receiver, special, movement_flags) // If we don't do this before everything else, heterochromia will be reset leading to eye_color_right no longer being accurate - if(ishuman(eye_recipient)) - var/mob/living/carbon/human/human_recipient = eye_recipient + if(ishuman(receiver)) + var/mob/living/carbon/human/human_recipient = receiver old_eye_color_left = human_recipient.eye_color_left old_eye_color_right = human_recipient.eye_color_right . = ..() - if(!.) - return - - eye_recipient.cure_blind(NO_EYES) + receiver.cure_blind(NO_EYES) apply_damaged_eye_effects() - refresh(eye_recipient, call_update = TRUE) - RegisterSignal(eye_recipient, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act)) + refresh(receiver, call_update = TRUE) + RegisterSignal(receiver, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act)) /// Refreshes the visuals of the eyes /// If call_update is TRUE, we also will call update_body @@ -103,48 +99,42 @@ if(call_update) affected_human.update_body() -/obj/item/organ/internal/eyes/Remove(mob/living/carbon/eye_owner, special, movement_flags) +/obj/item/organ/internal/eyes/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) . = ..() - if(ishuman(eye_owner)) - var/mob/living/carbon/human/human_owner = eye_owner + + if(ishuman(organ_owner)) + var/mob/living/carbon/human/human_owner = organ_owner if(initial(eye_color_left)) human_owner.eye_color_left = old_eye_color_left if(initial(eye_color_right)) human_owner.eye_color_right = old_eye_color_right if(native_fov) - eye_owner.remove_fov_trait(type) + organ_owner.remove_fov_trait(type) if(!special) human_owner.update_body() // Cure blindness from eye damage - eye_owner.cure_blind(EYE_DAMAGE) - eye_owner.cure_nearsighted(EYE_DAMAGE) + organ_owner.cure_blind(EYE_DAMAGE) + organ_owner.cure_nearsighted(EYE_DAMAGE) // Eye blind and temp blind go to, even if this is a bit of cheesy way to clear blindness - eye_owner.remove_status_effect(/datum/status_effect/eye_blur) - eye_owner.remove_status_effect(/datum/status_effect/temporary_blindness) + organ_owner.remove_status_effect(/datum/status_effect/eye_blur) + organ_owner.remove_status_effect(/datum/status_effect/temporary_blindness) // Then become blind anyways (if not special) if(!special) - eye_owner.become_blind(NO_EYES) + organ_owner.become_blind(NO_EYES) - eye_owner.update_tint() - eye_owner.update_sight() - is_emissive = FALSE // SKYRAT EDIT ADDITION - UnregisterSignal(eye_owner, COMSIG_ATOM_BULLET_ACT) + organ_owner.update_tint() + organ_owner.update_sight() + is_emissive = FALSE // NOVA EDIT ADDITION + UnregisterSignal(organ_owner, COMSIG_ATOM_BULLET_ACT) -// BUBBER EDIT - REPLACES organ/eyes with organ/internal/eyes until someone can pull the rework - Needed for some qol in proc -/obj/item/organ/internal/eyes/proc/on_bullet_act(mob/living/carbon/source, obj/projectile/proj, def_zone) -// /obj/item/organ/eyes/proc/on_bullet_act(mob/living/carbon/source, obj/projectile/proj, def_zone) +/obj/item/organ/internal/eyes/proc/on_bullet_act(datum/source, obj/projectile/proj, def_zone) SIGNAL_HANDLER // Once-a-dozen-rounds level of rare if (def_zone != BODY_ZONE_HEAD || !prob(proj.damage * 0.1) || !(proj.damage_type == BRUTE || proj.damage_type == BURN)) return - var/blocked = source.check_projectile_armor(def_zone, proj, is_silent = TRUE) - if (blocked && source.is_eyes_covered()) - if (!proj.armour_penetration || prob(blocked - proj.armour_penetration)) - return - var/valid_sides = list() if (!(scarring & RIGHT_EYE_SCAR)) valid_sides += RIGHT_EYE_SCAR @@ -599,7 +589,7 @@ deactivate(close_ui = TRUE) /// Set the initial color of the eyes on insert to be the mob's previous eye color. -/obj/item/organ/internal/eyes/robotic/glow/Insert(mob/living/carbon/eye_recipient, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/eyes/robotic/glow/mob_insert(mob/living/carbon/eye_recipient, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() left_eye_color_string = old_eye_color_left right_eye_color_string = old_eye_color_right diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm index 3f3e8165844..ce659792529 100644 --- a/code/modules/surgery/organs/internal/heart/_heart.dm +++ b/code/modules/surgery/organs/internal/heart/_heart.dm @@ -3,7 +3,7 @@ desc = "I feel bad for the heartless bastard who lost this." icon_state = "heart-on" base_icon_state = "heart" - visual = FALSE + zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_HEART item_flags = NO_BLOOD_ON_ITEM diff --git a/code/modules/surgery/organs/internal/heart/heart_ethereal.dm b/code/modules/surgery/organs/internal/heart/heart_ethereal.dm index ff2db562d95..3e5762a623f 100644 --- a/code/modules/surgery/organs/internal/heart/heart_ethereal.dm +++ b/code/modules/surgery/organs/internal/heart/heart_ethereal.dm @@ -21,15 +21,14 @@ add_atom_colour(ethereal_color, FIXED_COLOUR_PRIORITY) update_appearance() -/obj/item/organ/internal/heart/ethereal/Insert(mob/living/carbon/heart_owner, special = FALSE, movement_flags) +/obj/item/organ/internal/heart/ethereal/mob_insert(mob/living/carbon/heart_owner, special = FALSE, movement_flags) . = ..() - if(!.) - return + RegisterSignal(heart_owner, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_change)) RegisterSignal(heart_owner, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(on_owner_fully_heal)) RegisterSignal(heart_owner, COMSIG_QDELETING, PROC_REF(owner_deleted)) -/obj/item/organ/internal/heart/ethereal/Remove(mob/living/carbon/heart_owner, special, movement_flags) +/obj/item/organ/internal/heart/ethereal/mob_remove(mob/living/carbon/heart_owner, special, movement_flags) UnregisterSignal(heart_owner, list(COMSIG_MOB_STATCHANGE, COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_QDELETING)) REMOVE_TRAIT(heart_owner, TRAIT_CORPSELOCKED, SPECIES_TRAIT) stop_crystalization_process(heart_owner) diff --git a/code/modules/surgery/organs/internal/liver/_liver.dm b/code/modules/surgery/organs/internal/liver/_liver.dm index 9b0f3a7162f..dc5374ba416 100644 --- a/code/modules/surgery/organs/internal/liver/_liver.dm +++ b/code/modules/surgery/organs/internal/liver/_liver.dm @@ -6,7 +6,7 @@ name = "liver" desc = "Pairing suggestion: chianti and fava beans." icon_state = "liver" - visual = FALSE + w_class = WEIGHT_CLASS_SMALL zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_LIVER diff --git a/code/modules/surgery/organs/internal/lungs/_lungs.dm b/code/modules/surgery/organs/internal/lungs/_lungs.dm index 4e03945b5b7..af176fe9fd7 100644 --- a/code/modules/surgery/organs/internal/lungs/_lungs.dm +++ b/code/modules/surgery/organs/internal/lungs/_lungs.dm @@ -1,7 +1,7 @@ /obj/item/organ/internal/lungs name = "lungs" icon_state = "lungs" - visual = FALSE + zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_LUNGS gender = PLURAL @@ -154,17 +154,16 @@ add_gas_reaction(/datum/gas/zauker, while_present = PROC_REF(too_much_zauker)) ///Simply exists so that you don't keep any alerts from your previous lack of lungs. -/obj/item/organ/internal/lungs/Insert(mob/living/carbon/receiver, special = FALSE, movement_flags) +/obj/item/organ/internal/lungs/mob_insert(mob/living/carbon/receiver, special = FALSE, movement_flags) . = ..() - if(!.) - return . + receiver.clear_alert(ALERT_NOT_ENOUGH_OXYGEN) receiver.clear_alert(ALERT_NOT_ENOUGH_CO2) receiver.clear_alert(ALERT_NOT_ENOUGH_NITRO) receiver.clear_alert(ALERT_NOT_ENOUGH_PLASMA) receiver.clear_alert(ALERT_NOT_ENOUGH_N2O) -/obj/item/organ/internal/lungs/Remove(mob/living/carbon/organ_owner, special, movement_flags) +/obj/item/organ/internal/lungs/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) . = ..() // This is very "manual" I realize, but it's useful to ensure cleanup for gases we're removing happens // Avoids stuck alerts and such diff --git a/code/modules/surgery/organs/internal/stomach/_stomach.dm b/code/modules/surgery/organs/internal/stomach/_stomach.dm index 888d099faa2..ae249b74fee 100644 --- a/code/modules/surgery/organs/internal/stomach/_stomach.dm +++ b/code/modules/surgery/organs/internal/stomach/_stomach.dm @@ -5,7 +5,7 @@ name = "stomach" desc = "Onaka ga suite imasu." icon_state = "stomach" - visual = FALSE + w_class = WEIGHT_CLASS_SMALL zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_STOMACH @@ -247,11 +247,11 @@ disgusted.throw_alert(ALERT_DISGUST, /atom/movable/screen/alert/disgusted) disgusted.add_mood_event("disgust", /datum/mood_event/disgusted) -/obj/item/organ/internal/stomach/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/internal/stomach/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() receiver.hud_used?.hunger?.update_appearance() -/obj/item/organ/internal/stomach/Remove(mob/living/carbon/stomach_owner, special, movement_flags) +/obj/item/organ/internal/stomach/mob_remove(mob/living/carbon/stomach_owner, special, movement_flags) if(ishuman(stomach_owner)) var/mob/living/carbon/human/human_owner = owner human_owner.clear_alert(ALERT_DISGUST) diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm index a8bc5b61d85..3ac028e2760 100644 --- a/code/modules/surgery/organs/internal/tongue/_tongue.dm +++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm @@ -2,7 +2,7 @@ name = "tongue" desc = "A fleshy muscle mostly used for lying." icon_state = "tongue" - visual = FALSE + zone = BODY_ZONE_PRECISE_MOUTH slot = ORGAN_SLOT_TONGUE attack_verb_continuous = list("licks", "slobbers", "slaps", "frenches", "tongues") @@ -124,30 +124,30 @@ food_taste_reaction = FOOD_LIKED return food_taste_reaction -/obj/item/organ/internal/tongue/Insert(mob/living/carbon/tongue_owner, special = FALSE, movement_flags) +/obj/item/organ/internal/tongue/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() - if(!.) - return + if(modifies_speech) - RegisterSignal(tongue_owner, COMSIG_MOB_SAY, PROC_REF(handle_speech)) - tongue_owner.voice_filter = voice_filter + RegisterSignal(receiver, COMSIG_MOB_SAY, PROC_REF(handle_speech)) + receiver.voice_filter = voice_filter /* This could be slightly simpler, by making the removal of the * NO_TONGUE_TRAIT conditional on the tongue's `sense_of_taste`, but * then you can distinguish between ageusia from no tongue, and * ageusia from having a non-tasting tongue. */ - REMOVE_TRAIT(tongue_owner, TRAIT_AGEUSIA, NO_TONGUE_TRAIT) + REMOVE_TRAIT(receiver, TRAIT_AGEUSIA, NO_TONGUE_TRAIT) apply_tongue_effects() -/obj/item/organ/internal/tongue/Remove(mob/living/carbon/tongue_owner, special, movement_flags) +/obj/item/organ/internal/tongue/mob_remove(mob/living/carbon/organ_owner, special, movement_flags) . = ..() + temp_say_mod = "" - UnregisterSignal(tongue_owner, COMSIG_MOB_SAY) - REMOVE_TRAIT(tongue_owner, TRAIT_SPEAKS_CLEARLY, SPEAKING_FROM_TONGUE) - REMOVE_TRAIT(tongue_owner, TRAIT_AGEUSIA, ORGAN_TRAIT) + UnregisterSignal(organ_owner, COMSIG_MOB_SAY) + REMOVE_TRAIT(organ_owner, TRAIT_SPEAKS_CLEARLY, SPEAKING_FROM_TONGUE) + REMOVE_TRAIT(organ_owner, TRAIT_AGEUSIA, ORGAN_TRAIT) // Carbons by default start with NO_TONGUE_TRAIT caused TRAIT_AGEUSIA - ADD_TRAIT(tongue_owner, TRAIT_AGEUSIA, NO_TONGUE_TRAIT) - tongue_owner.voice_filter = initial(tongue_owner.voice_filter) + ADD_TRAIT(organ_owner, TRAIT_AGEUSIA, NO_TONGUE_TRAIT) + organ_owner.voice_filter = initial(organ_owner.voice_filter) /obj/item/organ/internal/tongue/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag) . = ..() diff --git a/code/modules/surgery/organs/internal/vocal_cords/_vocal_cords.dm b/code/modules/surgery/organs/internal/vocal_cords/_vocal_cords.dm index 2ef245894bd..f6fed86a90d 100644 --- a/code/modules/surgery/organs/internal/vocal_cords/_vocal_cords.dm +++ b/code/modules/surgery/organs/internal/vocal_cords/_vocal_cords.dm @@ -1,7 +1,6 @@ /obj/item/organ/internal/vocal_cords //organs that are activated through speech with the :x/MODE_KEY_VOCALCORDS channel name = "vocal cords" icon_state = "appendix" - visual = FALSE zone = BODY_ZONE_PRECISE_MOUTH slot = ORGAN_SLOT_VOICE gender = PLURAL @@ -87,7 +86,6 @@ next_command = world.time + (cooldown * cooldown_mod) /obj/item/organ/internal/adamantine_resonator - visual = FALSE name = "adamantine resonator" desc = "Fragments of adamantine exist in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders." zone = BODY_ZONE_HEAD diff --git a/code/modules/surgery/organs/organ_movement.dm b/code/modules/surgery/organs/organ_movement.dm index 34d6b6f5251..689e0c6b379 100644 --- a/code/modules/surgery/organs/organ_movement.dm +++ b/code/modules/surgery/organs/organ_movement.dm @@ -18,7 +18,8 @@ mob_insert(receiver, special, movement_flags) bodypart_insert(limb_owner = receiver, movement_flags = movement_flags) - return TRUE + if(!special) + receiver.update_body_parts() /* * Remove the organ from the select mob. @@ -32,6 +33,9 @@ mob_remove(organ_owner, special, movement_flags) bodypart_remove(limb_owner = organ_owner, movement_flags = movement_flags) + if(!special) + organ_owner.update_body_parts() + /* * Insert the organ into the select mob. * @@ -65,6 +69,11 @@ wash(CLEAN_TYPE_BLOOD) organ_flags &= ~ORGAN_VIRGIN + if(external_bodytypes) + receiver.synchronize_bodytypes() + if(external_bodyshapes) + receiver.synchronize_bodyshapes() + receiver.organs |= src receiver.organs_slot[slot] = src owner = receiver @@ -122,6 +131,9 @@ ADD_TRAIT(src, TRAIT_NODROP, ORGAN_INSIDE_BODY_TRAIT) interaction_flags_item &= ~INTERACT_ITEM_ATTACK_HAND_PICKUP + if(bodypart_overlay) + limb.add_bodypart_overlay(bodypart_overlay) + /* * Remove the organ from the select mob. * @@ -219,6 +231,25 @@ interaction_flags_item |= INTERACT_ITEM_ATTACK_HAND_PICKUP SEND_SIGNAL(src, COMSIG_ORGAN_BODYPART_REMOVED, limb, movement_flags) // BUBBER CHANGE, added COMSIG_ORGAN_BODYPART_REMOVED to on_bodypart_remove + if(!bodypart_overlay) + return + + limb.remove_bodypart_overlay(bodypart_overlay) + + if(use_mob_sprite_as_obj_sprite) + update_appearance(UPDATE_OVERLAYS) + + color = bodypart_overlay.draw_color // so a pink felinid doesn't drop a gray tail + + if(greyscale_config) + get_greyscale_color_from_draw_color() + else + color = bodypart_overlay.draw_color // so a pink felinid doesn't drop a gray tail + +///Here we define how draw_color from the bodypart overlay sets the greyscale colors of organs that use GAGS +/obj/item/organ/proc/get_greyscale_color_from_draw_color() + color = bodypart_overlay.draw_color //Defaults to the legacy behaviour of applying the color to the item. + /// In space station videogame, nothing is sacred. If somehow an organ is removed unexpectedly, handle it properly /obj/item/organ/proc/forced_removal() SIGNAL_HANDLER diff --git a/code/modules/unit_tests/dna_infusion.dm b/code/modules/unit_tests/dna_infusion.dm index 0df63be644b..0fd898e00de 100644 --- a/code/modules/unit_tests/dna_infusion.dm +++ b/code/modules/unit_tests/dna_infusion.dm @@ -38,13 +38,19 @@ for(var/datum/infuser_entry/infuser_entry as anything in flatten_list(GLOB.infuser_entries)) var/output_organs = infuser_entry.output_organs var/mob/living/carbon/human/lab_rat = allocate(/mob/living/carbon/human/consistent) - lab_rat.dna.mutant_bodyparts["moth_antennae"] = list(MUTANT_INDEX_NAME = "Plain", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE)) // SKYRAT EDIT - Customization + // NOVA EDIT ADDITION START - Customization + lab_rat.dna.mutant_bodyparts["moth_antennae"] = list(MUTANT_INDEX_NAME = "Plain", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE)) + lab_rat.dna.mutant_bodyparts["tail"] = list(MUTANT_INDEX_NAME = "Light Tiger", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF")) + lab_rat.dna.mutant_bodyparts["snout"] = list(MUTANT_INDEX_NAME = "Sharp + Light", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF")) + lab_rat.dna.mutant_bodyparts["horns"] = list(MUTANT_INDEX_NAME = "Simple", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF")) + lab_rat.dna.mutant_bodyparts["frills"] = list(MUTANT_INDEX_NAME = "Aquatic", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF")) + // NOVA EDIT END var/list/obj/item/organ/inserted_organs = list() // Attempt to insert entire list of mutant organs for the given infusion_entry. for(var/obj/item/organ/organ as anything in output_organs) organ = new organ() - TEST_ASSERT(organ.Insert(lab_rat, special = TRUE, movement_flags = DELETE_IF_REPLACED), "The organ `[organ.type]` for `[infuser_entry.type]` was not inserted in the mob when expected, Insert() returned falsy when TRUE was expected.") + organ.Insert(lab_rat, special = TRUE, movement_flags = DELETE_IF_REPLACED) inserted_organs += organ // Search for added Status Effect. diff --git a/code/modules/unit_tests/organ_bodypart_shuffle.dm b/code/modules/unit_tests/organ_bodypart_shuffle.dm index 842dd1c6c13..11c0bcd71be 100644 --- a/code/modules/unit_tests/organ_bodypart_shuffle.dm +++ b/code/modules/unit_tests/organ_bodypart_shuffle.dm @@ -2,7 +2,7 @@ /datum/unit_test/organ_bodypart_shuffle /datum/unit_test/organ_bodypart_shuffle/Run() - var/mob/living/carbon/human/hollow_boy = allocate(/mob/living/carbon/human/consistent) + var/mob/living/carbon/human/hollow_boy = allocate(/mob/living/carbon/human/consistent) //freshly filled with wet insides // Test if organs are all properly updating when forcefully removed var/list/removed_organs = list() @@ -30,5 +30,3 @@ continue TEST_ASSERT(organ in hollow_boy.organs, "Organ '[organ.name] was put in an empty bodypart that replaced a humans, but the organ did not come with.") - // Test if bodyparts are all properly updating when forcefully removed - hollow_boy = allocate(/mob/living/carbon/human/consistent) //freshly filled with wet insides diff --git a/code/modules/wiremod/shell/brain_computer_interface.dm b/code/modules/wiremod/shell/brain_computer_interface.dm index 7b8fb9aa42f..e3ddf54135a 100644 --- a/code/modules/wiremod/shell/brain_computer_interface.dm +++ b/code/modules/wiremod/shell/brain_computer_interface.dm @@ -3,7 +3,6 @@ desc = "An implant that can be placed in a user's head to control circuits using their brain." icon = 'icons/obj/science/circuits.dmi' icon_state = "bci" - visual = FALSE zone = BODY_ZONE_HEAD w_class = WEIGHT_CLASS_TINY diff --git a/html/changelogs/AutoChangeLog-pr-86757.yml b/html/changelogs/AutoChangeLog-pr-86757.yml new file mode 100644 index 00000000000..1f43c192592 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-86757.yml @@ -0,0 +1,5 @@ +author: "00-Steven" +delete-after: True +changes: + - bugfix: "Fixed cat ears not layering properly." + - bugfix: "Husked bodies show their blood with the right colours in photographs." \ No newline at end of file diff --git a/modular_skyrat/master_files/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm b/modular_skyrat/master_files/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm index 130d1277e45..54d06537b3c 100644 --- a/modular_skyrat/master_files/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm +++ b/modular_skyrat/master_files/code/datums/bodypart_overlays/mutant_bodypart_overlay.dm @@ -136,7 +136,7 @@ if(mod_overlay) mod_overlay.add_overlay(sprite_datum.get_custom_mod_icon(owner, image_to_return)) - if(sprite_datum.hasinner) + if(sprite_datum.has_inner) returned_images += get_singular_image(build_icon_state(gender, image_layer, feature_key_suffix = "inner"), image_layer, owner) // Gets the icon_state of a single or matrix colored accessory and overlays it with a texture diff --git a/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm b/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm index 83872abb64f..db947e2190e 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm @@ -1,5 +1,10 @@ #define REQUIRED_CROP_LIST_SIZE 4 +/datum/preference + /// If the selected species has this in its /datum/species/mutant_bodyparts, + /// will show the feature as selectable. + var/relevant_mutant_bodypart = null + /datum/preference/tri_color abstract_type = /datum/preference/tri_color var/type_to_check = /datum/preference/toggle/allow_mismatched_parts diff --git a/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm b/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm index 0dd2daddc10..16f1032a2fb 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm @@ -7,11 +7,11 @@ /datum/preference/choiced/digitigrade_legs/create_default_value() - return "Normal Legs" + return NORMAL_LEGS /datum/preference/choiced/digitigrade_legs/init_possible_values() - return assoc_to_keys_features(SSaccessories.sprite_accessories["legs"]) + return list(NORMAL_LEGS, DIGITIGRADE_LEGS) /datum/preference/choiced/digitigrade_legs/is_accessible(datum/preferences/preferences) return ..() && is_usable(preferences) diff --git a/modular_skyrat/master_files/code/modules/mob/living/human/species.dm b/modular_skyrat/master_files/code/modules/mob/living/human/species.dm index ac68a44e2fd..bbc2570ed15 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/human/species.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/human/species.dm @@ -23,7 +23,7 @@ ) features += preference.savefile_key - for (var/obj/item/organ/external/organ_type as anything in external_organs) + for (var/obj/item/organ/organ_type as anything in mutant_organs) var/preference = initial(organ_type.preference) if (!isnull(preference)) features += preference diff --git a/modular_skyrat/master_files/code/modules/reagents/medicine_reagents/medicine_reagents.dm b/modular_skyrat/master_files/code/modules/reagents/medicine_reagents/medicine_reagents.dm index faba0cdb892..7765e6f3cd6 100644 --- a/modular_skyrat/master_files/code/modules/reagents/medicine_reagents/medicine_reagents.dm +++ b/modular_skyrat/master_files/code/modules/reagents/medicine_reagents/medicine_reagents.dm @@ -17,4 +17,4 @@ if(!istype(exposed_mob) || (reac_volume < 0.5)) return - exposed_mob.update_mutant_bodyparts() + exposed_mob.update_body_parts() diff --git a/modular_skyrat/master_files/code/modules/surgery/organs/_organ.dm b/modular_skyrat/master_files/code/modules/surgery/organs/_organ.dm new file mode 100644 index 00000000000..e5f45efb114 --- /dev/null +++ b/modular_skyrat/master_files/code/modules/surgery/organs/_organ.dm @@ -0,0 +1,4 @@ +/obj/item/organ + /// Whether or not we're a species-specific organ that will override + /// the ear choice on a certain species, while still applying its visuals. + var/overrides_sprite_datum_organ_type = FALSE diff --git a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm index d92ea4fdfac..7609fbe5d6c 100644 --- a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm +++ b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm @@ -44,14 +44,14 @@ GLOBAL_LIST_EMPTY(cortical_borers) borer = null return ..() -/obj/item/organ/internal/borer_body/on_mob_insert(mob/living/carbon/carbon_target, special, movement_flags) +/obj/item/organ/internal/borer_body/mob_insert(mob/living/carbon/carbon_target, special, movement_flags) . = ..() for(var/datum/borer_focus/body_focus as anything in borer.body_focuses) body_focus.on_add() carbon_target.apply_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type) //on removal, force the borer out -/obj/item/organ/internal/borer_body/on_mob_remove(mob/living/carbon/carbon_target, special) +/obj/item/organ/internal/borer_body/mob_remove(mob/living/carbon/carbon_target, special) . = ..() var/mob/living/basic/cortical_borer/cb_inside = carbon_target.has_borer() for(var/datum/borer_focus/body_focus as anything in cb_inside.body_focuses) diff --git a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_things/empowered_egg.dm b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_things/empowered_egg.dm index 525c4b32de4..a2c0826542b 100644 --- a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_things/empowered_egg.dm +++ b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_things/empowered_egg.dm @@ -19,11 +19,11 @@ if(iscarbon(loc)) Insert(loc) -/obj/item/organ/internal/empowered_borer_egg/Insert(mob/living/carbon/M, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/empowered_borer_egg/mob_insert(mob/living/carbon/M, special = FALSE, movement_flags = DELETE_IF_REPLACED) ..() addtimer(CALLBACK(src, PROC_REF(try_burst)), burst_time) -/obj/item/organ/internal/empowered_borer_egg/Remove(mob/living/carbon/M, special = FALSE) +/obj/item/organ/internal/empowered_borer_egg/mob_remove(mob/living/carbon/M, special = FALSE) . = ..() visible_message(span_warning(span_italics("As [src] is cut out of [M], it quickly vibrates and shatters, leaving nothing but some goop!"))) new/obj/effect/decal/cleanable/food/egg_smudge(get_turf(src)) diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories.dm index c9fe779c421..cc3655f6d26 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories.dm @@ -22,6 +22,10 @@ ///Notable things that have it set to FALSE are things that need special setup, such as genitals var/generic + /// Whether or not this sprite accessory has an additional overlay added to + /// it as an "inner" part, which is pre-colored. + var/has_inner = FALSE + /// For all the flags that you need to pass from a sprite_accessory to an organ, when it's linked to one. /// (i.e. passing through the fact that a snout should or shouldn't use a muzzled sprite for head worn items) var/flags_for_organ = NONE @@ -35,7 +39,7 @@ var/factual = TRUE ///Use this as a type path to an organ that this sprite_accessory will be associated. Make sure the organ has 'mutantpart_info' set properly. - var/organ_type + var/obj/item/organ/organ_type ///Set this to true to make an accessory appear as color customizable in preferences despite advanced color settings being off, will also prevent the accessory from being reset var/always_color_customizable @@ -170,12 +174,20 @@ icon_state = "none" +/// Legs are a special case, they aren't actually sprite_accessories but are updated with them. +/// These datums exist for selecting legs on preference, and little else /datum/sprite_accessory/legs + icon = null + em_block = TRUE key = "legs" - generic = "Leg Type" color_src = null genetic = TRUE +/datum/sprite_accessory/legs/none + name = NORMAL_LEGS + +/datum/sprite_accessory/legs/digitigrade_lizard + name = DIGITIGRADE_LEGS /datum/sprite_accessory/socks icon = 'modular_skyrat/master_files/icons/mob/clothing/underwear.dmi' use_static = TRUE diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/ears.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/ears.dm index 01583cb2682..38a107bb2cc 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/ears.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/ears.dm @@ -1,7 +1,7 @@ /datum/sprite_accessory/ears key = "ears" generic = "Ears" - organ_type = /obj/item/organ/external/ears // SET BACK TO THIS AS SOON AS WE GET EARS AS EXTERNAL ORGANS: organ_type = /obj/item/organ/internal/ears/mutant + organ_type = /obj/item/organ/internal/ears/mutant relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER) color_src = USE_MATRIXED_COLORS genetic = TRUE @@ -34,13 +34,15 @@ recommended_species = list(SPECIES_MAMMAL, SPECIES_HUMAN, SPECIES_SYNTH, SPECIES_FELINE, SPECIES_HUMANOID, SPECIES_GHOUL) relevent_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER) color_src = USE_ONE_COLOR + has_inner = TRUE /datum/sprite_accessory/ears/fox color_src = USE_ONE_COLOR + has_inner = TRUE /datum/sprite_accessory/ears/mutant - icon = 'modular_skyrat/master_files/icons/mob/sprite_accessory/ears.dmi' - organ_type = /obj/item/organ/external/ears // SET BACK TO THIS AS SOON AS WE GET EARS AS EXTERNAL ORGANS: organ_type = /obj/item/organ/internal/ears/mutant + icon = 'modular_nova/master_files/icons/mob/sprite_accessory/ears.dmi' + organ_type = /obj/item/organ/internal/ears/mutant color_src = USE_MATRIXED_COLORS recommended_species = list(SPECIES_MAMMAL, SPECIES_HUMAN, SPECIES_SYNTH, SPECIES_FELINE, SPECIES_HUMANOID, SPECIES_GHOUL) uses_emissives = TRUE @@ -84,7 +86,7 @@ /datum/sprite_accessory/ears/mutant/bigwolfinner name = "Big Wolf (ALT)" icon_state = "bigwolfinner" - hasinner = TRUE + has_inner = TRUE /datum/sprite_accessory/ears/mutant/bigwolfdark //alphabetical sort ignored here for ease-of-use name = "Dark Big Wolf" @@ -93,7 +95,7 @@ /datum/sprite_accessory/ears/mutant/bigwolfinnerdark name = "Dark Big Wolf (ALT)" icon_state = "bigwolfinnerdark" - hasinner = TRUE + has_inner = TRUE /datum/sprite_accessory/ears/mutant/bunny name = "Bunny" diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/snout.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/snout.dm index daea9fce0b0..830a1aac4fe 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/snout.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/snout.dm @@ -30,7 +30,7 @@ return !sprite_datum.is_hidden(human) -/obj/item/organ/external/snout/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/snout/mob_insert(mob/living/carbon/receiver, special, movement_flags) if(sprite_accessory_flags & SPRITE_ACCESSORY_USE_MUZZLED_SPRITE) external_bodyshapes |= BODYSHAPE_SNOUTED if(sprite_accessory_flags & SPRITE_ACCESSORY_USE_ALT_FACEWEAR_LAYER) diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/spines.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/spines.dm index 4f631993af4..fb2cf49ad70 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/spines.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/spines.dm @@ -24,6 +24,10 @@ default_color = DEFAULT_SECONDARY relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER) +/datum/sprite_accessory/tail_spines/none + name = SPRITE_ACCESSORY_NONE + icon_state = "none" + /datum/sprite_accessory/tail_spines/is_hidden(mob/living/carbon/human/wearer) var/list/used_in_turf = list("tail") if(wearer.owned_turf?.name in used_in_turf) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm index 36245ec34cf..ccccc9c736f 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm @@ -123,7 +123,7 @@ // The total list of parts choosable var/static/list/total_selection = list( ORGAN_SLOT_EXTERNAL_HORNS = "horns", - ORGAN_SLOT_EXTERNAL_EARS = "ears", + ORGAN_SLOT_EARS = "ears", ORGAN_SLOT_EXTERNAL_WINGS = "wings", ORGAN_SLOT_EXTERNAL_TAIL = "tail", ORGAN_SLOT_EXTERNAL_SYNTH_ANTENNA = "ipc_antenna", @@ -152,7 +152,7 @@ else for(var/part in available_selection) LAZYOR(try_hide_mutant_parts, part) - update_mutant_bodyparts() + update_body_parts() return // Dont open the radial automatically just for one button @@ -161,7 +161,7 @@ // If 'reveal all' is our only option just do it if(!re_do && (("reveal all" in available_selection) && (length(available_selection) == 1))) LAZYNULL(try_hide_mutant_parts) - update_mutant_bodyparts() + update_body_parts() return // Radial rendering @@ -184,7 +184,7 @@ if(pick == "reveal all") to_chat(usr, span_notice("You are no longer trying to hide your mutant parts.")) LAZYNULL(try_hide_mutant_parts) - update_mutant_bodyparts() + update_body_parts() return else if(pick in try_hide_mutant_parts) @@ -193,7 +193,7 @@ else to_chat(usr, span_notice("You are now trying to hide your [pick].")) LAZYOR(try_hide_mutant_parts, pick) - update_mutant_bodyparts() + update_body_parts() // automatically re-do the menu after making a selection mutant_part_visibility(re_do = TRUE) 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 3b7e8c86c07..78d9ee3151a 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 @@ -194,7 +194,6 @@ GLOBAL_LIST_EMPTY(customizable_races) species_human.overlays_standing[BODY_LAYER] = standing species_human.apply_overlay(BODY_LAYER) - handle_mutant_bodyparts(species_human) /datum/species/spec_stun(mob/living/carbon/human/target, amount) if(istype(target)) @@ -216,7 +215,18 @@ GLOBAL_LIST_EMPTY(customizable_races) var/obj/item/organ/current_organ = target.get_organ_by_type(mutant_accessory.organ_type) if(!current_organ || replace_current) - var/obj/item/organ/replacement = SSwardrobe.provide_type(mutant_accessory.organ_type) + var/organ_slot = mutant_accessory.organ_type::slot + var/obj/item/organ/current_organ_in_slot = target.get_organ_slot(organ_slot) + var/obj/item/organ/replacement + + // If the current organ in that slot should override the replacement because it's a special organ for this species, + // force it to be the replacement organ. + if(current_organ_in_slot?.overrides_sprite_datum_organ_type && istype(current_organ_in_slot, get_mutant_organ_type_for_slot(organ_slot))) + replacement = SSwardrobe.provide_type(current_organ_in_slot.type) + + else + replacement = SSwardrobe.provide_type(mutant_accessory.organ_type) + replacement.sprite_accessory_flags = mutant_accessory.flags_for_organ replacement.relevant_layers = mutant_accessory.relevent_layers diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage/hemophage_tumor.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage/hemophage_tumor.dm index 633dc304927..c715333654c 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage/hemophage_tumor.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage/hemophage_tumor.dm @@ -25,7 +25,7 @@ var/bloodloss_rate = NORMAL_BLOOD_DRAIN -/obj/item/organ/internal/heart/hemophage/Insert(mob/living/carbon/tumorful, special, movement_flags) +/obj/item/organ/internal/heart/hemophage/mob_insert(mob/living/carbon/tumorful, special, movement_flags) . = ..() if(!. || !owner) return @@ -35,7 +35,7 @@ RegisterSignal(tumorful, COMSIG_MOB_GET_STATUS_TAB_ITEMS, PROC_REF(get_status_tab_item)) -/obj/item/organ/internal/heart/hemophage/Remove(mob/living/carbon/tumorless, special = FALSE) +/obj/item/organ/internal/heart/hemophage/mob_remove(mob/living/carbon/tumorless, special = FALSE) . = ..() SEND_SIGNAL(tumorless, COMSIG_PULSATING_TUMOR_REMOVED, tumorless) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/lizard.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/lizard.dm index 7ca2a6b8e52..f2b938b7e47 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/lizard.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/lizard.dm @@ -1,6 +1,6 @@ /datum/species/lizard mutant_bodyparts = list() - external_organs = list() + mutant_organs = list() payday_modifier = 1.0 /datum/species/lizard/get_default_mutant_bodyparts() diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/xeno.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/xeno.dm index 8d783f08ccb..ba764842d7d 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/xeno.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/xeno.dm @@ -22,7 +22,6 @@ exotic_blood = /datum/reagent/toxin/acid heatmod = 2.5 mutant_bodyparts = list() - external_organs = list() payday_modifier = 1.0 changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT bodypart_overrides = list( diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm b/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm index 9bfa8f9df0e..c8796f831b7 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm @@ -1,29 +1,25 @@ /obj/item/organ/internal/ears/mutant - name = "fluffy ears" - icon = 'icons/obj/clothing/head/costume.dmi' - icon_state = "kitty" - -/obj/item/organ/internal/ears/cat - -/obj/item/organ/internal/ears/fox -/obj/item/organ/external/ears name = "fluffy ears" desc = "Wait, there's two pairs of these?" icon = 'icons/obj/clothing/head/costume.dmi' icon_state = "kitty" - mutantpart_key = "ears" - mutantpart_info = list(MUTANT_INDEX_NAME = "Cat", MUTANT_INDEX_COLOR_LIST = list("#FFAA00")) - - zone = BODY_ZONE_HEAD - slot = ORGAN_SLOT_EXTERNAL_EARS - bodypart_overlay = /datum/bodypart_overlay/mutant/ears +/obj/item/organ/internal/ears/cat + +/obj/item/organ/internal/ears/fox + /datum/bodypart_overlay/mutant/ears feature_key = "ears" layers = EXTERNAL_FRONT | EXTERNAL_ADJACENT | EXTERNAL_BEHIND color_source = ORGAN_COLOR_OVERRIDE +/datum/bodypart_overlay/mutant/ears/set_appearance_from_name(accessory_name) + if(!accessory_name) + accessory_name = "None" // Just to deal with the edge cases where there's some that wouldn't have an actual base appearance, since ears don't always need a visual component, but we have to proceed like this due to the unfortunate nature of this system. + + return ..() + /datum/bodypart_overlay/mutant/ears/override_color(rgb_value) return draw_color diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/organ.dm b/modular_skyrat/modules/customization/modules/surgery/organs/organ.dm index 2e07455af7b..f15b09e9a77 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/organ.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/organ.dm @@ -16,6 +16,13 @@ if(mutantpart_key) color = mutantpart_info[MUTANT_INDEX_COLOR_LIST][1] +/obj/item/organ/external/Remove(mob/living/carbon/organ_owner, special, movement_flags) + // NOVA EDIT ADDITION START + if(mutantpart_key) + transfer_mutantpart_info(organ_owner, special) + // NOVA EDIT ADDITION END + return ..() + /// Copies the organ's mutantpart_info to the owner's mutant_bodyparts /obj/item/organ/external/proc/copy_to_mutant_bodyparts(mob/living/carbon/organ_owner, special) var/mob/living/carbon/human/human_owner = organ_owner diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/tails.dm b/modular_skyrat/modules/customization/modules/surgery/organs/tails.dm index 4ce1e2ff72f..ab00f728f8f 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/tails.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/tails.dm @@ -41,7 +41,7 @@ return TRUE -/obj/item/organ/external/tail/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/tail/mob_insert(mob/living/carbon/receiver, special, movement_flags) if(sprite_accessory_flags & SPRITE_ACCESSORY_WAG_ABLE) wag_flags |= WAG_ABLE return ..() diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm index 924ccd82df1..5c1494dc31a 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm @@ -105,7 +105,7 @@ return SSaccessories.sprite_accessories["taur"] -/obj/item/organ/external/taur_body/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/external/taur_body/mob_insert(mob/living/carbon/receiver, special, movement_flags) if(sprite_accessory_flags & SPRITE_ACCESSORY_HIDE_SHOES) external_bodyshapes |= BODYSHAPE_HIDE_SHOES @@ -144,7 +144,7 @@ return ..() -/obj/item/organ/external/taur_body/Remove(mob/living/carbon/organ_owner, special, moving) +/obj/item/organ/external/taur_body/mob_remove(mob/living/carbon/organ_owner, special, moving) if(QDELETED(owner)) return ..() diff --git a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm index 886db5b8e3e..73451dbfbb5 100644 --- a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm +++ b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm @@ -96,7 +96,7 @@ user.owned_turf.dir = user.dir if(ishuman(user)) - human_user.update_mutant_bodyparts() + human_user.update_body_parts() var/list/DNA_trail = list("shoeprint", "footprint", "pawprint", "hoofprint", "clawprint") if(current_turf in DNA_trail) //These turfs leave clues of their owner diff --git a/modular_skyrat/modules/emotes/code/additionalemotes/turf_list.dm b/modular_skyrat/modules/emotes/code/additionalemotes/turf_list.dm index 55bd779f9e4..2f3e048f6e8 100644 --- a/modular_skyrat/modules/emotes/code/additionalemotes/turf_list.dm +++ b/modular_skyrat/modules/emotes/code/additionalemotes/turf_list.dm @@ -181,6 +181,6 @@ if(ishuman(user)) var/mob/living/carbon/human/human_user = user - human_user.update_mutant_bodyparts() + human_user.update_body_parts() #undef EXTRA_ABOVE_MOB_LAYER diff --git a/modular_skyrat/modules/modular_implants/code/nifs.dm b/modular_skyrat/modules/modular_implants/code/nifs.dm index 5fba0c6a353..161d5c8d3e2 100644 --- a/modular_skyrat/modules/modular_implants/code/nifs.dm +++ b/modular_skyrat/modules/modular_implants/code/nifs.dm @@ -126,7 +126,7 @@ QDEL_LIST(loaded_nifsofts) return ..() -/obj/item/organ/internal/cyberimp/brain/nif/Insert(mob/living/carbon/human/insertee, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/cyberimp/brain/nif/mob_insert(mob/living/carbon/human/insertee, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() if(linked_mob && stored_ckey != insertee.ckey && theft_protection) @@ -153,7 +153,7 @@ send_message("Loading preinstalled and stored NIFSofts, please wait...") addtimer(CALLBACK(src, PROC_REF(install_preinstalled_nifsofts)), 3 SECONDS) -/obj/item/organ/internal/cyberimp/brain/nif/Remove(mob/living/carbon/organ_owner, special = FALSE) +/obj/item/organ/internal/cyberimp/brain/nif/mob_remove(mob/living/carbon/organ_owner, special = FALSE) . = ..() organ_owner.log_message("'s [src] was removed from [organ_owner]", LOG_GAME) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_helpers/human.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_helpers/human.dm index d38656878af..2bdeb8b5974 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_helpers/human.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_helpers/human.dm @@ -271,7 +271,7 @@ overlays_standing[VAGINA_LAYER] = vagina_overlay apply_overlay(VAGINA_LAYER) - update_mutant_bodyparts() + update_body_parts() /// Updating anus slot /mob/living/carbon/human/proc/update_inv_anus() @@ -295,7 +295,7 @@ overlays_standing[ANUS_LAYER] = anus_overlay apply_overlay(ANUS_LAYER) - update_mutant_bodyparts() + update_body_parts() /// Updating nipples slot /mob/living/carbon/human/proc/update_inv_nipples() @@ -319,7 +319,7 @@ overlays_standing[NIPPLES_LAYER] = nipples_overlay apply_overlay(NIPPLES_LAYER) - update_mutant_bodyparts() + update_body_parts() /// Updating penis slot /mob/living/carbon/human/proc/update_inv_penis() @@ -343,7 +343,7 @@ overlays_standing[PENIS_LAYER] = penis_overlay apply_overlay(PENIS_LAYER) - update_mutant_bodyparts() + update_body_parts() /// Helper proc for calling all the lewd slot update_inv_ procs. /mob/living/carbon/human/proc/update_inv_lewd() diff --git a/modular_skyrat/modules/organs/code/ears.dm b/modular_skyrat/modules/organs/code/ears.dm index 462d3153c09..6a706d132cc 100644 --- a/modular_skyrat/modules/organs/code/ears.dm +++ b/modular_skyrat/modules/organs/code/ears.dm @@ -3,6 +3,8 @@ desc = "A set of four long rabbit-like ears, a Teshari's main tool while hunting. Naturally extremely sensitive to loud sounds." damage_multiplier = 1.5 actions_types = list(/datum/action/cooldown/spell/teshari_hearing) + overrides_sprite_datum_organ_type = TRUE + bodypart_overlay = /datum/bodypart_overlay/mutant/ears /obj/item/organ/internal/ears/teshari/on_mob_remove(mob/living/carbon/ear_owner) . = ..() diff --git a/modular_skyrat/modules/organs/code/tongue.dm b/modular_skyrat/modules/organs/code/tongue.dm index cb597bfc3c5..bf6580daec6 100644 --- a/modular_skyrat/modules/organs/code/tongue.dm +++ b/modular_skyrat/modules/organs/code/tongue.dm @@ -12,29 +12,29 @@ icon_state = "tongue" modifies_speech = TRUE -/obj/item/organ/internal/tongue/dog/Insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/tongue/dog/mob_insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() signer.verb_ask = "arfs" signer.verb_exclaim = "wans" signer.verb_whisper = "whimpers" signer.verb_yell = "barks" -/obj/item/organ/internal/tongue/dog/Remove(mob/living/carbon/speaker, special = FALSE) - ..() +/obj/item/organ/internal/tongue/dog/mob_remove(mob/living/carbon/speaker, special = FALSE) + . = ..() speaker.verb_ask = initial(verb_ask) speaker.verb_exclaim = initial(verb_exclaim) speaker.verb_whisper = initial(verb_whisper) speaker.verb_sing = initial(verb_sing) speaker.verb_yell = initial(verb_yell) -/obj/item/organ/internal/tongue/cat/Insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/tongue/cat/mob_insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() signer.verb_ask = "mrrps" signer.verb_exclaim = "mrrowls" signer.verb_whisper = "purrs" signer.verb_yell = "yowls" -/obj/item/organ/internal/tongue/cat/Remove(mob/living/carbon/speaker, special = FALSE) +/obj/item/organ/internal/tongue/cat/mob_remove(mob/living/carbon/speaker, special = FALSE) . = ..() speaker.verb_ask = initial(verb_ask) speaker.verb_exclaim = initial(verb_exclaim) @@ -48,14 +48,14 @@ icon_state = "tongue" modifies_speech = TRUE -/obj/item/organ/internal/tongue/avian/Insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) +/obj/item/organ/internal/tongue/avian/mob_insert(mob/living/carbon/signer, special = FALSE, movement_flags = DELETE_IF_REPLACED) . = ..() signer.verb_ask = "peeps" signer.verb_exclaim = "squawks" signer.verb_whisper = "murmurs" signer.verb_yell = "shrieks" -/obj/item/organ/internal/tongue/avian/Remove(mob/living/carbon/speaker, special = FALSE) +/obj/item/organ/internal/tongue/avian/mob_remove(mob/living/carbon/speaker, special = FALSE) . = ..() speaker.verb_ask = initial(verb_ask) speaker.verb_exclaim = initial(verb_exclaim) diff --git a/modular_skyrat/modules/primitive_catgirls/code/species.dm b/modular_skyrat/modules/primitive_catgirls/code/species.dm index d0b0f5cbaac..9ae49a3dd98 100644 --- a/modular_skyrat/modules/primitive_catgirls/code/species.dm +++ b/modular_skyrat/modules/primitive_catgirls/code/species.dm @@ -70,7 +70,7 @@ human_for_preview.dna.species.mutant_bodyparts["tail"] = list(MUTANT_INDEX_NAME = "Cat", MUTANT_INDEX_COLOR_LIST = list(human_for_preview.hair_color)) human_for_preview.dna.species.mutant_bodyparts["ears"] = list(MUTANT_INDEX_NAME = "Cat", MUTANT_INDEX_COLOR_LIST = list(human_for_preview.hair_color)) - human_for_preview.update_mutant_bodyparts() + human_for_preview.update_body_parts() human_for_preview.update_body(is_creating = TRUE) /datum/species/human/felinid/primitive/get_species_description() diff --git a/modular_skyrat/modules/synths/code/bodyparts/ears.dm b/modular_skyrat/modules/synths/code/bodyparts/ears.dm index 8a35e693c5c..0525baa7a01 100644 --- a/modular_skyrat/modules/synths/code/bodyparts/ears.dm +++ b/modular_skyrat/modules/synths/code/bodyparts/ears.dm @@ -8,6 +8,8 @@ gender = PLURAL maxHealth = 1 * STANDARD_ORGAN_THRESHOLD organ_flags = ORGAN_ROBOTIC + overrides_sprite_datum_organ_type = TRUE + bodypart_overlay = /datum/bodypart_overlay/mutant/ears /obj/item/organ/internal/ears/synth/emp_act(severity) . = ..() diff --git a/modular_skyrat/modules/synths/code/bodyparts/stomach.dm b/modular_skyrat/modules/synths/code/bodyparts/stomach.dm index 71fd2f27d48..b5d9fad2e12 100644 --- a/modular_skyrat/modules/synths/code/bodyparts/stomach.dm +++ b/modular_skyrat/modules/synths/code/bodyparts/stomach.dm @@ -47,11 +47,11 @@ ) departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_SCIENCE -/obj/item/organ/internal/stomach/synth/Insert(mob/living/carbon/receiver, special, movement_flags) +/obj/item/organ/internal/stomach/synth/mob_insert(mob/living/carbon/receiver, special, movement_flags) . = ..() RegisterSignal(receiver, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, PROC_REF(on_borg_charge)) -/obj/item/organ/internal/stomach/synth/Remove(mob/living/carbon/stomach_owner, special) +/obj/item/organ/internal/stomach/synth/mob_remove(mob/living/carbon/stomach_owner, special) . = ..() UnregisterSignal(stomach_owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT) diff --git a/modular_skyrat/modules/synths/code/species/synthetic.dm b/modular_skyrat/modules/synths/code/species/synthetic.dm index a4f324318f9..6d526b07f36 100644 --- a/modular_skyrat/modules/synths/code/species/synthetic.dm +++ b/modular_skyrat/modules/synths/code/species/synthetic.dm @@ -23,7 +23,7 @@ reagent_flags = PROCESS_SYNTHETIC payday_modifier = 1.0 // Matches the rest of the pay penalties the non-human crew have species_language_holder = /datum/language_holder/machine - mutant_organs = list(/obj/item/organ/internal/cyberimp/arm/power_cord) + mutant_organs = list(/obj/item/organ/internal/cyberimp/arm/power_cord/left_arm) mutantbrain = /obj/item/organ/internal/brain/synth mutantstomach = /obj/item/organ/internal/stomach/synth mutantears = /obj/item/organ/internal/ears/synth diff --git a/modular_skyrat/modules/taur_mechanics/code/constrict.dm b/modular_skyrat/modules/taur_mechanics/code/constrict.dm index 0172b1bfee0..2ca443ba106 100644 --- a/modular_skyrat/modules/taur_mechanics/code/constrict.dm +++ b/modular_skyrat/modules/taur_mechanics/code/constrict.dm @@ -202,7 +202,7 @@ var/mob/living/carbon/human/old_owner = owner set_owner(null) - old_owner?.update_mutant_bodyparts() + old_owner?.update_body_parts() tail_overlay = null return ..() @@ -521,7 +521,7 @@ RegisterSignal(owner, COMSIG_LIVING_TRY_PULL, PROC_REF(owner_tried_pull)) RegisterSignal(owner, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(owner_body_position_changed)) RegisterSignal(owner, COMSIG_ATOM_POST_DIR_CHANGE, PROC_REF(sync_direction)) - owner?.update_mutant_bodyparts() + owner?.update_body_parts() /// The time it takes for a constricted thing to do a break-out attempt. #define SERPENTINE_TAIL_UNBUCKLE_TIME 0.5 SECONDS // arbitrary diff --git a/tgstation.dme b/tgstation.dme index 22a4dc32d37..2fd04898031 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6212,7 +6212,7 @@ #include "code\modules\surgery\organs\autosurgeon.dm" #include "code\modules\surgery\organs\helpers.dm" #include "code\modules\surgery\organs\organ_movement.dm" -#include "code\modules\surgery\organs\external\_external_organ.dm" +#include "code\modules\surgery\organs\external\_visual_organs.dm" #include "code\modules\surgery\organs\external\restyling.dm" #include "code\modules\surgery\organs\external\spines.dm" #include "code\modules\surgery\organs\external\tails.dm" @@ -6953,6 +6953,7 @@ #include "modular_skyrat\master_files\code\modules\surgery\surgery.dm" #include "modular_skyrat\master_files\code\modules\surgery\bodyparts\_bodyparts.dm" #include "modular_skyrat\master_files\code\modules\surgery\bodyparts\robot_bodyparts.dm" +#include "modular_skyrat\master_files\code\modules\surgery\organs\_organ.dm" #include "modular_skyrat\master_files\code\modules\surgery\organs\tongue.dm" #include "modular_skyrat\master_files\code\modules\surgery\organs\external\wings\functional_wings.dm" #include "modular_skyrat\master_files\code\modules\surgery\organs\external\wings\wings.dm"