Merge pull request #629 from Zuhayr/fixes

Fixes for the asteroid turf post-changes.
This commit is contained in:
Neerti
2015-12-20 13:46:30 -05:00
4 changed files with 46 additions and 12 deletions
+2 -2
View File
@@ -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"
+4 -3
View File
@@ -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)
+2 -2
View File
@@ -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.
+38 -5
View File
@@ -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 << "<span class='notice'>Constructing support lattice ...</span>"
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 << "<span class='warning'>The plating is going to need some support.</span>"
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