From ce7d05ccf370f41cd94519da73e3ffaeaf976e3c Mon Sep 17 00:00:00 2001 From: Regory Date: Mon, 4 Aug 2014 16:24:00 -0400 Subject: [PATCH] Fix errors from ticker initializing after map ore Ores only count towards the station's score if it spawns on Z=5 (Mining Asteroid Level). The old method caused errors in the server log because gameticker/ticker initialized after the map ore spawns. This also means that ore mined on the Clown Planet don't count. --- code/modules/mining/ore.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index e268ed2fc0c..1079e06b0a2 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -78,8 +78,7 @@ /obj/item/weapon/ore/New() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 - if(ticker.current_state == GAME_STATE_PLAYING) score_oremined++ //When ore spawns, increment score. Ignore ores that spawn with map before game starts. - + if(src.z == 5) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) /obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/device/core_sampler))