From 9cec1c732fb1497237f33c2960ab0700f2ebb4c7 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 4 Aug 2026 12:00:41 -0400 Subject: [PATCH] The Great dna.features["body_size"] Killing (#6042) ## About The Pull Request Kills every instance of the body_size feature and changes everything to use current_size, RESIZE_DEFAULT_SIZE, and update_transform. Also cleans up oversized code big time. The only player-facing change from this is that the oversized specific organs are now gone. ## Why It's Good For The Game The oversized code was a mess and having snowflakey features when the proc and such already exists caused me pain. ## Proof Of Testing See below.
Screenshots/Videos https://github.com/user-attachments/assets/017fb9e3-aef9-48ce-a64e-b24a99ae49eb https://github.com/user-attachments/assets/4cdaa48c-0237-4447-a943-cabb222be25b https://github.com/user-attachments/assets/3bab0b0c-5098-4d51-b77e-994e21bcf87e
## Changelog :cl: del: Removed the oversized specific organs. /:cl: --- code/__DEFINES/~~bubber_defines/DNA.dm | 5 -- code/datums/dna/dna.dm | 3 - code/datums/mutations/body.dm | 8 +-- code/modules/client/preferences.dm | 2 +- code/modules/client/preferences/species.dm | 2 - .../master_files/code/game/atoms.dm | 5 +- .../modules/client/preferences/body_size.dm | 8 +-- .../code/additionalemotes/turf_emote.dm | 2 +- .../lewd_items/code/lewd_items/size_items.dm | 8 +-- .../code/gun_launches_little_guys_element.dm | 2 +- modular_skyrat/modules/organs/code/stomach.dm | 15 ----- modular_zubbers/code/datums/dna/dna.dm | 16 +---- .../datums/quirks/negative_quirks/micro.dm | 4 +- .../oversized/oversized_quirk.dm | 60 +++++++------------ .../code/modules/clothing/clothing.dm | 7 +-- .../carbon/human/species_types/slimepeople.dm | 14 +++-- .../modules/taur_mechanics/constrict.dm | 2 +- .../modules/taur_mechanics/taur_body.dm | 2 +- tgstation.dme | 1 - 19 files changed, 50 insertions(+), 116 deletions(-) delete mode 100644 modular_skyrat/modules/organs/code/stomach.dm diff --git a/code/__DEFINES/~~bubber_defines/DNA.dm b/code/__DEFINES/~~bubber_defines/DNA.dm index 437935a1feb..01a68991026 100644 --- a/code/__DEFINES/~~bubber_defines/DNA.dm +++ b/code/__DEFINES/~~bubber_defines/DNA.dm @@ -65,10 +65,6 @@ #define MAXIMUM_MARKINGS_PER_LIMB 3 -#define BODY_SIZE_NORMAL 1.00 -#define BODY_SIZE_MAX 1.5 -#define BODY_SIZE_MIN 0.8 - //In inches #define PENIS_MIN_GIRTH PENIS_MIN_LENGTH #define PENIS_MAX_GIRTH 40 @@ -105,7 +101,6 @@ "penis_taur_mode" = TRUE,\ "penis_sheath" = SHEATH_NONE,\ "balls_size" = 1,\ - "body_size" = BODY_SIZE_NORMAL,\ "custom_species" = "",\ "penis_uses_skintones" = TRUE,\ "penis_uses_skincolor" = TRUE,\ diff --git a/code/datums/dna/dna.dm b/code/datums/dna/dna.dm index adffef7a8d2..fa217b2aa6a 100644 --- a/code/datums/dna/dna.dm +++ b/code/datums/dna/dna.dm @@ -92,7 +92,6 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) //BUBBER EDIT ADDITION BEGIN - CUSTOMIZATION new_dna.mutant_bodyparts = LAZYCOPY(mutant_bodyparts) new_dna.body_markings = body_markings.Copy() - new_dna.update_body_size() //BUBBER EDIT ADDITION END new_dna.temporary_mutations = LAZYLISTDUPLICATE(temporary_mutations) new_dna.mutation_index = mutation_index @@ -443,8 +442,6 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) apply_customizable_dna_features_to_species() dna.unique_features = dna.generate_unique_features() - - dna.update_body_size() // BUBBER EDIT ADDITION END dna.species.on_species_gain(src, old_species, pref_load, icon_update, replace_missing) log_mob_tag("TAG: [tag] SPECIES: [key_name(src)] \[[mrace]\]") diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index f587e85dd60..2cbb0e8070c 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -127,7 +127,7 @@ if(!.) return // SKYRAT EDIT BEGIN - if(owner.dna.features["body_size"] < 1 || isteshari(owner)) + if(owner.current_size < 1 || isteshari(owner)) to_chat(owner, "You feel your body try to shrink, but your organs don't! Uh oh!") owner.adjust_brute_loss(25) return @@ -139,7 +139,7 @@ if(..()) return // SKYRAT EDIT BEGIN - if(owner.dna.features["body_size"] < 1 || isteshari(owner)) + if(owner.current_size < 1 || isteshari(owner)) to_chat(owner, "You feel relief as your organs cease to strain against your insides.") REMOVE_TRAIT(owner, TRAIT_DWARF, GENETIC_MUTATION) return @@ -198,7 +198,7 @@ if(!.) return // SKYRAT EDIT BEGIN - if(owner.dna.features["body_size"] > 1) + if(owner.current_size > 1) to_chat(owner, "You feel your body expanding even further, but it feels like your bones are expanding too much!") owner.adjust_brute_loss(25) // take some DAMAGE return @@ -211,7 +211,7 @@ if(..()) return // SKYRAT EDIT BEGIN - if(owner.dna.features["body_size"] > 1) + if(owner.current_size > 1) to_chat(owner, "You feel relief as your bones cease their growth spurt.") return // SKYRAT EDIT END diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f82eb76a623..1e71c549379 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -512,7 +512,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) // Being a taur, or over 1.1 scales it up if (body.dna.mutant_bodyparts[FEATURE_TAUR] && body.dna.mutant_bodyparts[FEATURE_TAUR][MUTANT_INDEX_NAME] != "None") canvas_size = 1 - else if (!isnull(body.dna.features["body_size"]) && body.dna.features["body_size"] > 1.1) + else if (!isnull(body.current_size) && body.current_size > 1.1) canvas_size = 1 // Add extra level if we're oversized if (preferences.all_quirks.Find("Oversized")) diff --git a/code/modules/client/preferences/species.dm b/code/modules/client/preferences/species.dm index 4bf5c7aabc0..a008c5cd8ce 100644 --- a/code/modules/client/preferences/species.dm +++ b/code/modules/client/preferences/species.dm @@ -35,8 +35,6 @@ target.set_species(value, icon_update = FALSE, pref_load = FALSE, override_features = prefs?.features.Copy(), override_mutantparts = prefs?.mutant_bodyparts.Copy(), override_markings = prefs?.body_markings.Copy()) // SKYRAT EDIT - Customization //SKYRAT EDIT ADDITION - target.dna.update_body_size() - for(var/organ_key in list(ORGAN_SLOT_VAGINA, ORGAN_SLOT_PENIS, ORGAN_SLOT_BREASTS, ORGAN_SLOT_ANUS)) var/obj/item/organ/genital/gent = target.get_organ_slot(organ_key) if(gent) diff --git a/modular_skyrat/master_files/code/game/atoms.dm b/modular_skyrat/master_files/code/game/atoms.dm index 0c7510d5b89..67c2a5fb841 100644 --- a/modular_skyrat/master_files/code/game/atoms.dm +++ b/modular_skyrat/master_files/code/game/atoms.dm @@ -1,4 +1,4 @@ -// Stop All Animations nulls the mob's transform, so we have to call update_body_size to ensure that it gets scaled properly again +// Stop All Animations nulls the mob's transform. /atom/vv_do_topic(list/href_list) . = ..() if(href_list[VV_HK_STOP_ALL_ANIMATIONS] && check_rights(R_VAREDIT)) @@ -6,9 +6,6 @@ if(!istype(human_mob)) return - human_mob.dna.current_body_size = BODY_SIZE_NORMAL // because if we don't set this, update_body_size will think that it has no work to do. - human_mob.dna.update_body_size() - /// Called after a loadout item gets custom named /atom/proc/on_loadout_custom_named() return diff --git a/modular_skyrat/master_files/code/modules/client/preferences/body_size.dm b/modular_skyrat/master_files/code/modules/client/preferences/body_size.dm index afb8364f20c..c70e63dbb30 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/body_size.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/body_size.dm @@ -2,8 +2,8 @@ category = PREFERENCE_CATEGORY_SECONDARY_FEATURES savefile_identifier = PREFERENCE_CHARACTER savefile_key = "body_size" - minimum = BODY_SIZE_MIN - maximum = BODY_SIZE_MAX + minimum = RESIZE_DEFAULT_SIZE * 0.8 + maximum = RESIZE_DEFAULT_SIZE * 1.5 step = 0.01 /datum/preference/numeric/body_size/is_accessible(datum/preferences/preferences) @@ -11,7 +11,7 @@ return passed_initial_check /datum/preference/numeric/body_size/apply_to_human(mob/living/carbon/human/target, value) - target.dna.features["body_size"] = value + target.update_transform(value) /datum/preference/numeric/body_size/create_default_value() - return BODY_SIZE_NORMAL + return RESIZE_DEFAULT_SIZE diff --git a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm index 5d74a64471c..f032267be35 100644 --- a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm +++ b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm @@ -147,7 +147,7 @@ //scaling var/atom/movable/owned_turf = user.owned_turf - var/change_multiplier = human_user.dna.features["body_size"] / BODY_SIZE_NORMAL + var/change_multiplier = human_user.current_size / RESIZE_DEFAULT_SIZE var/translate = ((change_multiplier-1) * 32)/2 owned_turf.transform = owned_turf.transform.Scale(change_multiplier) owned_turf.transform = owned_turf.transform.Translate(0, translate) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm index 3c6216d98ee..07a5d570838 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm @@ -83,7 +83,7 @@ return COMPONENT_INCOMPATIBLE var/mob/living/carbon/human/human_parent = parent - original_size = human_parent?.dna.features["body_size"] + original_size = human_parent.mob_size if(!original_size) //If we aren't able to get the original size, we shouldn't exist. return COMPONENT_INCOMPATIBLE @@ -106,15 +106,13 @@ /// Adjusts the sprite size of the parent mob based off `size_to_apply`. /datum/component/temporary_size/proc/apply_size(size_to_apply) var/mob/living/carbon/human/human_parent = parent - if(!human_parent || !size_to_apply || (human_parent.dna.features["body_size"] == size_to_apply)) + if(!human_parent || !size_to_apply || (human_parent.current_size == size_to_apply)) return FALSE if(isteshari(human_parent) || isvoxprimalis(human_parent)) // We check if the human_parent is a Vox Primalis or Teshari & temporarily disable the bodysize restriction human_parent.dna.species.body_size_restricted = FALSE - human_parent.dna.features["body_size"] = size_to_apply - human_parent.maptext_height = 32 * human_parent.dna.features["body_size"] - human_parent.dna.update_body_size() + human_parent.update_transform(size_to_apply) return TRUE /datum/component/temporary_size/Destroy(force, silent) diff --git a/modular_skyrat/modules/modular_weapons/code/gun_launches_little_guys_element.dm b/modular_skyrat/modules/modular_weapons/code/gun_launches_little_guys_element.dm index b049ed04e15..23b0e694969 100644 --- a/modular_skyrat/modules/modular_weapons/code/gun_launches_little_guys_element.dm +++ b/modular_skyrat/modules/modular_weapons/code/gun_launches_little_guys_element.dm @@ -40,7 +40,7 @@ /datum/element/gun_launches_little_guys/proc/throw_it_back(obj/item/gun/weapon, mob/living/carbon/user, atom/target, params, zone_override) SIGNAL_HANDLER - if(!isteshari(user) && !isdwarf(user) && !HAS_TRAIT(user, TRAIT_DWARF) && !(user.dna.features["body_size"] <= 0.9)) + if(!isteshari(user) && !isdwarf(user) && !HAS_TRAIT(user, TRAIT_DWARF) && !(user.current_size <= 0.9)) return var/fling_direction = REVERSE_DIR(user.dir) diff --git a/modular_skyrat/modules/organs/code/stomach.dm b/modular_skyrat/modules/organs/code/stomach.dm deleted file mode 100644 index f282222090a..00000000000 --- a/modular_skyrat/modules/organs/code/stomach.dm +++ /dev/null @@ -1,15 +0,0 @@ -/obj/item/organ/stomach/oversized - name = "huge guts" - desc = "Typically found in huge creatures, this monstrous engine has developed to be highly efficient, made to get an enormous amount of nutrients to an enormous eater." - icon = 'modular_skyrat/modules/organs/icons/stomach.dmi' - icon_state = "stomach_big" - maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD - metabolism_efficiency = 0.07 - -/obj/item/organ/stomach/synth/oversized - name = "huge synthetic bio-reactor" - desc = "Typically found in huge synthetics, this monstrous engine has been developed to be highly efficient, made to provide an enormous amount of power to an enormous machine." - icon = 'modular_skyrat/modules/organs/icons/stomach.dmi' - icon_state = "stomach_big_synth" //ugly placeholder sorry im not an artist hehe - maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD - metabolism_efficiency = 0.07 diff --git a/modular_zubbers/code/datums/dna/dna.dm b/modular_zubbers/code/datums/dna/dna.dm index 7c336fcccc7..0152b419fd0 100644 --- a/modular_zubbers/code/datums/dna/dna.dm +++ b/modular_zubbers/code/datums/dna/dna.dm @@ -4,21 +4,7 @@ ///Body markings of the DNA's owner. This is for storing their original state for re-creating the character. They'll get changed on species mutation var/list/list/body_markings = list() ///Current body size, used for proper re-sizing and keeping track of that - var/current_body_size = BODY_SIZE_NORMAL - -/datum/dna/proc/update_body_size() - if(!holder || species.body_size_restricted || current_body_size == features["body_size"]) - return - var/change_multiplier = features["body_size"] / current_body_size - //We update the translation to make sure our character doesn't go out of the southern bounds of the tile - var/translate = ((change_multiplier-1) * 32)/2 - holder.transform = holder.transform.Scale(change_multiplier) - // Splits the updated translation into X and Y based on the user's rotation. - var/translate_x = translate * ( holder.transform.b / features["body_size"] ) - var/translate_y = translate * ( holder.transform.e / features["body_size"] ) - holder.transform = holder.transform.Translate(translate_x, translate_y) - holder.maptext_height = 32 * features["body_size"] // Adjust runechat height - current_body_size = features["body_size"] + var/current_body_size = RESIZE_DEFAULT_SIZE /mob/living/carbon/proc/apply_customizable_dna_features_to_species() if(!has_dna()) diff --git a/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm b/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm index ace0760a3a9..6174f6b02a9 100644 --- a/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm +++ b/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm @@ -36,9 +36,7 @@ /datum/quirk/micro/post_add() var/mob/living/carbon/living_as_carbon = quirk_holder - living_as_carbon.dna.features["body_size"] = size_reduced - living_as_carbon.maptext_height = 32 * living_as_carbon.dna.features["body_size"] - living_as_carbon.dna.update_body_size() + living_as_carbon.update_transform(size_reduced) living_as_carbon.AddComponent( \ /datum/component/squashable, \ squash_chance = squash_chance_, \ diff --git a/modular_zubbers/code/datums/quirks/neutral_quirks/oversized/oversized_quirk.dm b/modular_zubbers/code/datums/quirks/neutral_quirks/oversized/oversized_quirk.dm index 68a44b3aa20..93716fa2555 100644 --- a/modular_zubbers/code/datums/quirks/neutral_quirks/oversized/oversized_quirk.dm +++ b/modular_zubbers/code/datums/quirks/neutral_quirks/oversized/oversized_quirk.dm @@ -1,8 +1,7 @@ #define OVERSIZED_SPEED_SLOWDOWN 0.25 +/// 50% hungrier #define OVERSIZED_HUNGER_MOD 1.5 -// Before making any changes to oversized, please see the module's readme.md file - /datum/quirk/oversized name = "Oversized" desc = "You, for whatever reason, are FAR too tall, and will encounter some rough situations because of it." @@ -18,9 +17,7 @@ /datum/quirk/oversized/add(client/client_source) var/mob/living/carbon/human/human_holder = quirk_holder - human_holder.dna.features["body_size"] = 2 - human_holder.maptext_height = 32 * human_holder.dna.features["body_size"] //Adjust runechat height - human_holder.dna.update_body_size() + human_holder.update_transform(2 * RESIZE_DEFAULT_SIZE) human_holder.maxHealth = HUMAN_MAXHEALTH * OVERSIZED_HEALTH_BUFF human_holder.health += ((HUMAN_MAXHEALTH * OVERSIZED_HEALTH_BUFF) - HUMAN_MAXHEALTH) @@ -31,21 +28,12 @@ on_gain_limb(src, bodypart, special = FALSE) human_holder.blood_volume_normal = BLOOD_VOLUME_OVERSIZED - human_holder.physiology.hunger_mod *= OVERSIZED_HUNGER_MOD //50% hungrier + human_holder.physiology.hunger_mod *= OVERSIZED_HUNGER_MOD human_holder.add_movespeed_modifier(/datum/movespeed_modifier/oversized) - var/obj/item/organ/stomach/old_stomach = human_holder.get_organ_slot(ORGAN_SLOT_STOMACH) - if(!istype(old_stomach) || old_stomach.organ_flags & ORGAN_ROBOTIC || old_stomach.organ_traits & TRAIT_NOHUNGER) - return - old_stomach.Remove(human_holder, special = TRUE) - qdel(old_stomach) - if(issynthetic(human_holder)) - var/obj/item/organ/stomach/synth/oversized/new_synth_stomach = new //YOU LOOK HUGE, THAT MUST MEAN YOU HAVE HUGE reactor! RIP AND TEAR YOUR HUGE reactor! - new_synth_stomach.Insert(human_holder, special = TRUE) - to_chat(human_holder, span_warning("You feel your massive engine rumble!")) - else - var/obj/item/organ/stomach/oversized/new_stomach = new //YOU LOOK HUGE, THAT MUST MEAN YOU HAVE HUGE GUTS! RIP AND TEAR YOUR HUGE GUTS! - new_stomach.Insert(human_holder, special = TRUE) - to_chat(human_holder, span_warning("You feel your massive stomach rumble!")) + var/obj/item/organ/stomach/stomach = human_holder.get_organ_slot(ORGAN_SLOT_STOMACH) + if(stomach) + stomach.maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD + stomach.metabolism_efficiency = 0.07 // Grant the self-view action self_view_action = new(human_holder) @@ -53,28 +41,24 @@ /datum/quirk/oversized/remove() var/mob/living/carbon/human/human_holder = quirk_holder - human_holder.dna.features["body_size"] = human_holder?.client?.prefs ?human_holder?.client?.prefs?.read_preference(/datum/preference/numeric/body_size) : 1 - human_holder.maptext_height = 32 * human_holder.dna.features["body_size"] - human_holder.dna.update_body_size() - human_holder.mob_size = MOB_SIZE_HUMAN + var/body_size = human_holder.client?.prefs?.read_preference(/datum/preference/numeric/body_size) + if(body_size && body_size != RESIZE_DEFAULT_SIZE) + human_holder.update_transform(RESIZE_DEFAULT_SIZE / body_size) + else + human_holder.update_transform(RESIZE_DEFAULT_SIZE / human_holder.current_size) human_holder.maxHealth = HUMAN_MAXHEALTH human_holder.health -= ((HUMAN_MAXHEALTH * OVERSIZED_HEALTH_BUFF) - HUMAN_MAXHEALTH) - var/obj/item/bodypart/arm/left/left_arm = human_holder.get_bodypart(BODY_ZONE_L_ARM) - if(left_arm) - left_arm.unarmed_damage_high = initial(left_arm.unarmed_damage_high) + var/obj/item/organ/stomach/stomach = human_holder.get_organ_slot(ORGAN_SLOT_STOMACH) + if(stomach) + stomach.maxHealth = STANDARD_ORGAN_THRESHOLD / 1.5 + stomach.metabolism_efficiency = initial(stomach.metabolism_efficiency) - var/obj/item/bodypart/arm/right/right_arm = human_holder.get_bodypart(BODY_ZONE_R_ARM) - if(right_arm) - right_arm.unarmed_damage_high = initial(right_arm.unarmed_damage_high) + for(var/obj/item/bodypart/arm/arm in human_holder.get_bodyparts()) + arm.unarmed_damage_high = initial(arm.unarmed_damage_high) - var/obj/item/bodypart/leg/left_leg = human_holder.get_bodypart(BODY_ZONE_L_LEG) - if (left_leg) - left_leg.unarmed_effectiveness = initial(left_leg.unarmed_effectiveness) - - var/obj/item/bodypart/leg/right_leg = human_holder.get_bodypart(BODY_ZONE_R_LEG) - if (right_leg) - right_leg.unarmed_effectiveness = initial(right_leg.unarmed_effectiveness) + for(var/obj/item/bodypart/leg/leg in human_holder.get_bodyparts()) + leg.unarmed_effectiveness = initial(leg.unarmed_effectiveness) for(var/obj/item/bodypart/bodypart as anything in human_holder.bodyparts) bodypart.name = replacetext(bodypart.name, "oversized ", "") @@ -101,9 +85,7 @@ var/obj/item/bodypart/arm/new_arm = gained new_arm.unarmed_damage_high = initial(new_arm.unarmed_damage_high) + OVERSIZED_HARM_DAMAGE_BONUS - // Before this, we never actually did anything with Oversized legs. // This brings their unarmed_effectiveness up to 20 from 15, which is on par with mushroom legs. - // Functionally, this makes their prone kicks more accurate and increases the chance of extending prone knockdown... but only while the victim is already prone. else if(istype(gained, /obj/item/bodypart/leg)) var/obj/item/bodypart/leg/new_leg = gained new_leg.unarmed_effectiveness = initial(new_leg.unarmed_effectiveness) + OVERSIZED_KICK_EFFECTIVENESS_BONUS @@ -113,7 +95,5 @@ /datum/movespeed_modifier/oversized multiplicative_slowdown = OVERSIZED_SPEED_SLOWDOWN - #undef OVERSIZED_HUNGER_MOD #undef OVERSIZED_SPEED_SLOWDOWN - diff --git a/modular_zubbers/code/modules/clothing/clothing.dm b/modular_zubbers/code/modules/clothing/clothing.dm index 465d50051f7..6eeb15bb72e 100644 --- a/modular_zubbers/code/modules/clothing/clothing.dm +++ b/modular_zubbers/code/modules/clothing/clothing.dm @@ -9,8 +9,8 @@ resizer.visible_message(span_warning("A flash of purple light engulfs [resizer], before they change to normal!"), span_notice("You feel warm for a moment, before everything scales to your size...")) if(resizer.get_quirk(/datum/quirk/oversized)) resizer.remove_quirk(/datum/quirk/oversized) - resizer.dna.features["body_size"] = RESIZE_DEFAULT_SIZE - resizer.dna.update_body_size() + else + resizer.update_transform(RESIZE_DEFAULT_SIZE / resizer?.client?.prefs?.read_preference(/datum/preference/numeric/body_size)) resizer.normalized = TRUE /// For removing a normalization, and reverting back to normal @@ -23,6 +23,5 @@ if(oversized) resizer.add_quirk(/datum/quirk/oversized, announce = FALSE) if(!resizer.get_quirk(/datum/quirk/oversized)) - resizer.dna.features["body_size"] = resizer?.client?.prefs?.read_preference(/datum/preference/numeric/body_size) - resizer.dna.update_body_size() + resizer.update_transform(resizer?.client?.prefs?.read_preference(/datum/preference/numeric/body_size)) resizer.normalized = FALSE diff --git a/modular_zubbers/code/modules/mob/living/carbon/human/species_types/slimepeople.dm b/modular_zubbers/code/modules/mob/living/carbon/human/species_types/slimepeople.dm index f99a1917d81..ce0e7d51379 100644 --- a/modular_zubbers/code/modules/mob/living/carbon/human/species_types/slimepeople.dm +++ b/modular_zubbers/code/modules/mob/living/carbon/human/species_types/slimepeople.dm @@ -326,11 +326,11 @@ var/new_body_size = tgui_input_number( alterer, - "Choose your desired sprite size: ([BODY_SIZE_MIN * 100]% to [BODY_SIZE_MAX * 100]%). Warning: May make your character look distorted", + "Choose your desired sprite size: ([(RESIZE_DEFAULT_SIZE * 0.8) * 100]% to [(RESIZE_DEFAULT_SIZE * 1.5) * 100]%). Warning: May make your character look distorted", "Size Change", - default = min(alterer.dna.features["body_size"] * 100, BODY_SIZE_MAX * 100), - max_value = BODY_SIZE_MAX * 100, - min_value = BODY_SIZE_MIN * 100, + default = min(alterer.current_size * 100, (RESIZE_DEFAULT_SIZE * 1.5) * 100), + max_value = (RESIZE_DEFAULT_SIZE * 1.5) * 100, + min_value = (RESIZE_DEFAULT_SIZE * 0.8) * 100, ) if(!new_body_size) return @@ -340,8 +340,10 @@ alterer.remove_quirk(/datum/quirk/oversized) new_body_size = new_body_size * 0.01 - alterer.dna.features["body_size"] = new_body_size - alterer.dna.update_body_size() + if(new_body_size == RESIZE_DEFAULT_SIZE) + alterer.update_transform(RESIZE_DEFAULT_SIZE / alterer.current_size) + else + alterer.update_transform(new_body_size) if("Genitals") alter_genitals(alterer) diff --git a/modular_zubbers/modules/taur_mechanics/constrict.dm b/modular_zubbers/modules/taur_mechanics/constrict.dm index 38c7a0690a5..2282c12d2b0 100644 --- a/modular_zubbers/modules/taur_mechanics/constrict.dm +++ b/modular_zubbers/modules/taur_mechanics/constrict.dm @@ -272,7 +272,7 @@ /// Returns the scale, compared to default, our owner has. /obj/structure/serpentine_tail/proc/get_scale_change_mult() - return owner.dna.features["body_size"] / BODY_SIZE_NORMAL + return owner.current_size / RESIZE_DEFAULT_SIZE /// Returns the x shift for anything we constrict. /obj/structure/serpentine_tail/proc/get_constriction_pixel_x_shift() diff --git a/modular_zubbers/modules/taur_mechanics/taur_body.dm b/modular_zubbers/modules/taur_mechanics/taur_body.dm index 42920f67bfe..282bc965123 100644 --- a/modular_zubbers/modules/taur_mechanics/taur_body.dm +++ b/modular_zubbers/modules/taur_mechanics/taur_body.dm @@ -193,7 +193,7 @@ return ..() /obj/item/organ/taur_body/proc/get_riding_offset(oversized = FALSE) - var/size_scaling = (owner.dna.features["body_size"] / BODY_SIZE_NORMAL) - 1 + var/size_scaling = (owner.current_size / RESIZE_DEFAULT_SIZE) - 1 var/scaling_mult = 1 + (size_scaling * riding_offset_scaling_mult) return list( diff --git a/tgstation.dme b/tgstation.dme index d97d7db9071..a451d31842c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8809,7 +8809,6 @@ #include "modular_skyrat\modules\organs\code\liver.dm" #include "modular_skyrat\modules\organs\code\lungs.dm" #include "modular_skyrat\modules\organs\code\organs.dm" -#include "modular_skyrat\modules\organs\code\stomach.dm" #include "modular_skyrat\modules\organs\code\tongue.dm" #include "modular_skyrat\modules\panicbunker\code\panicbunker.dm" #include "modular_skyrat\modules\paycheck_rations\code\quirk.dm"