diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm
new file mode 100644
index 00000000000..06c7f4151df
--- /dev/null
+++ b/code/__DEFINES/layers.dm
@@ -0,0 +1,54 @@
+//Defines for atom layers
+//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE
+
+//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
+#define ABOVE_OPEN_TURF_LAYER 2.01
+#define CLOSED_TURF_LAYER 2.05
+#define ABOVE_NORMAL_TURF_LAYER 2.08
+#define LATTICE_LAYER 2.2
+#define DISPOSAL_PIPE_LAYER 2.3
+#define GAS_PIPE_LAYER 2.35
+#define WIRE_LAYER 2.4
+#define WIRE_TERMINAL_LAYER 2.45
+#define LOW_OBJ_LAYER 2.5
+
+#define OPEN_DOOR_LAYER 2.7
+#define PROJECTILE_HIT_THRESHHOLD_LAYER 2.75 //projectiles won't hit objects at or below this layer if possible
+#define TABLE_LAYER 2.8
+#define BELOW_OBJ_LAYER 2.9
+#define LOW_ITEM_LAYER 2.95
+//#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define
+#define CLOSED_DOOR_LAYER 3.1
+#define CLOSED_FIREDOOR_LAYER 3.11
+#define ABOVE_OBJ_LAYER 3.2
+#define SIGN_LAYER 3.4
+#define HIGH_OBJ_LAYER 3.5
+
+#define BELOW_MOB_LAYER 3.7
+#define LYING_MOB_LAYER 3.8
+//#define MOB_LAYER 4 //For easy recordkeeping; this is a byond define
+#define ABOVE_MOB_LAYER 4.1
+#define WALL_OBJ_LAYER 4.25
+#define EDGED_TURF_LAYER 4.3
+#define ON_EDGED_TURF_LAYER 4.35
+#define LARGE_MOB_LAYER 4.4
+#define ABOVE_ALL_MOB_LAYER 4.5
+
+#define SPACEVINE_LAYER 4.8
+#define SPACEVINE_MOB_LAYER 4.9
+//#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define
+
+#define GHOST_LAYER 6
+#define AREA_LAYER 10
+#define MASSIVE_OBJ_LAYER 11
+#define POINT_LAYER 12
+#define LIGHTING_LAYER 15
+
+//HUD layer defines
+#define FLASH_LAYER 17.9
+#define FULLSCREEN_LAYER 18
+#define DAMAGE_LAYER 18.1
+#define BLIND_LAYER 18.2
+#define CRIT_LAYER 18.3
+#define HUD_LAYER 19
+#define ABOVE_HUD_LAYER 19.1
diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm
index 8e3dcd2aa39..66e4e1fd3c4 100644
--- a/code/_onclick/hud/blob_overmind.dm
+++ b/code/_onclick/hud/blob_overmind.dm
@@ -125,7 +125,7 @@
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.mouse_opacity = 0
- blobpwrdisplay.layer = 20
+ blobpwrdisplay.layer = ABOVE_HUD_LAYER
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob()
diff --git a/code/_onclick/hud/demon.dm b/code/_onclick/hud/demon.dm
index fc0d923e080..5ed4f9847b9 100644
--- a/code/_onclick/hud/demon.dm
+++ b/code/_onclick/hud/demon.dm
@@ -35,7 +35,7 @@
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand1
- using.layer = 19
+ using.layer = HUD_LAYER
static_inventory += using
using = new /obj/screen/inventory()
@@ -43,7 +43,7 @@
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand2
- using.layer = 19
+ using.layer = HUD_LAYER
static_inventory += using
zone_select = new /obj/screen/zone_sel()
diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm
index a0a74545db8..4831d736969 100644
--- a/code/_onclick/hud/fullscreen.dm
+++ b/code/_onclick/hud/fullscreen.dm
@@ -1,7 +1,3 @@
-#define FULLSCREEN_LAYER 18
-#define DAMAGE_LAYER FULLSCREEN_LAYER + 0.1
-#define BLIND_LAYER DAMAGE_LAYER + 0.1
-#define CRIT_LAYER BLIND_LAYER + 0.1
/mob
var/list/screens = list()
@@ -110,8 +106,3 @@
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
-
-#undef FULLSCREEN_LAYER
-#undef BLIND_LAYER
-#undef DAMAGE_LAYER
-#undef CRIT_LAYER
diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm
index e1bacf6922d..2bbc92c7cd4 100644
--- a/code/_onclick/hud/other_mobs.dm
+++ b/code/_onclick/hud/other_mobs.dm
@@ -31,11 +31,11 @@
name = "Faith"
icon_state = "deity_power"
screen_loc = ui_deitypower
- layer = 20
+ layer = HUD_LAYER
/obj/screen/deity_follower_display
name = "Followers"
icon_state = "deity_followers"
screen_loc = ui_deityfollowers
- layer = 20
+ layer = HUD_LAYER
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index b13623a9bfd..7c69ae2a8a9 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -197,7 +197,7 @@
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
- A.layer = 20
+ A.layer = ABOVE_HUD_LAYER
x++
if(x == 4)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 4cd7f81ecce..8fe5ec01029 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -9,7 +9,7 @@
/obj/screen
name = ""
icon = 'icons/mob/screen_gen.dmi'
- layer = 20
+ layer = ABOVE_HUD_LAYER
unacidable = 1
appearance_flags = APPEARANCE_UI
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
@@ -29,7 +29,7 @@
maptext_width = 480
/obj/screen/swap_hand
- layer = 19
+ layer = HUD_LAYER
name = "swap hand"
/obj/screen/swap_hand/Click()
@@ -60,7 +60,7 @@
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
var/icon_empty // Icon when empty. For now used only by humans.
var/icon_full // Icon when contains an item. For now used only by humans.
- layer = 19
+ layer = HUD_LAYER
/obj/screen/inventory/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else
@@ -154,7 +154,7 @@
name = "drop"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_drop"
- layer = 19
+ layer = HUD_LAYER
/obj/screen/drop/Click()
usr.drop_item_v()
@@ -289,7 +289,7 @@
name = "resist"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist"
- layer = 19
+ layer = HUD_LAYER
/obj/screen/resist/Click()
if(isliving(usr))
@@ -403,7 +403,7 @@
icon_state = "blank"
blend_mode = BLEND_ADD
screen_loc = "WEST,SOUTH to EAST,NORTH"
- layer = 17
+ layer = FLASH_LAYER
/obj/screen/damageoverlay
icon = 'icons/mob/screen_full.dmi'
@@ -412,7 +412,7 @@
blend_mode = BLEND_MULTIPLY
screen_loc = "CENTER-7,CENTER-7"
mouse_opacity = 0
- layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
+ layer = DAMAGE_LAYER
/obj/screen/healths
name = "health"
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index a8fbcf17bb9..50438376e89 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -71,7 +71,7 @@ var/const/tk_maxrange = 15
flags = NOBLUDGEON | ABSTRACT
//item_state = null
w_class = 10
- layer = 20
+ layer = ABOVE_HUD_LAYER
var/last_throw = 0
var/atom/movable/focus = null
diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm
index bb4f8d28ffa..1077f37946c 100644
--- a/code/game/area/Space_Station_13_areas.dm
+++ b/code/game/area/Space_Station_13_areas.dm
@@ -19,7 +19,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Space"
icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
- layer = 10
+ layer = AREA_LAYER
mouse_opacity = 0
invisibility = INVISIBILITY_LIGHTING
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index d556f2a5b2e..2f7d234255b 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -26,7 +26,7 @@
/area/New()
icon_state = ""
- layer = 10
+ layer = AREA_LAYER
master = src
uid = ++global_uid
related = list(src)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 99e5a8205b7..4a2c0a330ee 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1,5 +1,5 @@
/atom
- layer = 2
+ layer = TURF_LAYER
var/level = 2
var/flags = 0
var/list/fingerprints
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 8952ff9b962..8d6d5705654 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -1,5 +1,5 @@
/atom/movable
- layer = 3
+ layer = OBJ_LAYER
var/last_move = null
var/anchored = 0
var/throwing = 0
diff --git a/code/game/gamemodes/clock_cult/clock_objects.dm b/code/game/gamemodes/clock_cult/clock_objects.dm
index da634d756e3..ee80c39f8cb 100644
--- a/code/game/gamemodes/clock_cult/clock_objects.dm
+++ b/code/game/gamemodes/clock_cult/clock_objects.dm
@@ -1317,7 +1317,7 @@
icon = 'icons/effects/96x96.dmi'
pixel_x = -30
pixel_y = -30
- layer = 2.01
+ layer = ABOVE_OPEN_TURF_LAYER
/obj/effect/clockwork/judicial_marker/New()
..()
@@ -1438,7 +1438,7 @@
desc = "Some big guy."
clockwork_desc = "One of Ratvar's generals."
alpha = 200
- layer = 10
+ layer = MASSIVE_OBJ_LAYER
/obj/effect/clockwork/general_marker/New()
..()
diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm
index c3cbc6f5aac..2d10a958b95 100644
--- a/code/game/gamemodes/clock_cult/clock_ratvar.dm
+++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm
@@ -1,7 +1,7 @@
/obj/structure/clockwork/massive //For objects that are typically very large
name = "massive construct"
desc = "A very large construction."
- layer = 10
+ layer = MASSIVE_OBJ_LAYER
/obj/structure/clockwork/massive/celestial_gateway //The gateway to Reebe, from which Ratvar emerges
name = "Gateway to the Celestial Derelict"
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index ebc7070d780..73ec9b1982c 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -189,7 +189,7 @@
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands)
. = list()
if(!isinhands && current_charges)
- . += image(layer = MOB_LAYER+0.05, icon = 'icons/effects/effects.dmi', icon_state = "shield-cult")
+ . += image(layer = MOB_LAYER+0.01, icon = 'icons/effects/effects.dmi', icon_state = "shield-cult")
/obj/item/clothing/suit/hooded/cultrobes/berserker
name = "flagellant's robes"
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index ba4d77b455c..293ccca04ae 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -22,7 +22,7 @@ To draw a rune, use an arcane tome.
icon = 'icons/obj/rune.dmi'
icon_state = "1"
unacidable = 1
- layer = TURF_LAYER + 0.08
+ layer = ABOVE_NORMAL_TURF_LAYER
color = rgb(255,0,0)
var/invocation = "Aiy ele-mayo!" //This is said by cultists when the rune is invoked.
diff --git a/code/game/gamemodes/demon/true_demon/inventory.dm b/code/game/gamemodes/demon/true_demon/inventory.dm
index 23035370135..b288fab269c 100644
--- a/code/game/gamemodes/demon/true_demon/inventory.dm
+++ b/code/game/gamemodes/demon/true_demon/inventory.dm
@@ -20,7 +20,7 @@
hands_overlays += r_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
- r_hand.layer = 20
+ r_hand.layer = ABOVE_HUD_LAYER
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
@@ -35,7 +35,7 @@
hands_overlays += l_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
- l_hand.layer = 20
+ l_hand.layer = ABOVE_HUD_LAYER
l_hand.screen_loc = ui_lhand
client.screen |= l_hand
if(hands_overlays.len)
diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm
index bc1236d7d0e..d53fe91186a 100644
--- a/code/game/gamemodes/gang/dominator.dm
+++ b/code/game/gamemodes/gang/dominator.dm
@@ -5,7 +5,7 @@
icon_state = "dominator"
density = 1
anchored = 1
- layer = 3.6
+ layer = HIGH_OBJ_LAYER
var/maxhealth = 200
var/health = 200
var/datum/gang/gang
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index 4aa0633f3be..aac99630f9e 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -389,7 +389,7 @@
/obj/effect/overlay/temp/swarmer //temporary swarmer visual feedback objects
icon = 'icons/mob/swarmer.dmi'
- layer = MOB_LAYER
+ layer = BELOW_MOB_LAYER
/obj/effect/overlay/temp/swarmer/disintegration
icon_state = "disintegrate"
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 7ca8a800923..8f30a8bfca4 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -18,7 +18,7 @@
invisibility = INVISIBILITY_REVENANT
health = INFINITY //Revenants don't use health, they use essence instead
maxHealth = INFINITY
- layer = 5
+ layer = GHOST_LAYER
healable = 0
sight = SEE_SELF
see_invisible = SEE_INVISIBLE_NOLIGHTING
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 418a878733d..67600b7e11a 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -48,7 +48,7 @@ var/bomb_set
icon = 'icons/obj/machines/nuke_terminal.dmi'
icon_state = "nuclearbomb_base"
anchored = 1 //stops it being moved
- layer = 4
+ layer = MOB_LAYER
/obj/machinery/nuclearbomb/syndicate
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 9f61521660c..d13a9d588fd 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -145,28 +145,28 @@ var/hsboxspawn = 1
P.wear_suit.layer = initial(P.wear_suit.layer)
P.wear_suit = null
P.wear_suit = new/obj/item/clothing/suit/space(P)
- P.wear_suit.layer = 20
+ P.wear_suit.layer = ABOVE_HUD_LAYER
P.update_inv_wear_suit()
if(P.head)
P.head.loc = P.loc
P.head.layer = initial(P.head.layer)
P.head = null
P.head = new/obj/item/clothing/head/helmet/space(P)
- P.head.layer = 20
+ P.head.layer = ABOVE_HUD_LAYER
P.update_inv_head()
if(P.wear_mask)
P.wear_mask.loc = P.loc
P.wear_mask.layer = initial(P.wear_mask.layer)
P.wear_mask = null
P.wear_mask = new/obj/item/clothing/mask/gas(P)
- P.wear_mask.layer = 20
+ P.wear_mask.layer = ABOVE_HUD_LAYER
P.update_inv_wear_mask()
if(P.back)
P.back.loc = P.loc
P.back.layer = initial(P.back.layer)
P.back = null
P.back = new/obj/item/weapon/tank/jetpack/oxygen(P)
- P.back.layer = 20
+ P.back.layer = ABOVE_HUD_LAYER
P.update_inv_back()
P.internal = P.back
P.update_internals_hud_icon(1)
diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm
index 4121a1baefd..a995968f4f0 100644
--- a/code/game/machinery/Beacon.dm
+++ b/code/game/machinery/Beacon.dm
@@ -5,7 +5,7 @@
name = "bluespace gigabeacon"
desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
level = 1 // underfloor
- layer = 2.5
+ layer = LOW_OBJ_LAYER
anchored = 1
use_power = 1
idle_power_usage = 0
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index acf294fd25c..e75c9827e14 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -2,7 +2,7 @@
name = "\improper AI liquid dispenser"
icon = 'icons/obj/device.dmi'
icon_state = "motion3"
- layer = 3
+ layer = PROJECTILE_HIT_THRESHHOLD_LAYER
anchored = 1
var/uses = 20
var/disabled = 1
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index b916029f14e..5ba7192f8bd 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -10,7 +10,7 @@
use_power = 2
idle_power_usage = 5
active_power_usage = 10
- layer = MOB_LAYER + 0.25
+ layer = WALL_OBJ_LAYER
var/health = 50
var/list/network = list("SS13")
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 5a4292e3e42..b57a640508d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -986,7 +986,7 @@ var/list/airlock_overlays = list()
sleep(5)
src.density = 0
sleep(9)
- src.layer = 2.7
+ src.layer = OPEN_DOOR_LAYER
update_icon(AIRLOCK_OPEN, 1)
SetOpacity(0)
operating = 0
@@ -1023,7 +1023,7 @@ var/list/airlock_overlays = list()
return 1
operating = 1
update_icon(AIRLOCK_CLOSING, 1)
- src.layer = 3.1
+ src.layer = CLOSED_DOOR_LAYER
sleep(5)
src.density = 1
if(!safe)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 81f3a3af60d..015c78b195a 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -6,7 +6,7 @@
anchored = 1
opacity = 1
density = 1
- layer = 2.7
+ layer = OPEN_DOOR_LAYER
power_channel = ENVIRON
var/secondsElectrified = 0
@@ -19,7 +19,7 @@
var/heat_proof = 0 // For rglass-windowed airlocks and firedoors
var/emergency = 0 // Emergency access override
var/sub_door = 0 // 1 if it's meant to go under another door.
- var/closingLayer = 3.1
+ var/closingLayer = CLOSED_DOOR_LAYER
var/autoclose = 0 //does it automatically close after some time
var/safe = 1 //whether the door detects things and mobs in its way and reopen or crushes them.
var/locked = 0 //whether the door is bolted or not.
@@ -29,9 +29,9 @@
/obj/machinery/door/New()
..()
if(density)
- layer = 3.1 //Above most items if closed
+ layer = CLOSED_DOOR_LAYER //Above most items if closed
else
- layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
+ layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
update_freelook_sight()
air_update_turf(1)
airlocks += src
@@ -245,7 +245,7 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
sleep(5)
density = 0
sleep(5)
- layer = 2.7
+ layer = OPEN_DOOR_LAYER
update_icon()
SetOpacity(0)
operating = 0
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index e2d5046c0d3..b94612e7d3f 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -18,7 +18,7 @@
glass = 1
var/nextstate = null
sub_door = 1
- closingLayer = 3.11
+ closingLayer = CLOSED_FIREDOOR_LAYER
/obj/machinery/door/firedoor/Bumped(atom/AM)
if(panel_open || operating)
diff --git a/code/game/machinery/doors/shutters.dm b/code/game/machinery/doors/shutters.dm
index 75fa01a2979..9c114009071 100644
--- a/code/game/machinery/doors/shutters.dm
+++ b/code/game/machinery/doors/shutters.dm
@@ -3,7 +3,7 @@
name = "shutters"
desc = "Heavy duty metal shutters that opens mechanically."
icon = 'icons/obj/doors/shutters.dmi'
- layer = 3.1
+ layer = CLOSED_DOOR_LAYER
/obj/machinery/door/poddoor/shutters/preopen
icon_state = "open"
@@ -15,14 +15,14 @@
/obj/machinery/door/poddoor/shutters/New()
..()
- layer = 3.1 //to handle /obj/machinery/door/New() resetting the layer.
+ layer = CLOSED_DOOR_LAYER //to handle /obj/machinery/door/New() resetting the layer.
/obj/machinery/door/poddoor/shutters/open(ignorepower = 0)
..()
- layer = 3.1
+ layer = CLOSED_DOOR_LAYER
/obj/machinery/door/poddoor/shutters/close(ignorepower = 0)
..()
- layer = 3.1
\ No newline at end of file
+ layer = CLOSED_DOOR_LAYER
\ No newline at end of file
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 49bf6e7d916..f776b3929fd 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -35,7 +35,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
- layer = 2.1
+ layer = LOW_OBJ_LAYER
flags = HEAR
languages = ROBOT | HUMAN
var/list/masters = list()//List of AIs that use the holopad
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 0eb8c805d4c..56267483da4 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -11,7 +11,7 @@
name = "electromagnetic generator"
desc = "A device that uses station power to create points of magnetic energy."
level = 1 // underfloor
- layer = 2.5
+ layer = LOW_OBJ_LAYER
anchored = 1
use_power = 1
idle_power_usage = 50
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 0bf936413c2..9b644c909bc 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -8,7 +8,7 @@
name = "navigation beacon"
desc = "A radio beacon used for bot navigation."
level = 1 // underfloor
- layer = 2.5
+ layer = LOW_OBJ_LAYER
anchored = 1
var/open = 0 // true if cover is open
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index a920d418d14..06c78ba1905 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -178,7 +178,7 @@
qdel(I)
qdel(J)
H.icon = HI
- H.layer = 25
+ H.layer = ABOVE_HUD_LAYER
usr.mapobjs += H
#else
@@ -296,7 +296,7 @@
H.icon = I
qdel(I)
- H.layer = 25
+ H.layer = ABOVE_HUD_LAYER
usr.mapobjs += H
#endif
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index d015bb1a975..6a67e4e3f07 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -3,7 +3,7 @@
icon = 'icons/obj/turrets.dmi'
icon_state = "grey_target_prism"
anchored = 1
- layer = 3
+ layer = OBJ_LAYER
invisibility = INVISIBILITY_OBSERVER //the turret is invisible if it's inside its cover
density = 1
use_power = 1 //this turret uses and requires power
@@ -502,7 +502,7 @@
if(cover)
cover.icon_state = "openTurretCover"
raised = 1
- layer = 4
+ layer = MOB_LAYER
/obj/machinery/porta_turret/proc/popDown() //pops the turret down
if(disabled)
@@ -511,7 +511,7 @@
return
if(stat & BROKEN)
return
- layer = 3
+ layer = OBJ_LAYER
raising = 1
if(cover)
flick("popdown", cover)
diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm
index a65694405a7..bb399096382 100644
--- a/code/game/machinery/porta_turret/portable_turret_cover.dm
+++ b/code/game/machinery/porta_turret/portable_turret_cover.dm
@@ -8,7 +8,7 @@
icon = 'icons/obj/turrets.dmi'
icon_state = "turretCover"
anchored = 1
- layer = 3.5
+ layer = HIGH_OBJ_LAYER
density = 0
var/obj/machinery/porta_turret/parent_turret = null
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index 319ce51d949..4b37378f666 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -5,7 +5,7 @@ var/const/SAFETY_COOLDOWN = 100
desc = "A large crushing machine which is used to recycle small items ineffeciently; there are lights on the side of it."
icon = 'icons/obj/recycling.dmi'
icon_state = "grinder-o0"
- layer = MOB_LAYER+1 // Overhead
+ layer = ABOVE_ALL_MOB_LAYER // Overhead
anchored = 1
density = 1
var/safety_mode = FALSE // Temporarily stops machine if it detects a mob
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index c0658a1fdc5..3243e0cf5fb 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -111,7 +111,7 @@
anchored = 0
density = 1
- layer = MOB_LAYER - 0.2 //so people can't hide it and it's REALLY OBVIOUS
+ layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS
stat = 0
var/active = 0
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index a947c472511..26692706d2a 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -7,7 +7,7 @@
anchored = 0
density = 0
- layer = MOB_LAYER - 0.2 //so people can't hide it and it's REALLY OBVIOUS
+ layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS
unacidable = 1
var/timer = 60
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 1b18ea95e3a..3145ab44da8 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -3,7 +3,7 @@
desc = "A large metallic machine with an entrance and an exit. A sign on the side reads, 'human go in, robot come out', human must be lying down and alive. Has to cooldown between each use."
icon = 'icons/obj/recycling.dmi'
icon_state = "separator-AO1"
- layer = MOB_LAYER+1 // Overhead
+ layer = ABOVE_ALL_MOB_LAYER // Overhead
anchored = 1
density = 0
var/transform_dead = 0
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 53800726166..edfe1f58dc8 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -15,7 +15,7 @@
desc = "A generic vending machine."
icon = 'icons/obj/vending.dmi'
icon_state = "generic"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
anchored = 1
density = 1
verb_say = "beeps"
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 6c62de01260..afdd7191fa8 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -20,7 +20,7 @@
opacity = 1 ///opaque. Menacing.
anchored = 1 //no pulling around.
unacidable = 1 //and no deleting hoomans inside
- layer = MOB_LAYER - 0.2//icon draw layer
+ layer = BELOW_MOB_LAYER//icon draw layer
infra_luminosity = 15 //byond implementation is bugged.
force = 5
flags = HEAR
diff --git a/code/game/objects/effects/decals/Cleanable/aliens.dm b/code/game/objects/effects/decals/Cleanable/aliens.dm
index 7e358f18fb4..36bf7577bb1 100644
--- a/code/game/objects/effects/decals/Cleanable/aliens.dm
+++ b/code/game/objects/effects/decals/Cleanable/aliens.dm
@@ -5,7 +5,7 @@
desc = "It's green and acidic. It looks like... blood?"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 20c32cca078..e6e90cbde1c 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -3,7 +3,7 @@
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "floor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
@@ -38,7 +38,7 @@
desc = "Your instincts say you shouldn't be following these."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
random_icon_states = null
var/list/existing_dirs = list()
blood_DNA = list()
@@ -53,7 +53,7 @@
desc = "They look bloody and gruesome."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm
index b4d66d84595..f7f4f5fe953 100644
--- a/code/game/objects/effects/decals/Cleanable/misc.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc.dm
@@ -3,7 +3,7 @@
desc = "Someone should clean that up."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/obj/objects.dmi'
icon_state = "shards"
@@ -26,7 +26,7 @@
icon_state = "dirt"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
mouse_opacity = 0
/obj/effect/decal/cleanable/flour
@@ -34,7 +34,7 @@
desc = "It's still good. Four second rule!"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon_state = "flour"
/obj/effect/decal/cleanable/greenglow
@@ -42,7 +42,7 @@
desc = "Jeez. I hope that's not for lunch."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
luminosity = 1
icon_state = "greenglow"
@@ -53,7 +53,7 @@
name = "cobweb"
desc = "Somebody should remove that."
density = 0
- layer = 3
+ layer = OBJ_LAYER
icon_state = "cobweb1"
burntime = 1
@@ -64,7 +64,7 @@
name = "gooey grey mass"
desc = "It looks like a melted... something."
density = 0
- layer = 3
+ layer = OBJ_LAYER
icon = 'icons/obj/chemical.dmi'
icon_state = "molten"
@@ -72,7 +72,7 @@
name = "cobweb"
desc = "Somebody should remove that."
density = 0
- layer = 3
+ layer = OBJ_LAYER
icon_state = "cobweb2"
//Vomit (sorry)
@@ -81,7 +81,7 @@
desc = "Gosh, how unpleasant."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
@@ -113,14 +113,14 @@
name = "tomato smudge"
desc = "It's red."
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
/obj/effect/decal/cleanable/plant_smudge
name = "plant smudge"
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_plant")
@@ -128,7 +128,7 @@
name = "smashed egg"
desc = "Seems like this one won't hatch."
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
@@ -136,7 +136,7 @@
name = "smashed pie"
desc = "It's pie cream from a cream pie."
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
@@ -153,7 +153,7 @@
icon_state = "shreds"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
/obj/effect/decal/cleanable/shreds/New()
pixel_x = rand(-5, 5)
diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm
index af2ff562590..e255f497ca2 100644
--- a/code/game/objects/effects/decals/Cleanable/robots.dm
+++ b/code/game/objects/effects/decals/Cleanable/robots.dm
@@ -5,7 +5,7 @@
desc = "It's a useless heap of junk... or is it?"
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/mob/robots.dmi'
icon_state = "gib1"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
@@ -44,7 +44,7 @@
desc = "It's black and greasy. Looks like Beepsky made another mess."
gender = PLURAL
density = 0
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/mob/robots.dmi'
icon_state = "floor1"
var/viruses = list()
diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm
index 2f5bd9ea000..2948ada90d0 100644
--- a/code/game/objects/effects/decals/crayon.dm
+++ b/code/game/objects/effects/decals/crayon.dm
@@ -3,7 +3,7 @@
desc = "Graffiti. Damn kids."
icon = 'icons/effects/crayondecal.dmi'
icon_state = "rune1"
- layer = 2.1
+ layer = ABOVE_NORMAL_TURF_LAYER
var/do_icon_rotate = TRUE
/obj/effect/decal/cleanable/crayon/examine()
@@ -31,7 +31,7 @@
/obj/effect/decal/cleanable/crayon/gang
- layer = 3.6 //Harder to hide
+ layer = HIGH_OBJ_LAYER //Harder to hide
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
var/datum/gang/gang
diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm
index 8daf88c6c42..762c702df1c 100644
--- a/code/game/objects/effects/decals/misc.dm
+++ b/code/game/objects/effects/decals/misc.dm
@@ -2,7 +2,7 @@
name = "pointer"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "arrow"
- layer = 16
+ layer = POINT_LAYER
duration = 25
/obj/effect/overlay/temp/point/New(atom/target, set_invis = 0)
@@ -12,23 +12,18 @@
pixel_y = target.pixel_y
invisibility = set_invis
-// Used for spray that you spray at walls, tables, hydrovats etc
-/obj/effect/decal/spraystill
- density = 0
- layer = 50
-
//Used by spraybottles.
/obj/effect/decal/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
pass_flags = PASSTABLE | PASSGRILLE
- layer = 5
+ layer = FLY_LAYER
/obj/effect/decal/sandeffect
name = "sandy tile"
icon = 'icons/turf/floors.dmi'
icon_state = "sandeffect"
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
/obj/effect/decal/fakelattice
name = "lattice"
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 54e57af855e..6dbf2b473e9 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -7,7 +7,7 @@
opacity = 0
anchored = 1
density = 0
- layer = MOB_LAYER + 0.5
+ layer = ABOVE_ALL_MOB_LAYER
mouse_opacity = 0
var/amount = 3
animate_movement = 0
diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm
index 47dabfaf579..fd07e31986d 100644
--- a/code/game/objects/effects/glowshroom.dm
+++ b/code/game/objects/effects/glowshroom.dm
@@ -7,7 +7,7 @@
density = 0
icon = 'icons/obj/lighting.dmi'
icon_state = "glowshroom" //replaced in New
- layer = 2.1
+ layer = ABOVE_NORMAL_TURF_LAYER
var/endurance = 30
var/potency = 30
var/delay = 1200
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index d39257edbcf..8c16eb5533f 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -3,7 +3,6 @@
desc = "Better stay away from that thing."
density = 0
anchored = 1
- layer = 3
icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
var/triggered = 0
diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm
index 4d621cf0fdd..712d8c6c59f 100644
--- a/code/game/objects/effects/misc.dm
+++ b/code/game/objects/effects/misc.dm
@@ -7,15 +7,6 @@
density = 1
anchored = 0
-/obj/effect/mark
- var/mark = ""
- icon = 'icons/misc/mark.dmi'
- icon_state = "blank"
- anchored = 1
- layer = 99
- mouse_opacity = 0
- unacidable = 1//Just to be sure.
-
/obj/effect/beam
name = "beam"
unacidable = 1//Just to be sure.
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index c929d74e5ca..79ce9abe797 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -22,7 +22,7 @@
/obj/effect/overlay/temp
icon_state = "nothing"
anchored = 1
- layer = 4.1
+ layer = ABOVE_MOB_LAYER
mouse_opacity = 0
var/duration = 10
var/randomdir = 1
@@ -117,7 +117,7 @@
/obj/effect/overlay/temp/cult/door
name = "unholy glow"
icon_state = "doorglow"
- layer = 3.17 //above closed doors
+ layer = CLOSED_FIREDOOR_LAYER //above closed doors
/obj/effect/overlay/temp/cult/door/unruned
icon_state = "unruneddoorglow"
@@ -125,7 +125,7 @@
/obj/effect/overlay/temp/cult/turf
name = "unholy glow"
icon_state = "wallglow"
- layer = TURF_LAYER + 0.07
+ layer = ABOVE_NORMAL_TURF_LAYER
/obj/effect/overlay/temp/cult/turf/open/floor
icon_state = "floorglow"
@@ -179,7 +179,7 @@
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
density = 1
- layer = 5
+ layer = WALL_OBJ_LAYER
anchored = 1
/obj/effect/overlay/palmtree_l
@@ -187,7 +187,7 @@
icon = 'icons/misc/beach2.dmi'
icon_state = "palm2"
density = 1
- layer = 5
+ layer = WALL_OBJ_LAYER
anchored = 1
/obj/effect/overlay/coconut
diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm
index 47c439f0a4e..e4c4ba33fa4 100644
--- a/code/game/objects/effects/spawners/lootdrop.dm
+++ b/code/game/objects/effects/spawners/lootdrop.dm
@@ -94,7 +94,7 @@
/obj/item/stack/rods{amount = 50} = 1,
/obj/item/stack/sheet/cardboard = 2,
/obj/item/stack/sheet/metal{amount = 20} = 1,
- /obj/item/stack/sheet/mineral/plasma{layer = 2.9} = 1,
+ /obj/item/stack/sheet/mineral/plasma = 1,
/obj/item/stack/sheet/rglass = 1,
/obj/item/weapon/book/manual/wiki/engineering_construction = 1,
/obj/item/weapon/book/manual/wiki/engineering_hacking = 1,
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index b8d0a99bba9..2ed341eca59 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -98,7 +98,7 @@
desc = "It never stays still for long."
icon_state = "spiderling"
anchored = 0
- layer = 2.75
+ layer = PROJECTILE_HIT_THRESHHOLD_LAYER
health = 3
var/amount_grown = 0
var/grow_as = null
diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm
index 043fcd80cb0..1fbfb9490a6 100644
--- a/code/game/objects/items/documents.dm
+++ b/code/game/objects/items/documents.dm
@@ -8,7 +8,7 @@
w_class = 1
throw_range = 1
throw_speed = 1
- layer = 4
+ layer = MOB_LAYER
pressure_resistance = 1
/obj/item/documents/nanotrasen
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index f2b9bcd472b..22bcc0d2dcb 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -155,7 +155,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
singular_name = "hide plate"
flags = NOBLUDGEON
w_class = 3
- layer = 4
+ layer = MOB_LAYER
/obj/item/stack/sheet/animalhide/ashdrake
name = "ash drake hide"
@@ -165,7 +165,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
singular_name = "drake plate"
flags = NOBLUDGEON
w_class = 3
- layer = 4
+ layer = MOB_LAYER
//Step one - dehairing.
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 0b5fa01aff8..ca32e2890b7 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -63,7 +63,7 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
icon_state = "sandbags"
singular_name = "sandbag"
force = 5
- layer = 2.95
+ layer = LOW_ITEM_LAYER
throwforce = 5
w_class = 3
throw_speed = 1
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index e09e732ddcf..7947a228a35 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -157,7 +157,7 @@
boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in contents)
O.screen_loc = "[cx],[cy]"
- O.layer = 20
+ O.layer = ABOVE_HUD_LAYER
cx++
if(cx > mx)
cx = tx
@@ -176,7 +176,7 @@
ND.sample_object.mouse_opacity = 2
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "[(ND.number > 1)? "[ND.number]" : ""]"
- ND.sample_object.layer = 20
+ ND.sample_object.layer = ABOVE_HUD_LAYER
cx++
if(cx > (4+cols))
cx = 4
@@ -186,7 +186,7 @@
O.mouse_opacity = 2 //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
- O.layer = 20
+ O.layer = ABOVE_HUD_LAYER
cx++
if(cx > (4+cols))
cx = 4
@@ -464,11 +464,11 @@
boxes.master = src
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
- boxes.layer = 19
+ boxes.layer = HUD_LAYER
closer = new /obj/screen/close()
closer.master = src
closer.icon_state = "backpack_close"
- closer.layer = 20
+ closer.layer = ABOVE_HUD_LAYER
orient2hud()
diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm
index ffe82b4c3c3..be576ce514b 100644
--- a/code/game/objects/structures/aliens.dm
+++ b/code/game/objects/structures/aliens.dm
@@ -162,7 +162,7 @@
desc = "A thick resin surface covers the floor."
anchored = 1
density = 0
- layer = TURF_LAYER + 0.09
+ layer = TURF_LAYER
icon_state = "weeds"
health = 15
var/obj/structure/alien/weeds/node/linked_node = null
diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm
index 5186309b65e..afa7633b420 100644
--- a/code/game/objects/structures/beds_chairs/alien_nest.dm
+++ b/code/game/objects/structures/beds_chairs/alien_nest.dm
@@ -14,7 +14,7 @@
var/image/nest_overlay
/obj/structure/bed/nest/New()
- nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
+ nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=LYING_MOB_LAYER)
return ..()
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user)
@@ -73,7 +73,7 @@
if(M in buckled_mobs)
M.pixel_y = 0
M.pixel_x = initial(M.pixel_x) + 2
- M.layer = MOB_LAYER - 0.3
+ M.layer = BELOW_MOB_LAYER
overlays += nest_overlay
else
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm
index faf3b4b8cb3..c91e5d5978e 100644
--- a/code/game/objects/structures/beds_chairs/chair.dm
+++ b/code/game/objects/structures/beds_chairs/chair.dm
@@ -162,7 +162,7 @@
/obj/structure/chair/comfy/New()
armrest = image("icons/obj/chairs.dmi", "comfychair_armrest")
- armrest.layer = MOB_LAYER + 0.1
+ armrest.layer = ABOVE_MOB_LAYER
return ..()
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 415139938a2..535966a09f8 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -11,7 +11,7 @@ LINEN BINS
icon_state = "sheetwhite"
item_state = "bedsheet"
slot_flags = SLOT_BACK
- layer = 4
+ layer = MOB_LAYER
throwforce = 0
throw_speed = 1
throw_range = 2
@@ -28,9 +28,11 @@ LINEN BINS
/obj/item/weapon/bedsheet/attack_self(mob/user)
user.drop_item()
if(layer == initial(layer))
- layer = 5
+ layer = ABOVE_MOB_LAYER
+ user << "You cover yourself with [src]."
else
layer = initial(layer)
+ user << "You smooth [src] out beneath you."
add_fingerprint(user)
return
diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm
index 8bf04d32eea..46d5f54b002 100644
--- a/code/game/objects/structures/flora.dm
+++ b/code/game/objects/structures/flora.dm
@@ -8,7 +8,7 @@
anchored = 1
density = 1
pixel_x = -16
- layer = 9
+ layer = FLY_LAYER
var/cut = FALSE
var/log_amount = 10
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 6d2412589de..ed54a367368 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -9,7 +9,7 @@
icon_state = "girder"
anchored = 1
density = 1
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
var/state = GIRDER_NORMAL
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
var/can_displace = TRUE //If the girder can be moved around by wrenching it
@@ -291,7 +291,6 @@
anchored = 0
state = GIRDER_DISPLACED
girderpasschance = 25
- layer = 2.45
/obj/structure/girder/reinforced
name = "reinforced girder"
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 745d27a0e5c..b2b5bf94732 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -7,7 +7,7 @@
anchored = 1
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
var/health = 10
var/destroyed = 0
var/obj/item/stack/rods/stored
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index c676d5882ce..399253f5a17 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -5,7 +5,7 @@
icon_state = "lattice"
density = 0
anchored = 1
- layer = 2.3 //under pipes
+ layer = LATTICE_LAYER //under pipes
var/obj/item/stack/rods/stored
canSmoothWith = list(/obj/structure/lattice,
/turf/open/floor,
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 03b9f323307..e142ca61091 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -211,7 +211,7 @@ var/global/list/crematoriums = new/list()
/obj/structure/tray
icon = 'icons/obj/stationobjs.dmi'
density = 1
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
var/obj/structure/bodycontainer/connected = null
anchored = 1
pass_flags = LETPASSTHROW
diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm
index ee8c28788a9..69603d9c9ed 100644
--- a/code/game/objects/structures/plasticflaps.dm
+++ b/code/game/objects/structures/plasticflaps.dm
@@ -5,7 +5,7 @@
icon_state = "plasticflaps"
density = 0
anchored = 1
- layer = 4
+ layer = ABOVE_MOB_LAYER
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
if(istype(caller, /mob/living))
diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm
index 1fd47bc35e9..ce55d863179 100644
--- a/code/game/objects/structures/reflector.dm
+++ b/code/game/objects/structures/reflector.dm
@@ -5,7 +5,7 @@
desc = "An angled mirror for reflecting lasers. This one does so at a 90 degree angle."
anchored = 0
density = 1
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
var/finished = 0
var/admin = 0 //Can't be rotated or deconstructed
var/framebuildstacktype = /obj/item/stack/sheet/metal
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 51679ceedf2..8cd1b6b101d 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -177,7 +177,7 @@ obj/structure/safe/ex_act(severity, target)
icon_state = "floorsafe"
density = 0
level = 1 //underfloor
- layer = 2.5
+ layer = LOW_OBJ_LAYER
/obj/structure/safe/floor/initialize()
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 28cc59a701b..df5050da450 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -3,7 +3,7 @@
anchored = 1
opacity = 0
density = 0
- layer = 3.5
+ layer = SIGN_LAYER
/obj/structure/sign/basic
name = "blank sign"
diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm
index c9e6167f88f..7dc62153c5d 100644
--- a/code/game/objects/structures/table_frames.dm
+++ b/code/game/objects/structures/table_frames.dm
@@ -16,7 +16,7 @@
icon_state = "table_frame"
density = 0
anchored = 0
- layer = 2.8
+ layer = PROJECTILE_HIT_THRESHHOLD_LAYER
var/framestack = /obj/item/stack/rods
var/framestackamount = 2
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index cf16100d401..a4dfb691ee1 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -19,7 +19,7 @@
icon_state = "table"
density = 1
anchored = 1
- layer = 2.8
+ layer = TABLE_LAYER
climbable = TRUE
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
var/frame = /obj/structure/table_frame
diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm
index 0c931eb3b53..0a0d96eac20 100644
--- a/code/game/objects/structures/target_stake.dm
+++ b/code/game/objects/structures/target_stake.dm
@@ -27,7 +27,7 @@
pinned_target = T
T.pinnedLoc = src
T.density = 1
- T.layer = OBJ_LAYER + 0.1
+ T.layer = OBJ_LAYER + 0.01
T.loc = loc
user << "You slide the target into the stake."
diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm
index bb7cc05d07c..5c42bb22445 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube.dm
@@ -6,7 +6,7 @@
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W"
density = 1
- layer = 3.1
+ layer = ABOVE_OBJ_LAYER
anchored = 1
var/tube_construction = /obj/structure/c_transit_tube
var/list/tube_dirs = null
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
index ffcacef2f4b..8ce01aa0305 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_construction.dm
@@ -6,7 +6,7 @@
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W" //icon_state decides which tube will be built
density = 0
- layer = 3.1 //same as the built tube
+ layer = ABOVE_OBJ_LAYER //same as the built tube
anchored = 0
/obj/structure/c_transit_tube/examine(mob/user)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 58f58411ecb..fea81bd9dcc 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -147,7 +147,7 @@
name = "mist"
icon = 'icons/obj/watercloset.dmi'
icon_state = "mist"
- layer = MOB_LAYER + 1
+ layer = FLY_LAYER
anchored = 1
mouse_opacity = 0
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 5b37185a6b2..15f57b2c55e 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -3,7 +3,7 @@
desc = "A window."
icon_state = "window"
density = 1
- layer = 3.2//Just above doors
+ layer = ABOVE_OBJ_LAYER //Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1 //initially is 0 for tile smoothing
flags = ON_BORDER
diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm
index 8384ac130e1..69058118212 100644
--- a/code/game/turfs/closed.dm
+++ b/code/game/turfs/closed.dm
@@ -1,6 +1,6 @@
/turf/closed
var/thermite = 0
-
+ layer = CLOSED_TURF_LAYER
opacity = 1
density = 1
blocks_air = 1
@@ -9,7 +9,6 @@
name = "wall"
icon = 'icons/turf/walls.dmi'
explosion_block = 50
- layer = TURF_LAYER + 0.05
/turf/closed/indestructible/splashscreen
name = "Space Station 13"
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 98c55e9c555..bec463937c6 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -5,7 +5,6 @@
icon_state = "wall"
var/mineral = "metal"
explosion_block = 1
- layer = TURF_LAYER + 0.05
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
@@ -223,7 +222,7 @@
O.anchored = 1
O.opacity = 1
O.density = 1
- O.layer = 5
+ O.layer = FLY_LAYER
playsound(src, 'sound/items/Welder.ogg', 100, 1)
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index 893df8ead12..8f43cb52da0 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -49,7 +49,7 @@
unacidable = 1//So you can't melt fire with acid.
icon = 'icons/effects/fire.dmi'
icon_state = "1"
- layer = TURF_LAYER
+ layer = ABOVE_OPEN_TURF_LAYER
luminosity = 3
var/volume = 125
diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm
index 5188750f085..244f8b1cd71 100644
--- a/code/modules/atmospherics/gasmixtures/gas_types.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_types.dm
@@ -76,7 +76,7 @@ var/list/hardcoded_gases = list("o2","n2","co2","plasma") //the main four gases,
/obj/effect/overlay/gas/
icon = 'icons/effects/tile_effects.dmi'
mouse_opacity = 0
- layer = 5
+ layer = FLY_LAYER
appearance_flags = RESET_COLOR|TILE_BOUND
/obj/effect/overlay/gas/New(state)
diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm
index 7997c832e00..891c4bb1e5d 100644
--- a/code/modules/atmospherics/machinery/atmosmachinery.dm
+++ b/code/modules/atmospherics/machinery/atmosmachinery.dm
@@ -15,6 +15,7 @@ Pipelines + Other Objects -> Pipe network
active_power_usage = 0
power_channel = ENVIRON
on_blueprints = TRUE
+ layer = GAS_PIPE_LAYER //under wires
var/nodealert = 0
var/can_unwrench = 0
var/initialize_directions = 0
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm
index f2dfa858d17..807980318e1 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/unary_devices.dm
@@ -2,7 +2,6 @@
icon = 'icons/obj/atmospherics/components/unary_devices.dmi'
dir = SOUTH
initialize_directions = SOUTH
- layer = TURF_LAYER+0.1
device_type = UNARY
/obj/machinery/atmospherics/components/unary/SetInitDirections()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
index 55ac2266861..06a369e647e 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
@@ -259,7 +259,7 @@
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
- pipe_vision_img = image(src, loc, layer = 20, dir = dir)
+ pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
return 0
else
return ..()
@@ -289,7 +289,7 @@
user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the vent", "You hear loud scraping noises.")
welded = 0
update_icon()
- pipe_vision_img = image(src, loc, layer = 20, dir = dir)
+ pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
index b9c727da0a6..5c60897d1dc 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -308,7 +308,7 @@
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
welded = 0
update_icon()
- pipe_vision_img = image(src, loc, layer = 20, dir = dir)
+ pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
return 0
else
return ..()
@@ -329,7 +329,7 @@
user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.")
welded = 0
update_icon()
- pipe_vision_img = image(src, loc, layer = 20, dir = dir)
+ pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm
index 94898fcd009..fc412840ebe 100644
--- a/code/modules/atmospherics/machinery/pipes/pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/pipes.dm
@@ -3,7 +3,6 @@
var/volume = 0
level = 1
- layer = 2.4 //under wires with their 2.44
use_power = 0
can_unwrench = 1
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index 4a744ef7100..460e53bfd1d 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -120,14 +120,10 @@
desc = "What is that thing?"
density = 1
anchored = 1
- layer = 3
icon = 'icons/mob/blob.dmi'
icon_state = "blobpod"
var/triggered = 0
-/obj/effect/meatgrinder/New()
- icon_state = "blobpod"
-
/obj/effect/meatgrinder/Crossed(AM as mob|obj)
Bumped(AM)
diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm
index bfb574706cc..19b3ac4abfa 100644
--- a/code/modules/events/anomaly_bluespace.dm
+++ b/code/modules/events/anomaly_bluespace.dm
@@ -65,7 +65,7 @@
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
blueeffect.icon = 'icons/effects/effects.dmi'
blueeffect.icon_state = "shieldsparkles"
- blueeffect.layer = 17
+ blueeffect.layer = FLASH_LAYER
blueeffect.mouse_opacity = 0
M.client.screen += blueeffect
sleep(20)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 793f267c948..23e4ee960d3 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -327,8 +327,7 @@
/datum/spacevine_mutation/flowering/on_grow(obj/effect/spacevine/holder)
if(holder.energy == 2 && prob(severity) && !locate(/obj/structure/alien/resin/flower_bud_enemy) in range(5,holder))
- var/obj/structure/alien/resin/flower_bud_enemy/FBE = new /obj/structure/alien/resin/flower_bud_enemy (get_turf(holder))
- FBE.layer = holder.layer+0.1
+ new/obj/structure/alien/resin/flower_bud_enemy(get_turf(holder))
/datum/spacevine_mutation/flowering/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
@@ -344,7 +343,7 @@
icon_state = "Light1"
anchored = 1
density = 0
- layer = MOB_LAYER + 0.8
+ layer = SPACEVINE_LAYER
mouse_opacity = 2 //Clicking anywhere on the turf is good enough
pass_flags = PASSTABLE | PASSGRILLE
var/energy = 0
@@ -532,7 +531,6 @@
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
SetOpacity(1)
- layer = 5
else
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 9eca1592029..46998855692 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -227,7 +227,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/singularity
image_icon = 'icons/effects/224x224.dmi'
image_state = "singularity_s7"
- image_layer = 6
+ image_layer = MASSIVE_OBJ_LAYER
px = -96
py = -96
@@ -635,7 +635,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
if(!H.r_store) slots_free += ui_storage2
if(slots_free.len)
halitem.screen_loc = pick(slots_free)
- halitem.layer = 50
+ halitem.layer = ABOVE_HUD_LAYER
switch(rand(1,6))
if(1) //revolver
halitem.icon = 'icons/obj/guns/projectile.dmi'
diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
index e88e4e784cb..48dfb294839 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm
@@ -13,6 +13,7 @@
density = 1
anchored = 0
use_power = 0
+ layer = BELOW_OBJ_LAYER
var/list/product_types = list()
var/dispense_flavour = ICECREAM_VANILLA
var/flavour_name = "vanilla"
@@ -180,7 +181,6 @@
desc = "Delicious waffle cone, but no ice cream."
icon = 'icons/obj/kitchen.dmi'
icon_state = "icecream_cone_waffle" //default for admin-spawned cones, href_list["cone"] should overwrite this all the time
- layer = 3.1
var/ice_creamed = 0
var/cone_type
bitesize = 3
diff --git a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm
index 82f3ba80eb5..19c3112b320 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm
@@ -3,7 +3,7 @@
name = "juicer"
icon = 'icons/obj/kitchen.dmi'
icon_state = "juicer1"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
density = 1
anchored = 0
use_power = 1
diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
index 5e8171bf0dd..06ca4bd94b4 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm
@@ -3,7 +3,7 @@
desc = "Cooks and boils stuff."
icon = 'icons/obj/kitchen.dmi'
icon_state = "mw"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
density = 1
anchored = 1
use_power = 1
diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
index a464c31d2cc..6b2c96d505d 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
@@ -3,7 +3,7 @@
desc = "A machine used for recycling dead monkeys into monkey cubes. It currently produces 1 cube for every 5 monkeys inserted." // except it literally never does
icon = 'icons/obj/kitchen.dmi'
icon_state = "grinder"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
density = 1
anchored = 1
use_power = 1
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index 797baa35247..96d32d3902b 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -4,7 +4,7 @@
desc = "An industrial grinder used to process meat and other foods. Keep hands clear of intake area while operating."
icon = 'icons/obj/kitchen.dmi'
icon_state = "processor"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
density = 1
anchored = 1
var/broken = 0
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index ca330eeddef..afa3d9cead9 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -6,7 +6,7 @@
desc = "Keeps cold things cold and hot things cold."
icon = 'icons/obj/vending.dmi'
icon_state = "smartfridge"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
density = 1
anchored = 1
use_power = 1
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index ce238c7eaa1..0161097ef48 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -278,7 +278,7 @@
else
var/t_growthstate = min(round((age / myseed.maturation) * myseed.growthstages), myseed.growthstages)
I = image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.icon_grow][t_growthstate]")
- I.layer = MOB_LAYER + 0.1
+ I.layer = OBJ_LAYER + 0.01
overlays += I
/obj/machinery/hydroponics/proc/update_icon_lights()
diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm
index 4cd39bcbf8d..5f9d1048e2e 100644
--- a/code/modules/lighting/lighting_system.dm
+++ b/code/modules/lighting/lighting_system.dm
@@ -27,7 +27,7 @@
*/
#define LIGHTING_CIRCULAR 1 //Comment this out to use old square lighting effects.
-#define LIGHTING_LAYER 15 //Drawing layer for lighting
+//#define LIGHTING_LAYER 15 //Drawing layer for lighting, moved to layers.dm
#define LIGHTING_CAP 10 //The lumcount level at which alpha is 0 and we're fully lit.
#define LIGHTING_CAP_FRAC (255/LIGHTING_CAP) //A precal'd variable we'll use in turf/redraw_lighting()
#define LIGHTING_ICON 'icons/effects/alphacolors.dmi'
@@ -365,7 +365,6 @@
T.init_lighting()
T.update_lumcount(0)
-#undef LIGHTING_LAYER
#undef LIGHTING_CIRCULAR
#undef LIGHTING_ICON
#undef LIGHTING_ICON_STATE
diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm
index 6d89f9d90b0..aefb61aae1e 100644
--- a/code/modules/mining/equipment_locker.dm
+++ b/code/modules/mining/equipment_locker.dm
@@ -649,7 +649,7 @@
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures."
icon = 'icons/effects/effects.dmi'
icon_state = "shield1"
- layer = 4.1
+ layer = ABOVE_ALL_MOB_LAYER
mouse_opacity = 0
var/resonance_damage = 20
@@ -1035,7 +1035,7 @@
var/client/C = user.client
for(var/turf/closed/mineral/M in minerals)
var/turf/F = get_turf(M)
- var/image/I = image('icons/turf/smoothrocks.dmi', loc = F, icon_state = M.scan_state, layer = 18)
+ var/image/I = image('icons/turf/smoothrocks.dmi', loc = F, icon_state = M.scan_state, layer = FLASH_LAYER)
C.images += I
spawn(30)
if(C)
@@ -1053,7 +1053,7 @@
C.icon_state = M.scan_state
/obj/effect/overlay/temp/mining_overlay
- layer = 20
+ layer = FLASH_LAYER
icon = 'icons/turf/smoothrocks.dmi'
anchored = 1
mouse_opacity = 0
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 198f92cdb58..97a8d178266 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -124,7 +124,7 @@
icon_state = "orb"
var/obj/item/device/wisp_lantern/home
luminosity = 7
- layer = FLY_LAYER - 0.3
+ layer = ABOVE_ALL_MOB_LAYER
/obj/item/device/warp_cube
name = "blue cube"
diff --git a/code/modules/mining/lavaland/ruins/gym.dm b/code/modules/mining/lavaland/ruins/gym.dm
index 6a538ae54b7..e945319d161 100644
--- a/code/modules/mining/lavaland/ruins/gym.dm
+++ b/code/modules/mining/lavaland/ruins/gym.dm
@@ -4,7 +4,7 @@
icon = 'goon/icons/obj/fitness.dmi'
icon_state = "punchingbag"
anchored = 1
- layer = MOB_LAYER+1 // TODO LAYER
+ layer = WALL_OBJ_LAYER
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
@@ -69,7 +69,7 @@
user.Stun(4)
user.loc = src.loc
var/image/W = image('goon/icons/obj/fitness.dmi',"fitnessweight-w")
- W.layer = MOB_LAYER+1
+ W.layer = WALL_OBJ_LAYER
overlays += W
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
user.visible_message("[user] is [bragmessage]!")
diff --git a/code/modules/mining/lavaland/weather.dm b/code/modules/mining/lavaland/weather.dm
index fed8c95c19f..6415b41e024 100644
--- a/code/modules/mining/lavaland/weather.dm
+++ b/code/modules/mining/lavaland/weather.dm
@@ -22,7 +22,7 @@
var/start_up_overlay = "lava"
var/duration_overlay = "lava"
- var/overlay_layer = 10 //This is the default area layer, and above everything else. 2 is floors/below walls and mobs.
+ var/overlay_layer = AREA_LAYER //This is the default area layer, and above everything else. TURF_LAYER is floors/below walls and mobs.
var/purely_aesthetic = FALSE //If we just want gentle rain that doesn't hurt people
var/list/impacted_areas = list()
var/immunity_type = "storm"
@@ -95,6 +95,6 @@
if(END_STAGE)
N.icon_state = initial(N.icon_state)
N.icon = 'icons/turf/areas.dmi'
- N.layer = 10 //Just default back to normal area stuff since I assume setting a var is faster than initial
+ N.layer = AREA_LAYER //Just default back to normal area stuff since I assume setting a var is faster than initial
N.invisibility = INVISIBILITY_MAXIMUM
N.opacity = 0
\ No newline at end of file
diff --git a/code/modules/mining/lavaland/weather_types.dm b/code/modules/mining/lavaland/weather_types.dm
index 1f75b7daa07..dc3f35f6d9c 100644
--- a/code/modules/mining/lavaland/weather_types.dm
+++ b/code/modules/mining/lavaland/weather_types.dm
@@ -16,7 +16,7 @@
start_up_overlay = "lava"
duration_overlay = "lava"
- overlay_layer = 2 //Covers floors only
+ overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only
immunity_type = "lava"
@@ -50,7 +50,7 @@
start_up_overlay = ""
duration_overlay = ""
- overlay_layer = 10
+ overlay_layer = AREA_LAYER
/datum/weather/advanced_darkness/update_areas()
for(var/area/A in impacted_areas)
@@ -80,7 +80,7 @@
start_up_overlay = "light_ash"
duration_overlay = "ash_storm"
- overlay_layer = 10
+ overlay_layer = AREA_LAYER
immunity_type = "ash"
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index 457554c2300..819766ef3a2 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -36,7 +36,6 @@
/obj/structure/closet/secure_closet/miner/New()
..()
- new /obj/item/stack/sheet/mineral/sandbags(src, 5)
new /obj/item/weapon/storage/box/emptysandbags(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/device/t_scanner/adv_mining_scanner/lesser(src)
@@ -46,6 +45,7 @@
new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/weapon/survivalcapsule(src)
+ new /obj/item/stack/sheet/mineral/sandbags(src, 5)
/**********************Shuttle Computer**************************/
@@ -511,7 +511,7 @@
/obj/structure/fans/tiny
name = "tiny fan"
desc = "A tiny fan, releasing a thin gust of air."
- layer = TURF_LAYER + 0.8
+ layer = ABOVE_NORMAL_TURF_LAYER
density = 0
icon_state = "fan_tiny"
buildstackamount = 2
@@ -547,6 +547,6 @@
icon = 'icons/obj/lavaland/survival_pod.dmi'
name = "tubes"
anchored = 1
- layer = MOB_LAYER - 0.2
+ layer = BELOW_MOB_LAYER
density = 0
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index f9f5ed6caf1..8fe9e12e507 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -12,7 +12,7 @@
opacity = 1
density = 1
blocks_air = 1
- layer = MOB_LAYER + 0.05
+ layer = EDGED_TURF_LAYER
temperature = TCMB
var/environment_type = "asteroid"
var/turf/open/floor/plating/turf_type = /turf/open/floor/plating/asteroid/airless
@@ -179,7 +179,7 @@
/turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null, triggered_by_explosion = 0)
if(stage == 0)
- var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_active", layer = 4.06)
+ var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_active", layer = ON_EDGED_TURF_LAYER)
overlays += I
activated_image = I
name = "gibtonite deposit"
@@ -217,7 +217,7 @@
/turf/closed/mineral/gibtonite/proc/defuse()
if(stage == 1)
overlays -= activated_image
- var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_inactive", layer = 4.06)
+ var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_inactive", layer = ON_EDGED_TURF_LAYER)
overlays += I
desc = "An inactive gibtonite reserve. The ore can be extracted."
stage = 2
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 3c1e42f0166..3d60378e0f4 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -7,7 +7,7 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
icon = 'icons/mob/mob.dmi'
icon_state = "ghost"
- layer = MOB_LAYER + 1
+ layer = GHOST_LAYER
stat = DEAD
density = 0
canmove = 0
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 690124ac2e3..065717a47d0 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -29,7 +29,7 @@
if(!l_hand)
W.loc = src //TODO: move to equipped?
l_hand = W
- W.layer = 20 //TODO: move to equipped?
+ W.layer = ABOVE_HUD_LAYER //TODO: move to equipped?
W.equipped(src,slot_l_hand)
if(W.pulledby)
W.pulledby.stop_pulling()
@@ -47,7 +47,7 @@
if(!r_hand)
W.loc = src
r_hand = W
- W.layer = 20
+ W.layer = ABOVE_HUD_LAYER
W.equipped(src,slot_r_hand)
if(W.pulledby)
W.pulledby.stop_pulling()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index c93ad1ead74..49c8ea62f4a 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -7,7 +7,7 @@
pixel_x = -16
bubble_icon = "alienroyal"
mob_size = MOB_SIZE_LARGE
- layer = MOB_LAYER + 0.5 //above most mobs, but below speechbubbles
+ layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno = 20, /obj/item/stack/sheet/animalhide/xeno = 3)
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index d575ba5f4f8..642031e8541 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -9,8 +9,8 @@
if(user.stat != CONSCIOUS)
return
- if (user.layer != TURF_LAYER+0.2)
- user.layer = TURF_LAYER+0.2
+ if (user.layer != ABOVE_NORMAL_TURF_LAYER)
+ user.layer = ABOVE_NORMAL_TURF_LAYER
user.visible_message("[user] scurries to the ground!", \
"You are now hiding.")
else
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 17584a81feb..c65a6d53df1 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -4,7 +4,7 @@
icon_state = "brain"
throw_speed = 3
throw_range = 5
- layer = 4.1
+ layer = ABOVE_MOB_LAYER
zone = "head"
slot = "brain"
vital = 1
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index b1718b26f9a..ee109955a12 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -919,7 +919,7 @@
for(var/mob/M in viewers(src))
if(M.client)
viewing += M.client
- flick_overlay(image(icon,src,"electrocuted_generic",MOB_LAYER+1), viewing, anim_duration)
+ flick_overlay(image(icon,src,"electrocuted_generic",ABOVE_MOB_LAYER), viewing, anim_duration)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 0)
if(incapacitated() || lying )
diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm
index 8ac3bfc3d66..6ad159851dd 100644
--- a/code/modules/mob/living/carbon/inventory.dm
+++ b/code/modules/mob/living/carbon/inventory.dm
@@ -35,7 +35,7 @@
I.screen_loc = null // will get moved if inventory is visible
I.loc = src
I.equipped(src, slot)
- I.layer = 20
+ I.layer = ABOVE_HUD_LAYER
switch(slot)
if(slot_back)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 655b939cc99..0209d40b126 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -811,9 +811,9 @@ Sorry Giacom. Please don't be mad :(
// What icon do we use for the attack?
var/image/I
if(hand && l_hand) // Attacked with item in left hand.
- I = image(l_hand.icon, A, l_hand.icon_state, A.layer + 1)
+ I = image(l_hand.icon, A, l_hand.icon_state, A.layer + 0.1)
else if(!hand && r_hand) // Attacked with item in right hand.
- I = image(r_hand.icon, A, r_hand.icon_state, A.layer + 1)
+ I = image(r_hand.icon, A, r_hand.icon_state, A.layer + 0.1)
else // Attacked with a fist?
return
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 8ac3547f12b..b95db4d75f0 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -157,7 +157,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
for(var/mob/M in listening)
if(M.client)
speech_bubble_recipients.Add(M.client)
- var/image/I = image('icons/mob/talk.dmi', src, "[bubble_type][say_test(message)]", MOB_LAYER+1)
+ var/image/I = image('icons/mob/talk.dmi', src, "[bubble_type][say_test(message)]", FLY_LAYER)
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
spawn(0)
flick_overlay(I, speech_bubble_recipients, 30)
@@ -219,7 +219,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
if(1)
if(prob(40))
M << "We can faintly sense an outsider trying to communicate through the hivemind..."
- return 1
+ return 1
if(2)
var/msg = "[mind.changeling.changelingID]: [message]"
log_say("[mind.changeling.changelingID]/[src.key] : [message]")
@@ -229,7 +229,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
else
switch(M.lingcheck())
if(3)
- M << msg
+ M << msg
if(2)
M << msg
if(1)
@@ -289,7 +289,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
return NOPASS
return 0
-/mob/living/lingcheck() //1 is ling w/ no hivemind. 2 is ling w/hivemind. 3 is ling victim being linked into hivemind.
+/mob/living/lingcheck() //1 is ling w/ no hivemind. 2 is ling w/hivemind. 3 is ling victim being linked into hivemind.
if(mind && mind.changeling)
if(mind.changeling.changeling_speak)
return 2
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index 91413e2e1ad..4b4a65f12c0 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -48,7 +48,7 @@
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O
- O.layer = 20
+ O.layer = ABOVE_HUD_LAYER
O.screen_loc = inv1.screen_loc
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
@@ -58,7 +58,7 @@
else if(!module_state_2)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_2 = O
- O.layer = 20
+ O.layer = ABOVE_HUD_LAYER
O.screen_loc = inv2.screen_loc
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
@@ -68,7 +68,7 @@
else if(!module_state_3)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_3 = O
- O.layer = 20
+ O.layer = ABOVE_HUD_LAYER
O.screen_loc = inv3.screen_loc
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index b035b59d825..55de2e3253e 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -84,7 +84,7 @@
robot_modules_background = new()
robot_modules_background.icon_state = "block"
- robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
+ robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer ABOVE_HUD_LAYER, UI should be just below it.
ident = rand(1, 999)
update_icons()
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 1257e7d0ab4..ce5d311e7bf 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -132,7 +132,7 @@ var/global/mulebot_count = 0
if(load && !ismob(load))//buckling handles the mob offsets
load.pixel_y = initial(load.pixel_y) + 9
if(load.layer < layer)
- load.layer = layer + 0.1
+ load.layer = layer + 0.01
overlays += load
return
@@ -384,7 +384,7 @@ var/global/mulebot_count = 0
if(M in buckled_mobs) //post buckling
M.pixel_y = initial(M.pixel_y) + 9
if(M.layer < layer)
- M.layer = layer + 0.1
+ M.layer = layer + 0.01
else //post unbuckling
load = null
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index cdedc564910..45f8b884801 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -207,7 +207,7 @@
if(change)
if(change > 0)
if(M && stat != DEAD)
- flick_overlay(image('icons/mob/animal.dmi', src, "heart-ani2", MOB_LAYER+1), list(M.client), 20)
+ flick_overlay(image('icons/mob/animal.dmi', src, "heart-ani2", ABOVE_MOB_LAYER), list(M.client), 20)
emote("me", 1, "purrs!")
else
if(M && stat != DEAD)
diff --git a/code/modules/mob/living/simple_animal/friendly/cockroach.dm b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
index e9f1c512b42..9d6a9ab7f64 100644
--- a/code/modules/mob/living/simple_animal/friendly/cockroach.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
@@ -53,4 +53,4 @@
icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 7e14553ce1c..43a1ce548b1 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -534,7 +534,7 @@
if(change)
if(change > 0)
if(M && stat != DEAD) // Added check to see if this mob (the dog) is dead to fix issue 2454
- flick_overlay(image('icons/mob/animal.dmi',src,"heart-ani2",MOB_LAYER+1), list(M.client), 20)
+ flick_overlay(image('icons/mob/animal.dmi',src,"heart-ani2",ABOVE_MOB_LAYER), list(M.client), 20)
emote("me", 1, "yaps happily!")
else
if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
index ed54a1e50b8..51bc2316b5b 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
@@ -97,7 +97,7 @@
I.screen_loc = null // will get moved if inventory is visible
I.loc = src
I.equipped(src, slot)
- I.layer = 20
+ I.layer = ABOVE_HUD_LAYER
switch(slot)
if(slot_head)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
index 4b3e79d22f3..19d54f72bdd 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
@@ -37,7 +37,7 @@
hands_overlays += r_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
- r_hand.layer = 20
+ r_hand.layer = ABOVE_HUD_LAYER
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
@@ -54,7 +54,7 @@
hands_overlays += l_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
- l_hand.layer = 20
+ l_hand.layer = ABOVE_HUD_LAYER
l_hand.screen_loc = ui_lhand
client.screen |= l_hand
diff --git a/code/modules/mob/living/simple_animal/guardian/types/lightning.dm b/code/modules/mob/living/simple_animal/guardian/types/lightning.dm
index ca1c4e8d22e..deaef1dbe72 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/lightning.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/lightning.dm
@@ -1,7 +1,7 @@
//Beam
/obj/effect/ebeam/chain
name = "lightning chain"
- layer = MOB_LAYER - 0.1
+ layer = LYING_MOB_LAYER
/mob/living/simple_animal/hostile/guardian/beam
melee_damage_lower = 5
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
index 6e5d69f172c..d71a079b733 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
@@ -70,7 +70,7 @@
icon_state = "fireball"
name = "fireball"
desc = "Get out of the way!"
- layer = 6
+ layer = FLY_LAYER
randomdir = 0
duration = 10
pixel_z = 500
@@ -78,7 +78,7 @@
/obj/effect/overlay/temp/target
icon = 'icons/mob/actions.dmi'
icon_state = "sniper_zoom"
- layer = MOB_LAYER - 0.1
+ layer = BELOW_MOB_LAYER
luminosity = 2
duration = 10
@@ -87,7 +87,7 @@
desc = "Don't just stand there, move!"
icon = 'icons/effects/96x96.dmi'
icon_state = "rune_large"
- layer = MOB_LAYER - 0.1
+ layer = BELOW_MOB_LAYER
pixel_x = -32
pixel_y = -32
color = "#FF0000"
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index f9ff4a3762d..09c51bde9be 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -12,7 +12,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = INFINITY
- layer = MOB_LAYER + 0.5 //Looks weird with them slipping under mineral walls and cameras and shit otherwise
+ layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise
/mob/living/simple_animal/hostile/megafauna/death(gibbed)
if(health > 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index 2cbaff85393..ba2db3344ed 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -77,8 +77,8 @@
aggro_vision_range = 9
idle_vision_range = 2
turns_per_move = 5
- loot = list(/obj/item/weapon/ore/diamond{layer = 4.1},
- /obj/item/weapon/ore/diamond{layer = 4.1})
+ loot = list(/obj/item/weapon/ore/diamond{layer = ABOVE_MOB_LAYER},
+ /obj/item/weapon/ore/diamond{layer = ABOVE_MOB_LAYER})
/obj/item/projectile/temp/basilisk
name = "freezing blast"
@@ -463,7 +463,7 @@
mob_size = MOB_SIZE_LARGE
var/pre_attack = 0
var/pre_attack_icon = "Goliath_preattack"
- loot = list(/obj/item/stack/sheet/animalhide/goliath_hide{layer = 4.1})
+ loot = list(/obj/item/stack/sheet/animalhide/goliath_hide{layer = ABOVE_MOB_LAYER})
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
..()
@@ -558,7 +558,7 @@
icon_state = "goliath_hide"
flags = NOBLUDGEON
w_class = 3
- layer = 4
+ layer = MOB_LAYER
/obj/item/stack/sheet/animalhide/goliath_hide/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
@@ -629,7 +629,7 @@
environment_smash = 0
var/wumbo = 0
var/inflate_cooldown = 0
- loot = list(/obj/item/asteroid/fugu_gland{layer = 4.1})
+ loot = list(/obj/item/asteroid/fugu_gland{layer = ABOVE_MOB_LAYER})
/mob/living/simple_animal/hostile/asteroid/fugu/Life()
if(!wumbo)
@@ -705,7 +705,7 @@
icon_state = "fugu_gland"
flags = NOBLUDGEON
w_class = 3
- layer = 4
+ layer = MOB_LAYER
origin_tech = "biotech=6"
var/list/banned_mobs()
@@ -1005,7 +1005,6 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = INFINITY
- layer = MOB_LAYER-0.1
loot = list(/obj/effect/collapse, /obj/structure/closet/crate/necropolis/tendril)
del_on_death = 1
var/gps = null
@@ -1021,7 +1020,7 @@
/obj/effect/collapse
name = "collapsing necropolis tendril"
desc = "Get clear!"
- layer = 2
+ layer = ABOVE_OPEN_TURF_LAYER
icon = 'icons/mob/nest.dmi'
icon_state = "tendril"
anchored = TRUE
diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
index e550017407c..9d6491c3770 100644
--- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm
+++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
@@ -29,7 +29,6 @@
faction = list("skeleton")
see_invisible = SEE_INVISIBLE_MINIMUM
see_in_dark = 8
- layer = MOB_LAYER - 0.1
deathmessage = "collapses into a pile of bones!"
del_on_death = 1
loot = list(/obj/effect/decal/remains/human)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 14583cd85fd..7d57ca55b42 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -5,7 +5,7 @@
desc = "a large pulsating plant..."
icon = 'icons/effects/spacevines.dmi'
icon_state = "flower_bud"
- layer = MOB_LAYER + 0.9
+ layer = SPACEVINE_MOB_LAYER
opacity = 0
canSmoothWith = list()
smooth = SMOOTH_FALSE
@@ -49,7 +49,7 @@
name = "venus human trap"
desc = "now you know how the fly feels"
icon_state = "venus_human_trap"
- layer = MOB_LAYER + 0.9
+ layer = SPACEVINE_MOB_LAYER
health = 50
maxHealth = 50
ranged = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/zombie.dm b/code/modules/mob/living/simple_animal/hostile/zombie.dm
index 064df080757..11d2a8704c0 100644
--- a/code/modules/mob/living/simple_animal/hostile/zombie.dm
+++ b/code/modules/mob/living/simple_animal/hostile/zombie.dm
@@ -30,7 +30,6 @@
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/zombie = 3)
see_invisible = SEE_INVISIBLE_MINIMUM
see_in_dark = 8
- layer = MOB_LAYER - 0.1
var/removingairlock = 0
/mob/living/simple_animal/hostile/zombie/darkholme //BOY?NEXT?RUIN
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index 5fedf3b3a81..a7498e11397 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -79,6 +79,7 @@
/mob/living/simple_animal/slime/proc/Feedon(mob/living/M)
M.unbuckle_all_mobs(force=1) //Slimes rip other mobs (eg: shoulder parrots) off (Slimes Vs Slimes is already handled in CanFeedon())
if(M.buckle_mob(src, force=1))
+ layer = M.layer+0.01 //appear above the target mob
M.visible_message("The [name] has latched onto [M]!", \
"The [name] has latched onto [M]!")
else
@@ -94,6 +95,7 @@
if(!silent)
visible_message("[src] has let go of [buckled]!", \
"I stopped feeding.")
+ layer = initial(layer)
buckled.unbuckle_mob(src,force=1)
/mob/living/simple_animal/slime/verb/Evolve()
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 61e3230a032..22178caa4bf 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -24,8 +24,6 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange",
speak_emote = list("telepathically chirps")
bubble_icon = "slime"
- layer = 5
-
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
maxHealth = 150
diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm
index 204d2b400f7..bd01da0b97a 100644
--- a/code/modules/mob/living/simple_animal/spawner.dm
+++ b/code/modules/mob/living/simple_animal/spawner.dm
@@ -18,7 +18,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 350
- layer = MOB_LAYER-0.1
+ layer = BELOW_MOB_LAYER
sentience_type = SENTIENCE_BOSS
diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm
index d01b00ceaeb..c32a82c7865 100644
--- a/code/modules/mob/living/ventcrawling.dm
+++ b/code/modules/mob/living/ventcrawling.dm
@@ -92,7 +92,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
for(var/X in totalMembers)
var/obj/machinery/atmospherics/A = X //all elements in totalMembers are necessarily of this type.
if(!A.pipe_vision_img)
- A.pipe_vision_img = image(A, A.loc, layer = 20, dir = A.dir)
+ A.pipe_vision_img = image(A, A.loc, layer = ABOVE_HUD_LAYER, dir = A.dir)
//20 for being above darkness
pipes_shown += A.pipe_vision_img
if(client)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 53cc71405c7..d5647ed98dc 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -681,9 +681,9 @@ var/next_mob_id = 0
density = !lying
if(lying)
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
- layer = MOB_LAYER - 0.2 //so mob lying always appear behind standing mobs
+ layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
else
- if(layer == MOB_LAYER - 0.2)
+ if(layer == LYING_MOB_LAYER)
layer = initial(layer)
update_transform()
update_action_buttons_icon()
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 00e480cbcc2..e6d1f17a3dc 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -1,6 +1,6 @@
/mob
density = 1
- layer = 4
+ layer = MOB_LAYER
animate_movement = 2
flags = HEAR
hud_possible = list(ANTAG_HUD)
diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
index eee99a59bd5..04c0c796f23 100644
--- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm
@@ -13,7 +13,7 @@ It is possible to destroy the net by the occupant or someone else.
opacity = 0//Can see through.
mouse_opacity = 1//So you can hit it with stuff.
anchored = 1//Can't drag/grab the trapped mob.
-
+ layer = ABOVE_ALL_MOB_LAYER
var/health = 25//How much health it has.
var/mob/living/affecting = null//Who it is currently affecting, if anyone.
var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed.
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
index b31d49c1d82..34d47d7e469 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
@@ -18,7 +18,6 @@
H.Beam(C,"n_beam",,15)
H.say("Get over here!")
var/obj/effect/energy_net/E = new /obj/effect/energy_net(C.loc)
- E.layer = C.layer+1//To have it appear one layer above the mob.
H.visible_message("[H] caught [C] with an energy net!","You caught [C] with an energy net!")
E.affecting = C
E.master = H
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 29d4bc11de5..98065675712 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -14,7 +14,6 @@
w_class = 1
throw_range = 1
throw_speed = 1
- layer = 3
pressure_resistance = 0
slot_flags = SLOT_HEAD
body_parts_covered = HEAD
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 341f7cf7e51..51b6eb9558f 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -33,7 +33,7 @@ By design, d1 is the smallest direction and d2 is the highest
icon_state = "0-1"
var/d1 = 0 // cable direction 1 (see above)
var/d2 = 1 // cable direction 2 (see above)
- layer = 2.44 //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4
+ layer = WIRE_LAYER //Above pipes, which are at GAS_PIPE_LAYER
var/cable_color = "red"
var/obj/item/stack/cable_coil/stored
diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm
index a9780a6f25e..daebb4850a7 100644
--- a/code/modules/power/gravitygenerator.dm
+++ b/code/modules/power/gravitygenerator.dm
@@ -146,7 +146,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
middle = part
if(count <= 3) // Their sprite is the top part of the generator
part.density = 0
- part.layer = MOB_LAYER + 0.1
+ part.layer = WALL_OBJ_LAYER
part.sprite_number = count
part.main_part = src
parts += part
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index ba4def1b629..a4b9ae8875c 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -32,7 +32,7 @@
icon = 'icons/obj/lighting.dmi'
icon_state = "tube-construct-stage1"
anchored = 1
- layer = MOB_LAYER + 0.25
+ layer = WALL_OBJ_LAYER
var/stage = 1
var/fixture_type = "tube"
var/sheets_refunded = 2
@@ -131,7 +131,7 @@
icon_state = "tube1"
desc = "A lighting fixture."
anchored = 1
- layer = MOB_LAYER + 0.25
+ layer = WALL_OBJ_LAYER
use_power = 2
idle_power_usage = 2
active_power_usage = 20
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index 0ddbd973c4a..4dc2e7b65d3 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -10,7 +10,7 @@
unacidable = 1
use_power = 0
luminosity = 4
- layer = OBJ_LAYER + 0.1
+ layer = ABOVE_OBJ_LAYER
var/obj/machinery/field/generator/FG1 = null
var/obj/machinery/field/generator/FG2 = null
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index befe71b8071..d9090686d8d 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -7,7 +7,7 @@
icon_state = "singularity_s1"
anchored = 1
density = 1
- layer = 6
+ layer = MASSIVE_OBJ_LAYER
luminosity = 6
unacidable = 1 //Don't comment this out.
var/current_size = 1
diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm
index 229c59f9d03..f3fcb43585b 100644
--- a/code/modules/power/terminal.dm
+++ b/code/modules/power/terminal.dm
@@ -8,10 +8,9 @@
icon_state = "term"
desc = "It's an underfloor wiring terminal for power equipment."
level = 1
- layer = TURF_LAYER
var/obj/machinery/power/master = null
anchored = 1
- layer = 2.6 // a bit above wires
+ layer = WIRE_TERMINAL_LAYER //a bit above wires
/obj/machinery/power/terminal/New()
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 83d17c7ebfe..a6b0e4c0c7b 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -129,7 +129,7 @@
if((!( current ) || loc == current))
current = locate(Clamp(x+xo,1,world.maxx),Clamp(y+yo,1,world.maxy),z)
step_towards(src, current)
- if(original && (original.layer>=2.75) || ismob(original))
+ if(original && (original.layer>=PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original, 1)
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index 0002f3dbeca..81f9afd7dad 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -162,7 +162,7 @@
name = "kinetic explosion"
icon = 'icons/obj/projectiles.dmi'
icon_state = "kinetic_blast"
- layer = 4.1
+ layer = ABOVE_ALL_MOB_LAYER
/obj/effect/kinetic_blast/New()
spawn(4)
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index e71f8a95b48..479a2ea140b 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -3,7 +3,7 @@
desc = "Used to grind things up into raw materials."
icon = 'icons/obj/kitchen.dmi'
icon_state = "juicer1"
- layer = 2.9
+ layer = BELOW_OBJ_LAYER
anchored = 1
use_power = 1
idle_power_usage = 5
diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm
index d5c7403d185..926f2afbb31 100644
--- a/code/modules/recycling/disposal-structures.dm
+++ b/code/modules/recycling/disposal-structures.dm
@@ -136,7 +136,7 @@
var/dpdir = 0 // bitmask of pipe directions
dir = 0 // dir will contain dominant direction for junction pipes
var/health = 10 // health points 0-10
- layer = 2.3 // slightly lower than wires and other pipes
+ layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
var/base_icon_state // initial icon state on map
var/obj/structure/disposalconstruct/stored
diff --git a/code/modules/spells/spell_types/ethereal_jaunt.dm b/code/modules/spells/spell_types/ethereal_jaunt.dm
index 07623aad297..9afa9929390 100644
--- a/code/modules/spells/spell_types/ethereal_jaunt.dm
+++ b/code/modules/spells/spell_types/ethereal_jaunt.dm
@@ -27,7 +27,7 @@
animation.density = 0
animation.anchored = 1
animation.icon = 'icons/mob/mob.dmi'
- animation.layer = 5
+ animation.layer = FLY_LAYER
animation.master = holder
target.ExtinguishMob()
if(target.buckled)
diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm
index 3c45a182304..63fbc29203d 100644
--- a/code/modules/surgery/bodyparts/head.dm
+++ b/code/modules/surgery/bodyparts/head.dm
@@ -5,7 +5,7 @@
max_damage = 200
body_zone = "head"
body_part = HEAD
- layer = 4.1 //so it isn't hidden behind some objects when on the floor
+ layer = ABOVE_MOB_LAYER //so it isn't hidden behind some objects when on the floor
w_class = 4 //Quite a hefty load
slowdown = 1 //Balancing measure
throw_range = 2 //No head bowling
@@ -163,4 +163,4 @@
/obj/item/bodypart/head/burn()
drop_organs()
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm
index 01d440dec03..bf77878eae0 100644
--- a/code/modules/vehicles/atv.dm
+++ b/code/modules/vehicles/atv.dm
@@ -14,7 +14,7 @@
..()
if(!atvcover)
atvcover = image("icons/obj/vehicles.dmi", "atvcover")
- atvcover.layer = MOB_LAYER + 0.1
+ atvcover.layer = ABOVE_MOB_LAYER
obj/vehicle/atv/post_buckle_mob(mob/living/M)
@@ -26,7 +26,7 @@ obj/vehicle/atv/post_buckle_mob(mob/living/M)
/obj/vehicle/atv/handle_vehicle_layer()
if(dir == SOUTH)
- layer = MOB_LAYER+0.1
+ layer = ABOVE_MOB_LAYER
else
layer = OBJ_LAYER
@@ -51,13 +51,13 @@ obj/vehicle/atv/post_buckle_mob(mob/living/M)
/obj/vehicle/atv/turret/handle_vehicle_layer()
if(dir == SOUTH)
- layer = MOB_LAYER+0.1
+ layer = ABOVE_MOB_LAYER
else
layer = OBJ_LAYER
if(turret)
if(dir == NORTH)
- turret.layer = MOB_LAYER+0.1
+ turret.layer = ABOVE_MOB_LAYER
else
turret.layer = OBJ_LAYER
diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm
index 2e02313105e..e894e3c1c4a 100644
--- a/code/modules/vehicles/scooter.dm
+++ b/code/modules/vehicles/scooter.dm
@@ -15,7 +15,7 @@
/obj/vehicle/scooter/handle_vehicle_layer()
if(dir == SOUTH)
- layer = MOB_LAYER+0.1
+ layer = ABOVE_MOB_LAYER
else
layer = OBJ_LAYER
diff --git a/code/modules/vehicles/speedbike.dm b/code/modules/vehicles/speedbike.dm
index 8f374cd6213..7602f9f4356 100644
--- a/code/modules/vehicles/speedbike.dm
+++ b/code/modules/vehicles/speedbike.dm
@@ -2,7 +2,7 @@
name = "Speedbike"
icon = 'icons/obj/bike.dmi'
icon_state = "speedbike_blue"
- layer = MOB_LAYER - 0.1
+ layer = LYING_MOB_LAYER
keytype = null
vehicle_move_delay = 0
var/overlay_state = "cover_blue"
@@ -11,13 +11,13 @@
/obj/vehicle/space/speedbike/New()
..()
overlay = image("icons/obj/bike.dmi", overlay_state)
- overlay.layer = MOB_LAYER + 0.1
+ overlay.layer = ABOVE_MOB_LAYER
overlays += overlay
/obj/effect/overlay/temp/speedbike_trail
name = "speedbike trails"
icon_state = "ion_fade"
- layer = MOB_LAYER - 0.2
+ layer = BELOW_MOB_LAYER
duration = 10
randomdir = 0
diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm
index e1539301204..96582344dfc 100644
--- a/code/modules/vehicles/vehicle.dm
+++ b/code/modules/vehicles/vehicle.dm
@@ -27,7 +27,7 @@
//APPEARANCE
/obj/vehicle/proc/handle_vehicle_layer()
if(dir != NORTH)
- layer = MOB_LAYER+0.1
+ layer = ABOVE_MOB_LAYER
else
layer = OBJ_LAYER
diff --git a/tgstation.dme b/tgstation.dme
index 70b5431dda2..fd4a6d24a20 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -33,6 +33,7 @@
#include "code\__DEFINES\genetics.dm"
#include "code\__DEFINES\hud.dm"
#include "code\__DEFINES\is_helpers.dm"
+#include "code\__DEFINES\layers.dm"
#include "code\__DEFINES\machines.dm"
#include "code\__DEFINES\math.dm"
#include "code\__DEFINES\misc.dm"
@@ -43,8 +44,8 @@
#include "code\__DEFINES\reagents.dm"
#include "code\__DEFINES\role_preferences.dm"
#include "code\__DEFINES\say.dm"
-#include "code\__DEFINES\sight.dm"
#include "code\__DEFINES\shuttles.dm"
+#include "code\__DEFINES\sight.dm"
#include "code\__DEFINES\stat.dm"
#include "code\__DEFINES\tablecrafting.dm"
#include "code\__DEFINES\tgui.dm"