[MIRROR] Fixes a bug with species component application (#11877)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-26 23:06:16 -07:00
committed by GitHub
parent 3a5552a3d4
commit 61146ef685
7 changed files with 29 additions and 12 deletions

View File

@@ -36,6 +36,9 @@
///If we dissipate radiation or keep it.
var/radiation_dissipation = TRUE
dupe_mode = COMPONENT_DUPE_UNIQUE
dupe_type = /datum/component/radiation_effects
/datum/component/radiation_effects/Initialize(glows, radiation_glow_minor_threshold, contamination, contamination_strength, radiation_color, intensity_mod, range_mod, radiation_immunity, radiation_healing, radiation_dissipation)
if(!isliving(parent))

View File

@@ -534,10 +534,3 @@
. = ..()
var/mob/living/living_parent = parent
living_parent.remove_filter("omen")
/**
* The dice omen.
* Single use omen from rolling a nat 1 on a cursed d20.
*/
/datum/component/omen/dice
incidents_left = 1

View File

@@ -14,7 +14,9 @@
if(our_target.status_flags & GODMODE) //Already have it.
return ELEMENT_INCOMPATIBLE
our_target.status_flags |= GODMODE
our_target.status_flags &= ~CANSTUN
our_target.status_flags &= ~CANWEAKEN
our_target.status_flags &= ~CANPARALYSE
if(ishuman(target))
RegisterSignal(target, COMSIG_EXTERNAL_ORGAN_PRE_DAMAGE_APPLICATION, PROC_REF(on_external_damaged))
RegisterSignal(target, COMSIG_INTERNAL_ORGAN_PRE_DAMAGE_APPLICATION, PROC_REF(on_internal_damaged))
@@ -65,6 +67,7 @@
//And finally, remove the fact we're in godmode.
our_target.status_flags &= ~GODMODE
our_target.status_flags |= CANSTUN|CANWEAKEN|CANPARALYSE
return ..()
/datum/element/godmode/proc/on_external_damaged()

View File

@@ -251,7 +251,7 @@
to_chat(user, span_cult("You feel extraordinarily unlucky..."))
if(evil)
user.AddComponent(
/datum/component/omen/dice,\
/datum/component/omen,\
incidents_left = 1,\
luck_mod = 1,\
damage_mod = 1,\
@@ -262,7 +262,7 @@
else
user.AddComponent(
/datum/component/omen/dice,\
/datum/component/omen,\
incidents_left = 1,\
luck_mod = 0.3,\
damage_mod = 1,\

View File

@@ -584,3 +584,11 @@
G.radiation_color = trait_prefs["glow_color"]
G.glows = trait_prefs["glow_enabled"]
G.radiation_healing = TRUE
/datum/trait/positive/radioactive_heal/unapply(var/datum/species/S,var/mob/living/carbon/human/H, var/list/trait_prefs)
..() //Does all the removal stuff
//We then check to see if we still have the radiation component (such as we have a species componennt of it)
//If so, we remove the healing effect.
var/datum/component/radiation_effects/G = H.GetComponent(added_component_path)
if(G)
G.radiation_healing = initial(G.radiation_healing)

View File

@@ -73,7 +73,7 @@
add_verb(H, /mob/living/carbon/human/proc/trait_tutorial)
if(special_env)
S.env_traits += src
if(added_component_path)
if(added_component_path && !H.GetComponent(added_component_path))
H.AddComponent(added_component_path)
return
@@ -107,6 +107,15 @@
if(added_component_path)
var/datum/component/C = H.GetComponent(added_component_path)
if(C)
if(LAZYLEN(S.species_component))
//Species_component is a list of paths.
for(var/checked_species_component in S.species_component)
//Ex: ACP = /datum/component/radioactive/type2 CSC = /datum/component/radioactive. This returns.
if(ispath(added_component_path, checked_species_component))
return
//Ex: ACP = /datum/component/radioactive CSC = /datum/component/radioactive/shadekin. This passes.
if(ispath(checked_species_component, added_component_path))
return
qdel(C)
return

View File

@@ -18,8 +18,9 @@
// Heals the internal organ passively as long as it's under the bruised threshold
// Not a lot of MATH just yet, but nutrition or other factors could be taken into account
// Per the original PR: 'Allows internal organs to regenerate themselves passively, as long as they're not bruised.'
/obj/item/organ/internal/proc/passive_heal()
if(!is_bruised() && !is_broken())
if(is_bruised() || is_broken())
return
var/heal_amt = healing_factor * CONFIG_GET(number/organ_regeneration_multiplier)