mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 08:38:13 +01:00
Merge pull request #7247 from VOREStation/Arokha/erisfloors
Port various auto-decorating floors from Eris
This commit is contained in:
@@ -67,6 +67,7 @@ What is the naming convention for planes or layers?
|
||||
#define UNDERWATER_LAYER 2.5 // Anything on this layer will render under the water layer.
|
||||
#define WATER_LAYER 3.0 // Layer for water overlays.
|
||||
#define ABOVE_TURF_LAYER 3.1 // Snow and wallmounted/floormounted equipment
|
||||
#define TURF_DECAL_LAYER 3.2 // Mapped in floor decals, not automatic edges/corners
|
||||
#define DECAL_PLANE -44 // Permanent decals
|
||||
#define DIRTY_PLANE -43 // Nonpermanent decals
|
||||
#define BLOOD_PLANE -42 // Blood is really dirty, but we can do special stuff if we separate it
|
||||
|
||||
@@ -9,5 +9,12 @@
|
||||
#define TURF_IS_FRAGILE 256
|
||||
#define TURF_ACID_IMMUNE 512
|
||||
|
||||
//Used for floor/wall smoothing
|
||||
#define SMOOTH_NONE 0 //Smooth only with itself
|
||||
#define SMOOTH_ALL 1 //Smooth with all of type
|
||||
#define SMOOTH_WHITELIST 2 //Smooth with a whitelist of subtypes
|
||||
#define SMOOTH_BLACKLIST 3 //Smooth with all but a blacklist of subtypes
|
||||
#define SMOOTH_GREYLIST 4 // Use a whitelist and a blacklist at the same time. atom smoothing only
|
||||
|
||||
#define isCardinal(x) (x == NORTH || x == SOUTH || x == EAST || x == WEST)
|
||||
#define isDiagonal(x) (x == NORTHEAST || x == SOUTHEAST || x == NORTHWEST || x == SOUTHWEST)
|
||||
@@ -169,3 +169,11 @@
|
||||
T.ChangeTurf(get_base_turf_by_area(T))
|
||||
|
||||
return TRUE
|
||||
|
||||
//Used for border objects. This returns true if this atom is on the border between the two specified turfs
|
||||
//This assumes that the atom is located inside the target turf
|
||||
/atom/proc/is_between_turfs(var/turf/origin, var/turf/target)
|
||||
if (flags & ON_BORDER)
|
||||
var/testdir = get_dir(target, origin)
|
||||
return (dir & testdir)
|
||||
return TRUE
|
||||
|
||||
@@ -420,6 +420,11 @@
|
||||
/obj/structure/window/proc/is_fulltile()
|
||||
return fulltile
|
||||
|
||||
/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
|
||||
if(fulltile)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
update_icon()
|
||||
|
||||
@@ -45,6 +45,84 @@ var/list/flooring_types
|
||||
var/can_paint
|
||||
var/list/footstep_sounds = list() // key=species name, value = list of sounds,
|
||||
// For instance, footstep_sounds = list("key" = list(sound.ogg))
|
||||
var/is_plating = FALSE
|
||||
var/list/flooring_cache = list() // Cached overlays for our edges and corners and junk
|
||||
|
||||
//Plating types, can be overridden
|
||||
var/plating_type = null
|
||||
|
||||
//Resistance is subtracted from all incoming damage
|
||||
//var/resistance = RESISTANCE_FRAGILE
|
||||
|
||||
//Damage the floor can take before being destroyed
|
||||
//var/health = 50
|
||||
|
||||
//var/removal_time = WORKTIME_FAST * 0.75
|
||||
|
||||
//Flooring Icon vars
|
||||
var/smooth_nothing = FALSE //True/false only, optimisation
|
||||
//If true, all smoothing logic is entirely skipped
|
||||
|
||||
//The rest of these x_smooth vars use one of the following options
|
||||
//SMOOTH_NONE: Ignore all of type
|
||||
//SMOOTH_ALL: Smooth with all of type
|
||||
//SMOOTH_WHITELIST: Ignore all except types on this list
|
||||
//SMOOTH_BLACKLIST: Smooth with all except types on this list
|
||||
//SMOOTH_GREYLIST: Objects only: Use both lists
|
||||
|
||||
//How we smooth with other flooring
|
||||
var/floor_smooth = SMOOTH_NONE
|
||||
var/list/flooring_whitelist = list() //Smooth with nothing except the contents of this list
|
||||
var/list/flooring_blacklist = list() //Smooth with everything except the contents of this list
|
||||
|
||||
//How we smooth with walls
|
||||
var/wall_smooth = SMOOTH_NONE
|
||||
//There are no lists for walls at this time
|
||||
|
||||
//How we smooth with space and openspace tiles
|
||||
var/space_smooth = SMOOTH_NONE
|
||||
//There are no lists for spaces
|
||||
|
||||
/*
|
||||
How we smooth with movable atoms
|
||||
These are checked after the above turf based smoothing has been handled
|
||||
SMOOTH_ALL or SMOOTH_NONE are treated the same here. Both of those will just ignore atoms
|
||||
Using the white/blacklists will override what the turfs concluded, to force or deny smoothing
|
||||
|
||||
Movable atom lists are much more complex, to account for many possibilities
|
||||
Each entry in a list, is itself a list consisting of three items:
|
||||
Type: The typepath to allow/deny. This will be checked against istype, so all subtypes are included
|
||||
Priority: Used when items in two opposite lists conflict. The one with the highest priority wins out.
|
||||
Vars: An associative list of variables (varnames in text) and desired values
|
||||
Code will look for the desired vars on the target item and only call it a match if all desired values match
|
||||
This can be used, for example, to check that objects are dense and anchored
|
||||
there are no safety checks on this, it will probably throw runtimes if you make typos
|
||||
|
||||
Common example:
|
||||
Don't smooth with dense anchored objects except airlocks
|
||||
|
||||
smooth_movable_atom = SMOOTH_GREYLIST
|
||||
movable_atom_blacklist = list(
|
||||
list(/obj, list("density" = TRUE, "anchored" = TRUE), 1)
|
||||
)
|
||||
movable_atom_whitelist = list(
|
||||
list(/obj/machinery/door/airlock, list(), 2)
|
||||
)
|
||||
|
||||
*/
|
||||
var/smooth_movable_atom = SMOOTH_NONE
|
||||
var/list/movable_atom_whitelist = list()
|
||||
var/list/movable_atom_blacklist = list()
|
||||
|
||||
/decl/flooring/proc/get_plating_type(var/turf/T)
|
||||
return plating_type
|
||||
|
||||
/decl/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/layer = ABOVE_TURF_LAYER)
|
||||
if(!flooring_cache[cache_key])
|
||||
var/image/I = image(icon = icon, icon_state = icon_base, dir = icon_dir)
|
||||
I.layer = layer
|
||||
flooring_cache[cache_key] = I
|
||||
return flooring_cache[cache_key]
|
||||
|
||||
/decl/flooring/grass
|
||||
name = "grass"
|
||||
@@ -53,7 +131,7 @@ var/list/flooring_types
|
||||
icon_base = "grass"
|
||||
has_base_range = 1
|
||||
damage_temperature = T0C+80
|
||||
flags = TURF_HAS_EDGES | TURF_REMOVE_SHOVEL
|
||||
flags = TURF_HAS_EDGES | TURF_HAS_CORNERS | TURF_REMOVE_SHOVEL
|
||||
build_type = /obj/item/stack/tile/grass
|
||||
footstep_sounds = list("human" = list(
|
||||
'sound/effects/footstep/grass1.ogg',
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/floor_decals = list()
|
||||
var/image/I = floor_decals[cache_key]
|
||||
if(!I)
|
||||
I = image(icon = icon, icon_state = icon_state, dir = dir)
|
||||
I.layer = T.layer
|
||||
I.layer = TURF_DECAL_LAYER
|
||||
I.color = color
|
||||
I.alpha = alpha
|
||||
floor_decals[cache_key] = I
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/lava = 0
|
||||
|
||||
/turf/simulated/floor/is_plating()
|
||||
return !flooring
|
||||
return (!flooring || flooring.is_plating)
|
||||
|
||||
/turf/simulated/floor/Initialize(mapload, floortype)
|
||||
. = ..()
|
||||
@@ -59,8 +59,8 @@
|
||||
old_decals = current_decals
|
||||
|
||||
/turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring, var/initializing)
|
||||
make_plating(defer_icon_update = 1)
|
||||
if(!flooring && !initializing) // Plating -> Flooring
|
||||
//make_plating(defer_icon_update = 1)
|
||||
if(is_plating() && !initializing) // Plating -> Flooring
|
||||
swap_decals()
|
||||
flooring = newflooring
|
||||
footstep_sounds = newflooring.footstep_sounds
|
||||
@@ -79,11 +79,15 @@
|
||||
icon_state = base_icon_state
|
||||
footstep_sounds = base_footstep_sounds
|
||||
|
||||
if(flooring) // Flooring -> Plating
|
||||
if(!is_plating()) // Flooring -> Plating
|
||||
swap_decals()
|
||||
if(flooring.build_type && place_product)
|
||||
new flooring.build_type(src)
|
||||
flooring = null
|
||||
var/newtype = flooring.get_plating_type()
|
||||
if(newtype) // Has a custom plating type to become
|
||||
set_flooring(get_flooring_data(newtype))
|
||||
else
|
||||
flooring = null
|
||||
|
||||
set_light(0)
|
||||
broken = null
|
||||
@@ -95,8 +99,9 @@
|
||||
update_icon(1)
|
||||
|
||||
/turf/simulated/floor/levelupdate()
|
||||
var/floored_over = !is_plating()
|
||||
for(var/obj/O in src)
|
||||
O.hide(O.hides_under_flooring() && src.flooring)
|
||||
O.hide(O.hides_under_flooring() && floored_over)
|
||||
|
||||
/turf/simulated/floor/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
break
|
||||
return
|
||||
|
||||
if(flooring)
|
||||
if(!is_plating())
|
||||
if(istype(C, /obj/item/weapon))
|
||||
try_deconstruct_tile(C, user)
|
||||
return
|
||||
@@ -64,7 +64,6 @@
|
||||
try_replace_tile(C, user)
|
||||
return
|
||||
else
|
||||
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
if(broken || burnt)
|
||||
to_chat(user, "<span class='warning'>This section is too damaged to support anything. Use a welder to fix the damage.</span>")
|
||||
@@ -94,7 +93,7 @@
|
||||
// Stay still and focus...
|
||||
if(use_flooring.build_time && !do_after(user, use_flooring.build_time))
|
||||
return
|
||||
if(flooring || !S || !user || !use_flooring)
|
||||
if(!is_plating() || !S || !user || !use_flooring)
|
||||
return
|
||||
if(S.use(use_flooring.build_cost))
|
||||
set_flooring(use_flooring)
|
||||
|
||||
@@ -36,39 +36,39 @@ var/image/no_ceiling_image = null
|
||||
if(flooring.flags & TURF_HAS_EDGES)
|
||||
for(var/step_dir in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(src, step_dir)
|
||||
if(!test_link(T))
|
||||
if(!flooring.test_link(src, T))
|
||||
has_border |= step_dir
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[step_dir]", "[flooring.icon_base]_edges", step_dir))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-edge-[step_dir]", "[flooring.icon_base]_edges", step_dir))
|
||||
|
||||
//Note: Doesn't actually check northeast, this is bitmath to check if we're edge'd (aka not smoothed) to NORTH and EAST
|
||||
//North = 0001, East = 0100, Northeast = 0101, so (North|East) == Northeast, therefore (North|East)&Northeast == Northeast
|
||||
if((has_border & NORTHEAST) == NORTHEAST)
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[NORTHEAST]", "[flooring.icon_base]_edges", NORTHEAST))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-edge-[NORTHEAST]", "[flooring.icon_base]_edges", NORTHEAST))
|
||||
if((has_border & NORTHWEST) == NORTHWEST)
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[NORTHWEST]", "[flooring.icon_base]_edges", NORTHWEST))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-edge-[NORTHWEST]", "[flooring.icon_base]_edges", NORTHWEST))
|
||||
if((has_border & SOUTHEAST) == SOUTHEAST)
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHEAST]", "[flooring.icon_base]_edges", SOUTHEAST))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHEAST]", "[flooring.icon_base]_edges", SOUTHEAST))
|
||||
if((has_border & SOUTHWEST) == SOUTHWEST)
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHWEST]", "[flooring.icon_base]_edges", SOUTHWEST))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-edge-[SOUTHWEST]", "[flooring.icon_base]_edges", SOUTHWEST))
|
||||
|
||||
if(flooring.flags & TURF_HAS_CORNERS)
|
||||
//Like above but checking for NO similar bits rather than both similar bits.
|
||||
if((has_border & NORTHEAST) == 0) //Are connected NORTH and EAST
|
||||
var/turf/simulated/floor/T = get_step(src, NORTHEAST)
|
||||
if(!test_link(T)) //But not NORTHEAST
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[NORTHEAST]", "[flooring.icon_base]_corners", NORTHEAST))
|
||||
if(!flooring.test_link(src, T)) //But not NORTHEAST
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-corner-[NORTHEAST]", "[flooring.icon_base]_corners", NORTHEAST))
|
||||
if((has_border & NORTHWEST) == 0)
|
||||
var/turf/simulated/floor/T = get_step(src, NORTHWEST)
|
||||
if(!test_link(T))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[NORTHWEST]", "[flooring.icon_base]_corners", NORTHWEST))
|
||||
if(!flooring.test_link(src, T))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-corner-[NORTHWEST]", "[flooring.icon_base]_corners", NORTHWEST))
|
||||
if((has_border & SOUTHEAST) == 0)
|
||||
var/turf/simulated/floor/T = get_step(src, SOUTHEAST)
|
||||
if(!test_link(T))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHEAST]", "[flooring.icon_base]_corners", SOUTHEAST))
|
||||
if(!flooring.test_link(src, T))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHEAST]", "[flooring.icon_base]_corners", SOUTHEAST))
|
||||
if((has_border & SOUTHWEST) == 0)
|
||||
var/turf/simulated/floor/T = get_step(src, SOUTHWEST)
|
||||
if(!test_link(T))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHWEST]", "[flooring.icon_base]_corners", SOUTHWEST))
|
||||
if(!flooring.test_link(src, T))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-corner-[SOUTHWEST]", "[flooring.icon_base]_corners", SOUTHWEST))
|
||||
|
||||
// Re-apply floor decals
|
||||
if(LAZYLEN(decals))
|
||||
@@ -79,9 +79,9 @@ var/image/no_ceiling_image = null
|
||||
icon_state = "dmg[rand(1,4)]"
|
||||
else if(flooring)
|
||||
if(!isnull(broken) && (flooring.flags & TURF_CAN_BREAK))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-broken-[broken]","broken[broken]"))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-broken-[broken]","broken[broken]"))
|
||||
if(!isnull(burnt) && (flooring.flags & TURF_CAN_BURN))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-burned-[burnt]","burned[burnt]"))
|
||||
add_overlay(flooring.get_flooring_overlay("[flooring.icon_base]-burned-[burnt]","burned[burnt]"))
|
||||
|
||||
if(update_neighbors)
|
||||
for(var/turf/simulated/floor/F in range(src, 1))
|
||||
@@ -129,9 +129,153 @@ var/image/no_ceiling_image = null
|
||||
return S
|
||||
return null
|
||||
|
||||
//Tests whether this flooring will smooth with the specified turf
|
||||
//You can override this if you want a flooring to have super special snowflake smoothing behaviour
|
||||
/decl/flooring/proc/test_link(var/turf/origin, var/turf/T, var/countercheck = FALSE)
|
||||
|
||||
/turf/simulated/floor/proc/test_link(var/turf/simulated/floor/them)
|
||||
return (istype(them) && them.flooring?.name == src.flooring.name)
|
||||
var/is_linked = FALSE
|
||||
if (countercheck)
|
||||
//If this is a countercheck, we skip all of the above, start off with true, and go straight to the atom lists
|
||||
is_linked = TRUE
|
||||
else if(T)
|
||||
|
||||
//If it's a wall, use the wall_smooth setting
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
if(wall_smooth == SMOOTH_ALL)
|
||||
is_linked = TRUE
|
||||
|
||||
//If it's space or openspace, use the space_smooth setting
|
||||
else if(isspace(T) || isopenspace(T))
|
||||
if(space_smooth == SMOOTH_ALL)
|
||||
is_linked = TRUE
|
||||
|
||||
//If we get here then its a normal floor
|
||||
else if (istype(T, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/t = T
|
||||
//If the floor is the same as us,then we're linked,
|
||||
if (t.flooring?.type == type)
|
||||
is_linked = TRUE
|
||||
/*
|
||||
But there's a caveat. To make atom black/whitelists work correctly, we also need to check that
|
||||
they smooth with us. Ill call this counterchecking for simplicity.
|
||||
This is needed to make both turfs have the correct borders
|
||||
|
||||
To prevent infinite loops we have a countercheck var, which we'll set true
|
||||
*/
|
||||
|
||||
if (smooth_movable_atom != SMOOTH_NONE)
|
||||
//We do the countercheck, passing countercheck as true
|
||||
is_linked = test_link(T, origin, countercheck = TRUE)
|
||||
|
||||
else if (floor_smooth == SMOOTH_ALL)
|
||||
is_linked = TRUE
|
||||
|
||||
else if (floor_smooth != SMOOTH_NONE)
|
||||
//If we get here it must be using a whitelist or blacklist
|
||||
if (floor_smooth == SMOOTH_WHITELIST)
|
||||
for (var/v in flooring_whitelist)
|
||||
if (istype(t.flooring, v))
|
||||
//Found a match on the list
|
||||
is_linked = TRUE
|
||||
break
|
||||
else if(floor_smooth == SMOOTH_BLACKLIST)
|
||||
is_linked = TRUE //Default to true for the blacklist, then make it false if a match comes up
|
||||
for (var/v in flooring_whitelist)
|
||||
if (istype(t.flooring, v))
|
||||
//Found a match on the list
|
||||
is_linked = FALSE
|
||||
break
|
||||
|
||||
//Alright now we have a preliminary answer about smoothing, however that answer may change with the following
|
||||
//Atom lists!
|
||||
var/best_priority = -1
|
||||
//A white or blacklist entry will only override smoothing if its priority is higher than this
|
||||
//And then this value becomes its priority
|
||||
if (smooth_movable_atom != SMOOTH_NONE)
|
||||
if (smooth_movable_atom == SMOOTH_WHITELIST || smooth_movable_atom == SMOOTH_GREYLIST)
|
||||
for (var/list/v in movable_atom_whitelist)
|
||||
var/d_type = v[1]
|
||||
var/list/d_vars = v[2]
|
||||
var/d_priority = v[3]
|
||||
//Priority is the quickest thing to check first
|
||||
if (d_priority <= best_priority)
|
||||
continue
|
||||
|
||||
//Ok, now we start testing all the atoms in the target turf
|
||||
for (var/a in T) //No implicit typecasting here, faster
|
||||
|
||||
if (istype(a, d_type))
|
||||
//It's the right type, so we're sure it will have the vars we want.
|
||||
|
||||
var/atom/movable/AM = a
|
||||
//Typecast it to a movable atom
|
||||
//Lets make sure its in the way before we consider it
|
||||
if (!AM.is_between_turfs(origin, T))
|
||||
continue
|
||||
|
||||
//From here on out, we do dangerous stuff that may runtime if the coder screwed up
|
||||
|
||||
|
||||
var/match = TRUE
|
||||
for (var/d_var in d_vars)
|
||||
//For each variable we want to check
|
||||
if (AM.vars[d_var] != d_vars[d_var])
|
||||
//We get a var of the same name from the atom's vars list.
|
||||
//And check if it equals our desired value
|
||||
match = FALSE
|
||||
break //If any var doesn't match the desired value, then this atom is not a match, move on
|
||||
|
||||
|
||||
if (match)
|
||||
//If we've successfully found an atom which matches a list entry
|
||||
best_priority = d_priority //This one is king until a higher priority overrides it
|
||||
|
||||
//And this is a whitelist, so this match forces is_linked to true
|
||||
is_linked = TRUE
|
||||
|
||||
|
||||
if (smooth_movable_atom == SMOOTH_BLACKLIST || smooth_movable_atom == SMOOTH_GREYLIST)
|
||||
//All of this blacklist code is copypasted from above, with only minor name changes
|
||||
for (var/list/v in movable_atom_blacklist)
|
||||
var/d_type = v[1]
|
||||
var/list/d_vars = v[2]
|
||||
var/d_priority = v[3]
|
||||
//Priority is the quickest thing to check first
|
||||
if (d_priority <= best_priority)
|
||||
continue
|
||||
|
||||
//Ok, now we start testing all the atoms in the target turf
|
||||
for (var/a in T) //No implicit typecasting here, faster
|
||||
|
||||
if (istype(a, d_type))
|
||||
//It's the right type, so we're sure it will have the vars we want.
|
||||
|
||||
var/atom/movable/AM = a
|
||||
//Typecast it to a movable atom
|
||||
//Lets make sure its in the way before we consider it
|
||||
if (!AM.is_between_turfs(origin, T))
|
||||
continue
|
||||
|
||||
//From here on out, we do dangerous stuff that may runtime if the coder screwed up
|
||||
|
||||
var/match = TRUE
|
||||
for (var/d_var in d_vars)
|
||||
//For each variable we want to check
|
||||
if (AM.vars[d_var] != d_vars[d_var])
|
||||
//We get a var of the same name from the atom's vars list.
|
||||
//And check if it equals our desired value
|
||||
match = FALSE
|
||||
break //If any var doesn't match the desired value, then this atom is not a match, move on
|
||||
|
||||
|
||||
if (match)
|
||||
//If we've successfully found an atom which matches a list entry
|
||||
best_priority = d_priority //This one is king until a higher priority overrides it
|
||||
|
||||
//And this is a blacklist, so this match forces is_linked to false
|
||||
is_linked = FALSE
|
||||
|
||||
return is_linked
|
||||
|
||||
/turf/simulated/floor/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0)
|
||||
if(!flooring_cache[cache_key])
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -981,7 +981,10 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
if(!depth || lying)
|
||||
return
|
||||
|
||||
overlays_standing[WATER_LAYER] = image(icon = 'icons/mob/submerged.dmi', icon_state = "human_swimming_[depth]", layer = BODY_LAYER+WATER_LAYER) //TODO: Improve
|
||||
var/atom/A = loc // We'd better be swimming and on a turf
|
||||
var/image/I = image(icon = 'icons/mob/submerged.dmi', icon_state = "human_swimming_[depth]", layer = BODY_LAYER+WATER_LAYER) //TODO: Improve
|
||||
I.color = A.color
|
||||
overlays_standing[WATER_LAYER] = I
|
||||
|
||||
apply_layer(WATER_LAYER)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user