diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index ede0351993b..aa6d2f2625c 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -11,7 +11,8 @@ Pipelines + Other Objects -> Pipe network
GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics
anchored = 1
- layer = 2.4 //under wires with their 2.44
+ layer = GAS_PIPE_HIDDEN_LAYER //under wires
+ plane = FLOOR_PLANE
idle_power_usage = 0
active_power_usage = 0
power_channel = ENVIRON
@@ -61,10 +62,14 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
// Icons/overlays/underlays
/obj/machinery/atmospherics/update_icon()
- return null
+ var/turf/T = loc
+ if(level == 2 || !T.intact)
+ plane = GAME_PLANE
+ else
+ plane = FLOOR_PLANE
/obj/machinery/atmospherics/proc/update_pipe_image()
- pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
+ pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipe_image.plane = HUD_PLANE
/obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0)
diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
index 3e18cfb41fa..c1019236425 100644
--- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
@@ -112,6 +112,8 @@
..()
/obj/machinery/atmospherics/binary/circulator/update_icon()
+ ..()
+
if(stat & (BROKEN|NOPOWER))
icon_state = "circ[side]-p"
else if(last_pressure_delta > 0)
diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index 8f828c178ad..62b4f55470e 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -71,6 +71,8 @@
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 8becfa37c10..3448655c953 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -28,6 +28,7 @@
return ..()
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
+ ..()
icon_state = "[on ? "on" : "off"]"
/obj/machinery/atmospherics/binary/passive_gate/update_underlays()
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index b138d19b513..249cfb5842d 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -39,6 +39,8 @@ Thus, the two variables affect pump operation are set in New():
on = 1
/obj/machinery/atmospherics/binary/pump/update_icon()
+ ..()
+
if(!powered())
icon_state = "off"
else
diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm
index dabe548ce9f..f9da99544b5 100644
--- a/code/ATMOSPHERICS/components/binary_devices/valve.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm
@@ -16,6 +16,8 @@
icon_state = "map_valve1"
/obj/machinery/atmospherics/binary/valve/update_icon(animation)
+ ..()
+
if(animation)
flick("valve[src.open][!src.open]",src)
else
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index 11874172340..ff9a22a524b 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -43,6 +43,8 @@ Thus, the two variables affect pump operation are set in New():
set_frequency(frequency)
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
+ ..()
+
if(!powered())
icon_state = "off"
else
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index a3903f278fb..cde1c9e80b0 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -72,6 +72,8 @@
update_ports()
/obj/machinery/atmospherics/omni/update_icon()
+ ..()
+
if(stat & NOPOWER)
overlays = overlays_off
on = 0
@@ -83,8 +85,6 @@
underlays = underlays_current
- return
-
/obj/machinery/atmospherics/omni/proc/error_check()
return
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index c6720e45f6e..c6548f122b7 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -40,6 +40,8 @@ Filter types:
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/filter/update_icon()
+ ..()
+
if(flipped)
icon_state = "m"
else
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 0c64804b6da..43de7828891 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -17,6 +17,8 @@
flipped = 1
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
+ ..()
+
if(flipped)
icon_state = "m"
else
diff --git a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
index 3ec4e8443e4..7b3f8299339 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm
@@ -135,6 +135,7 @@
/obj/machinery/atmospherics/trinary/tvalve/digital/update_icon()
..()
+
if(!powered())
icon_state = "tvalvenopower"
diff --git a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm
index 51415223de2..7cae2968a22 100644
--- a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm
@@ -13,6 +13,8 @@
var/current_heat_capacity = 50000 //totally random
/obj/machinery/atmospherics/unary/cold_sink/update_icon()
+ ..()
+
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -20,8 +22,6 @@
on = 0
- return
-
/obj/machinery/atmospherics/unary/cold_sink/process_atmos()
..()
if(!on)
diff --git a/code/ATMOSPHERICS/components/unary_devices/generator_input.dm b/code/ATMOSPHERICS/components/unary_devices/generator_input.dm
index 42c3676836c..cb095b1e551 100644
--- a/code/ATMOSPHERICS/components/unary_devices/generator_input.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/generator_input.dm
@@ -9,12 +9,12 @@
var/update_cycle
/obj/machinery/atmospherics/unary/generator_input/update_icon()
+ ..()
+
if(node)
icon_state = "intact"
else
icon_state = "exposed"
- return
-
/obj/machinery/atmospherics/unary/generator_input/proc/return_exchange_air()
return air_contents
diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
index 58b374578df..e4afcadc7fa 100644
--- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm
@@ -13,13 +13,13 @@
burn_state = LAVA_PROOF
/obj/machinery/atmospherics/unary/heat_exchanger/update_icon()
+ ..()
+
if(node)
icon_state = "intact"
else
icon_state = "exposed"
- return
-
/obj/machinery/atmospherics/unary/heat_exchanger/atmos_init()
if(!partner)
var/partner_connect = turn(dir,180)
diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm
index 31eb7305ded..b3b1d0c4fdc 100644
--- a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm
@@ -13,6 +13,8 @@
var/current_heat_capacity = 50000 //totally random
/obj/machinery/atmospherics/unary/heat_reservoir/update_icon()
+ ..()
+
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -20,8 +22,6 @@
on = 0
- return
-
/obj/machinery/atmospherics/unary/heat_reservoir/process_atmos()
..()
if(!on)
diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
index 509b36ff8ab..009b2531745 100644
--- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
@@ -38,6 +38,8 @@
return ..()
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
+ ..()
+
if(!powered())
icon_state = "off"
else
diff --git a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm
index 0f575fb9c3a..a9c3b98ad74 100644
--- a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm
@@ -14,6 +14,8 @@
var/oxygen_content = 10
/obj/machinery/atmospherics/unary/oxygen_generator/update_icon()
+ ..()
+
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -21,8 +23,6 @@
on = 0
- return
-
/obj/machinery/atmospherics/unary/oxygen_generator/New()
..()
diff --git a/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm b/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm
index 711a1df3861..a9e4e2a282b 100644
--- a/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm
@@ -18,6 +18,7 @@
return ..()
/obj/machinery/atmospherics/unary/portables_connector/update_icon()
+ ..()
icon_state = "connector"
/obj/machinery/atmospherics/unary/portables_connector/update_underlays()
diff --git a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
index c245bfc120e..5a6e76a182b 100644
--- a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
@@ -11,10 +11,12 @@
desc = "Transfers heat to and from an area"
/obj/machinery/atmospherics/unary/thermal_plate/update_icon()
- var/prefix=""
+ ..()
+
+ var/prefix = ""
//var/suffix="_idle" // Also available: _heat, _cool
if(level == 1 && istype(loc, /turf/simulated))
- prefix="h"
+ prefix = "h"
icon_state = "[prefix]off"
/obj/machinery/atmospherics/unary/thermal_plate/process_atmos()
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
index 0ac609cb6ec..25ee6417184 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
@@ -77,6 +77,10 @@
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
+ ..()
+
+ plane = FLOOR_PLANE
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
index 82cdfa46e97..5a8fb02ec7d 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
@@ -91,6 +91,10 @@
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
+ ..()
+
+ plane = FLOOR_PLANE
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm
index 2552f6e0794..71630aef1c2 100644
--- a/code/ATMOSPHERICS/pipes/cap.dm
+++ b/code/ATMOSPHERICS/pipes/cap.dm
@@ -55,6 +55,8 @@
node.update_underlays()
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm
index 199942e7a40..bddc0281472 100644
--- a/code/ATMOSPHERICS/pipes/manifold.dm
+++ b/code/ATMOSPHERICS/pipes/manifold.dm
@@ -116,6 +116,8 @@
node3.update_underlays()
/obj/machinery/atmospherics/pipe/manifold/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm
index 502795e1da9..a948b22fd19 100644
--- a/code/ATMOSPHERICS/pipes/manifold4w.dm
+++ b/code/ATMOSPHERICS/pipes/manifold4w.dm
@@ -90,6 +90,8 @@
node4.update_underlays()
/obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
index b2c2750a452..b966690733b 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
@@ -137,6 +137,8 @@
node2.update_underlays()
/obj/machinery/atmospherics/pipe/simple/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
index 3efd22ed446..db982639c2f 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
@@ -28,6 +28,8 @@
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
index 9bf085b534a..1ca4da646ac 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
@@ -39,6 +39,8 @@
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0)
+ ..()
+
if(!check_icon_cache())
return
diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm
index 9da2c725a43..26894d3e6ea 100644
--- a/code/__DEFINES/layers.dm
+++ b/code/__DEFINES/layers.dm
@@ -6,7 +6,9 @@
#define PLANE_SPACE -95
#define PLANE_SPACE_PARALLAX -90
-#define GAME_PLANE 0
+#define FLOOR_PLANE -2
+#define GAME_PLANE -1
+#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
#define SPACE_LAYER 1.8
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index dff9426c641..106c1900a82 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -401,4 +401,7 @@
#define GHOST_ORBIT_TRIANGLE "triangle"
#define GHOST_ORBIT_HEXAGON "hexagon"
#define GHOST_ORBIT_SQUARE "square"
-#define GHOST_ORBIT_PENTAGON "pentagon"
\ No newline at end of file
+#define GHOST_ORBIT_PENTAGON "pentagon"
+
+// Filters
+#define FILTER_AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA")
\ No newline at end of file
diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index aa3652046b5..32433975e9e 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -29,10 +29,12 @@
#define UI_DARKMODE 131072
#define DISABLE_KARMA 262144
#define CHAT_NO_MENTORTICKETLOGS 524288
-
#define TYPING_ONCE 1048576
+#define AMBIENT_OCCLUSION 2097152
-#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC)
+#define TOGGLES_TOTAL 4194304 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
+
+#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC|AMBIENT_OCCLUSION)
// Admin attack logs filter system, see /proc/add_attack_logs and /proc/msg_admin_attack
#define ATKLOG_ALL 0
diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm
index 2db8621195d..472f7be75f4 100644
--- a/code/__HELPERS/icon_smoothing.dm
+++ b/code/__HELPERS/icon_smoothing.dm
@@ -114,7 +114,7 @@
return
if(QDELETED(A))
return
- if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
+ if(A.smooth & (SMOOTH_TRUE | SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
if(A.smooth & SMOOTH_DIAGONAL)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 619d09713d6..00724c94a03 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -2029,3 +2029,17 @@ var/mob/dview/dview_mob = new
/proc/pass()
return
+
+/proc/params2turf(scr_loc, turf/origin, client/C)
+ if(!scr_loc)
+ return null
+ var/tX = splittext(scr_loc, ",")
+ var/tY = splittext(tX[2], ":")
+ var/tZ = origin.z
+ tY = tY[1]
+ tX = splittext(tX[1], ":")
+ tX = tX[1]
+ var/list/actual_view = getviewsize(C ? C.view : world.view)
+ tX = Clamp(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
+ tY = Clamp(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
+ return locate(tX, tY, tZ)
\ No newline at end of file
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 24e58b502ad..b44efa5444f 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -399,7 +399,25 @@
icon_state = "passage0"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
- screen_loc = "CENTER-7,CENTER-7"
+ screen_loc = "CENTER"
+
+#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
+#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.
+
+/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
+ var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
+ var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
+ var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
+ var/px = view_size_x * world.icon_size
+ var/py = view_size_y * world.icon_size
+ var/sx = min(MAX_SAFE_BYOND_ICON_SCALE_PX, px)
+ var/sy = min(MAX_SAFE_BYOND_ICON_SCALE_PX, py)
+ newicon.Scale(sx, sy)
+ icon = newicon
+ screen_loc = "CENTER-[(ox-1)*0.5],CENTER-[(oy-1)*0.5]"
+ var/matrix/M = new
+ M.Scale(px/sx, py/sy)
+ transform = M
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
@@ -407,6 +425,6 @@
var/mob/living/carbon/C = usr
C.swap_hand()
else
- var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
+ var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr))
T.Click(location, control, params)
return 1
diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm
index 2a7dab21a03..1e17cae1708 100644
--- a/code/_onclick/hud/devil.dm
+++ b/code/_onclick/hud/devil.dm
@@ -40,7 +40,6 @@
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand1
- using.layer = 19
static_inventory += using
using = new /obj/screen/swap_hand()
@@ -48,7 +47,6 @@
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand2
- using.layer = 19
static_inventory += using
mymob.zone_sel = new /obj/screen/zone_sel()
diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm
index 673a49ffd22..4c9ff339052 100644
--- a/code/_onclick/hud/fullscreen.dm
+++ b/code/_onclick/hud/fullscreen.dm
@@ -54,6 +54,7 @@
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
+ plane = FULLSCREEN_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/severity = 0
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 410d49f973e..56d954313cc 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -38,6 +38,8 @@
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = 0
+ var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
+
/mob/proc/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud(src)
@@ -47,6 +49,11 @@
hide_actions_toggle = new
hide_actions_toggle.InitialiseIcon(mymob)
+ for(var/mytype in subtypesof(/obj/screen/plane_master))
+ var/obj/screen/plane_master/instance = new mytype()
+ plane_masters["[instance.plane]"] = instance
+ instance.backdrop(mymob)
+
/datum/hud/Destroy()
if(mymob.hud_used == src)
mymob.hud_used = null
@@ -83,14 +90,16 @@
nightvisionicon = null
devilsouldisplay = null
+ QDEL_LIST_ASSOC_VAL(plane_masters)
+
mymob = null
return ..()
/datum/hud/proc/show_hud(version = 0)
if(!ismob(mymob))
- return 0
+ return FALSE
if(!mymob.client)
- return 0
+ return FALSE
mymob.client.screen = list()
@@ -162,13 +171,25 @@
mymob.update_action_buttons(1)
reorganize_alerts()
reload_fullscreen()
+ plane_masters_update()
+
+/datum/hud/proc/plane_masters_update()
+ // Plane masters are always shown to OUR mob, never to observers
+ for(var/thing in plane_masters)
+ var/obj/screen/plane_master/PM = plane_masters[thing]
+ PM.backdrop(mymob)
+ mymob.client.screen += PM
/datum/hud/human/show_hud(version = 0)
- ..()
+ . = ..()
+ if(!.)
+ return
hidden_inventory_update()
/datum/hud/robot/show_hud(version = 0)
- ..()
+ . = ..()
+ if(!.)
+ return
update_robot_modules_display()
/datum/hud/proc/hidden_inventory_update()
diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm
new file mode 100644
index 00000000000..4d9d05856ae
--- /dev/null
+++ b/code/_onclick/hud/plane_master.dm
@@ -0,0 +1,34 @@
+/obj/screen/plane_master
+ screen_loc = "CENTER"
+ icon_state = "blank"
+ appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
+ blend_mode = BLEND_OVERLAY
+ var/show_alpha = 255
+ var/hide_alpha = 0
+
+/obj/screen/plane_master/proc/Show(override)
+ alpha = override || show_alpha
+
+/obj/screen/plane_master/proc/Hide(override)
+ alpha = override || hide_alpha
+
+//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928
+//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
+/obj/screen/plane_master/proc/backdrop(mob/mymob)
+
+/obj/screen/plane_master/floor
+ name = "floor plane master"
+ plane = FLOOR_PLANE
+ appearance_flags = PLANE_MASTER
+ blend_mode = BLEND_OVERLAY
+
+/obj/screen/plane_master/game_world
+ name = "game world plane master"
+ plane = GAME_PLANE
+ appearance_flags = PLANE_MASTER //should use client color
+ blend_mode = BLEND_OVERLAY
+
+/obj/screen/plane_master/game_world/backdrop(mob/mymob)
+ filters -= FILTER_AMBIENT_OCCLUSION
+ if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & AMBIENT_OCCLUSION))
+ filters += FILTER_AMBIENT_OCCLUSION
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index a542c0345fd..ea23a56d8e4 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -226,8 +226,8 @@
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
- A.layer = 20
- A.plane = HUD_PLANE
+ A.layer = ABOVE_HUD_LAYER
+ A.plane = ABOVE_HUD_PLANE
x++
if(x == 4)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index d9f6653b0ff..aeda1e5baa6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -10,7 +10,7 @@
name = ""
icon = 'icons/mob/screen_gen.dmi'
layer = HUD_LAYER_SCREEN
- plane = HUD_PLANE
+ plane = ABOVE_HUD_PLANE
unacidable = 1
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/datum/hud/hud = null
@@ -47,7 +47,8 @@
/obj/screen/drop
name = "drop"
icon_state = "act_drop"
- layer = 19
+ layer = HUD_LAYER
+ plane = HUD_PLANE
/obj/screen/drop/Click()
usr.drop_item_v()
@@ -143,8 +144,9 @@
name = "resist"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist"
- layer = 19
-
+ layer = HUD_LAYER
+ plane = HUD_PLANE
+
/obj/screen/resist/Click()
if(isliving(usr))
var/mob/living/L = usr
@@ -327,7 +329,8 @@
/obj/screen/inventory
var/slot_id //The indentifier for the slot. It has nothing to do with ID cards.
var/list/object_overlays = list()
- layer = 19
+ layer = HUD_LAYER
+ plane = HUD_PLANE
/obj/screen/inventory/MouseEntered()
..()
@@ -417,7 +420,8 @@
return 1
/obj/screen/swap_hand
- layer = 19
+ layer = HUD_LAYER
+ plane = HUD_PLANE
name = "swap hand"
/obj/screen/swap_hand/Click()
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 238ce2d5a94..6ef7a797136 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -65,8 +65,8 @@ var/const/tk_maxrange = 15
flags = NOBLUDGEON | ABSTRACT | DROPDEL
//item_state = null
w_class = WEIGHT_CLASS_GIGANTIC
- layer = 20
- plane = HUD_PLANE
+ layer = ABOVE_HUD_LAYER
+ plane = ABOVE_HUD_PLANE
var/last_throw = 0
var/atom/movable/focus = null
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index c5683f366ae..6f25d1b23aa 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -16,6 +16,7 @@
// area from any other instances already present (meaning you can have
// separate APCs, and so on)
var/there_can_be_many = 0
+ plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE.
/area/New()
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 024b2a924cf..e46c1290637 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1,5 +1,6 @@
/atom
- layer = 2
+ layer = TURF_LAYER
+ plane = GAME_PLANE
var/level = 2
var/flags = NONE
var/flags_2 = NONE
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 35284594b46..216c946fc97 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -67,32 +67,32 @@ datum/hSB
P.wear_suit.plane = initial(P.wear_suit.plane)
P.wear_suit = null
P.wear_suit = new/obj/item/clothing/suit/space(P)
- P.wear_suit.layer = 20
- P.wear_suit.plane = HUD_PLANE
+ P.wear_suit.layer = ABOVE_HUD_LAYER
+ P.wear_suit.plane = ABOVE_HUD_PLANE
if(P.head)
P.head.loc = P.loc
P.head.layer = initial(P.head.layer)
P.head.plane = initial(P.head.plane)
P.head = null
P.head = new/obj/item/clothing/head/helmet/space(P)
- P.head.layer = 20
- P.head.plane = HUD_PLANE
+ P.head.layer = ABOVE_HUD_LAYER
+ P.head.plane = ABOVE_HUD_PLANE
if(P.wear_mask)
P.wear_mask.loc = P.loc
P.wear_mask.layer = initial(P.wear_mask.layer)
P.wear_mask.plane = initial(P.wear_mask.plane)
P.wear_mask = null
P.wear_mask = new/obj/item/clothing/mask/gas(P)
- P.wear_mask.layer = 20
- P.wear_mask.plane = HUD_PLANE
+ P.wear_mask.layer = ABOVE_HUD_LAYER
+ P.wear_mask.plane = ABOVE_HUD_PLANE
if(P.back)
P.back.loc = P.loc
P.back.layer = initial(P.back.layer)
P.back.plane = initial(P.back.plane)
P.back = null
P.back = new/obj/item/tank/jetpack(P)
- P.back.layer = 20
- P.back.plane = HUD_PLANE
+ P.back.layer = ABOVE_HUD_LAYER
+ P.back.plane = ABOVE_HUD_PLANE
P.internal = P.back
if("hsbmetal")
var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal
diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
index 29a2c9aadca..c11105e9f30 100644
--- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
@@ -107,6 +107,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind(null))
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor(null))
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle(null))
+
+ QDEL_NULL(H.hud_used)
H.hud_used = new /datum/hud/human(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha)
H.hud_used.show_hud(H.hud_used.hud_version)
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index 8a65da977ae..48b64e8c589 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -3,6 +3,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "motion3"
layer = 3
+ plane = FLOOR_PLANE
anchored = 1.0
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0)
var/uses = 20
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 49a05371050..e6d967c8eb4 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -44,6 +44,7 @@ var/list/holopads = list()
idle_power_usage = 5
active_power_usage = 100
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
+ plane = FLOOR_PLANE
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0)
var/list/masters = list()//List of living mobs that use the holopad
var/list/holorays = list()//Holoray-mob link.
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 3c36edb1685..20d15a29e1f 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -3,6 +3,7 @@
desc = "It's useful for igniting plasma."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "igniter1"
+ plane = FLOOR_PLANE
armor = list(melee = 50, bullet = 30, laser = 70, energy = 50, bomb = 20, bio = 0, rad = 0)
var/id = null
var/on = 1.0
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index e98c4e90c30..e77eef869dc 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -183,8 +183,8 @@
qdel(I)
qdel(J)
H.icon = HI
- H.layer = 25
- H.plane = HUD_PLANE
+ H.layer = ABOVE_HUD_LAYER
+ H.plane = ABOVE_HUD_PLANE
usr.mapobjs += H
#else
diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm
index 07c7137d719..5feec285408 100644
--- a/code/game/objects/effects/effects.dm
+++ b/code/game/objects/effects/effects.dm
@@ -16,6 +16,7 @@
return FALSE
/obj/effect/decal
+ plane = FLOOR_PLANE
var/no_scoop = FALSE //if it has this, don't let it be scooped up
var/no_clear = FALSE //if it has this, don't delete it when its' scooped up
var/list/scoop_reagents = null
diff --git a/code/game/objects/effects/temporary_visuals/cult.dm b/code/game/objects/effects/temporary_visuals/cult.dm
index 8edb88a7e79..7a12caf6b10 100644
--- a/code/game/objects/effects/temporary_visuals/cult.dm
+++ b/code/game/objects/effects/temporary_visuals/cult.dm
@@ -37,4 +37,5 @@
/obj/effect/temp_visual/cult/turf/open/floor
icon_state = "floorglow"
- duration = 5
\ No newline at end of file
+ duration = 5
+ plane = FLOOR_PLANE
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 507d6fdb9f3..8815cccd92f 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -151,8 +151,8 @@
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
cx++
if(cx > mx)
cx = tx
@@ -171,8 +171,8 @@
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
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.plane = HUD_PLANE
+ ND.sample_object.layer = ABOVE_HUD_LAYER
+ ND.sample_object.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -182,8 +182,8 @@
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //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.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -332,8 +332,8 @@
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
- W.layer = 20
- W.plane = HUD_PLANE
+ W.layer = ABOVE_HUD_LAYER
+ W.plane = ABOVE_HUD_PLANE
else
W.layer = initial(W.layer)
W.plane = initial(W.plane)
@@ -447,17 +447,18 @@
else
verbs -= /obj/item/storage/verb/toggle_gathering_mode
- src.boxes = new /obj/screen/storage( )
- src.boxes.name = "storage"
- src.boxes.master = src
- src.boxes.icon_state = "block"
- src.boxes.screen_loc = "7,7 to 10,8"
- src.boxes.layer = 19
- src.closer = new /obj/screen/close( )
- src.closer.master = src
- src.closer.icon_state = "x"
- src.closer.layer = 20
- src.closer.plane = HUD_PLANE
+ boxes = new /obj/screen/storage( )
+ boxes.name = "storage"
+ boxes.master = src
+ boxes.icon_state = "block"
+ boxes.screen_loc = "7,7 to 10,8"
+ boxes.layer = HUD_LAYER
+ boxes.plane = HUD_PLANE
+ closer = new /obj/screen/close( )
+ closer.master = src
+ closer.icon_state = "x"
+ closer.layer = ABOVE_HUD_LAYER
+ closer.plane = ABOVE_HUD_PLANE
orient2hud()
/obj/item/storage/Destroy()
@@ -469,7 +470,7 @@
return ..()
/obj/item/storage/emp_act(severity)
- if(!istype(src.loc, /mob/living))
+ if(!istype(loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()
diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm
index 90e32882087..d23f4c9d606 100644
--- a/code/game/objects/structures/aliens.dm
+++ b/code/game/objects/structures/aliens.dm
@@ -113,6 +113,7 @@
anchored = TRUE
density = FALSE
layer = TURF_LAYER
+ plane = FLOOR_PLANE
icon_state = "weeds"
max_integrity = 15
var/obj/structure/alien/weeds/node/linked_node = null
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index 936c94f5c4f..d88600fe4e7 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -7,6 +7,7 @@
anchored = 1.0
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
layer = 2.3 //under pipes
+ plane = FLOOR_PLANE
// flags = CONDUCT
/obj/structure/lattice/New()
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 07c2bb8a8d6..78103a4b441 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -17,7 +17,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "dont_use_this_floor"
-
+ plane = FLOOR_PLANE
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
var/icon_plating = "plating"
thermal_conductivity = 0.040
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index a6216c87b1a..ae6cd9d2fa0 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -333,6 +333,8 @@
if(!prefs)
prefs = new /datum/preferences(src)
preferences_datums[ckey] = prefs
+ else
+ prefs.parent = src
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps)
@@ -393,10 +395,8 @@
if(establish_db_connection())
to_chat(src,"You have enabled karma gains.")
- if(!void)
- void = new()
-
- screen += void
+ generate_clickcatcher()
+ apply_clickcatcher()
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
to_chat(src, "Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.")
@@ -772,3 +772,13 @@
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
else
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
+
+/client/proc/generate_clickcatcher()
+ if(!void)
+ void = new()
+ screen += void
+
+/client/proc/apply_clickcatcher()
+ generate_clickcatcher()
+ var/list/actualview = getviewsize(view)
+ void.UpdateGreed(actualview[1],actualview[2])
\ No newline at end of file
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index 22894aaa691..20860db0b46 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -183,7 +183,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
// 0 = character settings, 1 = game preferences
var/current_tab = TAB_CHAR
- // OOC Metadata:
+ // OOC Metadata:
var/metadata = ""
var/slot_name = ""
@@ -452,6 +452,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "Donator Publicity: [(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]
"
dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]
"
dat += "FPS: [clientfps]
"
+ dat += "Ambient Occlusion: [toggles & AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]
"
dat += "Ghost Ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
"
dat += "Ghost Sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
"
dat += "Ghost Radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
"
@@ -1921,22 +1922,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
parent.fps = clientfps
-/*
- if("skin_style")
- var/skin_style_name = input(user, "Select a new skin style") as null|anything in list("default1", "default2", "default3")
- if(!skin_style_name) return
-*/
-
-/* if("spawnpoint")
- var/list/spawnkeys = list()
- for(var/S in spawntypes)
- spawnkeys += S
- var/choice = input(user, "Where would you like to spawn when latejoining?") as null|anything in spawnkeys
- if(!choice || !spawntypes[choice])
- spawnpoint = "Arrivals Shuttle"
- return
- spawnpoint = choice */
-
else
switch(href_list["preference"])
if("publicity")
@@ -2081,6 +2066,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(href_list["tab"])
current_tab = text2num(href_list["tab"])
+ if("ambientocclusion")
+ toggles ^= AMBIENT_OCCLUSION
+ if(parent && parent.screen && parent.screen.len)
+ var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen
+ PM.filters -= FILTER_AMBIENT_OCCLUSION
+ if(toggles & AMBIENT_OCCLUSION)
+ PM.filters += FILTER_AMBIENT_OCCLUSION
+
ShowChoices(user)
return 1
diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm
index b355d921016..3483a4c77d3 100644
--- a/code/modules/client/preference/preferences_mysql.dm
+++ b/code/modules/client/preference/preferences_mysql.dm
@@ -18,7 +18,7 @@
ghost_anonsay,
exp,
clientfps,
- atklog
+ atklog,
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -55,7 +55,7 @@
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style))
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
- toggles = sanitize_integer(toggles, 0, 2097151, initial(toggles))
+ toggles = sanitize_integer(toggles, 0, TOGGLES_TOTAL, initial(toggles))
sound = sanitize_integer(sound, 0, 65535, initial(sound))
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm
index 703de37468e..c4d7599d2de 100644
--- a/code/modules/client/preference/preferences_toggles.dm
+++ b/code/modules/client/preference/preferences_toggles.dm
@@ -230,7 +230,6 @@
to_chat(usr, "You have disabled karma gains.")
else
to_chat(usr, "You have enabled karma gains.")
- return
/client/verb/toggle_popup_limiter()
set name = "Toggle Text Popup Limiter"
@@ -242,4 +241,4 @@
to_chat(usr, "You have enabled text popup limiting.")
else
to_chat(usr, "You have disabled text popup limiting.")
- return
+
diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm
index 29baf834bb5..a8f11681577 100644
--- a/code/modules/events/anomaly_bluespace.dm
+++ b/code/modules/events/anomaly_bluespace.dm
@@ -58,7 +58,8 @@
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.plane = FULLSCREEN_PLANE
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
M.client.screen += blueeffect
sleep(20)
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 471f82c1511..d412d604ec2 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -38,8 +38,8 @@
if(!l_hand && has_left_hand())
W.forceMove(src) //TODO: move to equipped?
l_hand = W
- W.layer = 20 //TODO: move to equipped?
- W.plane = HUD_PLANE //TODO: move to equipped?
+ W.layer = ABOVE_HUD_LAYER //TODO: move to equipped?
+ W.plane = ABOVE_HUD_PLANE //TODO: move to equipped?
W.equipped(src,slot_l_hand)
if(pulling == W)
stop_pulling()
@@ -54,8 +54,8 @@
if(!r_hand && has_right_hand())
W.forceMove(src)
r_hand = W
- W.layer = 20
- W.plane = HUD_PLANE
+ W.layer = ABOVE_HUD_LAYER
+ W.plane = ABOVE_HUD_PLANE
W.equipped(src,slot_r_hand)
if(pulling == W)
stop_pulling()
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 79b41e47cc3..69f898fb677 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -202,8 +202,8 @@
W.screen_loc = null
W.loc = src
W.equipped(src, slot)
- W.layer = 20
- W.plane = HUD_PLANE
+ W.layer = ABOVE_HUD_LAYER
+ W.plane = ABOVE_HUD_PLANE
switch(slot)
if(slot_back)
@@ -248,8 +248,8 @@
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
r_ear = O
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
update_inv_ears(redraw_mob)
if(slot_r_ear)
r_ear = W
@@ -257,8 +257,8 @@
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
l_ear = O
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
update_inv_ears(redraw_mob)
if(slot_glasses)
glasses = W
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index 8eb8bb80763..7695145300e 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -55,24 +55,24 @@
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv1.screen_loc
contents += O
set_actions(O)
else if(!module_state_2)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_2 = O
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv2.screen_loc
contents += O
set_actions(O)
else if(!module_state_3)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_3 = O
- O.layer = 20
- O.plane = HUD_PLANE
+ O.layer = ABOVE_HUD_LAYER
+ O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv3.screen_loc
contents += O
set_actions(O)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index ae6a832f6ac..18bfe6998c3 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -114,7 +114,9 @@ var/list/robot_verbs_default = list(
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 20, UI should be just below it.
+ robot_modules_background.plane = HUD_PLANE
+
ident = rand(1, 999)
rename_character(null, get_default_name())
update_icons()
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 02f15a59709..66fb417733b 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -534,8 +534,8 @@
W.forceMove(src)
W.equipped(src, slot)
- W.layer = 20
- W.plane = HUD_PLANE
+ W.layer = ABOVE_HUD_LAYER
+ W.plane = ABOVE_HUD_PLANE
switch(slot)
if(slot_collar)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index d5ca6b0b0f8..5deebd22ee9 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -334,15 +334,15 @@
else if(h_user.l_store == src)
h_user.unEquip(src)
B.loc = h_user
- B.layer = 20
- B.plane = HUD_PLANE
+ B.layer = ABOVE_HUD_LAYER
+ B.plane = ABOVE_HUD_PLANE
h_user.l_store = B
h_user.update_inv_pockets()
else if(h_user.r_store == src)
h_user.unEquip(src)
B.loc = h_user
- B.layer = 20
- B.plane = HUD_PLANE
+ B.layer = ABOVE_HUD_LAYER
+ B.plane = ABOVE_HUD_PLANE
h_user.r_store = B
h_user.update_inv_pockets()
else if(h_user.head == src)
diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm
index 9d786dd0713..c5b48c74d81 100644
--- a/code/modules/reagents/chemistry/reagents/drugs.dm
+++ b/code/modules/reagents/chemistry/reagents/drugs.dm
@@ -604,6 +604,32 @@
M.emote("laugh")
return list(effect, update_flags)
+/datum/reagent/rotatium //Rotatium. Fucks up your rotation and is hilarious
+ name = "Rotatium"
+ id = "rotatium"
+ description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
+ reagent_state = LIQUID
+ color = "#AC88CA" //RGB: 172, 136, 202
+ metabolization_rate = 0.6 * REAGENTS_METABOLISM
+ taste_message = "spinning"
+
+/datum/reagent/rotatium/on_mob_life(mob/living/carbon/M)
+ if(M.hud_used)
+ if(current_cycle >= 20 && current_cycle % 20 == 0)
+ var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"])
+ var/rotation = min(round(current_cycle / 20), 89) // By this point the player is probably puking and quitting anyway
+ for(var/whole_screen in screens)
+ animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
+ animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
+ return ..()
+
+/datum/reagent/rotatium/on_mob_delete(mob/living/M)
+ if(M && M.hud_used)
+ var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"])
+ for(var/whole_screen in screens)
+ animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
+ ..()
+
//////////////////////////////
// Synth-Drugs //
//////////////////////////////
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index ef002caa1ec..6413765c99c 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -680,7 +680,7 @@
dir = 0 // dir will contain dominant direction for junction pipes
var/health = 10 // health points 0-10
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100)
- 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
// new pipe, set the icon_state as on map
diff --git a/paradise.dme b/paradise.dme
index e478048e4d8..66d034ac287 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -144,6 +144,7 @@
#include "code\_onclick\hud\movable_screen_objects.dm"
#include "code\_onclick\hud\other_mobs.dm"
#include "code\_onclick\hud\picture_in_picture.dm"
+#include "code\_onclick\hud\plane_master.dm"
#include "code\_onclick\hud\radial.dm"
#include "code\_onclick\hud\robot.dm"
#include "code\_onclick\hud\screen_objects.dm"