From 2c9adb12f39f3b1afd8066fc69dd6b009e2b61fd Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 13 Dec 2015 15:00:19 +0100 Subject: [PATCH] Fixes spell logging runtime Fixes lava runtime Fixes mecha ore scanner runtime Fixes crayon writing runtime Fixes latejoin headrev runtime --- code/datums/spell.dm | 2 +- code/game/gamemodes/revolution/revolution.dm | 2 +- code/game/mecha/equipment/tools/mining_tools.dm | 7 ++++--- code/game/turfs/simulated/floor/plating.dm | 5 +++-- code/modules/paperwork/paper.dm | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 29fe4dfd7ed..f717b4534e4 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -176,7 +176,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells before_cast(targets) invocation(user) - if(user.ckey) + if(user && user.ckey) user.attack_log += text("\[[time_stamp()]\] [user.real_name] ([user.ckey]) cast the spell [name].") spawn(0) if(charge_type == "recharge" && recharge) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index fe21e018bd8..43d2b2f6ae7 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -192,7 +192,7 @@ if(khrushchev.current && khrushchev.current.client && khrushchev.current.stat != DEAD) if(ROLE_REV in khrushchev.current.client.prefs.be_special) promotable_revs += khrushchev - if(promotable_revs) + if(promotable_revs.len) var/datum/mind/stalin = pick(promotable_revs) revolutionaries -= stalin head_revolutionaries += stalin diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 8d94ed2e15e..07231ed8854 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -118,12 +118,13 @@ var/obj/mecha/working/mecha = loc if(!mecha.occupant) return + var/mob/pilot = mecha.occupant var/list/occupant = list() - occupant |= mecha.occupant - mecha.occupant.sight |= SEE_TURFS + occupant |= pilot + pilot.sight |= SEE_TURFS scanning = 1 mineral_scan_pulse(occupant,get_turf(loc)) spawn(equip_cooldown) scanning = 0 - mecha.occupant.sight -= SEE_TURFS + pilot.sight -= SEE_TURFS diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 0465b15341e..5ba6f4a7ac4 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -214,8 +214,9 @@ else if (istype(AM, /mob/living)) var/mob/living/L = AM L.adjustFireLoss(20) - L.adjust_fire_stacks(20) - L.IgniteMob() + if(L) //mobs turning into object corpses could get deleted here. + L.adjust_fire_stacks(20) + L.IgniteMob() /turf/simulated/floor/plating/lava/attackby(obj/item/C, mob/user, params) //Lava isn't a good foundation to build on return diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 739b17cfff0..076fb9526e1 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -202,6 +202,7 @@ t = "[t]" else // If it is a crayon, and he still tries to use these, make them empty! + var/obj/item/toy/crayon/C = P t = replacetext(t, "\[*\]", "") t = replacetext(t, "\[hr\]", "") t = replacetext(t, "\[small\]", "") @@ -209,7 +210,7 @@ t = replacetext(t, "\[list\]", "") t = replacetext(t, "\[/list\]", "") - t = "[t]" + t = "[t]" // t = replacetext(t, "#", "") // Junk converted to nothing!