Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions code/modules/surgery/organs/internal/heart/_heart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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(.)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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()

Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

. = ..()
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading