From 354b1978ea53aabdd622a129fb8b9b3ac7eb762d Mon Sep 17 00:00:00 2001 From: Fira Date: Sat, 4 Jan 2014 13:22:06 +0100 Subject: [PATCH 01/12] Partial fix for pAI emotes (they still can't hear beyond one container level, will require a say/emote code hack) --- code/modules/mob/emote.dm | 6 +++++- code/modules/mob/living/silicon/pai/pai.dm | 3 ++- code/modules/mob/mob_defines.dm | 1 + code/modules/mob/say.dm | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 416528d3fc0..8a9f2a3b905 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -36,11 +36,15 @@ M.show_message(message) + // Type 1 (Visual) emotes are sent to anyone in view of the item if (m_type & 1) for (var/mob/O in viewers(src, null)) O.show_message(message, m_type) + + // Type 2 (Audible) emotes are sent to anyone in hear range + // of the *LOCATION* -- this is important for pAIs to be heard else if (m_type & 2) - for (var/mob/O in hearers(src.loc, null)) + for (var/mob/O in hearers(get_turf(src), null)) O.show_message(message, m_type) /mob/proc/emote_dead(var/message) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 863708d18c3..02c8ea04223 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -4,6 +4,7 @@ icon_state = "shadow" robot_talk_understand = 0 + emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person) var/network = "SS13" var/obj/machinery/camera/current = null @@ -268,4 +269,4 @@ pai.key = src.key card.setPersonality(pai) -*/ \ No newline at end of file +*/ diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 2452db5abcc..2e5a65c7c37 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -89,6 +89,7 @@ var/list/languages = list() // For speaking/listening. var/list/abilities = list() // For species-derived or admin-given powers. var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null. + var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes var/name_archive //For admin things like possession diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 040c1615c50..1f2d5c2845e 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -25,7 +25,7 @@ message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) if(use_me) - usr.emote("me",1,message) + usr.emote("me",usr.emote_type,message) else usr.emote(message) From c8beb399449e3d8b3c79df376fb5483a23b4a300 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 5 Jan 2014 19:17:26 -0600 Subject: [PATCH 02/12] Dirt Fixes. Pass ALL the attack_by's to the floor. --- code/game/objects/effects/decals/Cleanable/misc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index d94d4670bea..0b999cb0bb3 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -41,7 +41,7 @@ icon_state = "dirt" /obj/effect/decal/cleanable/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/crowbar)) + if(!istype(W,/obj/item/weapon/mop) && !istype(W,/obj/item/weapon/soap)) var/turf/T = get_turf(src) if(T) T.attackby(W,user) From cd4ef7a1b712f1fd1c41f033c9af49ea3a4c7a87 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 5 Jan 2014 19:30:52 -0600 Subject: [PATCH 03/12] Ghost chat unicode support...removed unneeded sanitize() --- code/modules/mob/dead/observer/say.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index db9cd2129c6..acf6c887d7f 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -1,5 +1,5 @@ /mob/dead/observer/say(var/message) - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + message = trim(copytext(message, 1, MAX_MESSAGE_LEN)) if (!message) return @@ -18,7 +18,7 @@ /mob/dead/observer/emote(var/act, var/type, var/message) - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + message = trim(copytext(message, 1, MAX_MESSAGE_LEN)) if(!message) return @@ -62,4 +62,4 @@ M.show_message("You hear muffled speech... you can almost make out some words...", 2) // M.show_message("[stutter(message)]", 2) playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1) -*/ \ No newline at end of file +*/ From 0798c7f4c32d9be90ec48c92e3d7dd38275d360f Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 6 Jan 2014 23:11:09 -0600 Subject: [PATCH 04/12] Cleanbots are now created unlocked. Allows roboticist to set up cleanbots and if they patrol or not. Requires janitor access to lock them (Captain, HoP, Janitor) Should probably have a proc that checks you have either of the access listed but for now this fixes this minor problem. --- code/game/machinery/bots/cleanbot.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 7b5e18413f7..10504668490 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -54,6 +54,8 @@ src.botcard = new /obj/item/weapon/card/id(src) var/datum/job/janitor/J = new/datum/job/janitor src.botcard.access = J.get_access() + + src.locked = 0 // Start unlocked so roboticist can set them to patrol. if(radio_controller) radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS) From 1575db63203345f4a8fbc5c76c6e33a99a57e2ce Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 6 Jan 2014 23:33:48 -0600 Subject: [PATCH 05/12] Fixed placing ID's into PDA's that are on the ground. Removed useless can_use check, no reason that is needed there. --- code/game/objects/items/devices/PDA/PDA.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 2750af1b05b..cd3368b9418 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -943,10 +943,9 @@ var/global/list/obj/item/device/pda/PDAs = list() else //Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand. if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) ) - if( can_use(user) )//If they can still act. - id_check(user, 2) - user << "You put the ID into \the [src]'s slot." - updateSelfDialog()//Update self dialog on success. + id_check(user, 2) + user << "You put the ID into \the [src]'s slot." + updateSelfDialog()//Update self dialog on success. return //Return in case of failed check or when successful. updateSelfDialog()//For the non-input related code. else if(istype(C, /obj/item/device/paicard) && !src.pai) From a96c17fd758a49678ec53046f1ec6255bd3d4e05 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 7 Jan 2014 20:53:42 +1030 Subject: [PATCH 06/12] Mixed up some whitelist flags. --- code/__HELPERS/global_lists.dm | 2 +- code/modules/client/preferences.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 07a22f56932..ff853eca2f2 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -94,7 +94,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al var/datum/species/S = new T all_species[S.name] = S - if(S.flags & WHITELISTED) + if(S.flags & IS_WHITELISTED) whitelisted_species += S.name return 1 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e86bdc13046..ab55f29f50e 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -899,7 +899,7 @@ datum/preferences if(config.usealienwhitelist) for(var/L in all_languages) var/datum/language/lang = all_languages[L] - if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & IS_WHITELISTED )))) + if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & WHITELISTED )))) new_languages += lang languages_available = 1 From 912c04b9d61873313b4f57934c293dbb1a6e0a37 Mon Sep 17 00:00:00 2001 From: Mloc Date: Tue, 7 Jan 2014 21:50:16 +0000 Subject: [PATCH 07/12] Another year gone. --- COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYING b/COPYING index 5005fcd90f0..77e1d829ffb 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ Baystation12 -Copyright (C) 2010-2013 Baystation12 and tgstation13. +Copyright (C) 2010-2014 Baystation12 and tgstation13. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From 049501a898a67949af6574e530480fb71c15c28e Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jan 2014 10:26:39 +1030 Subject: [PATCH 08/12] Added some limited support for alien reagent reactions. --- code/modules/reagents/Chemistry-Holder.dm | 5 +- code/modules/reagents/Chemistry-Reagents.dm | 89 +++++++++++++++------ 2 files changed, 69 insertions(+), 25 deletions(-) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 504461fed7f..970a6b293f5 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -199,11 +199,12 @@ 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() conditional_update_move(var/atom/A, var/Running = 0) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 04ff35c984f..9de86133771 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -5,6 +5,10 @@ #define REAGENTS_OVERDOSE 30 #define REM REAGENTS_EFFECT_MULTIPLIER +//Some on_mob_life() procs check for alien races. +#define IS_DIONA 1 +#define IS_VOX 2 + //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. @@ -68,7 +72,7 @@ datum src = null return - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(!istype(M, /mob/living)) return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO if( (overdose > 0) && (volume >= overdose))//Overdosing, wooo @@ -400,10 +404,15 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE*2 - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(!M) M = holder.my_atom - if(M.losebreath >= 10) - M.losebreath = max(10, M.losebreath-5) + + if(alien && alien == IS_VOX) + M.adjustToxLoss(REAGENTS_METABOLISM) + else + if(M.losebreath >= 10) + M.losebreath = max(10, M.losebreath-5) + holder.remove_reagent(src.id, 0.5 * REAGENTS_METABOLISM) return @@ -484,6 +493,14 @@ datum custom_metabolism = 0.01 + on_mob_life(var/mob/living/M as mob, var/alien) + if(M.stat == 2) return + if(alien && alien == IS_VOX) + M.adjustToxLoss(REAGENTS_METABOLISM) + holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + return + ..() + copper name = "Copper" id = "copper" @@ -501,6 +518,14 @@ datum custom_metabolism = 0.01 + on_mob_life(var/mob/living/M as mob, var/alien) + if(M.stat == 2) return + if(alien && alien == IS_VOX) + M.adjustOxyLoss(-2*REM) + holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + return + ..() + hydrogen name = "Hydrogen" id = "hydrogen" @@ -671,7 +696,10 @@ datum if(prob(5)) if(prob(50)) M.radiation += 50 // curing it that way may kill you instead - M.adjustToxLoss(100) + var/mob/living/carbon/human/H + if(istype(C,/mob/living/carbon/human)) + H = C + if(!H || (H.species && !(H.species.flags & RAD_ABSORB))) M.adjustToxLoss(100) M:antibodies |= V.antigen ..() return @@ -983,6 +1011,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom + //This needs a diona check but if one is added they won't be able to heal burn damage at all. M.heal_organ_damage(0,2*REM) ..() return @@ -995,11 +1024,12 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE/2 - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN return if(!M) M = holder.my_atom - M.heal_organ_damage(0,3*REM) + if(alien && alien != IS_DIONA) + M.heal_organ_damage(0,3*REM) ..() return @@ -1011,11 +1041,16 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) return //See above, down and around. --Agouri if(!M) M = holder.my_atom - M.adjustOxyLoss(-2*REM) + + if(alien && alien == IS_VOX) + M.adjustToxLoss(2*REM) + else if(alien && alien != IS_DIONA) + M.adjustOxyLoss(-2*REM) + if(holder.has_reagent("lexorin")) holder.remove_reagent("lexorin", 2*REM) ..() @@ -1029,11 +1064,16 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE/2 - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) return if(!M) M = holder.my_atom - M.adjustOxyLoss(-M.getOxyLoss()) + + if(alien && alien == IS_VOX) + M.adjustOxyLoss() + else if(alien && alien != IS_DIONA) + M.adjustOxyLoss(-M.getOxyLoss()) + if(holder.has_reagent("lexorin")) holder.remove_reagent("lexorin", 2*REM) ..() @@ -1046,14 +1086,15 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) return if(!M) M = holder.my_atom - if(M.getOxyLoss()) M.adjustOxyLoss(-1*REM) - if(M.getBruteLoss() && prob(80)) M.heal_organ_damage(1*REM,0) - if(M.getFireLoss() && prob(80)) M.heal_organ_damage(0,1*REM) - if(M.getToxLoss() && prob(80)) M.adjustToxLoss(-1*REM) + if(alien && alien != IS_DIONA) + if(M.getOxyLoss()) M.adjustOxyLoss(-1*REM) + if(M.getBruteLoss() && prob(80)) M.heal_organ_damage(1*REM,0) + if(M.getFireLoss() && prob(80)) M.heal_organ_damage(0,1*REM) + if(M.getToxLoss() && prob(80)) M.adjustToxLoss(-1*REM) ..() return @@ -1064,12 +1105,13 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(!M) M = holder.my_atom - M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1) - M.drowsyness = max(M.drowsyness-2*REM, 0) - M.hallucination = max(0, M.hallucination - 5*REM) - M.adjustToxLoss(-2*REM) + if(alien && alien != IS_DIONA) + M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1) + M.drowsyness = max(M.drowsyness-2*REM, 0) + M.hallucination = max(0, M.hallucination - 5*REM) + M.adjustToxLoss(-2*REM) ..() return @@ -1249,11 +1291,12 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE - on_mob_life(var/mob/living/M as mob) + on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) return if(!M) M = holder.my_atom - M.heal_organ_damage(2*REM,0) + if(alien != IS_DIONA) + M.heal_organ_damage(2*REM,0) ..() return From c8b595be95f39bc514b75ae28dab64c99d2352ef Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jan 2014 10:27:21 +1030 Subject: [PATCH 09/12] Added an alien var to metabolize procs for humans and monkeys to tie into alien reagent reactions. --- code/modules/mob/living/carbon/human/life.dm | 10 +++++++++- code/modules/mob/living/carbon/monkey/life.dm | 4 ++-- code/modules/mob/living/carbon/monkey/monkey.dm | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 617998de006..8a63f2b43db 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -866,7 +866,15 @@ */ proc/handle_chemicals_in_body() - if(reagents) reagents.metabolize(src) + if(reagents) + + var/alien //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 + reagents.metabolize(src,alien) + var/total_plasmaloss = 0 for(var/obj/item/I in src) if(I.contaminated) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 7599c31359d..4ec4d413062 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -440,7 +440,7 @@ proc/handle_chemicals_in_body() - if(istype(src,/mob/living/carbon/monkey/diona)) //Filthy check. Dionaea nymphs need light or they get sad. + if(alien) //Diona nymphs are the only alien monkey currently. var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing if(isturf(loc)) //else, there's considered to be no light var/turf/T = loc @@ -459,7 +459,7 @@ adjustToxLoss(-1) adjustOxyLoss(-1) - if(reagents) reagents.metabolize(src) + if(reagents) reagents.metabolize(src,alien) if (drowsyness) drowsyness-- diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index b0ddd30c73d..f780b790333 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -14,6 +14,7 @@ //var/uni_append = "12C4E2" // Small appearance modifier for different species. var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2. var/update_muts = 1 // Monkey gene must be set at start. + var/alien //Used for reagent metabolism. /mob/living/carbon/monkey/tajara name = "farwa" @@ -97,6 +98,7 @@ /mob/living/carbon/monkey/diona/New() ..() + alien = 1 gender = NEUTER dna.mutantrace = "plant" greaterform = "Diona" From e8a5b37ea755c93808283e7624ea805ff67794c4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jan 2014 10:56:39 +1030 Subject: [PATCH 10/12] Fixed some cocked up checks for alien var. --- code/modules/reagents/Chemistry-Reagents.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 9de86133771..1029c46c54d 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1028,7 +1028,7 @@ datum if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN return if(!M) M = holder.my_atom - if(alien && alien != IS_DIONA) + if(!alien || alien != IS_DIONA) M.heal_organ_damage(0,3*REM) ..() return @@ -1048,7 +1048,7 @@ datum if(alien && alien == IS_VOX) M.adjustToxLoss(2*REM) - else if(alien && alien != IS_DIONA) + else if(!alien || alien != IS_DIONA) M.adjustOxyLoss(-2*REM) if(holder.has_reagent("lexorin")) @@ -1071,7 +1071,7 @@ datum if(alien && alien == IS_VOX) M.adjustOxyLoss() - else if(alien && alien != IS_DIONA) + else if(!alien || alien != IS_DIONA) M.adjustOxyLoss(-M.getOxyLoss()) if(holder.has_reagent("lexorin")) @@ -1090,7 +1090,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - if(alien && alien != IS_DIONA) + if(!alien || alien != IS_DIONA) if(M.getOxyLoss()) M.adjustOxyLoss(-1*REM) if(M.getBruteLoss() && prob(80)) M.heal_organ_damage(1*REM,0) if(M.getFireLoss() && prob(80)) M.heal_organ_damage(0,1*REM) @@ -1107,7 +1107,7 @@ datum on_mob_life(var/mob/living/M as mob, var/alien) if(!M) M = holder.my_atom - if(alien && alien != IS_DIONA) + if(!alien || alien != IS_DIONA) M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1) M.drowsyness = max(M.drowsyness-2*REM, 0) M.hallucination = max(0, M.hallucination - 5*REM) From 787da649c140e7cb5593ca6f170d534747cf57a9 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jan 2014 11:05:58 +1030 Subject: [PATCH 11/12] Safer way to do the alien thang. --- code/modules/mob/living/carbon/human/life.dm | 2 +- code/modules/mob/living/carbon/monkey/monkey.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8a63f2b43db..0cd59c4d629 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -868,7 +868,7 @@ proc/handle_chemicals_in_body() if(reagents) - var/alien //Not the best way to handle it, but neater than checking this for every single reagent proc. + 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") diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index f780b790333..42fbb8fa02e 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -14,7 +14,7 @@ //var/uni_append = "12C4E2" // Small appearance modifier for different species. var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2. var/update_muts = 1 // Monkey gene must be set at start. - var/alien //Used for reagent metabolism. + var/alien = 0 //Used for reagent metabolism. /mob/living/carbon/monkey/tajara name = "farwa" From 901dbd634dd3e000e6fbcdf4763e3142b54c70c6 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jan 2014 11:13:36 +1030 Subject: [PATCH 12/12] Indentation fix. --- code/modules/reagents/Chemistry-Reagents.dm | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 1029c46c54d..c9666d98f00 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -493,13 +493,13 @@ datum custom_metabolism = 0.01 - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2) return - if(alien && alien == IS_VOX) - M.adjustToxLoss(REAGENTS_METABOLISM) - holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. - return - ..() + on_mob_life(var/mob/living/M as mob, var/alien) + if(M.stat == 2) return + if(alien && alien == IS_VOX) + M.adjustToxLoss(REAGENTS_METABOLISM) + holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + return + ..() copper name = "Copper" @@ -518,13 +518,13 @@ datum custom_metabolism = 0.01 - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2) return - if(alien && alien == IS_VOX) - M.adjustOxyLoss(-2*REM) - holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. - return - ..() + on_mob_life(var/mob/living/M as mob, var/alien) + if(M.stat == 2) return + if(alien && alien == IS_VOX) + M.adjustOxyLoss(-2*REM) + holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + return + ..() hydrogen name = "Hydrogen"