mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation
This commit is contained in:
@@ -5,7 +5,7 @@ sudo: false
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- BYOND_MAJOR="512"
|
- BYOND_MAJOR="512"
|
||||||
- BYOND_MINOR="1411"
|
- BYOND_MINOR="1412"
|
||||||
- MACRO_COUNT=4
|
- MACRO_COUNT=4
|
||||||
matrix:
|
matrix:
|
||||||
- TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0"
|
- TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
|
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
|
||||||
if(LAZYLEN(graphic_add))
|
if(LAZYLEN(graphic_add))
|
||||||
add_overlay(graphic_add, priority = TRUE)
|
overlays += graphic_add
|
||||||
if(LAZYLEN(graphic_remove))
|
if(LAZYLEN(graphic_remove))
|
||||||
cut_overlay(graphic_remove, priority = TRUE)
|
overlays -= graphic_remove
|
||||||
|
|
||||||
/turf/proc/update_air_properties()
|
/turf/proc/update_air_properties()
|
||||||
var/block = c_airblock(src)
|
var/block = c_airblock(src)
|
||||||
|
|||||||
@@ -803,6 +803,7 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
|||||||
var/old_dir1 = T.dir
|
var/old_dir1 = T.dir
|
||||||
var/old_icon_state1 = T.icon_state
|
var/old_icon_state1 = T.icon_state
|
||||||
var/old_icon1 = T.icon
|
var/old_icon1 = T.icon
|
||||||
|
var/old_overlays = T.overlays.Copy()
|
||||||
var/old_underlays = T.underlays.Copy()
|
var/old_underlays = T.underlays.Copy()
|
||||||
var/old_decals = T.decals ? T.decals.Copy() : null
|
var/old_decals = T.decals ? T.decals.Copy() : null
|
||||||
|
|
||||||
@@ -810,9 +811,11 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
|||||||
X.set_dir(old_dir1)
|
X.set_dir(old_dir1)
|
||||||
X.icon_state = old_icon_state1
|
X.icon_state = old_icon_state1
|
||||||
X.icon = old_icon1
|
X.icon = old_icon1
|
||||||
X.copy_overlays(T, TRUE)
|
X.overlays = old_overlays
|
||||||
X.underlays = old_underlays
|
X.underlays = old_underlays
|
||||||
X.decals = old_decals
|
X.decals = old_decals
|
||||||
|
if(old_decals)
|
||||||
|
X.apply_decals()
|
||||||
|
|
||||||
//Move the air from source to dest
|
//Move the air from source to dest
|
||||||
var/turf/simulated/ST = T
|
var/turf/simulated/ST = T
|
||||||
@@ -838,10 +841,14 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
|||||||
if(shuttlework)
|
if(shuttlework)
|
||||||
var/turf/simulated/shuttle/SS = T
|
var/turf/simulated/shuttle/SS = T
|
||||||
SS.landed_holder.leave_turf()
|
SS.landed_holder.leave_turf()
|
||||||
|
|
||||||
else if(turftoleave)
|
else if(turftoleave)
|
||||||
T.ChangeTurf(turftoleave)
|
T.ChangeTurf(turftoleave)
|
||||||
|
T.apply_decals()
|
||||||
|
|
||||||
else
|
else
|
||||||
T.ChangeTurf(get_base_turf_by_area(T))
|
T.ChangeTurf(get_base_turf_by_area(T))
|
||||||
|
T.apply_decals()
|
||||||
|
|
||||||
refined_src -= T
|
refined_src -= T
|
||||||
refined_trg -= B
|
refined_trg -= B
|
||||||
|
|||||||
28
code/controllers/subsystems/floor_decals.dm
Normal file
28
code/controllers/subsystems/floor_decals.dm
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//
|
||||||
|
// Floor Decals Initialization Subsystem
|
||||||
|
// This is part of the giant decal hack that works around a BYOND bug where DreamDaemon will crash if you
|
||||||
|
// update overlays on turfs too much.
|
||||||
|
// The master_controller on Polaris used to init decals prior to initializing areas (which initilized turfs)
|
||||||
|
// Now that we switched to subsystems we still want to do the same thing, so this takes care of it.
|
||||||
|
//
|
||||||
|
SUBSYSTEM_DEF(floor_decals)
|
||||||
|
name = "Floor Decals"
|
||||||
|
init_order = INIT_ORDER_DECALS
|
||||||
|
flags = SS_NO_FIRE
|
||||||
|
|
||||||
|
/datum/controller/subsystem/floor_decals/Initialize(timeofday)
|
||||||
|
if(floor_decals_initialized)
|
||||||
|
return ..()
|
||||||
|
to_world_log("Initializing Floor Decals")
|
||||||
|
admin_notice("<span class='danger'>Initializing Floor Decals</span>", R_DEBUG)
|
||||||
|
var/list/turfs_with_decals = list()
|
||||||
|
for(var/obj/effect/floor_decal/D in world)
|
||||||
|
var/T = D.add_to_turf_decals()
|
||||||
|
if(T) turfs_with_decals |= T
|
||||||
|
CHECK_TICK
|
||||||
|
for(var/item in turfs_with_decals)
|
||||||
|
var/turf/T = item
|
||||||
|
if(T.decals) T.apply_decals()
|
||||||
|
CHECK_TICK
|
||||||
|
floor_decals_initialized = TRUE
|
||||||
|
return ..()
|
||||||
@@ -14,29 +14,17 @@ var/list/floor_decals = list()
|
|||||||
if(newcolour) color = newcolour
|
if(newcolour) color = newcolour
|
||||||
..(newloc)
|
..(newloc)
|
||||||
|
|
||||||
|
// Hack to workaround byond crash bug
|
||||||
/obj/effect/floor_decal/initialize()
|
/obj/effect/floor_decal/initialize()
|
||||||
|
if(!floor_decals_initialized || !loc || QDELETED(src))
|
||||||
|
return
|
||||||
add_to_turf_decals()
|
add_to_turf_decals()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
if(T) //VOREStation Edit
|
||||||
|
T.apply_decals()
|
||||||
initialized = TRUE
|
initialized = TRUE
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
// This is a separate proc from initialize() to facilitiate its caching and other stuff. Look into it someday.
|
|
||||||
/obj/effect/floor_decal/proc/add_to_turf_decals()
|
|
||||||
if(supplied_dir)
|
|
||||||
set_dir(supplied_dir) // TODO - Why can't this line be done in initialize/New()?
|
|
||||||
var/turf/T = get_turf(src)
|
|
||||||
if(istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
|
|
||||||
var/cache_key = "[alpha]-[color]-[dir]-[icon_state]-[T.layer]"
|
|
||||||
var/image/I = floor_decals[cache_key]
|
|
||||||
if(!I)
|
|
||||||
I = image(icon = icon, icon_state = icon_state, dir = dir)
|
|
||||||
I.layer = T.layer
|
|
||||||
I.color = color
|
|
||||||
I.alpha = alpha
|
|
||||||
floor_decals[cache_key] = I
|
|
||||||
LAZYADD(T.decals, I) // Add to its decals list (so it remembers to re-apply after it cuts overlays)
|
|
||||||
T.add_overlay(I) // Add to its current overlays too.
|
|
||||||
return T
|
|
||||||
|
|
||||||
/obj/effect/floor_decal/reset
|
/obj/effect/floor_decal/reset
|
||||||
name = "reset marker"
|
name = "reset marker"
|
||||||
|
|
||||||
|
|||||||
@@ -230,8 +230,9 @@
|
|||||||
oxygen = 0
|
oxygen = 0
|
||||||
nitrogen = 0
|
nitrogen = 0
|
||||||
|
|
||||||
/turf/simulated/floor/reinforced/n20/initialize()
|
/turf/simulated/floor/reinforced/n20/New()
|
||||||
. = ..()
|
..()
|
||||||
|
sleep(-1)
|
||||||
if(!air) make_air()
|
if(!air) make_air()
|
||||||
air.adjust_gas("sleeping_agent", ATMOSTANK_NITROUSOXIDE)
|
air.adjust_gas("sleeping_agent", ATMOSTANK_NITROUSOXIDE)
|
||||||
|
|
||||||
@@ -411,11 +412,11 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/turf/snow/update_icon()
|
/turf/snow/update_icon()
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
for(var/d in crossed_dirs)
|
for(var/d in crossed_dirs)
|
||||||
var/amt = crossed_dirs[d]
|
var/amt = crossed_dirs[d]
|
||||||
|
|
||||||
for(var/i in 1 to amt)
|
for(var/i in 1 to amt)
|
||||||
add_overlay(image(icon, "footprint[i]", text2num(d)))
|
overlays += icon(icon, "footprint[i]", text2num(d))
|
||||||
|
|
||||||
//**** Here ends snow ****
|
//**** Here ends snow ****
|
||||||
95
code/game/turfs/flooring/turf_overlay_holder.dm
Normal file
95
code/game/turfs/flooring/turf_overlay_holder.dm
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
//
|
||||||
|
// Initialize floor decals! Woo! This is crazy.
|
||||||
|
//
|
||||||
|
|
||||||
|
var/global/floor_decals_initialized = FALSE
|
||||||
|
|
||||||
|
// The Turf Decal Holder
|
||||||
|
// Since it is unsafe to add overlays to turfs, we hold them here for now.
|
||||||
|
// Since I want this object to basically not exist, I am modeling it in part after lighting_overlay
|
||||||
|
/atom/movable/turf_overlay_holder
|
||||||
|
name = "turf overlay holder"
|
||||||
|
density = 0
|
||||||
|
simulated = 0
|
||||||
|
anchored = 1
|
||||||
|
layer = TURF_LAYER
|
||||||
|
icon = null
|
||||||
|
icon_state = null
|
||||||
|
mouse_opacity = 0
|
||||||
|
// auto_init = 0
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/initialize()
|
||||||
|
// doesn't need special init
|
||||||
|
initialized = TRUE
|
||||||
|
return INITIALIZE_HINT_NORMAL
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/New(var/atom/newloc)
|
||||||
|
..()
|
||||||
|
verbs.Cut()
|
||||||
|
var/turf/T = loc
|
||||||
|
T.overlay_holder = src
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/Destroy()
|
||||||
|
if(loc)
|
||||||
|
var/turf/T = loc
|
||||||
|
if(T.overlay_holder == src)
|
||||||
|
T.overlay_holder = null
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
// Variety of overrides so the overlays don't get affected by weird things.
|
||||||
|
/atom/movable/turf_overlay_holder/ex_act()
|
||||||
|
return
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/singularity_act()
|
||||||
|
return
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/singularity_pull()
|
||||||
|
return
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/forceMove()
|
||||||
|
return 0 //should never move
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/Move()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/atom/movable/turf_overlay_holder/throw_at()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/effect/floor_decal/proc/add_to_turf_decals()
|
||||||
|
if(src.supplied_dir) src.set_dir(src.supplied_dir)
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
if(istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
|
||||||
|
var/cache_key = "[src.alpha]-[src.color]-[src.dir]-[src.icon_state]-[T.layer]"
|
||||||
|
var/image/I = floor_decals[cache_key]
|
||||||
|
if(!I)
|
||||||
|
I = image(icon = src.icon, icon_state = src.icon_state, dir = src.dir)
|
||||||
|
I.layer = T.layer
|
||||||
|
I.color = src.color
|
||||||
|
I.alpha = src.alpha
|
||||||
|
floor_decals[cache_key] = I
|
||||||
|
if(!T.decals) T.decals = list()
|
||||||
|
//world.log << "About to add img:\ref[I] onto decals at turf:\ref[T] ([T.x],[T.y],[T.z]) which has appearance:\ref[T.appearance] and decals.len=[T.decals.len]"
|
||||||
|
T.decals += I
|
||||||
|
return T
|
||||||
|
// qdel(D)
|
||||||
|
src.loc = null
|
||||||
|
src.tag = null
|
||||||
|
|
||||||
|
// Changes to turf to let us do this
|
||||||
|
/turf
|
||||||
|
var/atom/movable/turf_overlay_holder/overlay_holder = null
|
||||||
|
|
||||||
|
// After a turf change, destroy the old overlay holder since we will have lost access to it.
|
||||||
|
/turf/post_change()
|
||||||
|
var/atom/movable/turf_overlay_holder/TOH = locate(/atom/movable/turf_overlay_holder, src)
|
||||||
|
if(TOH)
|
||||||
|
qdel(TOH)
|
||||||
|
..()
|
||||||
|
|
||||||
|
/turf/proc/apply_decals()
|
||||||
|
if(decals)
|
||||||
|
if(!overlay_holder)
|
||||||
|
overlay_holder = new(src)
|
||||||
|
overlay_holder.overlays = src.decals
|
||||||
|
else if(overlay_holder)
|
||||||
|
overlay_holder.overlays.Cut()
|
||||||
@@ -21,15 +21,16 @@
|
|||||||
spawn(0)
|
spawn(0)
|
||||||
wet = wet_val
|
wet = wet_val
|
||||||
if(wet_overlay)
|
if(wet_overlay)
|
||||||
cut_overlay(wet_overlay)
|
overlays -= wet_overlay
|
||||||
wet_overlay = image('icons/effects/water.dmi', icon_state = "wet_floor")
|
wet_overlay = null
|
||||||
add_overlay(wet_overlay)
|
wet_overlay = image('icons/effects/water.dmi',src,"wet_floor")
|
||||||
|
overlays += wet_overlay
|
||||||
sleep(800)
|
sleep(800)
|
||||||
if(wet == 2)
|
if(wet == 2)
|
||||||
sleep(3200)
|
sleep(3200)
|
||||||
wet = 0
|
wet = 0
|
||||||
if(wet_overlay)
|
if(wet_overlay)
|
||||||
cut_overlay(wet_overlay)
|
overlays -= wet_overlay
|
||||||
wet_overlay = null
|
wet_overlay = null
|
||||||
|
|
||||||
/turf/simulated/proc/freeze_floor()
|
/turf/simulated/proc/freeze_floor()
|
||||||
@@ -37,14 +38,14 @@
|
|||||||
return
|
return
|
||||||
wet = 3 // icy
|
wet = 3 // icy
|
||||||
if(wet_overlay)
|
if(wet_overlay)
|
||||||
cut_overlay(wet_overlay)
|
overlays -= wet_overlay
|
||||||
wet_overlay = null
|
wet_overlay = null
|
||||||
wet_overlay = image('icons/turf/overlays.dmi',src,"snowfloor")
|
wet_overlay = image('icons/turf/overlays.dmi',src,"snowfloor")
|
||||||
add_overlay(wet_overlay)
|
overlays += wet_overlay
|
||||||
spawn(5 MINUTES)
|
spawn(5 MINUTES)
|
||||||
wet = 0
|
wet = 0
|
||||||
if(wet_overlay)
|
if(wet_overlay)
|
||||||
cut_overlay(wet_overlay)
|
overlays -= wet_overlay
|
||||||
wet_overlay = null
|
wet_overlay = null
|
||||||
|
|
||||||
/turf/simulated/clean_blood()
|
/turf/simulated/clean_blood()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
//This proc auto corrects the grass tiles' siding.
|
//This proc auto corrects the grass tiles' siding.
|
||||||
/turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update)
|
/turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update)
|
||||||
|
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
// VOREStation Edit - We are flooring switching to plating, swap out old_decals for decals.
|
// VOREStation Edit - We are flooring switching to plating, swap out old_decals for decals.
|
||||||
if(flooring)
|
if(flooring)
|
||||||
var/tmp/list/underfloor_decals = old_decals
|
var/tmp/list/underfloor_decals = old_decals
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var/image/no_ceiling_image = null
|
|||||||
if(lava)
|
if(lava)
|
||||||
return
|
return
|
||||||
|
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
|
|
||||||
if(flooring)
|
if(flooring)
|
||||||
// Set initial icon and strings.
|
// Set initial icon and strings.
|
||||||
@@ -38,17 +38,17 @@ var/image/no_ceiling_image = null
|
|||||||
var/turf/simulated/floor/T = get_step(src, step_dir)
|
var/turf/simulated/floor/T = get_step(src, step_dir)
|
||||||
if(!istype(T) || !T.flooring || T.flooring.name != flooring.name)
|
if(!istype(T) || !T.flooring || T.flooring.name != flooring.name)
|
||||||
has_border |= step_dir
|
has_border |= step_dir
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[step_dir]", "[flooring.icon_base]_edges", step_dir))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-edge-[step_dir]", "[flooring.icon_base]_edges", step_dir)
|
||||||
|
|
||||||
// There has to be a concise numerical way to do this but I am too noob.
|
// There has to be a concise numerical way to do this but I am too noob.
|
||||||
if((has_border & NORTH) && (has_border & EAST))
|
if((has_border & NORTH) && (has_border & EAST))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[NORTHEAST]", "[flooring.icon_base]_edges", NORTHEAST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-edge-[NORTHEAST]", "[flooring.icon_base]_edges", NORTHEAST)
|
||||||
if((has_border & NORTH) && (has_border & WEST))
|
if((has_border & NORTH) && (has_border & WEST))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[NORTHWEST]", "[flooring.icon_base]_edges", NORTHWEST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-edge-[NORTHWEST]", "[flooring.icon_base]_edges", NORTHWEST)
|
||||||
if((has_border & SOUTH) && (has_border & EAST))
|
if((has_border & SOUTH) && (has_border & EAST))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHEAST]", "[flooring.icon_base]_edges", SOUTHEAST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHEAST]", "[flooring.icon_base]_edges", SOUTHEAST)
|
||||||
if((has_border & SOUTH) && (has_border & WEST))
|
if((has_border & SOUTH) && (has_border & WEST))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHWEST]", "[flooring.icon_base]_edges", SOUTHWEST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHWEST]", "[flooring.icon_base]_edges", SOUTHWEST)
|
||||||
|
|
||||||
if(flooring.flags & TURF_HAS_CORNERS)
|
if(flooring.flags & TURF_HAS_CORNERS)
|
||||||
// As above re: concise numerical way to do this.
|
// As above re: concise numerical way to do this.
|
||||||
@@ -56,36 +56,37 @@ var/image/no_ceiling_image = null
|
|||||||
if(!(has_border & EAST))
|
if(!(has_border & EAST))
|
||||||
var/turf/simulated/floor/T = get_step(src, NORTHEAST)
|
var/turf/simulated/floor/T = get_step(src, NORTHEAST)
|
||||||
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[NORTHEAST]", "[flooring.icon_base]_corners", NORTHEAST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-corner-[NORTHEAST]", "[flooring.icon_base]_corners", NORTHEAST)
|
||||||
if(!(has_border & WEST))
|
if(!(has_border & WEST))
|
||||||
var/turf/simulated/floor/T = get_step(src, NORTHWEST)
|
var/turf/simulated/floor/T = get_step(src, NORTHWEST)
|
||||||
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[NORTHWEST]", "[flooring.icon_base]_corners", NORTHWEST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-corner-[NORTHWEST]", "[flooring.icon_base]_corners", NORTHWEST)
|
||||||
if(!(has_border & SOUTH))
|
if(!(has_border & SOUTH))
|
||||||
if(!(has_border & EAST))
|
if(!(has_border & EAST))
|
||||||
var/turf/simulated/floor/T = get_step(src, SOUTHEAST)
|
var/turf/simulated/floor/T = get_step(src, SOUTHEAST)
|
||||||
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHEAST]", "[flooring.icon_base]_corners", SOUTHEAST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHEAST]", "[flooring.icon_base]_corners", SOUTHEAST)
|
||||||
if(!(has_border & WEST))
|
if(!(has_border & WEST))
|
||||||
var/turf/simulated/floor/T = get_step(src, SOUTHWEST)
|
var/turf/simulated/floor/T = get_step(src, SOUTHWEST)
|
||||||
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
if(!(istype(T) && T.flooring && T.flooring.name == flooring.name))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHWEST]", "[flooring.icon_base]_corners", SOUTHWEST))
|
overlays |= get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHWEST]", "[flooring.icon_base]_corners", SOUTHWEST)
|
||||||
|
|
||||||
// Re-apply floor decals
|
// Hack workaround to byond crash bug
|
||||||
if(LAZYLEN(decals))
|
//if(decals && decals.len)
|
||||||
add_overlay(decals)
|
//overlays |= decals
|
||||||
|
apply_decals()
|
||||||
|
|
||||||
if(is_plating() && !(isnull(broken) && isnull(burnt))) //temp, todo
|
if(is_plating() && !(isnull(broken) && isnull(burnt))) //temp, todo
|
||||||
icon = 'icons/turf/flooring/plating.dmi'
|
icon = 'icons/turf/flooring/plating.dmi'
|
||||||
icon_state = "dmg[rand(1,4)]"
|
icon_state = "dmg[rand(1,4)]"
|
||||||
else if(flooring)
|
else if(flooring)
|
||||||
if(!isnull(broken) && (flooring.flags & TURF_CAN_BREAK))
|
if(!isnull(broken) && (flooring.flags & TURF_CAN_BREAK))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-broken-[broken]","broken[broken]")) // VOREStation Edit - Eris overlays
|
overlays |= get_flooring_overlay("[flooring.icon_base]-broken-[broken]","broken[broken]") // VOREStation Edit - Eris overlays
|
||||||
if(!isnull(burnt) && (flooring.flags & TURF_CAN_BURN))
|
if(!isnull(burnt) && (flooring.flags & TURF_CAN_BURN))
|
||||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-burned-[burnt]","burned[burnt]")) // VOREStation Edit - Eris overlays
|
overlays |= get_flooring_overlay("[flooring.icon_base]-burned-[burnt]","burned[burnt]") // VOREStation Edit - Eris overlays
|
||||||
|
|
||||||
if(weather_overlay)
|
if(weather_overlay)
|
||||||
add_overlay(weather_overlay)
|
overlays += weather_overlay
|
||||||
|
|
||||||
if(update_neighbors)
|
if(update_neighbors)
|
||||||
for(var/turf/simulated/floor/F in range(src, 1))
|
for(var/turf/simulated/floor/F in range(src, 1))
|
||||||
@@ -96,7 +97,7 @@ var/image/no_ceiling_image = null
|
|||||||
// Show 'ceilingless' overlay.
|
// Show 'ceilingless' overlay.
|
||||||
var/turf/above = GetAbove(src)
|
var/turf/above = GetAbove(src)
|
||||||
if(above && isopenspace(above) && !istype(src, /turf/simulated/floor/outdoors)) // This won't apply to outdoor turfs since its assumed they don't have a ceiling anyways.
|
if(above && isopenspace(above) && !istype(src, /turf/simulated/floor/outdoors)) // This won't apply to outdoor turfs since its assumed they don't have a ceiling anyways.
|
||||||
add_overlay(no_ceiling_image)
|
overlays |= no_ceiling_image
|
||||||
|
|
||||||
/turf/simulated/floor/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0)
|
/turf/simulated/floor/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0)
|
||||||
if(!flooring_cache[cache_key])
|
if(!flooring_cache[cache_key])
|
||||||
|
|||||||
@@ -15,19 +15,17 @@
|
|||||||
var/list/decals
|
var/list/decals
|
||||||
|
|
||||||
New(var/location = null, var/turf/simulated/shuttle/turf)
|
New(var/location = null, var/turf/simulated/shuttle/turf)
|
||||||
..(null)
|
|
||||||
my_turf = turf
|
my_turf = turf
|
||||||
|
|
||||||
/obj/landed_holder/proc/land_on(var/turf/T)
|
/obj/landed_holder/proc/land_on(var/turf/T)
|
||||||
//Gather destination information
|
//Gather destination information
|
||||||
var/obj/landed_holder/new_holder = new(null)
|
var/old_dest_type = T.type
|
||||||
new_holder.turf_type = T.type
|
var/old_dest_dir = T.dir
|
||||||
new_holder.dir = T.dir
|
var/old_dest_icon_state = T.icon_state
|
||||||
new_holder.icon = T.icon
|
var/old_dest_icon = T.icon
|
||||||
new_holder.icon_state = T.icon_state
|
var/list/old_dest_overlays = T.overlays.Copy()
|
||||||
new_holder.copy_overlays(T, TRUE)
|
var/list/old_dest_underlays = T.underlays.Copy()
|
||||||
new_holder.underlays = T.underlays.Copy()
|
var/list/old_dest_decals = T.decals ? T.decals.Copy() : null
|
||||||
new_holder.decals = T.decals ? T.decals.Copy() : null
|
|
||||||
|
|
||||||
//Set the destination to be like us
|
//Set the destination to be like us
|
||||||
T.Destroy()
|
T.Destroy()
|
||||||
@@ -35,7 +33,7 @@
|
|||||||
new_dest.set_dir(my_turf.dir)
|
new_dest.set_dir(my_turf.dir)
|
||||||
new_dest.icon_state = my_turf.icon_state
|
new_dest.icon_state = my_turf.icon_state
|
||||||
new_dest.icon = my_turf.icon
|
new_dest.icon = my_turf.icon
|
||||||
new_dest.copy_overlays(my_turf, TRUE)
|
new_dest.overlays = my_turf.overlays
|
||||||
new_dest.underlays = my_turf.underlays
|
new_dest.underlays = my_turf.underlays
|
||||||
new_dest.decals = my_turf.decals
|
new_dest.decals = my_turf.decals
|
||||||
//Shuttle specific stuff
|
//Shuttle specific stuff
|
||||||
@@ -45,9 +43,18 @@
|
|||||||
new_dest.join_flags = my_turf.join_flags
|
new_dest.join_flags = my_turf.join_flags
|
||||||
new_dest.join_group = my_turf.join_group
|
new_dest.join_group = my_turf.join_group
|
||||||
|
|
||||||
// Associate the holder with the new turf.
|
if(new_dest.decals)
|
||||||
new_holder.my_turf = new_dest
|
new_dest.apply_decals()
|
||||||
new_dest.landed_holder = new_holder
|
|
||||||
|
//Tell the new turf about what was there before
|
||||||
|
new_dest.landed_holder = new(turf = new_dest)
|
||||||
|
new_dest.landed_holder.turf_type = old_dest_type
|
||||||
|
new_dest.landed_holder.dir = old_dest_dir
|
||||||
|
new_dest.landed_holder.icon = old_dest_icon
|
||||||
|
new_dest.landed_holder.icon_state = old_dest_icon_state
|
||||||
|
new_dest.landed_holder.overlays = old_dest_overlays
|
||||||
|
new_dest.landed_holder.underlays = old_dest_underlays
|
||||||
|
new_dest.landed_holder.decals = old_dest_decals
|
||||||
|
|
||||||
//Update underlays if necessary (interior corners won't have changed).
|
//Update underlays if necessary (interior corners won't have changed).
|
||||||
if(new_dest.takes_underlays && !new_dest.interior_corner)
|
if(new_dest.takes_underlays && !new_dest.interior_corner)
|
||||||
@@ -63,9 +70,11 @@
|
|||||||
new_source.set_dir(dir)
|
new_source.set_dir(dir)
|
||||||
new_source.icon_state = icon_state
|
new_source.icon_state = icon_state
|
||||||
new_source.icon = icon
|
new_source.icon = icon
|
||||||
new_source.copy_overlays(src, TRUE)
|
new_source.overlays = overlays
|
||||||
new_source.underlays = underlays
|
new_source.underlays = underlays
|
||||||
new_source.decals = decals
|
new_source.decals = decals
|
||||||
|
if(new_source.decals)
|
||||||
|
new_source.apply_decals()
|
||||||
else
|
else
|
||||||
new_source = my_turf.ChangeTurf(get_base_turf_by_area(my_turf),,1)
|
new_source = my_turf.ChangeTurf(get_base_turf_by_area(my_turf),,1)
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,7 @@ var/list/outdoor_turfs = list()
|
|||||||
planet_controller.unallocateTurf(src)
|
planet_controller.unallocateTurf(src)
|
||||||
else // This is happening during map gen, if there's no planet_controller (hopefully).
|
else // This is happening during map gen, if there's no planet_controller (hopefully).
|
||||||
outdoor_turfs -= src
|
outdoor_turfs -= src
|
||||||
if(weather_overlay)
|
qdel(weather_overlay)
|
||||||
cut_overlay(weather_overlay)
|
|
||||||
qdel_null(weather_overlay)
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/turf/simulated/post_change()
|
/turf/simulated/post_change()
|
||||||
@@ -69,14 +67,15 @@ var/list/outdoor_turfs = list()
|
|||||||
var/image/I = image(icon = 'icons/turf/outdoors_edge.dmi', icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir)
|
var/image/I = image(icon = 'icons/turf/outdoors_edge.dmi', icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir)
|
||||||
I.plane = 0
|
I.plane = 0
|
||||||
turf_edge_cache[cache_key] = I
|
turf_edge_cache[cache_key] = I
|
||||||
add_overlay(turf_edge_cache[cache_key])
|
overlays += turf_edge_cache[cache_key]
|
||||||
|
|
||||||
/turf/simulated/proc/get_edge_icon_state()
|
/turf/simulated/proc/get_edge_icon_state()
|
||||||
return icon_state
|
return icon_state
|
||||||
|
|
||||||
/turf/simulated/floor/outdoors/update_icon()
|
/turf/simulated/floor/outdoors/update_icon()
|
||||||
..()
|
overlays.Cut()
|
||||||
update_icon_edge()
|
update_icon_edge()
|
||||||
|
..()
|
||||||
|
|
||||||
/turf/simulated/floor/outdoors/mud
|
/turf/simulated/floor/outdoors/mud
|
||||||
name = "mud"
|
name = "mud"
|
||||||
|
|||||||
@@ -17,9 +17,10 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/turf/simulated/floor/outdoors/snow/update_icon()
|
/turf/simulated/floor/outdoors/snow/update_icon()
|
||||||
|
overlays.Cut()
|
||||||
..()
|
..()
|
||||||
for(var/d in crossed_dirs)
|
for(var/d in crossed_dirs)
|
||||||
add_overlay(image(icon = 'icons/turf/outdoors.dmi', icon_state = "snow_footprints", dir = text2num(d)))
|
overlays += image(icon = 'icons/turf/outdoors.dmi', icon_state = "snow_footprints", dir = text2num(d))
|
||||||
|
|
||||||
/turf/simulated/floor/outdoors/snow/attackby(var/obj/item/W, var/mob/user)
|
/turf/simulated/floor/outdoors/snow/attackby(var/obj/item/W, var/mob/user)
|
||||||
if(istype(W, /obj/item/weapon/shovel))
|
if(istype(W, /obj/item/weapon/shovel))
|
||||||
|
|||||||
@@ -47,36 +47,36 @@
|
|||||||
if(!damage_overlays[1]) //list hasn't been populated
|
if(!damage_overlays[1]) //list hasn't been populated
|
||||||
generate_overlays()
|
generate_overlays()
|
||||||
|
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
var/image/I
|
var/image/I
|
||||||
|
|
||||||
if(!density)
|
if(!density)
|
||||||
I = image('icons/turf/wall_masks.dmi', "[material.icon_base]fwall_open")
|
I = image('icons/turf/wall_masks.dmi', "[material.icon_base]fwall_open")
|
||||||
I.color = material.icon_colour
|
I.color = material.icon_colour
|
||||||
add_overlay(I)
|
overlays += I
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/i = 1 to 4)
|
for(var/i = 1 to 4)
|
||||||
I = image('icons/turf/wall_masks.dmi', "[material.icon_base][wall_connections[i]]", dir = 1<<(i-1))
|
I = image('icons/turf/wall_masks.dmi', "[material.icon_base][wall_connections[i]]", dir = 1<<(i-1))
|
||||||
I.color = material.icon_colour
|
I.color = material.icon_colour
|
||||||
add_overlay(I)
|
overlays += I
|
||||||
|
|
||||||
if(reinf_material)
|
if(reinf_material)
|
||||||
if(construction_stage != null && construction_stage < 6)
|
if(construction_stage != null && construction_stage < 6)
|
||||||
I = image('icons/turf/wall_masks.dmi', "reinf_construct-[construction_stage]")
|
I = image('icons/turf/wall_masks.dmi', "reinf_construct-[construction_stage]")
|
||||||
I.color = reinf_material.icon_colour
|
I.color = reinf_material.icon_colour
|
||||||
add_overlay(I)
|
overlays += I
|
||||||
else
|
else
|
||||||
if("[reinf_material.icon_reinf]0" in icon_states('icons/turf/wall_masks.dmi'))
|
if("[reinf_material.icon_reinf]0" in icon_states('icons/turf/wall_masks.dmi'))
|
||||||
// Directional icon
|
// Directional icon
|
||||||
for(var/i = 1 to 4)
|
for(var/i = 1 to 4)
|
||||||
I = image('icons/turf/wall_masks.dmi', "[reinf_material.icon_reinf][wall_connections[i]]", dir = 1<<(i-1))
|
I = image('icons/turf/wall_masks.dmi', "[reinf_material.icon_reinf][wall_connections[i]]", dir = 1<<(i-1))
|
||||||
I.color = reinf_material.icon_colour
|
I.color = reinf_material.icon_colour
|
||||||
add_overlay(I)
|
overlays += I
|
||||||
else
|
else
|
||||||
I = image('icons/turf/wall_masks.dmi', reinf_material.icon_reinf)
|
I = image('icons/turf/wall_masks.dmi', reinf_material.icon_reinf)
|
||||||
I.color = reinf_material.icon_colour
|
I.color = reinf_material.icon_colour
|
||||||
add_overlay(I)
|
overlays += I
|
||||||
|
|
||||||
if(damage != 0)
|
if(damage != 0)
|
||||||
var/integrity = material.integrity
|
var/integrity = material.integrity
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
if(overlay > damage_overlays.len)
|
if(overlay > damage_overlays.len)
|
||||||
overlay = damage_overlays.len
|
overlay = damage_overlays.len
|
||||||
|
|
||||||
add_overlay(damage_overlays[overlay])
|
overlays += damage_overlays[overlay]
|
||||||
return
|
return
|
||||||
|
|
||||||
/turf/simulated/wall/proc/generate_overlays()
|
/turf/simulated/wall/proc/generate_overlays()
|
||||||
|
|||||||
@@ -230,7 +230,15 @@
|
|||||||
|
|
||||||
/turf/simulated/shuttle/wall/voidcraft/update_icon()
|
/turf/simulated/shuttle/wall/voidcraft/update_icon()
|
||||||
if(stripe_color)
|
if(stripe_color)
|
||||||
cut_overlays()
|
overlays = list() //VOREStation Edit - Another place with overlay nonsense.
|
||||||
var/image/I = image(icon = src.icon, icon_state = "o_[icon_state]")
|
var/image/I = image(icon = src.icon, icon_state = "o_[icon_state]")
|
||||||
I.color = stripe_color
|
I.color = stripe_color
|
||||||
add_overlay(I)
|
//VOREStation Add - Shenanigans around this because of the bullshit byond bug
|
||||||
|
var/pre_overlays = overlays.len
|
||||||
|
overlays.Add(I)
|
||||||
|
var/post_overlays = overlays.len
|
||||||
|
if(post_overlays != (pre_overlays + 1))
|
||||||
|
world.log << "Corrupted overlays on [x],[y],[z] voidcraft wall"
|
||||||
|
new type(src)
|
||||||
|
return
|
||||||
|
//VOREStation Add End
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
var/list/flesh_overlay_cache = list()
|
var/list/flesh_overlay_cache = list()
|
||||||
|
|
||||||
/turf/simulated/flesh/update_icon(var/update_neighbors)
|
/turf/simulated/flesh/update_icon(var/update_neighbors)
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
|
|
||||||
if(density)
|
if(density)
|
||||||
icon = 'icons/turf/stomach_vr.dmi'
|
icon = 'icons/turf/stomach_vr.dmi'
|
||||||
@@ -37,7 +37,7 @@ var/list/flesh_overlay_cache = list()
|
|||||||
var/place_dir = turn(direction, 180)
|
var/place_dir = turn(direction, 180)
|
||||||
if(!flesh_overlay_cache["flesh_side_[place_dir]"])
|
if(!flesh_overlay_cache["flesh_side_[place_dir]"])
|
||||||
flesh_overlay_cache["flesh_side_[place_dir]"] = image('icons/turf/stomach_vr.dmi', "flesh_side", dir = place_dir)
|
flesh_overlay_cache["flesh_side_[place_dir]"] = image('icons/turf/stomach_vr.dmi', "flesh_side", dir = place_dir)
|
||||||
add_overlay(flesh_overlay_cache["flesh_side_[place_dir]"])
|
T.overlays += flesh_overlay_cache["flesh_side_[place_dir]"]
|
||||||
|
|
||||||
if(update_neighbors)
|
if(update_neighbors)
|
||||||
for(var/direction in alldirs)
|
for(var/direction in alldirs)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/turf/simulated/floor/water/update_icon()
|
/turf/simulated/floor/water/update_icon()
|
||||||
|
overlays.Cut()
|
||||||
..() // To get the edges.
|
..() // To get the edges.
|
||||||
icon_state = water_state
|
icon_state = water_state
|
||||||
var/image/floorbed_sprite = image(icon = 'icons/turf/outdoors.dmi', icon_state = under_state)
|
var/image/floorbed_sprite = image(icon = 'icons/turf/outdoors.dmi', icon_state = under_state)
|
||||||
@@ -128,16 +129,16 @@ var/list/shoreline_icon_cache = list()
|
|||||||
// Water sprites are really annoying, so let BYOND sort it out.
|
// Water sprites are really annoying, so let BYOND sort it out.
|
||||||
/turf/simulated/floor/water/shoreline/update_icon()
|
/turf/simulated/floor/water/shoreline/update_icon()
|
||||||
underlays.Cut()
|
underlays.Cut()
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
..() // Get the underlay first.
|
..() // Get the underlay first.
|
||||||
var/cache_string = "[initial(icon_state)]_[water_state]_[dir]"
|
var/cache_string = "[initial(icon_state)]_[water_state]_[dir]"
|
||||||
if(cache_string in shoreline_icon_cache) // Check to see if an icon already exists.
|
if(cache_string in shoreline_icon_cache) // Check to see if an icon already exists.
|
||||||
add_overlay(shoreline_icon_cache[cache_string])
|
overlays += shoreline_icon_cache[cache_string]
|
||||||
else // If not, make one, but only once.
|
else // If not, make one, but only once.
|
||||||
var/icon/shoreline_water = icon(src.icon, "shoreline_water", src.dir)
|
var/icon/shoreline_water = icon(src.icon, "shoreline_water", src.dir)
|
||||||
var/icon/shoreline_subtract = icon(src.icon, "[initial(icon_state)]_subtract", src.dir)
|
var/icon/shoreline_subtract = icon(src.icon, "[initial(icon_state)]_subtract", src.dir)
|
||||||
shoreline_water.Blend(shoreline_subtract,ICON_SUBTRACT)
|
shoreline_water.Blend(shoreline_subtract,ICON_SUBTRACT)
|
||||||
|
|
||||||
shoreline_icon_cache[cache_string] = shoreline_water
|
shoreline_icon_cache[cache_string] = shoreline_water
|
||||||
add_overlay(shoreline_icon_cache[cache_string])
|
overlays += shoreline_icon_cache[cache_string]
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,12 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/turf/snow/update_icon()
|
/turf/snow/update_icon()
|
||||||
cut_overlays()
|
overlays.Cut()
|
||||||
for(var/d in crossed_dirs)
|
for(var/d in crossed_dirs)
|
||||||
var/amt = crossed_dirs[d]
|
var/amt = crossed_dirs[d]
|
||||||
|
|
||||||
for(var/i in 1 to amt)
|
for(var/i in 1 to amt)
|
||||||
add_overlay(image(icon, "footprint[i]", text2num(d)))
|
overlays += icon(icon, "footprint[i]", text2num(d))
|
||||||
|
|
||||||
/turf/snow/snow2
|
/turf/snow/snow2
|
||||||
name = "snow"
|
name = "snow"
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
/turf/space/cracked_asteroid/is_space() // So people don't start floating when standing on it.
|
/turf/space/cracked_asteroid/is_space() // So people don't start floating when standing on it.
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
// u wot m8? ~Leshana
|
/turf/space/cracked_asteroid/New()
|
||||||
// /turf/space/cracked_asteroid/New()
|
..()
|
||||||
// ..()
|
spawn(2 SECONDS)
|
||||||
// spawn(2 SECONDS)
|
overlays.Cut()
|
||||||
// overlays.Cut()
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
/turf/unsimulated/beach/water/New()
|
/turf/unsimulated/beach/water/New()
|
||||||
..()
|
..()
|
||||||
add_overlay(image("icon"='icons/misc/beach.dmi',"icon_state"="water2","layer"=MOB_LAYER+0.1))
|
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water2","layer"=MOB_LAYER+0.1)
|
||||||
|
|
||||||
/turf/simulated/floor/beach
|
/turf/simulated/floor/beach
|
||||||
name = "Beach"
|
name = "Beach"
|
||||||
@@ -56,4 +56,4 @@
|
|||||||
|
|
||||||
/turf/simulated/floor/beach/water/New()
|
/turf/simulated/floor/beach/water/New()
|
||||||
..()
|
..()
|
||||||
add_overlay(image("icon"='icons/misc/beach.dmi',"icon_state"="water5","layer"=MOB_LAYER+0.1))
|
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water5","layer"=MOB_LAYER+0.1)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
/turf/simulated/floor/holofloor/desert/New()
|
/turf/simulated/floor/holofloor/desert/New()
|
||||||
..()
|
..()
|
||||||
if(prob(10))
|
if(prob(10))
|
||||||
add_overlay("asteroid[rand(0,9)]")
|
overlays += "asteroid[rand(0,9)]"
|
||||||
|
|
||||||
/obj/structure/holostool
|
/obj/structure/holostool
|
||||||
name = "stool"
|
name = "stool"
|
||||||
|
|||||||
@@ -84,8 +84,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/vr_sprite_check()
|
/mob/living/silicon/robot/proc/vr_sprite_check()
|
||||||
if((icon_state in vr_icons) && (icon == 'icons/mob/robots.dmi'))
|
if((!(original_icon == icon)) && (!(icon == 'icons/mob/robots_vr.dmi')))
|
||||||
original_icon = icon
|
original_icon = icon
|
||||||
|
if((icon_state in vr_icons) && (icon == 'icons/mob/robots.dmi'))
|
||||||
icon = 'icons/mob/robots_vr.dmi'
|
icon = 'icons/mob/robots_vr.dmi'
|
||||||
else if(!(icon_state in vr_icons))
|
else if(!(icon_state in vr_icons))
|
||||||
icon = original_icon
|
icon = original_icon
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
* Update icon and overlays of open space to be that of the turf below, plus any visible objects on that turf.
|
* Update icon and overlays of open space to be that of the turf below, plus any visible objects on that turf.
|
||||||
*/
|
*/
|
||||||
/turf/simulated/open/update_icon()
|
/turf/simulated/open/update_icon()
|
||||||
cut_overlays() // Edit - Overlays are being crashy when modified.
|
overlays = list() // Edit - Overlays are being crashy when modified.
|
||||||
update_icon_edge()// Add - Get grass into open spaces and whatnot.
|
update_icon_edge()// Add - Get grass into open spaces and whatnot.
|
||||||
var/turf/below = GetBelow(src)
|
var/turf/below = GetBelow(src)
|
||||||
if(below)
|
if(below)
|
||||||
@@ -86,7 +86,12 @@
|
|||||||
bottom_turf.plane = src.plane
|
bottom_turf.plane = src.plane
|
||||||
bottom_turf.color = below.color
|
bottom_turf.color = below.color
|
||||||
underlays = list(bottom_turf)
|
underlays = list(bottom_turf)
|
||||||
copy_overlays(below)
|
// Hack workaround to byond crash bug - Include the magic overlay holder object.
|
||||||
|
overlays += below.overlays
|
||||||
|
// if(below.overlay_holder)
|
||||||
|
// overlays += (below.overlays + below.overlay_holder.overlays)
|
||||||
|
// else
|
||||||
|
// overlays += below.overlays
|
||||||
|
|
||||||
// get objects (not mobs, they are handled by /obj/zshadow)
|
// get objects (not mobs, they are handled by /obj/zshadow)
|
||||||
var/list/o_img = list()
|
var/list/o_img = list()
|
||||||
@@ -99,10 +104,16 @@
|
|||||||
temp2.overlays += O.overlays
|
temp2.overlays += O.overlays
|
||||||
// TODO Is pixelx/y needed?
|
// TODO Is pixelx/y needed?
|
||||||
o_img += temp2
|
o_img += temp2
|
||||||
add_overlay(o_img)
|
var/overlays_pre = overlays.len
|
||||||
|
overlays += o_img
|
||||||
|
var/overlays_post = overlays.len
|
||||||
|
if(overlays_post != (overlays_pre + o_img.len)) //Here we go!
|
||||||
|
world.log << "Corrupted openspace turf at [x],[y],[z] being replaced. Pre: [overlays_pre], Post: [overlays_post]"
|
||||||
|
new /turf/simulated/open(src)
|
||||||
|
return //Let's get out of here.
|
||||||
|
|
||||||
if(!below_is_open)
|
if(!below_is_open)
|
||||||
add_overlay(over_OS_darkness)
|
overlays += over_OS_darkness
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
return PROCESS_KILL
|
return PROCESS_KILL
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
|
|
||||||
/turf/simulated/floor/beach/coastwater/New()
|
/turf/simulated/floor/beach/coastwater/New()
|
||||||
..()
|
..()
|
||||||
add_overlay(image("icon"='icons/misc/beach.dmi',"icon_state"="water","layer"=MOB_LAYER+0.1))
|
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water","layer"=MOB_LAYER+0.1)
|
||||||
|
|
||||||
// -- Areas -- //
|
// -- Areas -- //
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,7 @@
|
|||||||
#include "code\controllers\subsystems\airflow.dm"
|
#include "code\controllers\subsystems\airflow.dm"
|
||||||
#include "code\controllers\subsystems\atoms.dm"
|
#include "code\controllers\subsystems\atoms.dm"
|
||||||
#include "code\controllers\subsystems\bellies_vr.dm"
|
#include "code\controllers\subsystems\bellies_vr.dm"
|
||||||
|
#include "code\controllers\subsystems\floor_decals.dm"
|
||||||
#include "code\controllers\subsystems\garbage.dm"
|
#include "code\controllers\subsystems\garbage.dm"
|
||||||
#include "code\controllers\subsystems\lighting.dm"
|
#include "code\controllers\subsystems\lighting.dm"
|
||||||
#include "code\controllers\subsystems\machines.dm"
|
#include "code\controllers\subsystems\machines.dm"
|
||||||
@@ -1235,6 +1236,7 @@
|
|||||||
#include "code\game\turfs\flooring\flooring_premade.dm"
|
#include "code\game\turfs\flooring\flooring_premade.dm"
|
||||||
#include "code\game\turfs\flooring\flooring_vr.dm"
|
#include "code\game\turfs\flooring\flooring_vr.dm"
|
||||||
#include "code\game\turfs\flooring\shuttle_vr.dm"
|
#include "code\game\turfs\flooring\shuttle_vr.dm"
|
||||||
|
#include "code\game\turfs\flooring\turf_overlay_holder.dm"
|
||||||
#include "code\game\turfs\initialization\init.dm"
|
#include "code\game\turfs\initialization\init.dm"
|
||||||
#include "code\game\turfs\initialization\maintenance.dm"
|
#include "code\game\turfs\initialization\maintenance.dm"
|
||||||
#include "code\game\turfs\simulated\floor.dm"
|
#include "code\game\turfs\simulated\floor.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user