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
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NUKEIMMUNE "nuke_immunity"
/// Can't be given viruses
#define TRAIT_VIRUSIMMUNE "virus_immunity"
/// Our organs won't decay, if we're a carbon mob and thus have organs...
#define TRAIT_ROTIMMUNE "rot_immunity"
/// Won't become a husk under any circumstances
#define TRAIT_UNHUSKABLE "trait_unhuskable"
/// Reduces the chance viruses will spread to this mob, and if the mob has a virus, slows its advancement
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_VENTCRAWLER_NUDE" = TRAIT_VENTCRAWLER_NUDE,
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
"TRAIT_VIRUS_RESISTANCE" = TRAIT_VIRUS_RESISTANCE,
"TRAIT_ROTIMMUNE" = TRAIT_ROTIMMUNE,
"TRAIT_VORACIOUS" = TRAIT_VORACIOUS,
"TRAIT_WAS_EVOLVED" = TRAIT_WAS_EVOLVED,
"TRAIT_WATER_ADAPTATION" = TRAIT_WATER_ADAPTATION,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_VENTCRAWLER_NUDE" = TRAIT_VENTCRAWLER_NUDE,
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
"TRAIT_VIRUS_RESISTANCE" = TRAIT_VIRUS_RESISTANCE,
"TRAIT_ROTIMMUNE" = TRAIT_ROTIMMUNE,
"TRAIT_VORACIOUS" = TRAIT_VORACIOUS,
"TRAIT_WATER_ADAPTATION" = TRAIT_WATER_ADAPTATION,
"TRAIT_WATER_HATER" = TRAIT_WATER_HATER,
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@
if(stat == DEAD)
if(reagents && (reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1) || reagents.has_reagent(/datum/reagent/cryostylane))) // No organ decay if the body contains formaldehyde.
return
if(HAS_TRAIT(src, TRAIT_ROTIMMUNE))
return
for(var/obj/item/organ/organ in organs)
// On-death is where organ decay is handled
if(organ?.owner) // organ + owner can be null due to reagent metabolization causing organ shuffling
Expand Down
21 changes: 7 additions & 14 deletions surfshack13/nanites/code/programs/healing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,13 @@
return FALSE
return ..()

/datum/nanite_program/corpsepreserve/active_effect()
if(host_mob.stat == DEAD)
var/datum/reagent/S = host_mob.reagents?.has_reagent(/datum/reagent/toxin/formaldehyde)
if(S)
return
if(!spent)
spent = TRUE
nanites.adjust_nanites(null, -10)
host_mob.reagents.add_reagent(/datum/reagent/toxin/formaldehyde, 5)
return
return
else
spent = FALSE
return
/datum/nanite_program/corpsepreserve/enable_passive_effect()
. = ..()
host_mob.add_traits(list(TRAIT_ROTIMMUNE), TRAIT_NANITES)

/datum/nanite_program/corpsepreserve/disable_passive_effect()
. = ..()
host_mob.remove_traits(list(TRAIT_ROTIMMUNE), TRAIT_NANITES)

/datum/nanite_program/naniteresus
name = "Nanite Resurrection"
Expand Down
Loading