mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
Fixes a bug with species component application (#18696)
* Update trait.dm Update trait.dm Fixes a bug and cleans up Omen dice application * small godmode fix * Proper * Fixes organ regen
This commit is contained in:
@@ -562,3 +562,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user