diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 9a097030d5..0777c6aa41 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -113,6 +113,11 @@ datum/controller/game_controller/proc/setup_objects()
asteroid_ore_map = new /datum/ore_distribution()
asteroid_ore_map.populate_distribution_map()
+ //Shitty hack to fix mining turf overlays, for some reason New() is not being called.
+ for(var/turf/simulated/floor/plating/airless/asteroid/T in world)
+ T.updateMineralOverlays()
+ T.name = "asteroid"
+
//Set up spawn points.
populate_spawn_points()
@@ -301,7 +306,7 @@ datum/controller/game_controller/proc/process_machines_power()
//check if the area has power for M's channel
//this will keep stat updated in case the machine is moved from one area to another.
M.power_change(A) //we've already made sure A is a master area, above.
-
+
if(!(M.stat & NOPOWER) && M.use_power)
M.auto_use_power()
diff --git a/code/modules/mining/drilling/distribution.dm b/code/modules/mining/drilling/distribution.dm
index e935f55e52..e152a60b34 100644
--- a/code/modules/mining/drilling/distribution.dm
+++ b/code/modules/mining/drilling/distribution.dm
@@ -162,11 +162,6 @@ Deep minerals:
target_turf = locate(tx+j, ty+i, asteroid_z)
- //Very shitty fix for the asteroid turf overlays being screwy.
- if(target_turf && istype(target_turf,/turf/simulated/floor/plating/airless/asteroid))
- var/turf/simulated/floor/plating/airless/asteroid/T = target_turf
- T.updateMineralOverlays()
-
if(target_turf && target_turf.has_resources)
target_turf.resources = list()
target_turf.resources["silicates"] = rand(3,5)
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 0f5a8aba3a..bf70bb5c76 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -27,9 +27,23 @@
has_resources = 1
/turf/simulated/mineral/New()
+
. = ..()
+
MineralSpread()
+ spawn(2)
+ var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
+ for(var/direction in step_overlays)
+ var/turf/turf_to_check = get_step(src,step_overlays[direction])
+
+ if(istype(turf_to_check,/turf/simulated/floor/plating/airless/asteroid))
+ var/turf/simulated/floor/plating/airless/asteroid/T = turf_to_check
+ T.updateMineralOverlays()
+
+ else if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
+ turf_to_check.overlays += image('icons/turf/walls.dmi', "rock_side_[direction]")
+
/turf/simulated/mineral/ex_act(severity)
switch(severity)
if(2.0)
@@ -122,7 +136,7 @@
var/datum/find/F = finds[1]
if(excavation_level + P.excavation_amount > F.excavation_required)
//Chance to destroy / extract any finds here
- fail_message = ", [pick("there is a crunching noise","[W] collides with some different rock","part of the rock face crumbles away","something breaks under [W]")]"
+ fail_message = ". [pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]"
user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]."
@@ -199,13 +213,6 @@
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
overlays += excav_overlay
- /* Nope.
- //extract pesky minerals while we're excavating
- while(excavation_minerals.len && excavation_level > excavation_minerals[excavation_minerals.len])
- DropMineral()
- pop(excavation_minerals)
- mineralAmt-- */
-
//drop some rocks
next_rock += P.excavation_amount * 10
while(next_rock > 100)
@@ -254,6 +261,7 @@
M.apply_effect(25, IRRADIATE)
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
+ for(var/i=0;i