Fix for mining.

Fixes #4249
This commit is contained in:
SkyMarshal
2014-01-09 20:57:47 -05:00
committed by ZomgPonies
parent e2bbbb7e39
commit 0be7c1c9a2
+9 -9
View File
@@ -168,7 +168,7 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont
if(do_after(user,P.digspeed))
user << "\blue You finish [P.drill_verb] the rock."
if(finds.len)
if(finds && finds.len)
var/datum/find/F = finds[1]
if(round(excavation_level + P.excavation_amount) == F.excavation_required)
//Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them
@@ -202,15 +202,15 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont
else
GetDrilled(1)
return
else
excavation_level += P.excavation_amount
//archaeo overlays
if(!archaeo_overlay && finds.len)
var/datum/find/F = finds[1]
if(F.excavation_required <= excavation_level + F.view_range)
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
overlays += archaeo_overlay
excavation_level += P.excavation_amount
//archaeo overlays
if(!archaeo_overlay && finds && finds.len)
var/datum/find/F = finds[1]
if(F.excavation_required <= excavation_level + F.view_range)
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
overlays += archaeo_overlay
//there's got to be a better way to do this
var/update_excav_overlay = 0