diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 66251f79e5..80080220e9 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -114,8 +114,8 @@ build_cost = 5 build_type = (!canRwall && W.reinf_material) ? null : "wall" build_turf = /turf/simulated/floor - else if(istype(T,/turf/simulated/floor)) - var/turf/simulated/floor/F = T + else if(istype(T,/turf/simulated/floor) || (istype(T,/turf/simulated/mineral) && !T.density)) + var/turf/simulated/F = T build_delay = deconstruct ? 50 : 20 build_cost = deconstruct ? 10 : 3 build_type = deconstruct ? "floor" : "wall" diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 93d61e1602..b8048a93c0 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -10,10 +10,11 @@ /obj/structure/lattice/New() //turf/simulated/floor/asteroid ..() -///// Z-Level Stuff - if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/mineral/floor))) -///// Z-Level Stuff + + if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/mineral))) qdel(src) + return + for(var/obj/structure/lattice/LAT in src.loc) if(LAT != src) qdel(LAT) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 440f1283e0..353c366939 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -74,8 +74,8 @@ return //Drill through the flooring, if any. - if(istype(get_turf(src), /turf/simulated/floor)) - var/turf/simulated/floor/T = get_turf(src) + if(istype(get_turf(src), /turf/simulated)) + var/turf/simulated/T = get_turf(src) T.ex_act(2.0) //Dig out the tasty ores. diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index cfc4686163..852f0313b3 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -54,16 +54,21 @@ var/list/mining_overlay_cache = list() return density = 0 opacity = 0 - update_icon() - reconsider_lights() + update_general() /turf/simulated/mineral/proc/make_wall() if(density && opacity) return density = 1 opacity = 1 - update_icon() - reconsider_lights() + update_general() + +/turf/simulated/mineral/proc/update_general() + update_icon(1) + if(ticker && ticker.current_state == GAME_STATE_PLAYING) + reconsider_lights() + if(air_master) + air_master.mark_for_update(src) /turf/simulated/mineral/Entered(atom/movable/M as mob|obj) . = ..() @@ -243,12 +248,40 @@ var/list/mining_overlay_cache = list() for(var/obj/item/weapon/ore/O in contents) O.attackby(W,user) return + else if(istype(W,/obj/item/weapon/storage/bag/fossils)) var/obj/item/weapon/storage/bag/fossils/S = W if(S.collection_mode) for(var/obj/item/weapon/fossil/F in contents) F.attackby(W,user) return + + else if(istype(W, /obj/item/stack/rods)) + var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) + if(L) + return + var/obj/item/stack/rods/R = W + if (R.use(1)) + user << "Constructing support lattice ..." + playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) + new /obj/structure/lattice(get_turf(src)) + + else if(istype(W, /obj/item/stack/tile/floor)) + var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) + if(L) + var/obj/item/stack/tile/floor/S = W + if (S.get_amount() < 1) + return + qdel(L) + playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) + ChangeTurf(/turf/simulated/floor) + S.use(1) + return + else + user << "The plating is going to need some support." + return + + else if (istype(W, /obj/item/device/core_sampler)) geologic_data.UpdateNearbyArtifactInfo(src) @@ -423,7 +456,7 @@ var/list/mining_overlay_cache = list() M.apply_effect(25, IRRADIATE) make_floor() - update_icon() + update_icon(1) /turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F) //with skill and luck, players can cleanly extract finds