From 3a1f30ece4520a8a4ba3e635b5a288e30bf12062 Mon Sep 17 00:00:00 2001 From: Head Date: Sat, 28 Jul 2012 17:16:22 +0200 Subject: [PATCH 1/3] A few fixes. --- code/ZAS/Connection.dm | 3 +++ code/game/objects/effect_system.dm | 2 +- code/game/objects/items/weapons/implants/implanter.dm | 5 ++--- code/modules/mob/living/silicon/robot/robot.dm | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index 0f0748bafd8..0ecab34a577 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -190,6 +190,9 @@ connection return 1 proc/UpdateZones() //Changes connection data in the zones if it is required. + if(istype(A,/turf/space) || istype(B,/turf/space)) + src.Cleanup() + return if(A.ZAirPass(B)) var/door_pass = A.CanPass(null,B,1.5,1) if(door_pass || A.CanPass(null,B,0,0)) diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index 74b382e8944..a07810a22f2 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -195,7 +195,7 @@ steam.start() -- spawns the effect if(src.total_sparks > 20) return spawn(0) - if(holder) + if(holder || !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) src.total_sparks++ diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 6acc8dfece5..4f80a89a606 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -114,8 +114,7 @@ ..() /obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob) - if(istype(A,/obj/item)) - var/obj/item/weapon/implant/compressed/c = imp - c.scanned = A + if(istype(A,/obj/item) && imp) + imp:scanned = A A.loc.contents.Remove(A) update() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 90d1c80fef2..0d054614a51 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -253,7 +253,7 @@ if (timeleft) stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") - if(ticker.mode.name == "AI malfunction") + if(ticker.mode && ticker.mode.name == "AI malfunction") var/datum/game_mode/malfunction/malf = ticker.mode for (var/datum/mind/malfai in malf.malf_ai) if(connected_ai) From 04fac7a52871411990b4f1ff65766eba26c7d37b Mon Sep 17 00:00:00 2001 From: Head Date: Sat, 28 Jul 2012 17:46:25 +0200 Subject: [PATCH 2/3] Fix for the fix!, God i hate byond code. --- code/game/objects/effect_system.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index a07810a22f2..eefef5fcb82 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -195,7 +195,7 @@ steam.start() -- spawns the effect if(src.total_sparks > 20) return spawn(0) - if(holder || !istype(holder,/datum)) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) src.total_sparks++ From f814d99249aca83083f9d2cd9eb1dd673a4213ad Mon Sep 17 00:00:00 2001 From: Head Date: Sat, 28 Jul 2012 17:53:13 +0200 Subject: [PATCH 3/3] Added condition to the rest of the code in effect_system.dm --- code/game/objects/effect_system.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index eefef5fcb82..8d757fb7508 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -124,7 +124,7 @@ steam.start() -- spawns the effect var/i = 0 for(i=0, i 20) return spawn(0) - if(holder) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(src.location) src.total_smoke++ @@ -365,7 +365,7 @@ steam.start() -- spawns the effect if(src.total_smoke > 20) return spawn(0) - if(holder) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/bad_smoke/smoke = new /obj/effect/effect/bad_smoke(src.location) src.total_smoke++ @@ -494,7 +494,7 @@ steam.start() -- spawns the effect if(src.total_smoke > 20) return spawn(0) - if(holder) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/iterator = pick(0,1,1,1,2,2,2,3) var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location) @@ -602,7 +602,7 @@ steam.start() -- spawns the effect if(src.total_smoke > 20) return spawn(0) - if(holder) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/sleep_smoke/smoke = new /obj/effect/effect/sleep_smoke(src.location) src.total_smoke++ @@ -688,7 +688,7 @@ steam.start() -- spawns the effect if(src.total_smoke > 20) return spawn(0) - if(holder) + if(holder && !istype(holder,/datum)) src.location = get_turf(holder) var/obj/effect/effect/mustard_gas/smoke = new /obj/effect/effect/mustard_gas(src.location) src.total_smoke++