From cea151813e72e5ac6b01cc2a48659622bfce093d Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:44:00 -0600 Subject: [PATCH 1/8] Runtime fix: Dirt in SPAAAAACCEEEEEEE ndefined variable /turf/space/var/dirt proc name: reaction turf (/datum/reagent/space_cleaner/reaction_turf) source file: Chemistry-Reagents.dm,939 --- code/modules/reagents/Chemistry-Reagents.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c9666d98f00..73c500403f8 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -935,8 +935,9 @@ datum for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5,10)) reaction_turf(var/turf/simulated/S, var/volume) - if(volume >= 1) - S.dirt = 0 + if(istype(S) + if(volume >= 1) + S.dirt = 0 reaction_mob(var/mob/M, var/method=TOUCH, var/volume) if(iscarbon(M)) From 1eb66f1f78d7cc8261a3d488ec90e961f3d60ae2 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:47:55 -0600 Subject: [PATCH 2/8] Runtime fix blood_DNA length checks when it's possibly null. runtime error: Cannot read null.len proc name: attack self (/obj/item/weapon/melee/telebaton/attack_self) source file: swords_axes_etc.dm,156 --- code/game/objects/items/weapons/swords_axes_etc.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 8b9d914bc24..7ee3499c1cd 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -153,7 +153,7 @@ playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) add_fingerprint(user) - if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any + if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any overlays.Cut()//this might delete other item overlays as well but eeeeeeeh var/icon/I = new /icon(src.icon, src.icon_state) @@ -265,4 +265,4 @@ H.update_inv_r_hand() add_fingerprint(user) - return \ No newline at end of file + return From 0bcd89360a26223820d5b7ef0b89baf4de7fc5eb Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:51:57 -0600 Subject: [PATCH 3/8] Runtime fix: I have no UI, and I must close it. runtime error: Cannot execute null.close(). proc name: Topic (/obj/item/device/pda/Topic) source file: PDA.dm,485 usr: Garry Myers (/mob/living/carbon/human) src: PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering) call stack: PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering): Topic("src=\[0x2003e95];choice=Messag...", /list (/list)) NeroHarry (/client): Topic("src=\[0x2003e95];choice=Messag...", /list (/list), PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering)) NeroHarry (/client): Topic("src=\[0x2003e95];choice=Messag...", /list (/list), PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering)) --- code/game/objects/items/devices/PDA/PDA.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 5a0bdf4af30..df04ddfcfe7 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -482,7 +482,8 @@ var/global/list/obj/item/device/pda/PDAs = list() return 0 if(!can_use()) //Why reinvent the wheel? There's a proc that does exactly that. U.unset_machine() - ui.close() + if(ui) + ui.close() return 0 add_fingerprint(U) From 75116bfd53602c49da55fc477cbfe004ff2addc0 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:16:19 -0600 Subject: [PATCH 4/8] Runtime fix: Someone using a gas mask with no tank...IN SPACE runtime error: Cannot read null.oxygen proc name: copy from (/datum/gas_mixture/proc/copy_from) source file: FEA_gas_mixture.dm,480 usr: null src: /datum/gas_mixture (/datum/gas_mixture) call stack: /datum/gas_mixture (/datum/gas_mixture): copy from(null) Basileus (/mob/living/carbon/human): breathe() Basileus (/mob/living/carbon/human): Life() /datum/controller/game_control... (/datum/controller/game_controller): process mobs() /datum/controller/game_control... (/datum/controller/game_controller): process() runtime error: Cannot read null.toxins proc name: breathe (/mob/living/carbon/human/proc/breathe) source file: life.dm,339 usr: null src: Basileus (/mob/living/carbon/human) call stack: Basileus (/mob/living/carbon/human): breathe() Basileus (/mob/living/carbon/human): Life() /datum/controller/game_control... (/datum/controller/game_controller): process mobs() /datum/controller/game_control... (/datum/controller/game_controller): process() --- code/modules/mob/living/carbon/human/life.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 00368c2debd..8470095cde0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -325,7 +325,7 @@ breath = loc.remove_air(breath_moles) - if(istype(wear_mask, /obj/item/clothing/mask/gas)) + if(istype(wear_mask, /obj/item/clothing/mask/gas) && breath) var/obj/item/clothing/mask/gas/G = wear_mask var/datum/gas_mixture/filtered = new From d5951781fdeaf675508fa5d67bb44e130dde63df Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:27:04 -0600 Subject: [PATCH 5/8] Runtime fix: Alarms keep trying to heat up space. runtime error: Cannot execute null.heat capacity(). proc name: process (/obj/machinery/alarm/process) source file: alarm.dm,186 runtime error: Cannot execute null.heat capacity(). proc name: process (/obj/machinery/alarm/process) source file: alarm.dm,186 over and over and over. --- code/game/machinery/alarm.dm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index f2a069c4543..c781bb20c99 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -183,24 +183,25 @@ var/datum/gas_mixture/gas gas = location.remove_air(0.25*environment.total_moles) - var/heat_capacity = gas.heat_capacity() - var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) + if(gas) + var/heat_capacity = gas.heat_capacity() + var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) - //Use power. Assuming that each power unit represents 1000 watts.... - use_power(energy_used/1000, ENVIRON) + //Use power. Assuming that each power unit represents 1000 watts.... + use_power(energy_used/1000, ENVIRON) - //We need to cool ourselves. - if(environment.temperature > target_temperature) - gas.temperature -= energy_used/heat_capacity - else - gas.temperature += energy_used/heat_capacity + //We need to cool ourselves. + if(environment.temperature > target_temperature) + gas.temperature -= energy_used/heat_capacity + else + gas.temperature += energy_used/heat_capacity - environment.merge(gas) + environment.merge(gas) - if(abs(environment.temperature - target_temperature) <= 0.5) - regulating_temperature = 0 - visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click as a faint electronic humming stops.") + if(abs(environment.temperature - target_temperature) <= 0.5) + regulating_temperature = 0 + visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ + "You hear a click as a faint electronic humming stops.") var/old_level = danger_level danger_level = overall_danger_level() @@ -1683,4 +1684,4 @@ Code shamelessly copied from apc_frame else usr << browse(null, "window=partyalarm") return - return \ No newline at end of file + return From 3d8899812320df31b5dab37f9d0472370b70dc37 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:35:04 -0600 Subject: [PATCH 6/8] Runtime fix: usr = 0??? runtime error: Cannot read 0.item_use_icon proc name: remove gun icons (/client/proc/remove_gun_icons) source file: targeting.dm,273 usr: 0 src: Vivalas (/client) call stack: Vivalas (/client): remove gun icons() the taser gun (/obj/item/weapon/gun/energy/taser): dropped(Jonathon Sommer (/mob/living/carbon/human)) Jonathon Sommer (/mob/living/carbon/human): drop r hand(null) Jonathon Sommer (/mob/living/carbon/human): update canmove() Jonathon Sommer (/mob/living/carbon/human): Weaken(5) Jonathon Sommer (/mob/living/carbon/human): Weaken(5) Jonathon Sommer (/mob/living/carbon/human): apply effect(5, "weaken", 0) Jonathon Sommer (/mob/living/carbon/human): apply effects(0, 5, 0, 0, 0, 0, 0, 0, 0) --- code/modules/projectiles/targeting.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm index 06f25a7e18b..d627a5c7713 100644 --- a/code/modules/projectiles/targeting.dm +++ b/code/modules/projectiles/targeting.dm @@ -269,7 +269,7 @@ client/proc/add_gun_icons() screen += usr.gun_run_icon client/proc/remove_gun_icons() - if(isnull(usr)) return 1 // Runtime prevention on N00k agents spawning with SMG + if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG screen -= usr.item_use_icon screen -= usr.gun_move_icon if (target_can_move) From f071421552188fa08ac19f042d244ef2777dc706 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:39:25 -0600 Subject: [PATCH 7/8] Runtime fix: Null isn't really that sharp. runtime error: Cannot read null.sharp proc name: is sharp (/proc/is_sharp) source file: unsorted.dm,1270 usr: Arthur Ward (/mob/living/carbon/human) src: null call stack: is sharp(null) the police tape (/obj/item/tape/police): breaktape(null, Arthur Ward (/mob/living/carbon/human)) the police tape (/obj/item/tape/police): attack hand(Arthur Ward (/mob/living/carbon/human)) Arthur Ward (/mob/living/carbon/human): UnarmedAttack(the police tape (/obj/item/tape/police), 1) Arthur Ward (/mob/living/carbon/human): ClickOn(the police tape (/obj/item/tape/police), "icon-x=16;icon-y=10;left=1;scr...") the police tape (/obj/item/tape/police): Click(the floor (172,128,1) (/turf/simulated/floor), "mapwindow.map", "icon-x=16;icon-y=10;left=1;scr...") --- code/__HELPERS/unsorted.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f9c2c90dd57..c5ec1748419 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1267,6 +1267,7 @@ proc/is_hot(obj/item/W as obj) //Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. /proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + if(!W) return 0 if(W.sharp) return 1 return ( \ W.sharp || \ @@ -1374,4 +1375,4 @@ var/list/WALLITEMS = list( return 0 /proc/format_text(text) - return replacetext(replacetext(text,"\proper ",""),"\improper ","") \ No newline at end of file + return replacetext(replacetext(text,"\proper ",""),"\improper ","") From 0f538a9b2faae56f86eb630298ba0234cce92bb6 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:50:44 -0600 Subject: [PATCH 8/8] Typo fix. Screw typechecks and their need for closing parens :*( --- code/modules/reagents/Chemistry-Reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 73c500403f8..8a6f6a74f99 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -935,7 +935,7 @@ datum for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5,10)) reaction_turf(var/turf/simulated/S, var/volume) - if(istype(S) + if(istype(S)) if(volume >= 1) S.dirt = 0