diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 25d4be543c5..9b091e8994d 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -310,7 +310,8 @@ return else - if(!isemptylist(src.search_contents_for(/obj/item/weapon/disk/nuclear))) + var/inside = src.search_contents_for(/atom) + if(is_type_in_list(/obj/item/weapon/disk/nuclear, inside)) usr << "You get the feeling that you shouldn't cremate one of the items in the cremator." return @@ -320,7 +321,7 @@ cremating = 1 locked = 1 - for(var/mob/living/M in contents) + for(var/mob/living/M in inside) if (M.stat!=2) M.emote("scream",,, 1) //Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out. @@ -331,7 +332,7 @@ M.ghostize() del(M) - for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up + for(var/obj/O in inside) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up del(O) new /obj/effect/decal/cleanable/ash(src) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7e7fcc57789..54d5efb23ed 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -469,9 +469,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/list/mobs = getmobs() var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs var/mob/target = mobs[input] - if(istype(target,/mob/living/silicon/ai)) - var/mob/living/silicon/ai/M = target - target = M.eyeobj ManualFollow(target) // This is the ghost's follow verb with an argument @@ -787,10 +784,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp ..() if (href_list["follow"]) - var/mob/target = locate(href_list["follow"]) in mob_list + var/target = locate(href_list["follow"]) + if(following == target) return var/mob/A = usr; A << "You are now following [target]" - //var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list + if(istype(target,/mob/living/silicon/ai)) + var/mob/living/silicon/ai/M = target + target = M.eyeobj if(target && target != usr) following = target spawn(0) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 42b36d405b5..90ae769dd1d 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1008,10 +1008,11 @@ var/global/list/organ_damage_overlays = list( if(reagents) var/alien = 0 //Not the best way to handle it, but neater than checking this for every single reagent proc. - if(species && species.name == "Diona") - alien = 1 - else if(species && species.name == "Vox") - alien = 2 + if(src.species) + switch(src.species.type) + if(/datum/species/diona) alien = 1 + if(/datum/species/vox) alien = 2 + if(/datum/species/plasmaman) alien = 3 reagents.metabolize(src,alien) var/total_plasmaloss = 0 diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index d3c34cccc2a..513aa77bf0a 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -261,11 +261,11 @@ datum return total_transfered */ - metabolize(var/mob/M) + metabolize(var/mob/M, var/alien) for(var/A in reagent_list) var/datum/reagent/R = A if(M && R) - R.on_mob_life(M) + R.on_mob_life(M, alien) update_total() update_aerosol(var/mob/M) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index b505fb1e24e..3cbd282f417 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -8,6 +8,7 @@ //Some on_mob_life() procs check for alien races. #define IS_DIONA 1 #define IS_VOX 2 +#define IS_PLASMA 3 //The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent) //so that it can continue working when the reagent is deleted while the proc is still active. @@ -76,7 +77,6 @@ return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO if( (overdose > 0) && (volume >= overdose))//Overdosing, wooo M.adjustToxLoss(overdose_dam) - if(!holder) return holder.remove_reagent(src.id, custom_metabolism) //By default it slowly disappears. return