From bb444d9b68375d8b24426925b9519ec112aa70ec Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Sat, 24 Jan 2015 01:38:21 -0500 Subject: [PATCH] MarkVA's Optimization --- code/game/dna/dna2_domutcheck.dm | 6 ++++-- code/game/dna/genes/goon_disabilities.dm | 13 ++++--------- code/game/objects/items/weapons/dna_injector.dm | 6 ++++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm index e5a73fc116e..8ca6e8f99d2 100644 --- a/code/game/dna/dna2_domutcheck.dm +++ b/code/game/dna/dna2_domutcheck.dm @@ -49,8 +49,10 @@ // Use this to force a mut check on a single gene! /proc/genemutcheck(var/mob/living/M, var/block, var/connected=null, var/flags=0) - if(istype(M, /mob/living/carbon/human/machine)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure. - return + if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure. + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + return if(!M) return if(block < 0) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 455aa80e284..fa534735c73 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -325,19 +325,14 @@ usr << "No target found in range." return -<<<<<<< HEAD - var/mob/living/carbon/L = targets[1] */ - - var/mob/living/carbon/L = usr - -======= var/mob/living/carbon/L = targets[1] if(L) usr.attack_log += text("\[[time_stamp()]\] [usr.real_name] ([usr.ckey]) cast the spell [name] on [L.real_name] ([L.ckey]).") L.attack_log += text("\[[time_stamp()]\] [usr.real_name] ([usr.ckey]) cast the spell [name] on [L.real_name] ([L.ckey]).") - msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (JMP)") ->>>>>>> 7dced99c6f4e987583e38d95ef9e253003f4e314 - L.adjust_fire_stacks(0.5) // Same as walking into fire. Was 100 (goon fire) + msg_admin_attack("[usr.real_name] ([usr.ckey]) has cast the spell [name] on [L.real_name] ([L.ckey]) (JM +*/ + var/mob/living/carbon/L = usr + L.visible_message("\red [L.name] suddenly bursts into flames!") L.on_fire = 1 L.update_icon = 1 diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 00996582a24..e2b19f317ad 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -98,8 +98,10 @@ return uses /obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob) - if (!istype(M, /mob) || istype(M, /mob/living/carbon/human/machine)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure. - return + if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure. + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + return if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" return