diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm index db957baead52..190b098f6d2d 100644 --- a/code/modules/surgery/organs/internal/heart/_heart.dm +++ b/code/modules/surgery/organs/internal/heart/_heart.dm @@ -127,7 +127,7 @@ return beating /obj/item/organ/heart/get_status_appendix(advanced, add_tooltips) - var/bpm = get_heart_rate() + var/bpm = get_perceived_heart_rate() . = "[IS_ORGANIC_ORGAN(src) ? "Heart" : "Pulse"] rate: [bpm]" + span_slightly_smaller("bpm") if(bpm <= SLOW_HEARTBEAT_THRESHOLD || bpm >= FAST_HEARTBEAT_THRESHOLD) . = span_alert(.) @@ -299,6 +299,13 @@ return max(0, round(final_amount, 1)) +/// Gets what a person would see as the heart rate, used for things that fake a non-beating heart like fakedeath +/obj/item/organ/heart/proc/get_perceived_heart_rate() + if(HAS_TRAIT(owner, TRAIT_FAKEDEATH)) + return 0 + + return get_heart_rate() + /// Returns the strength of the heart as a multiplier (0 to 1+) /obj/item/organ/heart/proc/get_heart_strength() if(!is_beating() || isnull(owner)) @@ -364,6 +371,8 @@ return rand(7, 9) * 10 /mob/living/carbon/human/get_bpm() + if(HAS_TRAIT(src, TRAIT_FAKEDEATH)) + return 0 var/obj/item/organ/heart/heart = get_organ_by_type(/obj/item/organ/heart) return heart?.last_bpm || 0 @@ -397,6 +406,8 @@ /// Returns the mob's blood pressure range (calculated from average bp with some variance) as a list/tuple of (diastolic pressure, systolic pressure) /mob/living/proc/get_bp_range() + if(HAS_TRAIT(src, TRAIT_FAKEDEATH)) + return list(0, 0) var/avg_blood_pressure = get_bp() var/avg_pulse_pressure = get_pp() @@ -412,7 +423,7 @@ return "" var/bpm_msg = "" - var/bpm = get_heart_rate() + var/bpm = get_perceived_heart_rate() if(bpm <= 0) bpm_msg = span_boldwarning("You don't feel your heart beating!") else if(bpm < SLOW_HEARTBEAT_THRESHOLD) diff --git a/maplestation.dme b/maplestation.dme index 51b8b726e82b..39dc862eb75a 100644 --- a/maplestation.dme +++ b/maplestation.dme @@ -6496,6 +6496,7 @@ #include "maplestation_modules\code\modules\antagonists\advanced_ling\changeling_rebalancing.dm" #include "maplestation_modules\code\modules\antagonists\advanced_ling\changeling_stings.dm" #include "maplestation_modules\code\modules\antagonists\advanced_ling\neutered_ling.dm" +#include "maplestation_modules\code\modules\antagonists\changeling\changeling.dm" #include "maplestation_modules\code\modules\art\statuettes.dm" #include "maplestation_modules\code\modules\cargo\costumes_toys.dm" #include "maplestation_modules\code\modules\cargo\goodies.dm" diff --git a/maplestation_modules/code/modules/antagonists/changeling/changeling.dm b/maplestation_modules/code/modules/antagonists/changeling/changeling.dm new file mode 100644 index 000000000000..2c150ba720f0 --- /dev/null +++ b/maplestation_modules/code/modules/antagonists/changeling/changeling.dm @@ -0,0 +1,34 @@ +/// Handles all of the new modular variables that changelings need for their transformations + +/datum/changeling_profile + /// Reference to the profile source's flavor_text if it has any + var/datum/flavor_text/flavor_text + /// the size of the profile source + var/size = 1 + /// The height of the profile source + var/height = HUMAN_HEIGHT_MEDIUM + +/datum/changeling_profile/copy_profile(datum/changeling_profile/new_profile) + . = ..() + new_profile.flavor_text = flavor_text + new_profile.size = size + new_profile.height = height + +/datum/antagonist/changeling/create_profile(mob/living/carbon/human/target, protect = 0) + var/datum/changeling_profile/new_profile = ..() + + new_profile.flavor_text = target.linked_flavor + if(target.dna.features["size"]) + new_profile.size = target.dna.features["size"] + new_profile.height = target.mob_height + + return new_profile + +/datum/antagonist/changeling/transform(mob/living/carbon/human/user, datum/changeling_profile/chosen_profile) + user.linked_flavor = chosen_profile.flavor_text + if(user.dna.features["size"]) + user.update_transform(RESIZE_DEFAULT_SIZE/user.dna.features["size"]) + user.update_transform(chosen_profile.size) + user.set_mob_height(chosen_profile.height) + + . = ..() diff --git a/maplestation_modules/code/modules/client/preferences/height.dm b/maplestation_modules/code/modules/client/preferences/height.dm index 20a69390c9b7..e310a3650534 100644 --- a/maplestation_modules/code/modules/client/preferences/height.dm +++ b/maplestation_modules/code/modules/client/preferences/height.dm @@ -61,6 +61,8 @@ else if(value <= HEIGHT_VERY_SMALL) ADD_TRAIT(target, TRAIT_SMALL, INNATE_TRAIT) + target.dna.features["size"] = resize_amount + target.update_transform(resize_amount) /datum/preference/choiced/mob_size/is_accessible(datum/preferences/preferences)