Mineturf fixes (#2600)

changes:

Fixed a bug where dig overlays could sometimes be drawn under icon smoothing overlays.
Fixed a bug where sometimes mine turfs' icons would disappear.
Converted a manual GetBelow() statement into a call to GetBelow().
Disabled xenoarch turf overlays as the sprites are missing anyways.
This commit is contained in:
Lohikar
2017-06-04 05:29:58 -05:00
committed by skull132
parent e8cbf0fe50
commit 8c5a5a09c7

View File

@@ -7,9 +7,7 @@
density = 1 density = 1
/turf/simulated/mineral //wall piece /turf/simulated/mineral //wall piece
name = "Rock" name = "rock"
//icon = 'icons/turf/walls.dmi'
//icon_state = "rock"
icon = 'icons/turf/smooth/rock_wall.dmi' // Until we get sprites. icon = 'icons/turf/smooth/rock_wall.dmi' // Until we get sprites.
icon_state = "rock" icon_state = "rock"
layer = 2.01 layer = 2.01
@@ -277,14 +275,14 @@
excavation_level += P.excavation_amount excavation_level += P.excavation_amount
//archaeo overlays //archaeo overlays
if(!archaeo_overlay && finds && finds.len) /*if(!archaeo_overlay && finds && finds.len)
var/datum/find/F = finds[1] var/datum/find/F = finds[1]
if(F.excavation_required <= excavation_level + F.view_range) if(F.excavation_required <= excavation_level + F.view_range)
archaeo_overlay = "overlay_archaeo[rand(1,3)]" archaeo_overlay = "overlay_archaeo[rand(1,3)]"
add_overlay(archaeo_overlay) add_overlay(archaeo_overlay)*/
else else
user << "<span class='notice'> You stop [P.drill_verb] the rock.</span>" user << "<span class='notice'> You stop [P.drill_verb] [src].</span>"
P.drilling = 0 P.drilling = 0
if (istype(W, /obj/item/weapon/autochisel)) if (istype(W, /obj/item/weapon/autochisel))
@@ -708,7 +706,7 @@
/turf/simulated/floor/asteroid/proc/gets_dug() /turf/simulated/floor/asteroid/proc/gets_dug()
icon_state = "asteroid_dug" add_overlay("asteroid_dug", TRUE)
if(prob(75)) if(prob(75))
new/obj/item/weapon/ore/glass(src) new/obj/item/weapon/ore/glass(src)
@@ -735,9 +733,9 @@
if(dug <= 10) if(dug <= 10)
dug += 1 dug += 1
add_overlay("asteroid_dug") add_overlay("asteroid_dug", TRUE)
else else
var/turf/below = (!(z > world.maxz || z > 17 || z < 2) && z_levels & (1 << (z - 2))) ? get_step(src, DOWN) : null var/turf/below = GetBelow(src)
if(below) if(below)
var/area/below_area = below.loc // Let's just assume that the turf is not in nullspace. var/area/below_area = below.loc // Let's just assume that the turf is not in nullspace.
if(below_area.station_area) if(below_area.station_area)