diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm index bcf08305232d..19dbbd664aa3 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm @@ -1480,9 +1480,7 @@ /area/ruin/lavaland/unpowered/syndicate_lava_base/virology) "fj" = ( /obj/structure/table/glass, -/obj/structure/reagent_dispensers/virusfood{ - pixel_y = 28 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/north, /obj/item/clothing/gloves/color/latex, /obj/item/healthanalyzer, /obj/item/clothing/glasses/hud/health, diff --git a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm index ea821570bd9d..25020c8bee1b 100644 --- a/_maps/RandomRuins/SpaceRuins/deepstorage.dmm +++ b/_maps/RandomRuins/SpaceRuins/deepstorage.dmm @@ -2012,9 +2012,7 @@ /area/ruin/space/has_grav/deepstorage/armory) "ex" = ( /obj/structure/table, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/item/gun/ballistic/automatic/wt550, /obj/item/ammo_box/magazine/wt550m9{ pixel_y = 12 diff --git a/_maps/RandomRuins/SpaceRuins/turretedoutpost.dmm b/_maps/RandomRuins/SpaceRuins/turretedoutpost.dmm index aa5126fb6501..3b8334d8be2f 100644 --- a/_maps/RandomRuins/SpaceRuins/turretedoutpost.dmm +++ b/_maps/RandomRuins/SpaceRuins/turretedoutpost.dmm @@ -167,9 +167,7 @@ /area/ruin/space/has_grav/turretedoutpost) "aC" = ( /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /turf/open/floor/plasteel, /area/ruin/space/has_grav/turretedoutpost) "aD" = ( diff --git a/_maps/RandomZLevels/away_mission/SnowCabin.dmm b/_maps/RandomZLevels/away_mission/SnowCabin.dmm index 7de2ed53f16e..6fc37f1844df 100644 --- a/_maps/RandomZLevels/away_mission/SnowCabin.dmm +++ b/_maps/RandomZLevels/away_mission/SnowCabin.dmm @@ -1769,9 +1769,7 @@ /turf/open/floor/plasteel/dark, /area/awaymission/cabin/caves/mountain) "fs" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/blue, /obj/effect/turf_decal/tile/blue{ dir = 4 @@ -1890,9 +1888,7 @@ /turf/open/floor/plating/snowed, /area/awaymission/cabin/snowforest) "fE" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/blue{ dir = 4 }, diff --git a/_maps/RandomZLevels/away_mission/moonoutpost19.dmm b/_maps/RandomZLevels/away_mission/moonoutpost19.dmm index f342f8e36be0..f9b1237716db 100644 --- a/_maps/RandomZLevels/away_mission/moonoutpost19.dmm +++ b/_maps/RandomZLevels/away_mission/moonoutpost19.dmm @@ -2201,9 +2201,8 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/manifold{ - dir = 4; - level = 2 +/obj/machinery/atmospherics/pipe/manifold/general/visible{ + dir = 4 }, /turf/open/floor/plasteel/white, /area/awaymission/moonoutpost19/research) @@ -3045,7 +3044,7 @@ }, /area/awaymission/moonoutpost19/research) "gi" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/turf_decal/tile/red{ diff --git a/_maps/RandomZLevels/away_mission/research.dmm b/_maps/RandomZLevels/away_mission/research.dmm index 6acf819cc4e1..30393aa38fad 100644 --- a/_maps/RandomZLevels/away_mission/research.dmm +++ b/_maps/RandomZLevels/away_mission/research.dmm @@ -1070,9 +1070,7 @@ /turf/open/floor/plasteel/dark, /area/awaymission/research/interior/gateway) "cG" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/purple{ dir = 1 }, @@ -4523,9 +4521,7 @@ /turf/open/floor/plasteel/dark, /area/awaymission/research/interior/genetics) "iI" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/effect/turf_decal/tile/purple{ dir = 1 }, diff --git a/_maps/RandomZLevels/away_mission/undergroundoutpost45.dmm b/_maps/RandomZLevels/away_mission/undergroundoutpost45.dmm index 6eee9e9d9fad..867334fa19ee 100644 --- a/_maps/RandomZLevels/away_mission/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/away_mission/undergroundoutpost45.dmm @@ -1197,9 +1197,8 @@ }, /area/awaymission/undergroundoutpost45/central) "cM" = ( -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ - dir = 5; - level = 2 +/obj/machinery/atmospherics/pipe/simple/scrubbers/visible{ + dir = 5 }, /turf/open/floor/plating{ heat_capacity = 1e+006 @@ -1804,7 +1803,7 @@ dir = 8 }, /obj/structure/chair, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/tile/red{ @@ -3826,9 +3825,8 @@ }, /area/awaymission/undergroundoutpost45/crew_quarters) "hU" = ( -/obj/machinery/atmospherics/pipe/simple/supply/hidden{ - dir = 4; - level = 2 +/obj/machinery/atmospherics/pipe/simple/supply/visible{ + dir = 4 }, /obj/structure/table, /obj/item/book/manual/chef_recipes, @@ -3839,9 +3837,8 @@ /area/awaymission/undergroundoutpost45/crew_quarters) "hV" = ( /obj/effect/spawner/structure/window/reinforced, -/obj/machinery/atmospherics/pipe/simple/supply/hidden{ - dir = 4; - level = 2 +/obj/machinery/atmospherics/pipe/simple/supply/visible{ + dir = 4 }, /turf/open/floor/plating{ heat_capacity = 1e+006 @@ -7838,7 +7835,7 @@ }, /area/awaymission/undergroundoutpost45/research) "oC" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/decal/cleanable/dirt, @@ -9383,7 +9380,7 @@ /obj/structure/table, /obj/item/storage/box, /obj/item/storage/box, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/tile/red{ @@ -9591,9 +9588,8 @@ /obj/structure/disposalpipe/segment{ dir = 4 }, -/obj/machinery/atmospherics/pipe/simple/supply/hidden{ - dir = 4; - level = 2 +/obj/machinery/atmospherics/pipe/simple/supply/visible{ + dir = 4 }, /obj/machinery/door/airlock/maintenance{ name = "Research Maintenance"; @@ -11542,7 +11538,6 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/machinery/computer/atmos_control{ dir = 4; - level = 3; name = "Distribution and Waste Monitor"; sensors = list("UO45_air_sensor" = "Mixed Air Supply Tank", "UO45_distro_meter" = "Distribution Loop", "UO45_waste_meter" = "Waste Loop") }, diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 81eca95be1d8..7f77d8191985 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -687,9 +687,7 @@ /turf/open/floor/plasteel/dark, /area/security/office) "abI" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -1258,7 +1256,7 @@ /obj/machinery/light{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/machinery/atmospherics/pipe/simple/supply/hidden, @@ -1953,7 +1951,7 @@ /obj/machinery/airalarm{ pixel_y = 23 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/structure/table/wood, @@ -2600,9 +2598,7 @@ /obj/effect/turf_decal/tile/red{ dir = 8 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /turf/open/floor/plasteel/dark, /area/security/prison) "afy" = ( @@ -8942,7 +8938,7 @@ /obj/machinery/light_switch{ pixel_y = -23 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 32; pixel_y = -32 }, @@ -12691,7 +12687,7 @@ /area/construction/mining/aux_base) "aCY" = ( /obj/machinery/computer/security, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/tile/red{ @@ -24987,7 +24983,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/medical) "bjN" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/effect/turf_decal/tile/red, @@ -31724,7 +31720,7 @@ /turf/open/floor/plasteel/dark, /area/science/server) "bzz" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/machinery/airalarm{ @@ -32419,7 +32415,7 @@ /area/medical/medbay/central) "bBf" = ( /obj/structure/filingcabinet, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/machinery/newscaster{ @@ -38235,9 +38231,7 @@ /area/security/checkpoint/engineering) "bOP" = ( /obj/structure/table/glass, -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = -30 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/west, /obj/item/book/manual/wiki/infections{ pixel_y = 7 }, @@ -39920,7 +39914,7 @@ pixel_y = 9 }, /obj/item/pen, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ @@ -45124,9 +45118,7 @@ /turf/open/floor/plasteel, /area/maintenance/disposal/incinerator) "chi" = ( -/obj/machinery/atmospherics/pipe/manifold4w/general{ - level = 2 - }, +/obj/machinery/atmospherics/pipe/manifold4w/general/visible, /obj/machinery/meter, /turf/open/floor/plasteel, /area/maintenance/disposal/incinerator) diff --git a/_maps/map_files/CogStation/CogStation.dmm b/_maps/map_files/CogStation/CogStation.dmm index 2135803d288d..c2772783e175 100644 --- a/_maps/map_files/CogStation/CogStation.dmm +++ b/_maps/map_files/CogStation/CogStation.dmm @@ -10119,9 +10119,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 8 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/machinery/atmospherics/pipe/simple/cyan/hidden{ dir = 10 }, @@ -59387,9 +59385,7 @@ /obj/effect/turf_decal/tile/green{ dir = 4 }, -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/west, /obj/structure/extinguisher_cabinet{ pixel_y = 32 }, diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 506f5e239619..297d0b411f8c 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -3606,9 +3606,7 @@ /obj/structure/table/reinforced, /obj/item/book/manual/wiki/security_space_law, /obj/item/radio, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -8756,9 +8754,7 @@ /obj/machinery/status_display/evac{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/structure/table/reinforced, /obj/item/book/manual/wiki/security_space_law, /obj/item/radio, @@ -12525,9 +12521,7 @@ /area/security/prison) "aUD" = ( /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/item/electropack, /obj/item/assembly/signaler, /obj/machinery/light{ @@ -14224,9 +14218,7 @@ /obj/structure/table/reinforced, /obj/item/paper_bin, /obj/item/pen, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/machinery/light/small{ dir = 8 }, @@ -18314,9 +18306,7 @@ dir = 1; pixel_y = -24 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/effect/turf_decal/tile/red, /obj/effect/turf_decal/tile/red{ dir = 4 @@ -21800,7 +21790,7 @@ /obj/structure/cable/white{ icon_state = "1-8" }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 64; pixel_y = 32 }, @@ -26937,9 +26927,7 @@ /area/security/checkpoint/engineering) "bYH" = ( /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/structure/extinguisher_cabinet{ pixel_x = 26; pixel_y = -32 @@ -28377,9 +28365,7 @@ /turf/open/floor/plasteel, /area/ai_monitored/security/armory) "cbL" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/structure/table/reinforced, /obj/item/clothing/mask/gas/sechailer{ pixel_x = -3; @@ -28761,9 +28747,7 @@ /obj/machinery/light{ dir = 1 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -30307,7 +30291,7 @@ pixel_x = 32; pixel_y = -32 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 32; pixel_y = 32 }, @@ -35133,9 +35117,7 @@ /turf/open/floor/plating, /area/maintenance/starboard) "cuK" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/structure/rack, /obj/effect/decal/cleanable/dirt, /obj/item/storage/box/flashes, @@ -40000,9 +39982,7 @@ /obj/machinery/status_display/ai{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -41218,9 +41198,7 @@ /obj/machinery/status_display/evac{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/structure/table/reinforced, /obj/item/book/manual/wiki/security_space_law, /obj/item/radio, @@ -67558,9 +67536,7 @@ /turf/open/floor/plasteel, /area/service/kitchen) "dWm" = ( -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/west, /obj/structure/table/glass, /obj/structure/cable/white{ icon_state = "1-2" @@ -72086,9 +72062,7 @@ "etJ" = ( /obj/machinery/recharger, /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -74147,7 +74121,7 @@ /turf/open/floor/plasteel, /area/engineering/main) "fjQ" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -32; pixel_y = 32 }, diff --git a/_maps/map_files/FestiveBall/FestiveStation.dmm b/_maps/map_files/FestiveBall/FestiveStation.dmm index 353b298cebe1..675bc4121b6c 100644 --- a/_maps/map_files/FestiveBall/FestiveStation.dmm +++ b/_maps/map_files/FestiveBall/FestiveStation.dmm @@ -6457,9 +6457,7 @@ pixel_x = 3; pixel_y = -3 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /turf/open/floor/festive/wooden/wooden1, /area/ai_monitored/security/armory) "aqv" = ( @@ -13060,7 +13058,7 @@ /area/security) "aIa" = ( /obj/structure/closet/bombcloset/security, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/effect/turf_decal/tile/red, @@ -14900,9 +14898,7 @@ /obj/machinery/status_display/ai{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -27413,9 +27409,7 @@ }, /area/medical/virology) "bsD" = ( -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/west, /obj/structure/table/glass, /obj/structure/cable/white{ icon_state = "1-2" diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index 74dbdcf8d777..f63125eaf215 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -7458,7 +7458,7 @@ /obj/machinery/computer/security/telescreen/entertainment{ pixel_y = -26 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /turf/open/floor/plasteel/dark, @@ -7512,7 +7512,7 @@ }, /obj/effect/turf_decal/bot, /obj/machinery/light, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = -30 }, /turf/open/floor/plasteel/dark, @@ -18407,7 +18407,7 @@ c_tag = "Warden's Office"; dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/turf_decal/tile/neutral{ @@ -22985,7 +22985,7 @@ dir = 4 }, /obj/machinery/light, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = -30 }, /obj/item/crowbar, @@ -28486,9 +28486,7 @@ /obj/effect/turf_decal/tile/neutral{ dir = 4 }, -/obj/structure/reagent_dispensers/virusfood{ - pixel_y = -30 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/south, /turf/open/floor/plasteel/dark, /area/medical/virology) "aUz" = ( @@ -29099,7 +29097,7 @@ dir = 8; pixel_x = 24 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = -30 }, /obj/machinery/button/door{ @@ -32618,7 +32616,7 @@ dir = 4; pixel_x = -23 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = -30 }, /obj/item/crowbar, @@ -39486,7 +39484,7 @@ /obj/machinery/light_switch{ pixel_y = -24 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/machinery/camera{ @@ -57076,7 +57074,7 @@ /obj/structure/cable{ icon_state = "0-8" }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /turf/open/floor/plasteel/dark, @@ -58482,7 +58480,7 @@ /obj/structure/cable{ icon_state = "0-2" }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /turf/open/floor/wood, @@ -64117,7 +64115,7 @@ /obj/structure/cable{ icon_state = "2-4" }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/turf_decal/tile/neutral{ @@ -68719,7 +68717,7 @@ }, /obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/bot, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /turf/open/floor/plasteel/dark, diff --git a/_maps/map_files/LambdaStation/lambda.dmm b/_maps/map_files/LambdaStation/lambda.dmm index 22241d6dfcac..df31b52b476a 100644 --- a/_maps/map_files/LambdaStation/lambda.dmm +++ b/_maps/map_files/LambdaStation/lambda.dmm @@ -3448,7 +3448,7 @@ /area/security/execution/education) "ahJ" = ( /obj/structure/table, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 29 }, /obj/item/storage/backpack/duffelbag/sec/surgery{ @@ -11084,9 +11084,7 @@ dir = 4 }, /obj/effect/turf_decal/tile/red, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/structure/table/reinforced, /obj/machinery/recharger, /turf/open/floor/plasteel/dark, @@ -13485,7 +13483,7 @@ dir = 1 }, /obj/machinery/recharger, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /turf/open/floor/plasteel/dark, @@ -14061,7 +14059,7 @@ /turf/closed/wall/r_wall, /area/security/checkpoint/science) "azx" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/structure/closet/secure_closet/security/science, @@ -29280,7 +29278,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/supply) "bek" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/machinery/recharger, @@ -42582,9 +42580,7 @@ /turf/open/floor/plasteel/white, /area/medical/virology) "bOh" = ( -/obj/structure/reagent_dispensers/virusfood{ - pixel_y = 30 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/north, /obj/structure/table/glass, /obj/effect/turf_decal/trimline/green/filled/line{ dir = 1 @@ -43009,7 +43005,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/medical) "bPi" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/structure/table, @@ -52045,7 +52041,7 @@ /area/hallway/secondary/entry) "cqh" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on/layer1, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/trimline/red/filled/line{ diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 44a080ccb461..8e3e6c9ea37e 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -260,7 +260,7 @@ "aaG" = ( /obj/structure/table, /obj/item/flashlight/lamp, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -29 }, /obj/machinery/light/small{ @@ -5284,9 +5284,7 @@ /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "apQ" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/machinery/camera{ c_tag = "Security - Gear Room"; dir = 8 @@ -5988,9 +5986,7 @@ pixel_y = 7 }, /obj/item/pen, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /turf/open/floor/plasteel/showroomfloor, /area/security/warden) "asu" = ( @@ -9843,7 +9839,7 @@ dir = 8; pixel_x = 24 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = -30 }, /turf/open/floor/plasteel/dark, @@ -11664,7 +11660,7 @@ /area/security/checkpoint/supply) "aUm" = ( /obj/structure/filingcabinet, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/effect/turf_decal/tile/red{ @@ -13542,7 +13538,7 @@ /area/maintenance/starboard/fore) "aZL" = ( /obj/structure/filingcabinet, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/machinery/airalarm{ @@ -14532,7 +14528,7 @@ /obj/machinery/light_switch{ pixel_x = 27 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/structure/closet/secure_closet/security, @@ -24500,7 +24496,7 @@ "bYZ" = ( /obj/item/pen, /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/item/folder/red, @@ -26350,7 +26346,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/science/research) "cdS" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/structure/chair{ @@ -37592,9 +37588,7 @@ /obj/item/clothing/gloves/color/latex, /obj/item/healthanalyzer, /obj/item/clothing/glasses/hud/health, -/obj/structure/reagent_dispensers/virusfood{ - pixel_y = 30 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/north, /obj/structure/table/glass, /obj/effect/turf_decal/tile/green{ dir = 1 @@ -42428,7 +42422,7 @@ /obj/machinery/atmospherics/components/unary/vent_pump/on{ dir = 8 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 28 }, /obj/effect/turf_decal/tile/red{ @@ -78213,9 +78207,7 @@ /area/service/chapel/main) "tYn" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/machinery/atmospherics/components/unary/vent_pump/on{ dir = 4 }, @@ -79973,7 +79965,7 @@ /obj/machinery/light{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = 30 }, /obj/structure/extinguisher_cabinet{ diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index fb77051142d3..42c9a1db7c87 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -4002,9 +4002,7 @@ }, /area/command/heads_quarters/hos) "ahz" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 6 }, @@ -10390,9 +10388,7 @@ /obj/structure/extinguisher_cabinet{ pixel_x = -26 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/south, /obj/structure/closet/secure_closet/security/sec, /turf/open/floor/plasteel/dark/side{ dir = 10 @@ -23731,9 +23727,7 @@ /obj/effect/turf_decal/tile/green{ dir = 1 }, -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/west, /obj/item/storage/box/beakers{ pixel_x = -6; pixel_y = 8 @@ -28373,9 +28367,7 @@ /obj/structure/table/reinforced, /obj/item/book/manual/wiki/security_space_law, /obj/item/radio, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/red{ dir = 1 }, diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 207b47c0961a..938738f1bb7d 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -5985,7 +5985,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/tile/red{ @@ -15255,7 +15255,7 @@ departmentType = 5; pixel_x = -32 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/machinery/computer/security, @@ -20812,9 +20812,7 @@ departmentType = 5; pixel_y = 30 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -25519,7 +25517,7 @@ /area/security/checkpoint/medical) "bjZ" = ( /obj/machinery/computer/secure_data, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /obj/effect/turf_decal/tile/red{ @@ -35463,9 +35461,7 @@ /turf/open/floor/plasteel/dark, /area/command/heads_quarters/rd) "bEW" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/structure/filingcabinet/security, /obj/effect/turf_decal/tile/red{ dir = 1 @@ -38993,9 +38989,7 @@ /area/medical/virology) "bMJ" = ( /obj/structure/table/glass, -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/east, /obj/item/clothing/gloves/color/latex, /obj/item/clothing/glasses/hud/health, /obj/item/reagent_containers/dropper, @@ -43398,9 +43392,7 @@ /turf/open/floor/plasteel, /area/security/checkpoint/engineering) "bWC" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/structure/closet/secure_closet/security/engine, /obj/effect/turf_decal/tile/red, /obj/effect/turf_decal/tile/red{ @@ -50878,7 +50870,7 @@ /obj/structure/cable{ icon_state = "0-2" }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 30 }, /turf/open/floor/plasteel/showroomfloor, diff --git a/_maps/map_files/Snaxi/Snaxi.dmm b/_maps/map_files/Snaxi/Snaxi.dmm index 51b0cdb586d7..41e2e07c483c 100644 --- a/_maps/map_files/Snaxi/Snaxi.dmm +++ b/_maps/map_files/Snaxi/Snaxi.dmm @@ -15392,7 +15392,7 @@ /turf/open/floor/plating/snowed/smoothed/icemoon, /area/icemoon/surface/outdoors) "cFm" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/turf_decal/tile/red{ @@ -20188,9 +20188,7 @@ /obj/item/gun/energy/temperature/security, /obj/item/clothing/suit/armor/laserproof, /obj/item/gun/energy/ionrifle, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /turf/open/floor/plasteel/dark, /area/ai_monitored/security/armory) "fLK" = ( @@ -23294,7 +23292,7 @@ /turf/open/floor/plasteel/white, /area/medical/medbay/central) "hLo" = ( -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -30 }, /obj/effect/turf_decal/tile/red{ @@ -26691,9 +26689,7 @@ dir = 4 }, /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/item/book/manual/wiki/security_space_law, /turf/open/floor/plasteel/dark, /area/security/office) @@ -27181,9 +27177,7 @@ /obj/structure/table, /obj/item/radio/headset/headset_med, /obj/item/hand_labeler, -/obj/structure/reagent_dispensers/virusfood{ - pixel_x = 30 - }, +/obj/structure/reagent_dispensers/wall/virusfood/directional/east, /obj/effect/turf_decal/tile/green{ dir = 4 }, diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index cb32e435ca0b..1661a92a0e67 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -3233,9 +3233,7 @@ /obj/item/grenade/plastic/x4, /obj/structure/table/reinforced, /obj/item/clothing/ears/earmuffs, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/stripes/line, /turf/open/floor/plasteel, /area/centcom/control) @@ -3512,9 +3510,7 @@ /turf/open/floor/plasteel, /area/centcom/supply) "jg" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/effect/turf_decal/stripes/line{ dir = 8 }, @@ -5301,9 +5297,7 @@ /turf/open/floor/plasteel/dark, /area/centcom/control) "mW" = ( -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/effect/turf_decal/tile/red{ dir = 1 }, @@ -5941,9 +5935,7 @@ /obj/structure/table/wood, /obj/item/storage/photo_album, /obj/item/camera, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/north, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -7906,9 +7898,7 @@ /obj/machinery/newscaster{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, @@ -8697,9 +8687,7 @@ /obj/item/grenade/plastic/x4, /obj/structure/table/reinforced, /obj/item/clothing/ears/earmuffs, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/stripes/line{ dir = 1 }, @@ -12423,9 +12411,7 @@ /obj/structure/table/reinforced, /obj/item/storage/box/syringes, /obj/item/gun/syringe/rapidsyringe, -/obj/structure/reagent_dispensers/peppertank{ - pixel_y = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /obj/effect/turf_decal/stripes/line{ dir = 1 }, @@ -12963,9 +12949,7 @@ }, /obj/item/storage/box/silver_ids, /obj/structure/table/reinforced, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = 32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/east, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, diff --git a/_maps/shuttles/emergency_cere.dmm b/_maps/shuttles/emergency_cere.dmm index 9608f7f28a66..935c2fb9a042 100644 --- a/_maps/shuttles/emergency_cere.dmm +++ b/_maps/shuttles/emergency_cere.dmm @@ -497,9 +497,7 @@ "aU" = ( /obj/structure/table, /obj/machinery/recharger, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /turf/open/floor/mineral/plastitanium/red/brig, /area/shuttle/escape) "aV" = ( diff --git a/_maps/shuttles/emergency_meta.dmm b/_maps/shuttles/emergency_meta.dmm index cae3139c4199..2014c697b650 100644 --- a/_maps/shuttles/emergency_meta.dmm +++ b/_maps/shuttles/emergency_meta.dmm @@ -456,7 +456,7 @@ /turf/open/floor/mineral/plastitanium/red/brig, /area/shuttle/escape) "bt" = ( -/obj/structure/reagent_dispensers/peppertank, +/obj/structure/reagent_dispensers/wall/peppertank, /turf/closed/wall/mineral/titanium, /area/shuttle/escape) "bu" = ( diff --git a/_maps/shuttles/emergency_nature.dmm b/_maps/shuttles/emergency_nature.dmm index a7fcc12f1adc..ae19b05030e2 100644 --- a/_maps/shuttles/emergency_nature.dmm +++ b/_maps/shuttles/emergency_nature.dmm @@ -241,7 +241,7 @@ /obj/machinery/light{ dir = 8 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_y = 28 }, /turf/open/floor/mineral/plastitanium/red/brig, diff --git a/_maps/shuttles/emergency_omega.dmm b/_maps/shuttles/emergency_omega.dmm index 83b9c28305d3..637a9d0ac9a2 100644 --- a/_maps/shuttles/emergency_omega.dmm +++ b/_maps/shuttles/emergency_omega.dmm @@ -18,9 +18,7 @@ /obj/machinery/newscaster/security_unit{ pixel_y = 32 }, -/obj/structure/reagent_dispensers/peppertank{ - pixel_x = -32 - }, +/obj/structure/reagent_dispensers/wall/peppertank/directional/west, /turf/open/floor/mineral/plastitanium/red/brig, /area/shuttle/escape) "ae" = ( diff --git a/_maps/shuttles/labour_box.dmm b/_maps/shuttles/labour_box.dmm index 7e754ea02f92..f77448c67255 100644 --- a/_maps/shuttles/labour_box.dmm +++ b/_maps/shuttles/labour_box.dmm @@ -10,7 +10,7 @@ /obj/machinery/computer/shuttle/labor{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -31 }, /turf/open/floor/mineral/plastitanium/red, diff --git a/_maps/shuttles/labour_cog.dmm b/_maps/shuttles/labour_cog.dmm index b98d52f10feb..9311faff5485 100644 --- a/_maps/shuttles/labour_cog.dmm +++ b/_maps/shuttles/labour_cog.dmm @@ -244,7 +244,7 @@ /obj/machinery/computer/shuttle/labor{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -31 }, /turf/open/floor/plasteel/grimy, diff --git a/_maps/shuttles/labour_delta.dmm b/_maps/shuttles/labour_delta.dmm index b5b7faa26d0e..dab5c327fa9b 100644 --- a/_maps/shuttles/labour_delta.dmm +++ b/_maps/shuttles/labour_delta.dmm @@ -10,7 +10,7 @@ /obj/machinery/computer/shuttle/labor{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -31 }, /turf/open/floor/mineral/plastitanium/red, diff --git a/_maps/shuttles/labour_kilo.dmm b/_maps/shuttles/labour_kilo.dmm index 6b7092247578..d65fcf60f96d 100644 --- a/_maps/shuttles/labour_kilo.dmm +++ b/_maps/shuttles/labour_kilo.dmm @@ -10,7 +10,7 @@ /obj/machinery/computer/shuttle/labor{ dir = 4 }, -/obj/structure/reagent_dispensers/peppertank{ +/obj/structure/reagent_dispensers/wall/peppertank{ pixel_x = -31 }, /obj/effect/turf_decal/bot, diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 2b9fa902e909..46d2d7ce3291 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -356,7 +356,6 @@ // /client signals #define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client) #define COMSIG_MOB_CLIENT_MOVE "mob_client_move" //sent when client/Move() finishes with no early returns: (client, direction, n, oldloc) -#define COMSIG_MOB_CLIENT_CHANGE_VIEW "mob_client_change_view" //from base of /client/change_view(): (client, old_view, view) #define COMSIG_MOB_CLIENT_MOUSEMOVE "mob_client_mousemove" //from base of /client/MouseMove(): (object, location, control, params) ///sent when a mob/login() finishes: (client) @@ -380,7 +379,6 @@ #define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: () #define COMSIG_LIVING_REVIVE "living_revive" //from base of mob/living/revive() (full_heal, admin_revive) -#define COMSIG_MOB_RESET_PERSPECTIVE "mob_reset_perspective" //from base of /mob/reset_perspective(): (atom/target) #define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override) // This returns flags as defined for block in __DEFINES/combat.dm! #define COMSIG_LIVING_RUN_BLOCK "living_do_run_block" //from base of mob/living/do_run_block(): (real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone) @@ -440,11 +438,18 @@ #define COMPONENT_HOSTILE_NO_ATTACK 1 // /obj signals -#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled) -#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag) -#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value) -#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" //called exclusively in plumbing, for now -#define COMSIG_OBJ_ATTACK_GENERIC "obj_attack_generic" //from base of atom/animal_attack(): (/mob/user) +///from base of obj/deconstruct(): (disassembled) +#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" +///from base of /obj/obj_break(): (damage_flag) +#define COMSIG_OBJ_BREAK "obj_break" +///called in /obj/structure/setAnchored(): (value) +#define COMSIG_OBJ_SETANCHORED "obj_setanchored" +///called exclusively in plumbing, for now +#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" +///from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide +#define COMSIG_OBJ_HIDE "obj_hide" +///from base of atom/animal_attack(): (/mob/user) +#define COMSIG_OBJ_ATTACK_GENERIC "obj_attack_generic" #define COMPONENT_STOP_GENERIC_ATTACK 1 diff --git a/code/__DEFINES/dcs/signals/signals_clothing.dm b/code/__DEFINES/dcs/signals/signals_clothing.dm new file mode 100644 index 000000000000..242a076615f9 --- /dev/null +++ b/code/__DEFINES/dcs/signals/signals_clothing.dm @@ -0,0 +1,3 @@ +// /obj/item/clothing +/// (/obj/item/clothing, visor_state) - When a clothing gets it's visor toggled. +#define COMSIG_CLOTHING_VISOR_TOGGLE "clothing_visor_toggle" diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm new file mode 100644 index 000000000000..0f89e3cc5e32 --- /dev/null +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm @@ -0,0 +1,4 @@ +/// From base of /client/proc/change_view() (mob/source, new_size) +#define COMSIG_MOB_CLIENT_CHANGE_VIEW "mob_client_change_view" +/// From base of /mob/proc/reset_perspective() (mob/source) +#define COMSIG_MOB_RESET_PERSPECTIVE "mob_reset_perspective" diff --git a/code/__DEFINES/directional.dm b/code/__DEFINES/directional.dm new file mode 100644 index 000000000000..bfde544b4471 --- /dev/null +++ b/code/__DEFINES/directional.dm @@ -0,0 +1,35 @@ +// Byond direction defines, because I want to put them somewhere. +// #define NORTH 1 +// #define SOUTH 2 +// #define EAST 4 +// #define WEST 8 + +/// North direction as a string "[1]" +#define TEXT_NORTH "[NORTH]" +/// South direction as a string "[2]" +#define TEXT_SOUTH "[SOUTH]" +/// East direction as a string "[4]" +#define TEXT_EAST "[EAST]" +/// West direction as a string "[8]" +#define TEXT_WEST "[WEST]" + +/// Inverse direction, taking into account UP|DOWN if necessary. +#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) ) + +/// Create directional subtypes for a path to simplify mapping. +#define MAPPING_DIRECTIONAL_HELPERS(path, offset) ##path/directional/north {\ + dir = NORTH; \ + pixel_y = offset; \ +} \ +##path/directional/south {\ + dir = SOUTH; \ + pixel_y = -offset; \ +} \ +##path/directional/east {\ + dir = EAST; \ + pixel_x = offset; \ +} \ +##path/directional/west {\ + dir = WEST; \ + pixel_x = -offset; \ +} diff --git a/code/__DEFINES/fov.dm b/code/__DEFINES/fov.dm new file mode 100644 index 000000000000..d35d30cdfea0 --- /dev/null +++ b/code/__DEFINES/fov.dm @@ -0,0 +1,20 @@ +/// Field of vision defines. +#define FOV_90_DEGREES 90 +#define FOV_180_DEGREES 180 +#define FOV_270_DEGREES 270 + +/// Base mask dimensions. They're like a client's view, only change them if you modify the mask to different dimensions. +#define BASE_FOV_MASK_X_DIMENSION 15 +#define BASE_FOV_MASK_Y_DIMENSION 15 + +/// Range at which FOV effects treat nearsightness as blind and play +#define NEARSIGHTNESS_FOV_BLINDNESS 2 + +/// Range in tiles that a mob can see in the dark (used to determine if a mob has night_vision) +#define NIGHTVISION_FOV_RANGE 8 + +//Fullscreen overlay resolution in tiles for the clients view. +/// The fullscreen overlay in tiles for x axis +#define FULLSCREEN_OVERLAY_RESOLUTION_X 15 +/// The fullscreen overlay in tiles for y axis +#define FULLSCREEN_OVERLAY_RESOLUTION_Y 15 diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 640079e9b848..fbb7ed35d21d 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -7,6 +7,8 @@ #define isatom(A) (isloc(A)) +#define isdatum(thing) (istype(thing, /datum)) + #define isweakref(D) (istype(D, /datum/weakref)) //Turfs diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm new file mode 100644 index 000000000000..ea9fdb29e359 --- /dev/null +++ b/code/__DEFINES/layers.dm @@ -0,0 +1,227 @@ +//Defines for atom layers and planes +//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE + +//NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE +#define LOWEST_EVER_PLANE -200 + +#define FIELD_OF_VISION_BLOCKER_PLANE -199 +#define FIELD_OF_VISION_BLOCKER_RENDER_TARGET "*FIELD_OF_VISION_BLOCKER_RENDER_TARGET" + +#define CLICKCATCHER_PLANE -99 + +#define PLANE_SPACE -95 +#define PLANE_SPACE_PARALLAX -90 + +#define GRAVITY_PULSE_PLANE -11 +#define GRAVITY_PULSE_RENDER_TARGET "*GRAVPULSE_RENDER_TARGET" + +#define OPENSPACE_LAYER 600 //Openspace layer over all + +#define TRANSPARENT_FLOOR_PLANE -10 //Transparent plane that shows openspace underneath the floor +#define OPENSPACE_PLANE -9 //Openspace plane below all turfs +#define OPENSPACE_BACKDROP_PLANE -8 //Black square just over openspace plane to guaranteed cover all in openspace turf + + +#define FLOOR_PLANE -7 + +#define GAME_PLANE -6 +#define GAME_PLANE_FOV_HIDDEN -5 +#define GAME_PLANE_UPPER -4 +#define GAME_PLANE_UPPER_FOV_HIDDEN -3 + +#define ABOVE_GAME_PLANE -2 + +// PLANE_SPACE layer(s) +#define SPACE_LAYER 1.8 + +//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define. Most floors (FLOOR_PLANE) and walls (GAME_PLANE) use this. + +// GAME_PLANE layers +#define CULT_OVERLAY_LAYER 2.01 +#define MID_TURF_LAYER 2.02 +#define HIGH_TURF_LAYER 2.03 +#define TURF_PLATING_DECAL_LAYER 2.031 +#define TURF_DECAL_LAYER 2.039 //Makes turf decals appear in DM how they will look inworld. +#define ABOVE_OPEN_TURF_LAYER 2.04 +#define CLOSED_TURF_LAYER 2.05 +#define BULLET_HOLE_LAYER 2.06 +#define ABOVE_NORMAL_TURF_LAYER 2.08 +#define LATTICE_LAYER 2.2 +#define DISPOSAL_PIPE_LAYER 2.3 +#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap +#define WIRE_LAYER 2.4 +#define WIRE_BRIDGE_LAYER 2.44 +#define WIRE_TERMINAL_LAYER 2.45 +#define GAS_SCRUBBER_LAYER 2.46 +#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap +#define GAS_FILTER_LAYER 2.48 +#define GAS_PUMP_LAYER 2.49 +#define LOW_OBJ_LAYER 2.5 +///catwalk overlay of /turf/open/floor/plating/catwalk_floor +#define CATWALK_LAYER 2.51 +#define LOW_SIGIL_LAYER 2.52 +#define SIGIL_LAYER 2.53 +#define HIGH_SIGIL_LAYER 2.56 +#define HIGH_PIPE_LAYER 2.54 +// Anything aboe this layer is not "on" a turf for the purposes of washing +// I hate this life of ours +#define FLOOR_CLEAN_LAYER 2.55 + +#define BELOW_OPEN_DOOR_LAYER 2.6 +#define BLASTDOOR_LAYER 2.65 +#define OPEN_DOOR_LAYER 2.7 +#define DOOR_HELPER_LAYER 2.71 //keep this above OPEN_DOOR_LAYER +#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 GATEWAY_UNDERLAY_LAYER 2.85 +#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 CLOSED_BLASTDOOR_LAYER 3.3 // ABOVE WINDOWS AND DOORS +#define SHUTTER_LAYER 3.3 // HERE BE DRAGONS +#define ABOVE_WINDOW_LAYER 3.3 +#define SIGN_LAYER 3.4 +#define CORGI_ASS_PIN_LAYER 3.41 +#define NOT_HIGH_OBJ_LAYER 3.5 +#define HIGH_OBJ_LAYER 3.6 +#define BELOW_MOB_LAYER 3.7 + +// GAME_PLANE_FOV_HIDDEN layers +#define LOW_MOB_LAYER 3.75 +#define LYING_MOB_LAYER 3.8 +#define VEHICLE_LAYER 3.9 +#define MOB_BELOW_PIGGYBACK_LAYER 3.94 +//#define MOB_LAYER 4 //For easy recordkeeping; this is a byond define +#define MOB_SHIELD_LAYER 4.01 +#define MOB_ABOVE_PIGGYBACK_LAYER 4.06 +#define MOB_UPPER_LAYER 4.07 +#define HITSCAN_PROJECTILE_LAYER 4.09 //above all mob but still hidden by FoV + +// GAME_PLANE_UPPER layers +#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 SPACEVINE_LAYER 4.4 + +// GAME_PLANE_UPPER_FOV_HIDDEN layers +#define LARGE_MOB_LAYER 4.5 +#define SPACEVINE_MOB_LAYER 4.6 + +// Intermediate layer used by both GAME_PLANE_FOV_HIDDEN and ABOVE_GAME_PLANE +#define ABOVE_ALL_MOB_LAYER 4.7 + +// ABOVE_GAME_PLANE layers +//#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define +#define GASFIRE_LAYER 5.05 +#define RIPPLE_LAYER 5.1 + + +#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals + +#define AREA_PLANE 60 +#define MASSIVE_OBJ_PLANE 70 +#define GHOST_PLANE 80 +#define POINT_PLANE 90 + +#define RAD_TEXT_PLANE 90 + +//---------- LIGHTING ------------- +///Normal 1 per turf dynamic lighting underlays +#define LIGHTING_PLANE 100 + +///Lighting objects that are "free floating" +#define O_LIGHTING_VISUAL_PLANE 110 +#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE" + +///Things that should render ignoring lighting +#define ABOVE_LIGHTING_PLANE 120 + +#define LIGHTING_PRIMARY_LAYER 15 //The layer for the main lights of the station +#define LIGHTING_PRIMARY_DIMMER_LAYER 15.1 //The layer that dims the main lights of the station +#define LIGHTING_SECONDARY_LAYER 16 //The colourful, usually small lights that go on top + + +///visibility + hiding of things outside of light source range +#define BYOND_LIGHTING_PLANE 130 + + +//---------- EMISSIVES ------------- +//Layering order of these is not particularly meaningful. +//Important part is the seperation of the planes for control via plane_master + +/// This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas. +#define EMISSIVE_PLANE 150 +/// The render target used by the emissive layer. +#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE" +/// The layer you should use if you _really_ don't want an emissive overlay to be blocked. +#define EMISSIVE_LAYER_UNBLOCKABLE 9999 + +///---------------- MISC ----------------------- + +///AI Camera Static +#define CAMERA_STATIC_PLANE 200 + +///Debug Atmos Overlays +#define ATMOS_GROUP_PLANE 450 + +///--------------- FULLSCREEN IMAGES ------------ + +#define FULLSCREEN_PLANE 500 +#define FLASH_LAYER 1 +#define FULLSCREEN_LAYER 2 +#define UI_DAMAGE_LAYER 3 +#define BLIND_LAYER 4 +#define CRIT_LAYER 5 +#define CURSE_LAYER 6 +#define FOV_EFFECTS_LAYER 10000 //Blindness effects are not layer 4, they lie to you + +///--------------- FULLSCREEN RUNECHAT BUBBLES ------------ + +///Popup Chat Messages +#define RUNECHAT_PLANE 501 +/// Plane for balloon text (text that fades up) +#define BALLOON_CHAT_PLANE 502 + +//-------------------- Rendering --------------------- +#define RENDER_PLANE_GAME 990 +#define RENDER_PLANE_NON_GAME 995 +#define RENDER_PLANE_MASTER 999 + +//-------------------- HUD --------------------- +//HUD layer defines +#define HUD_PLANE 1000 +#define ABOVE_HUD_PLANE 1100 + +//Storage layer defines +#define VOLUMETRIC_STORAGE_BOX_PLANE 1001 +#define VOLUMETRIC_STORAGE_BOX_RENDER_TARGET "VOLUME_STORAGE_BOX_PLANE" + +#define VOLUMETRIC_STORAGE_ITEM_PLANE 1002 +#define VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE 1003 +#define VOLUMETRIC_STORAGE_ITEM_RENDER_TARGET "VOLUME_STORAGE_ITEM_PLANE" + +#define RADIAL_BACKGROUND_LAYER 0 +///1000 is an unimportant number, it's just to normalize copied layers +#define RADIAL_CONTENT_LAYER 1000 + +#define ADMIN_POPUP_LAYER 1 + +///Layer for screentips +#define SCREENTIP_LAYER 4 + +///Plane of the "splash" icon used that shows on the lobby screen. Nothing should ever be above this. +#define SPLASHSCREEN_PLANE 9999 + +#define LOBBY_BACKGROUND_LAYER 3 +#define LOBBY_BUTTON_LAYER 4 + +///cinematics are "below" the splash screen +#define CINEMATIC_LAYER -1 + +///Plane master controller keys +#define PLANE_MASTERS_GAME "plane_masters_game" +#define PLANE_MASTERS_COLORBLIND "plane_masters_colorblind" diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm deleted file mode 100644 index b4c616243f55..000000000000 --- a/code/__DEFINES/layers_planes.dm +++ /dev/null @@ -1,198 +0,0 @@ -//Defines for atom layers and planes -//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE - -#define PLANE_VOID -100 - -#define CLICKCATCHER_PLANE -99 - -#define PLANE_SPACE -98 -#define PLANE_SPACE_RENDER_TARGET "PLANE_SPACE" - -#define PLANE_SPACE_PARALLAX -95 -#define PLANE_SPACE_PARALLAX_RENDER_TARGET "PLANE_SPACE_PARALLAX" - -#define OPENSPACE_LAYER 17 //Openspace layer over all -#define OPENSPACE_PLANE -10 //Openspace plane below all turfs -#define OPENSPACE_BACKDROP_PLANE -9 //Black square just over openspace plane to guaranteed cover all in openspace turf - -#define FLOOR_PLANE -8 -#define FLOOR_PLANE_RENDER_TARGET "FLOOR_PLANE" - -#define WALL_PLANE -7 -#define WALL_PLANE_RENDER_TARGET "WALL_PLANE" - -#define ABOVE_WALL_PLANE -6 -#define ABOVE_WALL_PLANE_RENDER_TARGET "ABOVE_WALL_PLANE" - -#define FIELD_OF_VISION_BLOCKER_PLANE -5 -#define FIELD_OF_VISION_BLOCKER_RENDER_TARGET "*FIELD_OF_VISION_BLOCKER_PLANE" - -#define FIELD_OF_VISION_PLANE -4 -#define FIELD_OF_VISION_RENDER_TARGET "*FIELD_OF_VISION_PLANE" -#define FIELD_OF_VISION_LAYER 17 //used to place the visual (not the mask) shadow cone above any other floor plane stuff. - -#define GAME_PLANE -3 -#define GAME_PLANE_RENDER_TARGET "GAME_PLANE" - -#define FIELD_OF_VISION_VISUAL_PLANE -2 //Yea, FoV does require quite a few planes to work with 513 filters to a decent degree. -#define FIELD_OF_VISION_VISUAL_RENDER_TARGET "FIELD_OF_VISION_VISUAL_PLANE" - -#define CHAT_PLANE -1 //We don't want heard messages to be hidden by FoV. - -#define CHAT_LAYER 12.0001 // Do not insert layers between these two values -#define CHAT_LAYER_MAX 12.9999 - -#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals -#define BLACKNESS_PLANE_RENDER_TARGET "BLACKNESS_PLANE" - -///Layers most often used by atoms of plane lower than GAME_PLANE -#define SPACE_LAYER 1.8 -//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define -#define MID_TURF_LAYER 2.02 -#define HIGH_TURF_LAYER 2.03 -#define TURF_PLATING_DECAL_LAYER 2.031 -#define TURF_DECAL_LAYER 2.039 //Makes turf decals appear in DM how they will look inworld. -#define ABOVE_OPEN_TURF_LAYER 2.04 -#define CLOSED_TURF_LAYER 2.05 -#define BULLET_HOLE_LAYER 2.06 -#define ABOVE_NORMAL_TURF_LAYER 2.08 -#define LATTICE_LAYER 2.2 -#define DISPOSAL_PIPE_LAYER 2.3 -#define GAS_PIPE_HIDDEN_LAYER 2.35 -#define WIRE_LAYER 2.4 -#define WIRE_TERMINAL_LAYER 2.45 -#define GAS_SCRUBBER_LAYER 2.46 -#define GAS_PIPE_VISIBLE_LAYER 2.47 -#define GAS_FILTER_LAYER 2.48 -#define GAS_PUMP_LAYER 2.49 -#define LOW_OBJ_LAYER 2.5 -///catwalk overlay of /turf/open/floor/plating/plating_catwalk -#define CATWALK_LAYER 2.51 -#define LOW_SIGIL_LAYER 2.52 -#define SIGIL_LAYER 2.54 -#define HIGH_SIGIL_LAYER 2.56 -///Layers most often used by atoms of plane equal or higher than GAME_PLANE -#define BELOW_OPEN_DOOR_LAYER 2.6 -#define BLASTDOOR_LAYER 2.65 -#define OPEN_DOOR_LAYER 2.7 -#define DOOR_HELPER_LAYER 2.71 //keep this above OPEN_DOOR_LAYER -#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 TRAY_LAYER 2.85 -#define GATEWAY_UNDERLAY_LAYER 2.85 -#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_BLASTDOOR_LAYER 3.05 -#define CLOSED_DOOR_LAYER 3.1 -#define CLOSED_FIREDOOR_LAYER 3.11 -#define SHUTTER_LAYER 3.12 // HERE BE DRAGONS -#define ABOVE_OBJ_LAYER 3.2 -#define ABOVE_WINDOW_LAYER 3.3 -#define SIGN_LAYER 3.4 -#define NOT_HIGH_OBJ_LAYER 3.5 -#define HIGH_OBJ_LAYER 3.6 - -#define BELOW_MOB_LAYER 3.7 -#define LYING_MOB_LAYER 3.8 -#define MOB_LOWER_LAYER 3.95 -//#define MOB_LAYER 4 //For easy recordkeeping; this is a byond define -#define MOB_UPPER_LAYER 4.05 -#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 ABOVE_FLY_LAYER 5.1 -#define GASFIRE_LAYER 5.2 -#define RIPPLE_LAYER 5.3 - -#define GHOST_LAYER 6 -#define LOW_LANDMARK_LAYER 9 -#define MID_LANDMARK_LAYER 9.1 -#define HIGH_LANDMARK_LAYER 9.2 -#define AREA_LAYER 10 -#define MASSIVE_OBJ_LAYER 11 -#define POINT_LAYER 12 - -#define EMISSIVE_BLOCKER_PLANE 12 -#define EMISSIVE_BLOCKER_LAYER 12 -#define EMISSIVE_BLOCKER_RENDER_TARGET "*EMISSIVE_BLOCKER_PLANE" - -#define EMISSIVE_PLANE 13 -#define EMISSIVE_LAYER 13 - -#define EMISSIVE_UNBLOCKABLE_PLANE 14 -#define EMISSIVE_UNBLOCKABLE_LAYER 14 -#define EMISSIVE_LAYER_UNBLOCKABLE 14 -#define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE" -#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE" - -#define LIGHTING_PLANE 15 -#define LIGHTING_LAYER 15 -#define LIGHTING_RENDER_TARGET "LIGHT_PLANE" - -#define O_LIGHTING_VISUAL_PLANE 110 -#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE" - -#define RAD_TEXT_LAYER 15.1 - -#define ABOVE_LIGHTING_PLANE 16 -#define ABOVE_LIGHTING_LAYER 16 -#define ABOVE_LIGHTING_RENDER_TARGET "ABOVE_LIGHTING_PLANE" - -#define BYOND_LIGHTING_PLANE 18 -#define BYOND_LIGHTING_LAYER 18 -#define BYOND_LIGHTING_RENDER_TARGET "BYOND_LIGHTING_PLANE" - -#define CAMERA_STATIC_PLANE 19 -#define CAMERA_STATIC_LAYER 19 -#define CAMERA_STATIC_RENDER_TARGET "CAMERA_STATIC_PLANE" - -/// Plane for balloon text (text that fades up) -/// It's over lighting and every other crap because this is nearly as important as hud content and only visible to the user. -#define BALLOON_CHAT_PLANE 20 - -//HUD layer defines - -#define FULLSCREEN_PLANE 20 -#define FLASH_LAYER 20 -#define FULLSCREEN_LAYER 20.1 -#define UI_DAMAGE_LAYER 20.2 -#define BLIND_LAYER 20.3 -#define CRIT_LAYER 20.4 -#define CURSE_LAYER 20.5 -#define FULLSCREEN_RENDER_TARGET "FULLSCREEN_PLANE" - -#define HUD_PLANE 21 -#define HUD_LAYER 21 -#define HUD_RENDER_TARGET "HUD_PLANE" - -#define VOLUMETRIC_STORAGE_BOX_PLANE 22 -#define VOLUMETRIC_STORAGE_BOX_LAYER 22 -#define VOLUMETRIC_STORAGE_BOX_RENDER_TARGET "VOLUME_STORAGE_BOX_PLANE" - -#define VOLUMETRIC_STORAGE_ITEM_PLANE 23 -#define VOLUMETRIC_STORAGE_ITEM_LAYER 23 -#define VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER 25 -#define VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE 25 -#define VOLUMETRIC_STORAGE_ITEM_RENDER_TARGET "VOLUME_STORAGE_ITEM_PLANE" - -#define ABOVE_HUD_PLANE 30 -#define ABOVE_HUD_LAYER 30 -#define ABOVE_HUD_RENDER_TARGET "ABOVE_HUD_PLANE" - -#define LOBBY_BACKGROUND_LAYER 3 -#define LOBBY_BUTTON_LAYER 4 - -#define SPLASHSCREEN_LAYER 90 -#define SPLASHSCREEN_PLANE 90 -#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE" - -///Layer for screentips -#define SCREENTIP_LAYER 40 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 603d01b011c7..48ccaf99a3bc 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -1,14 +1,3 @@ -// Byond direction defines, because I want to put them somewhere. -// #define NORTH 1 -// #define SOUTH 2 -// #define EAST 4 -// #define WEST 8 - -#define TEXT_NORTH "[NORTH]" -#define TEXT_SOUTH "[SOUTH]" -#define TEXT_EAST "[EAST]" -#define TEXT_WEST "[WEST]" - /// yeah yeah i'm a lazy asshole who can't debug yeah yeah #define DEBUG_LINE message_admins("DEBUG: [__FILE__] [__LINE__] executing!") @@ -471,11 +460,6 @@ GLOBAL_LIST_INIT(pda_reskins, list( #define BONE_SCAR_FILE "wounds/bone_scar_desc.json" #define SCAR_LOC_FILE "wounds/scar_loc.json" - -//Fullscreen overlay resolution in tiles. -#define FULLSCREEN_OVERLAY_RESOLUTION_X 15 -#define FULLSCREEN_OVERLAY_RESOLUTION_Y 15 - #define SUMMON_GUNS "guns" #define SUMMON_MAGIC "magic" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index cd4e609e7a73..f9eeaec34d3d 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -328,11 +328,6 @@ #define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return; #define INTERACTING_WITH(X, Y) (Y in X.do_afters) -// / Field of vision defines. -#define FOV_90_DEGREES 90 -#define FOV_180_DEGREES 180 -#define FOV_270_DEGREES 270 - // / How far away you can be to make eye contact with someone while examining #define EYE_CONTACT_RANGE 5 diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 920a93a90675..1c13bb3c1c03 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -282,6 +282,8 @@ // item traits #define TRAIT_NODROP "nodrop" #define TRAIT_SPOOKY_THROW "spooky_throw" +/// Visible on t-ray scanners if the atom/var/level == 1 +#define TRAIT_T_RAY_VISIBLE "t-ray-visible" // common trait sources #define TRAIT_GENERIC "generic" @@ -360,6 +362,8 @@ #define CORRUPTED_SYSTEM "corrupted-system" ///Turf trait for when a turf is transparent #define TURF_Z_TRANSPARENT_TRAIT "turf_z_transparent" +/// Trait applied by element +#define ELEMENT_TRAIT(source) "element_trait_[source]" /// This trait is added by the active directional block system. #define ACTIVE_BLOCK_TRAIT "active_block" /// This trait is added by the parry system. diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm new file mode 100644 index 000000000000..db41db90fbf4 --- /dev/null +++ b/code/__DEFINES/turfs.dm @@ -0,0 +1,3 @@ +#define UNDERFLOOR_HIDDEN 0 +#define UNDERFLOOR_VISIBLE 1 +#define UNDERFLOOR_INTERACTABLE 2 diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm index cfb52408aaf4..6832a6e12b55 100644 --- a/code/__HELPERS/priority_announce.dm +++ b/code/__HELPERS/priority_announce.dm @@ -63,7 +63,7 @@ continue to_chat(mob_to_teleport, announcement) SEND_SOUND(mob_to_teleport, meeting_sound) //no preferences here, you must hear the funny sound - mob_to_teleport.overlay_fullscreen("emergency_meeting", /atom/movable/screen/fullscreen/scaled/emergency_meeting, 1) + mob_to_teleport.overlay_fullscreen("emergency_meeting", /atom/movable/screen/fullscreen/emergency_meeting, 1) addtimer(CALLBACK(mob_to_teleport, /mob/.proc/clear_fullscreen, "emergency_meeting"), 3 SECONDS) if (is_station_level(mob_to_teleport.z)) //teleport the mob to the crew meeting diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 73b2dd30064e..03cd7fb51307 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -15,8 +15,6 @@ var/textb = copytext(HTMLstring, 6, 8) return rgb(255 - hex2num(textr), 255 - hex2num(textg), 255 - hex2num(textb)) -//Better performant than an artisanal proc and more reliable than Turn(). From TGMC. -#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) ) //Returns location. Returns null if no location was found. /proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = FALSE, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0) /* @@ -717,7 +715,7 @@ Checks if that loc and dir has an item on the wall */ GLOBAL_LIST_INIT(WALLITEMS, typecacheof(list( /obj/machinery/power/apc, /obj/machinery/airalarm, /obj/item/radio/intercom, - /obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank, + /obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/wall/peppertank, /obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign, /obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/button, /obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller, diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index e3d15e99652f..15c51de9265c 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -139,6 +139,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( ), /obj/item = list( "TRAIT_NODROP" = TRAIT_NODROP, + "TRAIT_T_RAY_VISIBLE" = TRAIT_T_RAY_VISIBLE, "TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT, "TRAIT_SPOOKY_THROW" = TRAIT_SPOOKY_THROW ), diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm index f4d6ffc919a7..14397be13690 100644 --- a/code/_onclick/hud/blob_overmind.dm +++ b/code/_onclick/hud/blob_overmind.dm @@ -131,7 +131,6 @@ blobpwrdisplay.icon_state = "block" blobpwrdisplay.screen_loc = ui_health blobpwrdisplay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT - blobpwrdisplay.layer = ABOVE_HUD_LAYER blobpwrdisplay.plane = ABOVE_HUD_PLANE blobpwrdisplay.hud = src infodisplay += blobpwrdisplay diff --git a/code/_onclick/hud/credits.dm b/code/_onclick/hud/credits.dm index aaf423ecbcde..7ff10f735414 100644 --- a/code/_onclick/hud/credits.dm +++ b/code/_onclick/hud/credits.dm @@ -35,7 +35,7 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT alpha = 0 screen_loc = "12,1" - layer = SPLASHSCREEN_LAYER + plane = SPLASHSCREEN_PLANE var/client/parent var/matrix/target diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm index 574f5dd1fdaf..e1761b58a037 100644 --- a/code/_onclick/hud/devil.dm +++ b/code/_onclick/hud/devil.dm @@ -26,7 +26,6 @@ using.icon = ui_style using.icon_state = "swap_1_m" using.screen_loc = ui_swaphand_position(owner,1) - using.layer = HUD_LAYER using.plane = HUD_PLANE using.hud = src static_inventory += using @@ -36,7 +35,6 @@ using.icon = ui_style using.icon_state = "swap_2" using.screen_loc = ui_swaphand_position(owner,2) - using.layer = HUD_LAYER using.plane = HUD_PLANE using.hud = src static_inventory += using diff --git a/code/_onclick/hud/families.dm b/code/_onclick/hud/families.dm index 6cc9f4ef324c..d28ef82a6c0b 100644 --- a/code/_onclick/hud/families.dm +++ b/code/_onclick/hud/families.dm @@ -5,7 +5,7 @@ icon_state = "wanted_0" screen_loc = ui_wanted_lvl /// Wanted level, affects the hud icon. Level 0 is default, and the level 0 icon is blank, so in case of no families gamemode (and thus no wanted level), this HUD element will never appear. - level = 2 + var/level = 2 /// Boolean, have the cops arrived? If so, the icon stops changing and remains the same. var/cops_arrived = 0 diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm new file mode 100644 index 000000000000..f3882e7054d0 --- /dev/null +++ b/code/_onclick/hud/fullscreen.dm @@ -0,0 +1,203 @@ +/mob/proc/overlay_fullscreen(category, type, severity) + var/atom/movable/screen/fullscreen/screen = screens[category] + if (!screen || screen.type != type) + // needs to be recreated + clear_fullscreen(category, FALSE) + screens[category] = screen = new type() + else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view)) + // doesn't need to be updated + return screen + + screen.icon_state = "[initial(screen.icon_state)][severity]" + screen.severity = severity + if (client && screen.should_show_to(src)) + screen.update_for_view(client.view) + client.screen += screen + + return screen + +/mob/proc/clear_fullscreen(category, animated = 10) + var/atom/movable/screen/fullscreen/screen = screens[category] + if(!screen) + return + + screens -= category + + if(animated) + animate(screen, alpha = 0, time = animated) + addtimer(CALLBACK(src, .proc/clear_fullscreen_after_animate, screen), animated, TIMER_CLIENT_TIME) + else + if(client) + client.screen -= screen + qdel(screen) + +/mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen) + if(client) + client.screen -= screen + qdel(screen) + +/mob/proc/clear_fullscreens() + for(var/category in screens) + clear_fullscreen(category) + +/mob/proc/hide_fullscreens() + if(client) + for(var/category in screens) + client.screen -= screens[category] + +/mob/proc/reload_fullscreen() + if(client) + var/atom/movable/screen/fullscreen/screen + for(var/category in screens) + screen = screens[category] + if(screen.should_show_to(src)) + screen.update_for_view(client.view) + client.screen |= screen + else + client.screen -= screen + +/atom/movable/screen/fullscreen + icon = 'icons/hud/screen_full.dmi' + icon_state = "default" + screen_loc = "CENTER-7,CENTER-7" + layer = FULLSCREEN_LAYER + plane = FULLSCREEN_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + var/view = 7 + var/severity = 0 + var/show_when_dead = FALSE + +/atom/movable/screen/fullscreen/proc/update_for_view(client_view) + if (screen_loc == "CENTER-7,CENTER-7" && view != client_view) + var/list/actualview = getviewsize(client_view) + view = client_view + transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0) + +/atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob) + if(!show_when_dead && mymob.stat == DEAD) + return FALSE + return TRUE + +/atom/movable/screen/fullscreen/Destroy() + severity = 0 + . = ..() + +/atom/movable/screen/fullscreen/emergency_meeting + icon_state = "emergency_meeting" + show_when_dead = TRUE + layer = CURSE_LAYER + plane = SPLASHSCREEN_PLANE + +/atom/movable/screen/fullscreen/brute + icon_state = "brutedamageoverlay" + layer = UI_DAMAGE_LAYER + plane = FULLSCREEN_PLANE + +/atom/movable/screen/fullscreen/oxy + icon_state = "oxydamageoverlay" + layer = UI_DAMAGE_LAYER + plane = FULLSCREEN_PLANE + +/atom/movable/screen/fullscreen/crit + icon_state = "passage" + layer = CRIT_LAYER + plane = FULLSCREEN_PLANE + +/atom/movable/screen/fullscreen/crit/vision + icon_state = "oxydamageoverlay" + layer = BLIND_LAYER + +/atom/movable/screen/fullscreen/blind + icon_state = "blackimageoverlay" + layer = BLIND_LAYER + plane = FULLSCREEN_PLANE + +/atom/movable/screen/fullscreen/curse + icon_state = "curse" + layer = CURSE_LAYER + plane = FULLSCREEN_PLANE + +/atom/movable/screen/fullscreen/ivanov_display + icon_state = "ivanov" + alpha = 180 + +/atom/movable/screen/fullscreen/impaired + icon_state = "impairedoverlay" + +/atom/movable/screen/fullscreen/flash + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "flash" + +/atom/movable/screen/fullscreen/flash/black + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "black" + +/atom/movable/screen/fullscreen/flash/static + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "noise" + +/atom/movable/screen/fullscreen/high + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "druggy" + +/atom/movable/screen/fullscreen/color_vision + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "flash" + alpha = 80 + +/atom/movable/screen/fullscreen/bluespace_sparkle + icon = 'icons/effects/effects.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "shieldsparkles" + layer = FLASH_LAYER + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + show_when_dead = TRUE + +/atom/movable/screen/fullscreen/color_vision/green + color = "#00ff00" + +/atom/movable/screen/fullscreen/color_vision/red + color = "#ff0000" + +/atom/movable/screen/fullscreen/color_vision/blue + color = "#0000ff" + +/atom/movable/screen/fullscreen/cinematic_backdrop + icon = 'icons/hud/screen_gen.dmi' + screen_loc = "WEST,SOUTH to EAST,NORTH" + icon_state = "flash" + plane = SPLASHSCREEN_PLANE + layer = CINEMATIC_LAYER + color = "#000000" + show_when_dead = TRUE + +/atom/movable/screen/fullscreen/lighting_backdrop + icon = 'icons/hud/screen_gen.dmi' + icon_state = "flash" + transform = matrix(200, 0, 0, 0, 200, 0) + plane = LIGHTING_PLANE + blend_mode = BLEND_OVERLAY + show_when_dead = TRUE + +//Provides darkness to the back of the lighting plane +/atom/movable/screen/fullscreen/lighting_backdrop/lit + invisibility = INVISIBILITY_LIGHTING + layer = BACKGROUND_LAYER+21 + color = "#000" + show_when_dead = TRUE + +//Provides whiteness in case you don't see lights so everything is still visible +/atom/movable/screen/fullscreen/lighting_backdrop/unlit + layer = BACKGROUND_LAYER+20 + show_when_dead = TRUE + +/atom/movable/screen/fullscreen/see_through_darkness + icon_state = "nightvision" + plane = LIGHTING_PLANE + blend_mode = BLEND_ADD + show_when_dead = TRUE diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 9d762332c6dd..4d88bcd1d95f 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -54,6 +54,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list( var/list/inv_slots[SLOTS_AMT] // /atom/movable/screen/inventory objects, ordered by their slot ID. var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object + ///Assoc list of controller groups, associated with key string group name with value of the plane master controller ref + var/list/atom/movable/plane_master_controller/plane_master_controllers = list() ///UI for screentips that appear when you mouse over things @@ -106,6 +108,10 @@ GLOBAL_LIST_INIT(available_ui_styles, list( screentip_text = new(null, src) static_inventory += screentip_text + for(var/mytype in subtypesof(/atom/movable/plane_master_controller)) + var/atom/movable/plane_master_controller/controller_instance = new mytype(null,src) + plane_master_controllers[controller_instance.name] = controller_instance + /datum/hud/Destroy() if(mymob.hud_used == src) mymob.hud_used = null diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 9547ee6f86b8..3150485af502 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -174,7 +174,7 @@ /datum/hud/human/New(mob/living/carbon/human/owner) ..() - owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/special/see_through_darkness) + owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness) var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm deleted file mode 100644 index 3d39440dadaa..000000000000 --- a/code/_onclick/hud/plane_master.dm +++ /dev/null @@ -1,182 +0,0 @@ -/atom/movable/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 - -/atom/movable/screen/plane_master/proc/Show(override) - alpha = override || show_alpha - -/atom/movable/screen/plane_master/proc/Hide(override) - alpha = override || hide_alpha - -//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928 -//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong. -/atom/movable/screen/plane_master/proc/backdrop(mob/mymob) - -///Things rendered on "openspace"; holes in multi-z -/atom/movable/screen/plane_master/openspace - name = "open space plane master" - plane = OPENSPACE_BACKDROP_PLANE - appearance_flags = PLANE_MASTER - blend_mode = BLEND_MULTIPLY - alpha = 255 - -/atom/movable/screen/plane_master/openspace/Initialize(mapload) - . = ..() - filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE) - - filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10) - filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15) - filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20) - -/atom/movable/screen/plane_master/proc/outline(_size, _color) - filters += filter(type = "outline", size = _size, color = _color) - -/atom/movable/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA") - filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset) - -///Contains just the floor -/atom/movable/screen/plane_master/floor - name = "floor plane master" - plane = FLOOR_PLANE - appearance_flags = PLANE_MASTER - blend_mode = BLEND_OVERLAY - -/atom/movable/screen/plane_master/wall - name = "wall plane master" - plane = WALL_PLANE - appearance_flags = PLANE_MASTER - -/atom/movable/screen/plane_master/wall/backdrop(mob/mymob) - if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) - else - remove_filter("ambient_occlusion") - -/atom/movable/screen/plane_master/above_wall - name = "above wall plane master" - plane = ABOVE_WALL_PLANE - appearance_flags = PLANE_MASTER - -/atom/movable/screen/plane_master/above_wall/Initialize(mapload) - . = ..() - add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) - -/atom/movable/screen/plane_master/above_wall/backdrop(mob/mymob) - if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64")) - else - remove_filter("ambient_occlusion") - -///Contains most things in the game world -/atom/movable/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 - -/atom/movable/screen/plane_master/game_world/Initialize(mapload) - . = ..() - add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) - -/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob) - if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) - else - remove_filter("ambient_occlusion") - -///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners. -/atom/movable/screen/plane_master/field_of_vision - name = "field of vision mask plane master" - plane = FIELD_OF_VISION_PLANE - render_target = FIELD_OF_VISION_RENDER_TARGET - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -/atom/movable/screen/plane_master/field_of_vision/Initialize(mapload) - . = ..() - filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE) - -///Used to display the owner and its adjacent surroundings through the FoV plane mask. -/atom/movable/screen/plane_master/field_of_vision_blocker - name = "field of vision blocker plane master" - plane = FIELD_OF_VISION_BLOCKER_PLANE - render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -///Stores the visible portion of the FoV shadow cone. -/atom/movable/screen/plane_master/field_of_vision_visual - name = "field of vision visual plane master" - plane = FIELD_OF_VISION_VISUAL_PLANE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -/atom/movable/screen/plane_master/field_of_vision_visual/Initialize(mapload) - . = ..() - filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE) - -///Contains all lighting objects -/atom/movable/screen/plane_master/lighting - name = "lighting plane master" - plane = LIGHTING_PLANE - blend_mode = BLEND_MULTIPLY - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - -/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob) - mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/special/lighting_backdrop/lit) - mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/special/lighting_backdrop/unlit) - -/*! - * This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers. - * - * Emissive overlays are pasted with an atom color that converts them to be entirely some specific color. - * Emissive blockers are pasted with an atom color that converts them to be entirely some different color. - * Emissive overlays and emissive blockers are put onto the same plane. - * The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects. - * A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is. - * This is then used to alpha mask the lighting plane. - */ - -/atom/movable/screen/plane_master/lighting/Initialize(mapload) - . = ..() - add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE)) - add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE)) - -/** - * Handles emissive overlays and emissive blockers. - */ -/atom/movable/screen/plane_master/emissive - name = "emissive plane master" - plane = EMISSIVE_PLANE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - render_target = EMISSIVE_RENDER_TARGET - -/atom/movable/screen/plane_master/emissive/Initialize(mapload) - . = ..() - add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix)) - -///Contains space parallax -/atom/movable/screen/plane_master/parallax - name = "parallax plane master" - plane = PLANE_SPACE_PARALLAX - blend_mode = BLEND_MULTIPLY - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - render_target = PLANE_SPACE_PARALLAX_RENDER_TARGET - -/atom/movable/screen/plane_master/parallax_white - name = "parallax backdrop/space turf plane master" - plane = PLANE_SPACE - -/atom/movable/screen/plane_master/camera_static - name = "camera static plane master" - plane = CAMERA_STATIC_PLANE - appearance_flags = PLANE_MASTER - blend_mode = BLEND_OVERLAY - -//Reserved to chat messages, so they are still displayed above the field of vision masking. -/atom/movable/screen/plane_master/chat_messages - name = "runechat plane master" - plane = CHAT_PLANE - appearance_flags = PLANE_MASTER - blend_mode = BLEND_OVERLAY diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 935379b7210d..201facc4715d 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -4,8 +4,7 @@ GLOBAL_LIST_EMPTY(radial_menus) /atom/movable/screen/radial - icon = 'icons/mob/radial.dmi' - layer = ABOVE_HUD_LAYER + icon = 'icons/hud/radial.dmi' plane = ABOVE_HUD_PLANE var/datum/radial_menu/parent @@ -17,13 +16,13 @@ GLOBAL_LIST_EMPTY(radial_menus) /atom/movable/screen/radial/slice/MouseEntered(location, control, params) . = ..() icon_state = "radial_slice_focus" - if(tooltips) + if(should_tooltip) openToolTip(usr, src, params, title = name) /atom/movable/screen/radial/slice/MouseExited(location, control, params) . = ..() icon_state = "radial_slice" - if(tooltips) + if(should_tooltip) closeToolTip(usr) /atom/movable/screen/radial/slice/Click(location, control, params) @@ -121,7 +120,7 @@ GLOBAL_LIST_EMPTY(radial_menus) var/elements_to_add = max_elements - elements.len for(var/i in 1 to elements_to_add) //Create all elements var/atom/movable/screen/radial/slice/new_element = new /atom/movable/screen/radial/slice - new_element.tooltips = use_tooltips + new_element.should_tooltip = use_tooltips new_element.parent = src elements += new_element @@ -239,7 +238,6 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/proc/extract_image(E) var/mutable_appearance/MA = new /mutable_appearance(E) if(MA) - MA.layer = ABOVE_HUD_LAYER MA.plane = ABOVE_HUD_PLANE MA.appearance_flags |= RESET_TRANSFORM return MA @@ -257,7 +255,7 @@ GLOBAL_LIST_EMPTY(radial_menus) return current_user = M.client //Blank - menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing",layer = ABOVE_HUD_LAYER) + menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing") menu_holder.plane = ABOVE_HUD_PLANE menu_holder.appearance_flags |= KEEP_APART menu_holder.vis_contents += elements + close_button diff --git a/code/_onclick/hud/rendering/_render_readme.md b/code/_onclick/hud/rendering/_render_readme.md new file mode 100644 index 000000000000..8441f398b706 --- /dev/null +++ b/code/_onclick/hud/rendering/_render_readme.md @@ -0,0 +1,57 @@ +# The Render Readme + +1. [Byond internal functionality](#byond-internal-functionality) +2. [Known internal snowflake](#known-internal-snowflake) +3. [The rendering solution](#the-rendering-solution) +4. [Render plates](#render-plates) + +## Byond internal functionality +This part of the guide will assume that you have read the byond reference entry for rendering at www.byond.com/docs/ref//#/{notes}/renderer + +When you create an atom, this will always create an internal byond structure called an "appearance". This appearance you will likely be familiar with, as it is exposed through the /atom/var/appearance var. This appearance var holds data on how to render the object, ie what icon/icon_state/color etc it is using. Note that appearance vars will always copy, and do not hold a reference. When you update a var, for example lets pretend we add a filter, the appearance will be updated to include the filter. Note that, however, vis_contents objets are uniquely excluded from appearances. Then, when the filter is updated, the appearance will be recreated, and the atom marked as "dirty". After it has been updated, the SendMaps() function (sometimes also called maptick), which is a internal byond function that iterates over all objects in a clients view and in the clients.mob.contents, checks for "dirty" atoms, then resends any "dirty" appearances to clients as needed and unmarks them as dirty. This function is notoriosly slow, but we can see it's tick usage through the world.map_cpu var. We can also avoid more complex checks checking whether an object is visible on a clients screen by using the TILE_BOUND appearance flag. + +Finally, we arrive at clientside behavior, where we have two main clientside functions: GetMapIcons, and Render. GetMapIcons is repsonsible for actual rendering calculations on the clientside, such as "Group Icons and Set bounds", which performs clientside calculations for transform matrixes. Note that particles here are handled in a separate thread and are not diplayed in the clientside profiler. Render handles the actual drawing of the screen. + +For debugging rendering issues its reccomended you do two things: +A) Talk to someone who has inside knowledge(like lummox) about it, most of this is undocumented and bugs often +B) Use the undocumented debug printer which reads of data on icons rendering, this is very dense but can be useful in some cases. To use: Right click top tab -> Options & Messages -> Client -> Command -> Enter ".debug profile mapicons" and press Enter -> go to your Byond directory and find BYOND/cfg/mapicons.json . Yes this is one giant one-line json. + +## Known internal snowflake +The following is an incomplete list of pitfalls that come from byond snowflake that are known, this list is obviously incomplete. + +1. Transforms are very slow on clientside. This is not usually noticable, but if you start using large amounts of them it will grind you to a halt quickly, regardless of whether its on overlays or objs +2. The darkness plane. The darkness plane has specific variables it needs to render correctly, and these can be found in the plane masters file. it is composed internally of two parts, a black mask over the clients screen, and a non rendering mask that blocks all luminosity=0 turfs and their contents from rendering if the SEE_BLACKNESS flag is set properly. It behaves very oddly, such as forcing itself to ALWAYS render or pre-render on blend_multiply blend mode or refusing to render the black mask properly otherwise. The blocker will always block rendering but the mask can be layered under other objects. +3. render_target/source. Render_target/source will only copy certain rendering instructions, and these are only defined as "etc." in the byond reference. Known non copied appearance vars include: blend_mode, plane, layer, vis_contents, mouse_opacity... +4. Large icons on the screen that peek over the edge will instead of only rendering partly like you would expect will instead stretch the screen while not adgusting the render buffer, which means that you can actively see as tiles and map objects are rendered. You can use this for an easy "offscreen" UI. +5. Numerically large filters on objects of any size will torpedo performance, even though large objects with small filters will perform massively better. (ie blur(size=20) BAD) +6. Texture Atlas: the texture atlas byond uses to render icons is very susceptible to corruption and can regularily replace icons with other icons or just not render at all. This can be exasperated by alt tabbing or pausing the dreamseeker process. +7. The renderer is awful code and lummox said he will try changing a large part of it for 515 so keep an eye on that +8. Byond uses DirectX 9 (Lummox said he wants to update to DirectX 11) +9. Particles are just fancy overlays and are not independent of their owner +10. Maptick items inside mob.contents are cheaper compared to most other movables +11. Displacement filter: The byond "displacement filter" does not, as the name would make you expect, use displacement maps, but instead uses normal maps. + +## The rendering solution +One of the main issues with making pretty effects is how objects can only render to one plane, and how filters can only be applied to single objects. Quite simply it means we cant apply effects to multiple planes at once, and an effect to one plane only by treating it as a single unit: + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_old.png) + +A semi-fix to stop from having to apply effects to every single plane is to use the render controllers, to automatically apply filters and colors automatically onto their controlled planes. + +The solution is thus instead we replace plane masters rendering directly to client with planes that render multiple planes onto them as objects in order to be able to affect multiple planes while treating them as a single object. This is done by relaying the plane using a "render relay" onto a "render plate" which acts as a plane master of plane masters of sorts, and since planes are rendered onto it as single objects any filters we apply to them will render over the planes, treating them as a single unit. + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_refactored.png) + +We can also choose to render these by decreasing the scaling all applied effects (effect_size/number_of_plates_rendered_to) then rendering it onto multiple planes: + +![](https://raw.githubusercontent.com/tgstation/documentation-assets/main/rendering/renderpipe_refactored_multiple.png) + +Through these this allows us to treat planes as single objects, and lets us distort them as a single unit, most notably works wonders with the displacement filter. Specifically, here you can displacement_filter a plane onto a plate, which then will treat all the other planes rendered on that plate as a single unit. + +## Render plates + +The rendering system uses two objects to unify planes: render_relay and render_plates. Render relays use render_target/source and the relay_render_to_plane proc to replicate the plane master on the render relay. This render relay is then rendered onto a render_plate, which is a plane master that renders the render_relays onto itself. This plate can then be hierachically rendered with the same process until it reaches the master render_plate, which is the plate that will actually render to the player. These plates naturally in the byond style have quirks. For example, rendering to two plates will double any effects such as color or filters, and as such you need to carefully manage how you render them. Keep in mind as well that when sorting the layers for rendering on a plane that they should not be negative, this is handled automatically in relay_render_to_plane. When debugging note that mouse_opacity can act bizzarly with this method, such as only allowing you to click things that are layered over objects on a certain plane but auomatically setting the mouse_opacity should be handling this. Note that if you decide to manipulate a plane with internal byond objects that you will have to manually extrapolate the vars that are set if you want to render them to another plane (See blackness plane for example), and that this is not documented anywhere. + + +Goodluck and godspeed with coding + - Just another contributor diff --git a/code/_onclick/hud/rendering/plane_master.dm b/code/_onclick/hud/rendering/plane_master.dm new file mode 100644 index 000000000000..11eeb74f2d85 --- /dev/null +++ b/code/_onclick/hud/rendering/plane_master.dm @@ -0,0 +1,281 @@ +/atom/movable/screen/plane_master + screen_loc = "CENTER" + icon_state = "blank" + appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR + blend_mode = BLEND_OVERLAY + plane = LOWEST_EVER_PLANE + var/show_alpha = 255 + var/hide_alpha = 0 + + //--rendering relay vars-- + ///integer: what plane we will relay this planes render to + var/render_relay_plane = RENDER_PLANE_GAME + ///bool: Whether this plane should get a render target automatically generated + var/generate_render_target = TRUE + ///integer: blend mode to apply to the render relay in case you dont want to use the plane_masters blend_mode + var/blend_mode_override + ///reference: current relay this plane is utilizing to render + var/atom/movable/render_plane_relay/relay + +/atom/movable/screen/plane_master/proc/Show(override) + alpha = override || show_alpha + +/atom/movable/screen/plane_master/proc/Hide(override) + alpha = override || hide_alpha + +//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928 +//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong. +/atom/movable/screen/plane_master/proc/backdrop(mob/mymob) + SHOULD_CALL_PARENT(TRUE) + if(!isnull(render_relay_plane)) + relay_render_to_plane(mymob, render_relay_plane) + +///Things rendered on "openspace"; holes in multi-z +/atom/movable/screen/plane_master/openspace_backdrop + name = "open space backdrop plane master" + plane = OPENSPACE_BACKDROP_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_MULTIPLY + alpha = 255 + +/atom/movable/screen/plane_master/openspace + name = "open space plane master" + plane = OPENSPACE_PLANE + appearance_flags = PLANE_MASTER + +/atom/movable/screen/plane_master/openspace/Initialize(mapload) + . = ..() + add_filter("first_stage_openspace", 1, drop_shadow_filter(color = "#04080FAA", size = -10)) + add_filter("second_stage_openspace", 2, drop_shadow_filter(color = "#04080FAA", size = -15)) + add_filter("third_stage_openspace", 3, drop_shadow_filter(color = "#04080FAA", size = -20)) + +///For any transparent multi-z tiles we want to render +/atom/movable/screen/plane_master/transparent + name = "transparent plane master" + plane = TRANSPARENT_FLOOR_PLANE + appearance_flags = PLANE_MASTER + +///Contains just the floor +/atom/movable/screen/plane_master/floor + name = "floor plane master" + plane = FLOOR_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_OVERLAY + +///Contains most things in the game world +/atom/movable/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 + +/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob) + . = ..() + remove_filter("AO") + if(istype(mymob) && mymob.client?.prefs?.ambientocclusion) + add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA")) + +/atom/movable/screen/plane_master/game_world_fov_hidden + name = "game world fov hidden plane master" + plane = GAME_PLANE_FOV_HIDDEN + render_relay_plane = GAME_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/game_world_fov_hidden/Initialize() + . = ..() + add_filter("vision_cone", 1, alpha_mask_filter(render_source = FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags = MASK_INVERSE)) + +/atom/movable/screen/plane_master/game_world_upper + name = "upper game world plane master" + plane = GAME_PLANE_UPPER + render_relay_plane = GAME_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/game_world_upper_fov_hidden + name = "upper game world fov hidden plane master" + plane = GAME_PLANE_UPPER_FOV_HIDDEN + render_relay_plane = GAME_PLANE_FOV_HIDDEN + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/game_world_above + name = "above game world plane master" + plane = ABOVE_GAME_PLANE + render_relay_plane = GAME_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/massive_obj + name = "massive object plane master" + plane = MASSIVE_OBJ_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/ghost + name = "ghost plane master" + plane = GHOST_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + render_relay_plane = RENDER_PLANE_NON_GAME + +/atom/movable/screen/plane_master/point + name = "point plane master" + plane = POINT_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +/** + * Plane master handling byond internal blackness + * vars are set as to replicate behavior when rendering to other planes + * do not touch this unless you know what you are doing + */ +/atom/movable/screen/plane_master/blackness + name = "darkness plane master" + plane = BLACKNESS_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + color = list(null, null, null, "#0000", "#000f") + blend_mode = BLEND_MULTIPLY + appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR | PIXEL_SCALE + //byond internal end + +///Contains all lighting objects +/atom/movable/screen/plane_master/lighting + name = "lighting plane master" + plane = LIGHTING_PLANE + blend_mode_override = BLEND_MULTIPLY + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + + +/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob) + . = ..() + mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/lighting_backdrop/lit) + mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/lighting_backdrop/unlit) + +/*! + * This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers. + * + * Emissive overlays are pasted with an atom color that converts them to be entirely some specific color. + * Emissive blockers are pasted with an atom color that converts them to be entirely some different color. + * Emissive overlays and emissive blockers are put onto the same plane. + * The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects. + * A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is. + * This is then used to alpha mask the lighting plane. + */ +/atom/movable/screen/plane_master/lighting/Initialize(mapload) + . = ..() + add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE)) + add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE)) + + +/** + * Handles emissive overlays and emissive blockers. + */ +/atom/movable/screen/plane_master/emissive + name = "emissive plane master" + plane = EMISSIVE_PLANE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + render_target = EMISSIVE_RENDER_TARGET + render_relay_plane = null + +/atom/movable/screen/plane_master/emissive/Initialize(mapload) + . = ..() + add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix)) + +/atom/movable/screen/plane_master/above_lighting + name = "above lighting plane master" + plane = ABOVE_LIGHTING_PLANE + appearance_flags = PLANE_MASTER //should use client color + blend_mode = BLEND_OVERLAY + +///Contains space parallax +/atom/movable/screen/plane_master/parallax + name = "parallax plane master" + plane = PLANE_SPACE_PARALLAX + blend_mode = BLEND_MULTIPLY + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/atom/movable/screen/plane_master/parallax_white + name = "parallax whitifier plane master" + plane = PLANE_SPACE + +/atom/movable/screen/plane_master/camera_static + name = "camera static plane master" + plane = CAMERA_STATIC_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_OVERLAY + +/atom/movable/screen/plane_master/excited_turfs + name = "atmos excited turfs" + plane = ATMOS_GROUP_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_OVERLAY + alpha = 0 + +/atom/movable/screen/plane_master/o_light_visual + name = "overlight light visual plane master" + plane = O_LIGHTING_VISUAL_PLANE + render_target = O_LIGHTING_VISUAL_RENDER_TARGET + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + blend_mode = BLEND_MULTIPLY + blend_mode_override = BLEND_MULTIPLY + +/atom/movable/screen/plane_master/runechat + name = "runechat plane master" + plane = RUNECHAT_PLANE + appearance_flags = PLANE_MASTER + blend_mode = BLEND_OVERLAY + render_relay_plane = RENDER_PLANE_NON_GAME + +/atom/movable/screen/plane_master/runechat/backdrop(mob/mymob) + . = ..() + remove_filter("AO") + if(istype(mymob) && mymob.client?.prefs?.ambientocclusion) + add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA")) + +/atom/movable/screen/plane_master/gravpulse + name = "gravpulse plane" + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + plane = GRAVITY_PULSE_PLANE + blend_mode = BLEND_ADD + blend_mode_override = BLEND_ADD + render_target = GRAVITY_PULSE_RENDER_TARGET + render_relay_plane = null + +/atom/movable/screen/plane_master/area + name = "area plane" + plane = AREA_PLANE + +/atom/movable/screen/plane_master/radtext + name = "radtext plane" + plane = RAD_TEXT_PLANE + render_relay_plane = RENDER_PLANE_NON_GAME + +/atom/movable/screen/plane_master/balloon_chat + name = "balloon alert plane" + plane = BALLOON_CHAT_PLANE + render_relay_plane = RENDER_PLANE_NON_GAME + +/atom/movable/screen/plane_master/fullscreen + name = "fullscreen alert plane" + plane = FULLSCREEN_PLANE + render_relay_plane = RENDER_PLANE_NON_GAME + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/atom/movable/screen/plane_master/field_of_vision_blocker + name = "field of vision blocker plane master" + plane = FIELD_OF_VISION_BLOCKER_PLANE + render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + render_relay_plane = null + +/atom/movable/screen/plane_master/hud + name = "HUD plane" + plane = HUD_PLANE + render_relay_plane = RENDER_PLANE_NON_GAME + +/atom/movable/screen/plane_master/above_hud + name = "above HUD plane" + plane = ABOVE_HUD_PLANE + render_relay_plane = RENDER_PLANE_NON_GAME diff --git a/code/_onclick/hud/rendering/plane_master_controller.dm b/code/_onclick/hud/rendering/plane_master_controller.dm new file mode 100644 index 000000000000..faae549bc70b --- /dev/null +++ b/code/_onclick/hud/rendering/plane_master_controller.dm @@ -0,0 +1,124 @@ +///Atom that manages and controls multiple planes. It's an atom so we can hook into add_filter etc. Multiple controllers can control one plane. +/atom/movable/plane_master_controller + ///List of planes in this controllers control. Initially this is a normal list, but becomes an assoc list of plane numbers as strings | plane instance + var/list/controlled_planes = list() + ///hud that owns this controller + var/datum/hud/owner_hud + +INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller) + +///Ensures that all the planes are correctly in the controlled_planes list. +/atom/movable/plane_master_controller/Initialize(mapload, datum/hud/hud) + . = ..() + if(!istype(hud)) + return + + owner_hud = hud + var/assoc_controlled_planes = list() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/instance = owner_hud.plane_masters["[i]"] + if(!instance) //If we looked for a hud that isn't instanced, just keep going + stack_trace("[i] isn't a valid plane master layer for [owner_hud.type], are you sure it exists in the first place?") + continue + assoc_controlled_planes["[i]"] = instance + controlled_planes = assoc_controlled_planes + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/add_filter(name, priority, list/params) + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.add_filter(name, priority, params) + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/remove_filter(name_or_names) + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.remove_filter(name_or_names) + +/atom/movable/plane_master_controller/update_filters() + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.update_filters() + +///Gets all filters for this controllers plane masters +/atom/movable/plane_master_controller/proc/get_filters(name) + . = list() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + . += pm_iterator.get_filter(name) + +///Transitions all filters owned by this plane master controller +/atom/movable/plane_master_controller/transition_filter(name, time, list/new_params, easing, loop) + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.transition_filter(name, time, new_params, easing, loop) + +///Full override so we can just use filterrific +/atom/movable/plane_master_controller/add_atom_colour(coloration, colour_priority) + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.add_atom_colour(coloration, colour_priority) + + +///Removes an instance of colour_type from the atom's atom_colours list +/atom/movable/plane_master_controller/remove_atom_colour(colour_priority, coloration) + . = ..() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.remove_atom_colour(colour_priority, coloration) + + +///Resets the atom's color to null, and then sets it to the highest priority colour available +/atom/movable/plane_master_controller/update_atom_colour() + for(var/i in controlled_planes) + var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] + pm_iterator.update_atom_colour() + + +/atom/movable/plane_master_controller/game + name = PLANE_MASTERS_GAME + controlled_planes = list( + FLOOR_PLANE, + GAME_PLANE, + GAME_PLANE_FOV_HIDDEN, + GAME_PLANE_UPPER, + GAME_PLANE_UPPER_FOV_HIDDEN, + ABOVE_GAME_PLANE, + MASSIVE_OBJ_PLANE, + GHOST_PLANE, + POINT_PLANE, + LIGHTING_PLANE, + ) + +/// Controller of all planes we're ok with changing with colorblind logic +/atom/movable/plane_master_controller/colorblind + name = PLANE_MASTERS_COLORBLIND + controlled_planes = list( + PLANE_SPACE_PARALLAX, + GRAVITY_PULSE_PLANE, + FLOOR_PLANE, + GAME_PLANE, + GAME_PLANE_FOV_HIDDEN, + GAME_PLANE_UPPER, + GAME_PLANE_UPPER_FOV_HIDDEN, + ABOVE_GAME_PLANE, + MASSIVE_OBJ_PLANE, + GHOST_PLANE, + POINT_PLANE, + RAD_TEXT_PLANE, + LIGHTING_PLANE, + O_LIGHTING_VISUAL_PLANE, + ABOVE_LIGHTING_PLANE, + CAMERA_STATIC_PLANE, + ATMOS_GROUP_PLANE, + FULLSCREEN_PLANE, + RUNECHAT_PLANE, + HUD_PLANE, + ABOVE_HUD_PLANE, + ) + diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm new file mode 100644 index 000000000000..b15920cde377 --- /dev/null +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -0,0 +1,84 @@ +/*! + * Custom rendering solution to allow for advanced effects + * We (ab)use plane masters and render source/target to cheaply render 2+ planes as 1 + * if you want to read more read the _render_readme.md + */ + + +/** + * Render relay object assigned to a plane master to be able to relay it's render onto other planes that are not it's own + */ +/atom/movable/render_plane_relay + screen_loc = "CENTER" + layer = -1 + plane = 0 + appearance_flags = PASS_MOUSE | NO_CLIENT_COLOR | KEEP_TOGETHER + +/** + * ## Rendering plate + * + * Acts like a plane master, but for plane masters + * Renders other planes onto this plane, through the use of render objects + * Any effects applied onto this plane will act on the unified plane + * IE a bulge filter will apply as if the world was one object + * remember that once planes are unified on a render plate you cant change the layering of them! + */ +/atom/movable/screen/plane_master/rendering_plate + name = "default rendering plate" + + +///this plate renders the final screen to show to the player +/atom/movable/screen/plane_master/rendering_plate/master + name = "master rendering plate" + plane = RENDER_PLANE_MASTER + render_relay_plane = null + generate_render_target = FALSE + +///renders general in charachter game objects +/atom/movable/screen/plane_master/rendering_plate/game_world + name = "game rendering plate" + plane = RENDER_PLANE_GAME + render_relay_plane = RENDER_PLANE_MASTER + +/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload) + . = ..() + add_filter("displacer", 1, displacement_map_filter(render_source = GRAVITY_PULSE_RENDER_TARGET, size = 10)) + +///render plate for OOC stuff like ghosts, hud-screen effects, etc +/atom/movable/screen/plane_master/rendering_plate/non_game + name = "non-game rendering plate" + plane = RENDER_PLANE_NON_GAME + render_relay_plane = RENDER_PLANE_MASTER + + +/** + * Plane master proc called in backdrop() that creates a relay object, sets it as needed and then adds it to the clients screen + * Sets: + * * layer from plane to avoid z-fighting + * * plane to relay the render to + * * render_source so that the plane will render on this object + * * mouse opacity to ensure proper mouse hit tracking + * * name for debugging purposes + * Other vars such as alpha will automatically be applied with the render source + * Arguments: + * * mymob: mob whose plane is being backdropped + * * relay_plane: plane we are relaying this plane master to + */ +/atom/movable/screen/plane_master/proc/relay_render_to_plane(mob/mymob, relay_plane) + if(relay in mymob.client.screen) //backdrop can be called multiple times + return + if(!render_target && generate_render_target) + render_target = "*[name]: AUTOGENERATED RENDER TGT" + relay = new() + relay.render_source = render_target + relay.plane = relay_plane + relay.layer = (plane + abs(LOWEST_EVER_PLANE))*0.5 //layer must be positive but can be a decimal + if(blend_mode_override) + relay.blend_mode = blend_mode_override + else + relay.blend_mode = blend_mode + relay.mouse_opacity = mouse_opacity + relay.name = render_target + mymob.client.screen += relay + if(blend_mode != BLEND_MULTIPLY) + blend_mode = BLEND_DEFAULT diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index e20bae87d781..1feabeb615b5 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -239,7 +239,6 @@ A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7" else A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7" - A.layer = ABOVE_HUD_LAYER A.plane = ABOVE_HUD_PLANE x++ diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 33c0bb0f04a0..68728b12c85d 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -667,7 +667,6 @@ icon = 'icons/blank_title.png' icon_state = "" screen_loc = "1,1" - layer = SPLASHSCREEN_LAYER plane = SPLASHSCREEN_PLANE var/client/holder @@ -725,7 +724,7 @@ icon_state = "" mouse_opacity = MOUSE_OPACITY_TRANSPARENT screen_loc = ui_combo - layer = ABOVE_HUD_LAYER + plane = ABOVE_HUD_PLANE var/timerid /atom/movable/screen/combo/proc/clear_streak() diff --git a/code/_onclick/hud/screen_objects/sprint.dm b/code/_onclick/hud/screen_objects/sprint.dm index f8760ddd85b6..d0f16bd420a1 100644 --- a/code/_onclick/hud/screen_objects/sprint.dm +++ b/code/_onclick/hud/screen_objects/sprint.dm @@ -5,7 +5,6 @@ name = "toggle sprint" icon = 'modular_citadel/icons/ui/screen_midnight.dmi' icon_state = "act_sprint" - layer = ABOVE_HUD_LAYER - 0.1 var/mutable_appearance/flashy /atom/movable/screen/sprintbutton/Click() diff --git a/code/_onclick/hud/screen_objects/stamina.dm b/code/_onclick/hud/screen_objects/stamina.dm index b4c4807ec875..b452b0302486 100644 --- a/code/_onclick/hud/screen_objects/stamina.dm +++ b/code/_onclick/hud/screen_objects/stamina.dm @@ -45,7 +45,6 @@ name = "stamina buffer" icon_state = "stambuffer0" screen_loc = ui_stamina - layer = ABOVE_HUD_LAYER + 0.1 mouse_opacity = 0 /atom/movable/screen/staminabuffer/proc/mark_dirty() diff --git a/code/_onclick/hud/screen_objects/storage.dm b/code/_onclick/hud/screen_objects/storage.dm index 55156d9b0de5..5ff565fe0175 100644 --- a/code/_onclick/hud/screen_objects/storage.dm +++ b/code/_onclick/hud/screen_objects/storage.dm @@ -22,13 +22,11 @@ name = "storage" icon_state = "block" screen_loc = "7,7 to 10,8" - layer = HUD_LAYER plane = HUD_PLANE insertion_click = TRUE /atom/movable/screen/storage/close name = "close" - layer = ABOVE_HUD_LAYER plane = ABOVE_HUD_PLANE icon_state = "backpack_close" @@ -51,7 +49,6 @@ /atom/movable/screen/storage/volumetric_box icon_state = "stored_continue" - layer = VOLUMETRIC_STORAGE_BOX_LAYER plane = VOLUMETRIC_STORAGE_BOX_PLANE var/obj/item/our_item @@ -142,17 +139,14 @@ /atom/movable/screen/storage/volumetric_box/center/makeItemInactive() if(!holder) return - holder.layer = VOLUMETRIC_STORAGE_ITEM_LAYER holder.plane = VOLUMETRIC_STORAGE_ITEM_PLANE /atom/movable/screen/storage/volumetric_box/center/makeItemActive() if(!holder) return - holder.our_item.layer = VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER //make sure we display infront of the others! holder.our_item.plane = VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE /atom/movable/screen/storage/volumetric_edge - layer = VOLUMETRIC_STORAGE_BOX_LAYER plane = VOLUMETRIC_STORAGE_BOX_PLANE /atom/movable/screen/storage/volumetric_edge/Initialize(mapload, master, our_item) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 3ae45648df07..c6f4b7240e05 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -71,11 +71,11 @@ icon = 'icons/obj/magic.dmi'//Needs sprites icon_state = "2" item_flags = NOBLUDGEON | ABSTRACT | DROPDEL - //item_state = null + //inhand_icon_state = null w_class = WEIGHT_CLASS_GIGANTIC - layer = ABOVE_HUD_LAYER plane = ABOVE_HUD_PLANE + ///Object focused / selected by the TK user var/atom/movable/focus var/mob/living/carbon/tk_user diff --git a/code/_rendering/fullscreen/fullscreen.dm b/code/_rendering/fullscreen/fullscreen.dm deleted file mode 100644 index dd8f69789177..000000000000 --- a/code/_rendering/fullscreen/fullscreen.dm +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Adds a fullscreen overlay - * - * @params - * - category - string - must exist. will overwrite any other screen in this category. defaults to type. - * - type - the typepath of the screen - * - severity - severity - different screen objects have differing severities - */ -/mob/proc/overlay_fullscreen(category, type, severity) - ASSERT(type) - if(!category) - category = type - var/atom/movable/screen/fullscreen/screen = fullscreens[category] - if (!screen || screen.type != type) - // needs to be recreated - clear_fullscreen(category, 0) - fullscreens[category] = screen = new type - screen.SetSeverity(severity) - if(client && screen.ShouldShow(src)) - screen.SetView(client.view) - client.screen += screen - return screen - -/** - * Wipes a fullscreen of a certain category - * - * Second argument is for animation delay. - */ -/mob/proc/clear_fullscreen(category, animated = 10) - if(!fullscreens) - return - var/atom/movable/screen/fullscreen/screen = fullscreens[category] - fullscreens -= category - if(!screen) - return - if(animated > 0) - animate(screen, alpha = 0, time = animated) - addtimer(CALLBACK(src, .proc/_remove_fullscreen_direct, screen), animated, TIMER_CLIENT_TIME) - else - if(client) - client.screen -= screen - qdel(screen) - -/mob/proc/_remove_fullscreen_direct(atom/movable/screen/fullscreen/screen) - if(client) - client.screen -= screen - qdel(screen) - -/** - * Wipes all fullscreens - */ -/mob/proc/wipe_fullscreens() - for(var/category in fullscreens) - clear_fullscreen(category) - -/** - * Removes fullscreens from client but not the mob - */ -/mob/proc/hide_fullscreens() - if(client) - for(var/category in fullscreens) - client.screen -= fullscreens[category] - -/** - * Ensures all fullscreens are on client. - */ -/mob/proc/reload_fullscreen() - if(client) - var/atom/movable/screen/fullscreen/screen - for(var/category in fullscreens) - screen = fullscreens[category] - if(screen.ShouldShow(src)) - screen.SetView(client.view) - client.screen |= screen - else - client.screen -= screen - -/atom/movable/screen/fullscreen - icon = 'icons/screen/fullscreen_15x15.dmi' - icon_state = "default" - screen_loc = "CENTER-7,CENTER-7" - layer = FULLSCREEN_LAYER - plane = FULLSCREEN_PLANE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - /// current view we're adapted to - var/view_current - /// min severity - var/severity_min = 0 - /// max severity - var/severity_max = INFINITY - /// current severity - var/severity = 0 - /// show this while dead - var/show_when_dead = FALSE - -/atom/movable/screen/fullscreen/proc/SetSeverity(severity) - src.severity = clamp(severity, severity_min, severity_max) - icon_state = "[initial(icon_state)][severity]" - -/atom/movable/screen/fullscreen/proc/SetView(client_view) - view_current = client_view - -/atom/movable/screen/fullscreen/proc/ShouldShow(mob/M) - if(!show_when_dead && M.stat == DEAD) - return FALSE - return TRUE - -/atom/movable/screen/fullscreen/Destroy() - SetSeverity(0) - return ..() - -/atom/movable/screen/fullscreen/scaled - icon = 'icons/screen/fullscreen_15x15.dmi' - screen_loc = "CENTER-7,CENTER-7" - /// size of sprite in tiles - var/size_x = 15 - /// size of sprite in tiles - var/size_y = 15 - -/atom/movable/screen/fullscreen/scaled/SetView(client_view) - if(view_current != client_view) - var/list/actualview = getviewsize(client_view) - view_current = client_view - transform = matrix(actualview[1] / size_x, 0, 0, 0, actualview[2] / size_y, 0) - return ..() - -/atom/movable/screen/fullscreen/scaled/brute - icon_state = "brutedamageoverlay" - layer = UI_DAMAGE_LAYER - plane = FULLSCREEN_PLANE - -/atom/movable/screen/fullscreen/scaled/oxy - icon_state = "oxydamageoverlay" - layer = UI_DAMAGE_LAYER - plane = FULLSCREEN_PLANE - -/atom/movable/screen/fullscreen/scaled/crit - icon_state = "passage" - layer = CRIT_LAYER - plane = FULLSCREEN_PLANE - -/atom/movable/screen/fullscreen/scaled/crit/vision - icon_state = "oxydamageoverlay" - layer = BLIND_LAYER - -/atom/movable/screen/fullscreen/scaled/blind - icon_state = "blackimageoverlay" - layer = BLIND_LAYER - plane = FULLSCREEN_PLANE - -/atom/movable/screen/fullscreen/scaled/curse - icon_state = "curse" - layer = CURSE_LAYER - plane = FULLSCREEN_PLANE - -/atom/movable/screen/fullscreen/scaled/impaired - icon_state = "impairedoverlay" - -/atom/movable/screen/fullscreen/scaled/emergency_meeting - icon_state = "emergency_meeting" - show_when_dead = TRUE - layer = CURSE_LAYER - plane = SPLASHSCREEN_PLANE - -/atom/movable/screen/fullscreen/tiled/blurry - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "cloudy" - -/atom/movable/screen/fullscreen/tiled/flash - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "flash" - -/atom/movable/screen/fullscreen/tiled/flash/static - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "noise" - -/atom/movable/screen/fullscreen/tiled/high - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "druggy" - -/atom/movable/screen/fullscreen/tiled/color_vision - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "flash" - alpha = 80 - -/atom/movable/screen/fullscreen/tiled/color_vision/green - color = "#00ff00" - -/atom/movable/screen/fullscreen/tiled/color_vision/red - color = "#ff0000" - -/atom/movable/screen/fullscreen/tiled/color_vision/blue - color = "#0000ff" - -/atom/movable/screen/fullscreen/tiled/cinematic_backdrop - icon = 'icons/mob/screen_gen.dmi' - screen_loc = "WEST,SOUTH to EAST,NORTH" - icon_state = "flash" - plane = SPLASHSCREEN_PLANE - layer = SPLASHSCREEN_LAYER - 1 - color = "#000000" - show_when_dead = TRUE - -/atom/movable/screen/fullscreen/special/lighting_backdrop - icon = 'icons/mob/screen_gen.dmi' - icon_state = "flash" - transform = matrix(200, 0, 0, 0, 200, 0) - plane = LIGHTING_PLANE - blend_mode = BLEND_OVERLAY - show_when_dead = TRUE - -//Provides darkness to the back of the lighting plane -/atom/movable/screen/fullscreen/special/lighting_backdrop/lit - invisibility = INVISIBILITY_LIGHTING - layer = BACKGROUND_LAYER+21 - color = "#000" - show_when_dead = TRUE - -//Provides whiteness in case you don't see lights so everything is still visible -/atom/movable/screen/fullscreen/special/lighting_backdrop/unlit - layer = BACKGROUND_LAYER+20 - show_when_dead = TRUE - -/atom/movable/screen/fullscreen/special/see_through_darkness - icon_state = "nightvision" - plane = LIGHTING_PLANE - layer = LIGHTING_LAYER - blend_mode = BLEND_ADD - show_when_dead = TRUE diff --git a/code/_rendering/mob.dm b/code/_rendering/mob.dm index 49095d091061..0d9aea22da1c 100644 --- a/code/_rendering/mob.dm +++ b/code/_rendering/mob.dm @@ -18,4 +18,4 @@ * destroys screen rendering. call on mob del */ /mob/proc/dispose_rendering() - wipe_fullscreens() + clear_fullscreens() diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm index 5c767ecb1b94..530c6bb52d54 100644 --- a/code/controllers/admin.dm +++ b/code/controllers/admin.dm @@ -1,7 +1,7 @@ // Clickable stat() button. /obj/effect/statclick name = "Initializing..." - // blocks_emissive = NONE + blocks_emissive = NONE var/target INITIALIZE_IMMEDIATE(/obj/effect/statclick) diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index b7a92ee48f4a..68310acb0f0b 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -305,6 +305,8 @@ */ /datum/config_entry/flag/use_field_of_vision +/datum/config_entry/flag/native_fov + //Shuttle size limiter /datum/config_entry/number/max_shuttle_count config_entry_value = 6 diff --git a/code/controllers/subsystem/minor_mapping.dm b/code/controllers/subsystem/minor_mapping.dm index d6cbf99f9743..e31bbaf2d8e7 100644 --- a/code/controllers/subsystem/minor_mapping.dm +++ b/code/controllers/subsystem/minor_mapping.dm @@ -36,7 +36,7 @@ SUBSYSTEM_DEF(minor_mapping) // var/turf/T = pick_n_take(turfs) // var/obj/item/storage/backpack/satchel/flat/F = new(T) -// SEND_SIGNAL(F, COMSIG_OBJ_HIDE, T.intact) +// SEND_SIGNAL(F, COMSIG_OBJ_HIDE, T.underfloor_accessibility < UNDERFLOOR_VISIBLE) // amount-- /proc/find_exposed_wires() diff --git a/code/controllers/subsystem/persistence/secret_satchels.dm b/code/controllers/subsystem/persistence/secret_satchels.dm index fa2a445317e3..a08d239aad14 100644 --- a/code/controllers/subsystem/persistence/secret_satchels.dm +++ b/code/controllers/subsystem/persistence/secret_satchels.dm @@ -35,8 +35,8 @@ path = text2path(old_secret_satchels[pos]["saved_obj"]) if(F) - if(isfloorturf(F.loc) && !isplatingturf(F.loc)) - F.hide(1) + var/turf/open/floor = get_turf(F) + SEND_SIGNAL(F, COMSIG_OBJ_HIDE, floor.underfloor_accessibility < UNDERFLOOR_VISIBLE) if(ispath(path)) var/spawned_item = new path(F) spawned_objects[spawned_item] = TRUE diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm index 6ba2caa31df8..a016b8f1e4e5 100644 --- a/code/controllers/subsystem/statpanel.dm +++ b/code/controllers/subsystem/statpanel.dm @@ -94,7 +94,7 @@ SUBSYSTEM_DEF(statpanels) sdql2A[++sdql2A.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj)) var/list/sdql2B = list() for(var/i in GLOB.sdql2_queries) - var/datum/SDQL2_query/Q = i + var/datum/sdql2_query/Q = i sdql2B = Q.generate_stat() sdql2A += sdql2B target << output(url_encode(json_encode(sdql2A)), "statbrowser:update_sdql2") diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index 6aadd72a8abe..493c026f1238 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -1,23 +1,30 @@ /// How long the chat message's spawn-in animation will occur for -#define CHAT_MESSAGE_SPAWN_TIME 0.2 SECONDS +#define CHAT_MESSAGE_SPAWN_TIME 0.2 SECONDS /// How long the chat message will exist prior to any exponential decay -#define CHAT_MESSAGE_LIFESPAN 5 SECONDS +#define CHAT_MESSAGE_LIFESPAN 5 SECONDS /// How long the chat message's end of life fading animation will occur for -#define CHAT_MESSAGE_EOL_FADE 0.7 SECONDS +#define CHAT_MESSAGE_EOL_FADE 0.7 SECONDS /// Factor of how much the message index (number of messages) will account to exponential decay -#define CHAT_MESSAGE_EXP_DECAY 0.7 +#define CHAT_MESSAGE_EXP_DECAY 0.7 /// Factor of how much height will account to exponential decay -#define CHAT_MESSAGE_HEIGHT_DECAY 0.9 +#define CHAT_MESSAGE_HEIGHT_DECAY 0.9 /// Approximate height in pixels of an 'average' line, used for height decay -#define CHAT_MESSAGE_APPROX_LHEIGHT 11 +#define CHAT_MESSAGE_APPROX_LHEIGHT 11 /// Max width of chat message in pixels -#define CHAT_MESSAGE_WIDTH 96 +#define CHAT_MESSAGE_WIDTH 96 /// Max length of chat message in characters -#define CHAT_MESSAGE_MAX_LENGTH 110 +#define CHAT_MESSAGE_MAX_LENGTH 110 +/// The dimensions of the chat message icons +#define CHAT_MESSAGE_ICON_SIZE 9 + +///Base layer of chat elements +#define CHAT_LAYER 1 +///Highest possible layer of chat elements +#define CHAT_LAYER_MAX 2 /// Maximum precision of float before rounding errors occur (in this context) -#define CHAT_LAYER_Z_STEP 0.0001 +#define CHAT_LAYER_Z_STEP 0.0001 /// The number of z-layer 'slices' usable by the chat message layering -#define CHAT_LAYER_MAX_Z (CHAT_LAYER_MAX - CHAT_LAYER) / CHAT_LAYER_Z_STEP +#define CHAT_LAYER_MAX_Z (CHAT_LAYER_MAX - CHAT_LAYER) / CHAT_LAYER_Z_STEP /** * # Chat Message Overlay @@ -156,7 +163,7 @@ // Build message image message = image(loc = message_loc, layer = CHAT_LAYER + CHAT_LAYER_Z_STEP * current_z_idx++) - message.plane = CHAT_PLANE + message.plane = RUNECHAT_PLANE message.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA | KEEP_APART message.alpha = 0 message.pixel_y = owner.bound_height * 0.95 @@ -265,3 +272,14 @@ return "#[num2hex(x, 2)][num2hex(m, 2)][num2hex(c, 2)]" if(5) return "#[num2hex(c, 2)][num2hex(m, 2)][num2hex(x, 2)]" + +#undef CHAT_MESSAGE_SPAWN_TIME +#undef CHAT_MESSAGE_LIFESPAN +#undef CHAT_MESSAGE_EOL_FADE +#undef CHAT_MESSAGE_EXP_DECAY +#undef CHAT_MESSAGE_HEIGHT_DECAY +#undef CHAT_MESSAGE_APPROX_LHEIGHT +#undef CHAT_MESSAGE_WIDTH +#undef CHAT_LAYER_Z_STEP +#undef CHAT_LAYER_MAX_Z +#undef CHAT_MESSAGE_ICON_SIZE diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm index 6052b843646c..4f486ba7aefe 100644 --- a/code/datums/cinematic.dm +++ b/code/datums/cinematic.dm @@ -22,7 +22,6 @@ icon = 'icons/effects/station_explosion.dmi' icon_state = "station_intact" plane = SPLASHSCREEN_PLANE - layer = SPLASHSCREEN_LAYER mouse_opacity = MOUSE_OPACITY_TRANSPARENT screen_loc = "BOTTOM,LEFT+50%" appearance_flags = APPEARANCE_UI | TILE_BOUND @@ -101,7 +100,7 @@ if(!C) return watching += C - M.overlay_fullscreen("cinematic",/atom/movable/screen/fullscreen/tiled/cinematic_backdrop) + M.overlay_fullscreen("cinematic",/atom/movable/screen/fullscreen/cinematic_backdrop) C.screen += screen //Sound helper diff --git a/code/datums/components/clothing_fov_visor.dm b/code/datums/components/clothing_fov_visor.dm new file mode 100644 index 000000000000..2ea793bd5fd2 --- /dev/null +++ b/code/datums/components/clothing_fov_visor.dm @@ -0,0 +1,60 @@ +/// An element to add a FOV trait to the wearer, removing it when an item is unequipped, but only as long as the visor is up. +/datum/component/clothing_fov_visor + /// What's the FOV angle of the trait we're applying to the wearer + var/fov_angle + /// Keeping track of the visor of our clothing. + var/visor_up = FALSE + /// Because of clothing code not being too good, we need keep track whether we are worn. + var/is_worn = FALSE + +/datum/component/clothing_fov_visor/Initialize(fov_angle) + . = ..() + if(!isclothing(parent)) + return COMPONENT_INCOMPATIBLE + var/obj/item/clothing/clothing_parent = parent + src.fov_angle = fov_angle + src.visor_up = clothing_parent.up //Initial values could vary, so we need to get it. + +/datum/component/clothing_fov_visor/RegisterWithParent() + RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip) + RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop) + RegisterSignal(parent, COMSIG_CLOTHING_VISOR_TOGGLE, .proc/on_visor_toggle) + +/datum/component/clothing_fov_visor/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_CLOTHING_VISOR_TOGGLE)) + return ..() + +/// On dropping the item, remove the FoV trait if visor was down. +/datum/component/clothing_fov_visor/proc/on_drop(datum/source, mob/living/dropper) + SIGNAL_HANDLER + is_worn = FALSE + if(visor_up) + return + dropper.remove_fov_trait(source.type, fov_angle) + dropper.update_fov() + +/// On equipping the item, add the FoV trait if visor isn't up. +/datum/component/clothing_fov_visor/proc/on_equip(obj/item/source, mob/living/equipper, slot) + SIGNAL_HANDLER + if(!(source.slot_flags & slot)) //If EQUIPPED TO HANDS FOR EXAMPLE + return + is_worn = TRUE + if(visor_up) + return + equipper.add_fov_trait(source.type, fov_angle) + equipper.update_fov() + +/// On toggling the visor, we may want to add or remove FOV trait from the wearer. +/datum/component/clothing_fov_visor/proc/on_visor_toggle(datum/source, visor_state) + SIGNAL_HANDLER + visor_up = visor_state + if(!is_worn) + return + var/obj/item/clothing/clothing_parent = parent + var/mob/living/wearer = clothing_parent.loc //This has to be the case due to equip/dropped keeping track. + if(visor_up) + wearer.remove_fov_trait(source.type, fov_angle) + wearer.update_fov() + else + wearer.add_fov_trait(source.type, fov_angle) + wearer.update_fov() diff --git a/code/datums/components/field_of_vision.dm b/code/datums/components/field_of_vision.dm deleted file mode 100644 index 4c03346639ab..000000000000 --- a/code/datums/components/field_of_vision.dm +++ /dev/null @@ -1,354 +0,0 @@ -#define CENTERED_RENDER_SOURCE(img, atom, FoV) \ - atom.render_target = atom.render_target || ref(atom);\ - img.render_source = atom.render_target;\ - if(atom.icon){\ - var/_cached_sizes = FoV.width_n_height_offsets[atom.icon];\ - if(!_cached_sizes){\ - var/icon/_I = icon(atom.icon);\ - var/list/L = list();\ - L += (_I.Width() - world.icon_size)/2;\ - L += (_I.Height() - world.icon_size)/2;\ - _cached_sizes = FoV.width_n_height_offsets[atom.icon] = L\ - }\ - img.pixel_x = _cached_sizes[1];\ - img.pixel_y = _cached_sizes[2];\ - img.loc = atom\ - } - -#define REGISTER_NESTED_LOCS(source, list, comsig, proc) \ - for(var/k in get_nested_locs(source)){\ - var/atom/_A = k;\ - RegisterSignal(_A, comsig, proc);\ - list += _A\ - } - -#define UNREGISTER_NESTED_LOCS(list, comsig, index) \ - for(var/k in index to length(list)){\ - var/atom/_A = list[k];\ - UnregisterSignal(_A, comsig);\ - list -= _A\ - } - -/** - * Field of Vision component. Does totally what you probably think it does, - * ergo preventing players from seeing what's behind them. - */ -/datum/component/field_of_vision - can_transfer = TRUE - -/** - * That special invisible, almost neigh indestructible movable - * that holds both shadow cone mask and image and follows the player around. - */ - var/atom/movable/fov_holder/fov - ///The current screen size this field of vision is meant to fit for. - var/current_fov_size = list(15, 15) - ///How much is the cone rotated clockwise, purely backend. Please use rotate_shadow_cone() if you must. - var/angle = 0 - /// Used to scale the shadow cone when rotating it to fit over the edges of the screen. - var/rot_scale = 1 - /// The inner angle of this cone, right hardset to 90, 180, or 270 degrees, until someone figures out a way to make it dynamic. - var/shadow_angle = FOV_90_DEGREES - /// The mask portion of the cone, placed on a * render target plane so while not visible it still applies the filter. - var/image/shadow_mask - /// The visual portion of the cone, placed on the highest layer of the wall plane - var/image/visual_shadow -/** - * An image whose render_source is kept up to date to prevent the mob (or the topmost movable holding it) from being hidden by the mask. - * Will make it use vis_contents instead once a few byonds bugs with images and vis contents are fixed. - */ - var/image/owner_mask -/** - * A circle image used to somewhat uncover the adjacent portion of the shadow cone, making mobs and objects behind us somewhat visible. - * The owner mask is still required for those mob going over the default 32x32 px size btw. - */ - var/image/adj_mask - /// A list of nested locations the mob is in, to ensure the above image works correctly. - var/list/nested_locs = list() -/** - * A static list of offsets based on icon width and height, because render sources are centered unlike most other visuals, - * and that gives us some problems when the icon is larger or smaller than world.icon_size - */ - var/static/list/width_n_height_offsets = list() - -/datum/component/field_of_vision/Initialize(fov_type = FOV_90_DEGREES, _angle = 0) - if(!ismob(parent)) - return COMPONENT_INCOMPATIBLE - angle = _angle - shadow_angle = fov_type - -/datum/component/field_of_vision/RegisterWithParent() - . = ..() - var/mob/M = parent - if(M.client) - generate_fov_holder(M, angle) - RegisterSignal(M, COMSIG_MOB_CLIENT_LOGIN, .proc/on_mob_login) - RegisterSignal(M, COMSIG_MOB_CLIENT_LOGOUT, .proc/on_mob_logout) - RegisterSignal(M, COMSIG_MOB_GET_VISIBLE_MESSAGE, .proc/on_visible_message) - RegisterSignal(M, COMSIG_MOB_EXAMINATE, .proc/on_examinate) - RegisterSignal(M, COMSIG_MOB_FOV_VIEW, .proc/on_fov_view) - RegisterSignal(M, COMSIG_MOB_CLIENT_CHANGE_VIEW, .proc/on_change_view) - RegisterSignal(M, COMSIG_MOB_RESET_PERSPECTIVE, .proc/on_reset_perspective) - RegisterSignal(M, COMSIG_MOB_FOV_VIEWER, .proc/is_viewer) - -/datum/component/field_of_vision/UnregisterFromParent() - . = ..() - var/mob/M = parent - if(!QDELETED(fov)) - if(M.client) - UnregisterSignal(M, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_DEATH, COMSIG_LIVING_REVIVE)) - M.client.images -= owner_mask - M.client.images -= shadow_mask - M.client.images -= visual_shadow - M.client.images -= adj_mask - qdel(fov, TRUE) // Forced. - fov = null - QDEL_NULL(owner_mask) - QDEL_NULL(adj_mask) - if(length(nested_locs)) - UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, 1) - UnregisterSignal(M, list(COMSIG_MOB_CLIENT_LOGIN, COMSIG_MOB_CLIENT_LOGOUT, - COMSIG_MOB_GET_VISIBLE_MESSAGE, COMSIG_MOB_EXAMINATE, - COMSIG_MOB_FOV_VIEW, COMSIG_MOB_RESET_PERSPECTIVE, - COMSIG_MOB_CLIENT_CHANGE_VIEW, COMSIG_MOB_FOV_VIEWER)) - -/** - * Generates the holder and images (if not generated yet) and adds them to client.images. - * Run when the component is registered to a player mob, or upon login. - */ -/datum/component/field_of_vision/proc/generate_fov_holder(mob/M, _angle = 0) - if(QDELETED(fov)) - fov = new(get_turf(M)) - fov.icon_state = "[shadow_angle]" - fov.dir = M.dir - shadow_mask = image('icons/misc/field_of_vision.dmi', fov, "[shadow_angle]", FIELD_OF_VISION_LAYER) - shadow_mask.plane = FIELD_OF_VISION_PLANE - visual_shadow = image('icons/misc/field_of_vision.dmi', fov, "[shadow_angle]_v", FIELD_OF_VISION_LAYER) - visual_shadow.plane = FIELD_OF_VISION_VISUAL_PLANE - owner_mask = new - owner_mask.appearance_flags = RESET_TRANSFORM - owner_mask.plane = FIELD_OF_VISION_BLOCKER_PLANE - adj_mask = image('icons/misc/field_of_vision.dmi', fov, "adj_mask", FIELD_OF_VISION_LAYER) - adj_mask.appearance_flags = RESET_TRANSFORM - adj_mask.plane = FIELD_OF_VISION_BLOCKER_PLANE - if(_angle) - rotate_shadow_cone(_angle) - fov.alpha = M.stat == DEAD ? 0 : 255 - RegisterSignal(M, COMSIG_MOB_DEATH, .proc/hide_fov) - RegisterSignal(M, COMSIG_LIVING_REVIVE, .proc/show_fov) - RegisterSignal(M, COMSIG_ATOM_DIR_CHANGE, .proc/on_dir_change) - RegisterSignal(M, COMSIG_MOVABLE_MOVED, .proc/on_mob_moved) - RegisterSignal(M, COMSIG_ROBOT_UPDATE_ICONS, .proc/manual_centered_render_source) - var/atom/A = M - if(M.loc && !isturf(M.loc)) - REGISTER_NESTED_LOCS(M, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved) - A = nested_locs[nested_locs.len] - CENTERED_RENDER_SOURCE(owner_mask, A, src) - M.client.images += shadow_mask - M.client.images += visual_shadow - M.client.images += owner_mask - M.client.images += adj_mask - if(M.client.view != "[current_fov_size[1]]x[current_fov_size[2]]") - resize_fov(current_fov_size, getviewsize(M.client.view)) - -///Rotates the shadow cone to a certain degree. Backend shenanigans. -/datum/component/field_of_vision/proc/rotate_shadow_cone(new_angle) - var/simple_degrees = SIMPLIFY_DEGREES(new_angle - angle) - var/to_scale = cos(simple_degrees) * sin(simple_degrees) - if(to_scale) - var/old_rot_scale = rot_scale - rot_scale = 1 + to_scale - if(old_rot_scale != rot_scale) - visual_shadow.transform = shadow_mask.transform = shadow_mask.transform.Scale(rot_scale/old_rot_scale) - visual_shadow.transform = shadow_mask.transform = shadow_mask.transform.Turn(fov.transform, simple_degrees) - -/** - * Resizes the shadow to match the current screen size. - * Run when the client view size is changed, or if the player has a viewsize different than "15x15" on login/comp registration. - */ -/datum/component/field_of_vision/proc/resize_fov(list/old_view, list/view) - current_fov_size = view - var/old_size = max(old_view[1], old_view[2]) - var/new_size = max(view[1], view[2]) - if(old_size == new_size) //longest edges are still of the same length. - return - visual_shadow.transform = shadow_mask.transform = shadow_mask.transform.Scale(new_size/old_size) - -/datum/component/field_of_vision/proc/on_mob_login(mob/source, client/client) - generate_fov_holder(source, angle) - -/datum/component/field_of_vision/proc/on_mob_logout(mob/source, client/client) - UnregisterSignal(source, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_DEATH, - COMSIG_LIVING_REVIVE, COMSIG_ROBOT_UPDATE_ICONS)) - if(length(nested_locs)) - UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, 1) - -/datum/component/field_of_vision/proc/on_dir_change(mob/source, old_dir, new_dir) - fov.dir = new_dir - -///Hides the shadow, other visibility comsig procs will take it into account. Called when the mob dies. -/datum/component/field_of_vision/proc/hide_fov(mob/source) - fov.alpha = 0 - -/// Shows the shadow. Called when the mob is revived. -/datum/component/field_of_vision/proc/show_fov(mob/source) - fov.alpha = 255 - -/// Hides the shadow when looking through other items, shows it otherwise. -/datum/component/field_of_vision/proc/on_reset_perspective(mob/source, atom/target) - if(source.client.eye == source || source.client.eye == source.loc) - fov.alpha = 255 - else - fov.alpha = 0 - -/// Called when the client view size is changed. -/datum/component/field_of_vision/proc/on_change_view(mob/source, client, list/old_view, list/view) - resize_fov(old_view, view) - -/** - * Called when the owner mob moves around. Used to keep shadow located right behind us, - * As well as modify the owner mask to match the topmost item. - */ -/datum/component/field_of_vision/proc/on_mob_moved(mob/source, atom/oldloc, dir, forced) - var/turf/T - if(!isturf(source.loc)) //Recalculate all nested locations. - UNREGISTER_NESTED_LOCS( nested_locs, COMSIG_MOVABLE_MOVED, 1) - REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved) - var/atom/movable/topmost = nested_locs[nested_locs.len] - T = topmost.loc - CENTERED_RENDER_SOURCE(owner_mask, topmost, src) - else - T = source.loc - if(length(nested_locs)) - UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, 1) - CENTERED_RENDER_SOURCE(owner_mask, source, src) - if(T) - fov.forceMove(T, harderforce = TRUE) - -/// Pretty much like the above, but meant for other movables the mob is stored in (bodybags, boxes, mechs etc). -/datum/component/field_of_vision/proc/on_loc_moved(atom/movable/source, atom/oldloc, dir, forced) - if(isturf(source.loc) && isturf(oldloc)) //This is the case of the topmost movable loc moving around the world, skip. - fov.forceMove(source.loc, harderforce = TRUE) - return - var/atom/movable/prev_topmost = nested_locs[nested_locs.len] - if(prev_topmost != source) - UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, nested_locs.Find(source) + 1) - REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved) - var/atom/movable/topmost = nested_locs[nested_locs.len] - if(topmost != prev_topmost) - CENTERED_RENDER_SOURCE(owner_mask, topmost, src) - if(topmost.loc) - fov.forceMove(topmost.loc, harderforce = TRUE) - -/// A hacky comsig proc for things that somehow decide to change icon on the go. may make a change_icon_file() proc later but... -/datum/component/field_of_vision/proc/manual_centered_render_source(mob/source, old_icon) - if(!isturf(source.loc)) - return - CENTERED_RENDER_SOURCE(owner_mask, source, src) - -#undef CENTERED_RENDER_SOURCE -#undef REGISTER_NESTED_LOCS -#undef UNREGISTER_NESTED_LOCS - -/** - * Byond doc is not entirely correct on the integrated arctan() proc. - * When both x and y are negative, the output is also negative, cycling clockwise instead of counter-clockwise. - * That's also why I am extensively using the SIMPLIFY_DEGREES macro here. - * - * Overall this is the main macro that calculates wheter a target is within the shadow cone angle or not. - */ -#define FOV_ANGLE_CHECK(mob, target, zero_x_y_statement, success_statement) \ - var/turf/T1 = get_turf(target);\ - var/turf/T2 = get_turf(mob);\ - if(!T1 || !T2){\ - zero_x_y_statement\ - }\ - var/_x = (T1.x - T2.x);\ - var/_y = (T1.y - T2.y);\ - if(ISINRANGE(_x, -1, 1) && ISINRANGE(_y, -1, 1)){\ - zero_x_y_statement\ - }\ - var/dir = (mob.dir & (EAST|WEST)) || mob.dir;\ - var/_degree = -angle;\ - var/_half = shadow_angle/2;\ - switch(dir){\ - if(EAST){\ - _degree += 180;\ - }\ - if(NORTH){\ - _degree += 270;\ - }\ - if(SOUTH){\ - _degree += 90;\ - }\ - }\ - var/_min = SIMPLIFY_DEGREES(_degree - _half);\ - var/_max = SIMPLIFY_DEGREES(_degree + _half);\ - if((_min > _max) ? !ISINRANGE(SIMPLIFY_DEGREES(arctan(_x, _y)), _max, _min) : ISINRANGE(SIMPLIFY_DEGREES(arctan(_x, _y)), _min, _max)){\ - success_statement;\ - } - -/datum/component/field_of_vision/proc/on_examinate(mob/source, atom/target) - if(fov.alpha) - FOV_ANGLE_CHECK(source, target, return, return COMPONENT_DENY_EXAMINATE|COMPONENT_EXAMINATE_BLIND) - -/datum/component/field_of_vision/proc/on_visible_message(mob/source, atom/target, message, range, list/ignored_mobs) - if(fov.alpha) - FOV_ANGLE_CHECK(source, target, return, return COMPONENT_NO_VISIBLE_MESSAGE) - -/datum/component/field_of_vision/proc/on_fov_view(mob/source, list/atoms) - if(!fov.alpha) - return - for(var/k in atoms) - var/atom/A = k - FOV_ANGLE_CHECK(source, A, continue, atoms -= A) - -/datum/component/field_of_vision/proc/is_viewer(mob/source, atom/center, depth, list/viewers_list) - if(fov.alpha) - FOV_ANGLE_CHECK(source, center, return, viewers_list -= source) - -#undef FOV_ANGLE_CHECK - -/** - * The shadow cone's mask and visual images holder which can't locate inside the mob, - * lest they inherit the mob opacity and cause a lot of hindrance - */ -/atom/movable/fov_holder - name = "field of vision holder" - pixel_x = -224 //the image is about 480x480 px, ergo 15 tiles (480/32) big, and we gotta center it. - pixel_y = -224 - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - plane = FIELD_OF_VISION_PLANE - anchored = TRUE - -/atom/movable/fov_holder/ConveyorMove() - return - -/atom/movable/fov_holder/has_gravity(turf/T) - return FALSE - -/atom/movable/fov_holder/ex_act(severity, target, origin) - return FALSE - -/atom/movable/fov_holder/singularity_act() - return - -/atom/movable/fov_holder/singularity_pull() - return - -/atom/movable/fov_holder/blob_act() - return - -/atom/movable/fov_holder/onTransitZ() - return - -/// Prevents people from moving these after creation, because they shouldn't be. -/atom/movable/fov_holder/forceMove(atom/destination, no_tp=FALSE, harderforce = FALSE) - if(harderforce) - return ..() - -/// Last but not least, these shouldn't be deleted by anything but the component itself -/atom/movable/fov_holder/Destroy(force = FALSE) - if(!force) - return QDEL_HINT_LETMELIVE - return ..() diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm index 8b326ac4248d..35ecfa1bf230 100644 --- a/code/datums/components/footstep.dm +++ b/code/datums/components/footstep.dm @@ -91,10 +91,13 @@ return playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1) -/datum/component/footstep/proc/play_humanstep() +/datum/component/footstep/proc/play_humanstep(mob/living/carbon/human/source, atom/oldloc, direction) var/turf/open/T = prepare_step() if(!T) return + + play_fov_effect(source, 5, "footstep", direction, ignore_self = TRUE) + var/mob/living/carbon/human/H = parent var/list/L = GLOB.barefootstep var/turf_footstep = T.barefootstep diff --git a/code/datums/components/fov_handler.dm b/code/datums/components/fov_handler.dm new file mode 100644 index 000000000000..2ae2d10b09ad --- /dev/null +++ b/code/datums/components/fov_handler.dm @@ -0,0 +1,129 @@ +/// Component which handles Field of View masking for clients. FoV attributes are at /mob/living +/datum/component/fov_handler + /// Currently applied x size of the fov masks + var/current_fov_x = BASE_FOV_MASK_X_DIMENSION + /// Currently applied y size of the fov masks + var/current_fov_y = BASE_FOV_MASK_Y_DIMENSION + /// Whether we are applying the masks now + var/applied_mask = FALSE + /// The angle of the mask we are applying + var/fov_angle = FOV_180_DEGREES + /// The blocker mask applied to a client's screen + var/atom/movable/screen/fov_blocker/blocker_mask + /// The shadow mask applied to a client's screen + var/atom/movable/screen/fov_shadow/visual_shadow + +/datum/component/fov_handler/Initialize(fov_type = FOV_180_DEGREES) + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + var/mob/living/mob_parent = parent + var/client/parent_client = mob_parent.client + if(!parent_client) //Love client volatility!! + qdel(src) //no QDEL hint for components, and we dont want this to print a warning regarding bad component application + return + + blocker_mask = new + visual_shadow = new + visual_shadow.alpha = parent_client?.prefs.fov_darkness + set_fov_angle(fov_type) + on_dir_change(mob_parent, mob_parent.dir, mob_parent.dir) + update_fov_size() + update_mask() + +/datum/component/fov_handler/Destroy() + if(applied_mask) + remove_mask() + if(blocker_mask) // In a case of early deletion due to volatile client + QDEL_NULL(blocker_mask) + if(visual_shadow) // In a case of early deletion due to volatile client + QDEL_NULL(visual_shadow) + return ..() + +/datum/component/fov_handler/proc/set_fov_angle(new_angle) + fov_angle = new_angle + blocker_mask.icon_state = "[fov_angle]" + visual_shadow.icon_state = "[fov_angle]_v" + +/// Updates the size of the FOV masks by comparing them to client view size. +/datum/component/fov_handler/proc/update_fov_size() + SIGNAL_HANDLER + var/mob/parent_mob = parent + var/client/parent_client = parent_mob.client + if(!parent_client) //Love client volatility!! + return + var/list/view_size = getviewsize(parent_client.view) + if(view_size[1] == current_fov_x && view_size[2] == current_fov_y) + return + current_fov_x = BASE_FOV_MASK_X_DIMENSION + current_fov_y = BASE_FOV_MASK_Y_DIMENSION + var/matrix/new_matrix = new + var/x_shift = view_size[1] - current_fov_x + var/y_shift = view_size[2] - current_fov_y + var/x_scale = view_size[1] / current_fov_x + var/y_scale = view_size[2] / current_fov_y + current_fov_x = view_size[1] + current_fov_y = view_size[2] + visual_shadow.transform = blocker_mask.transform = new_matrix.Scale(x_scale, y_scale) + visual_shadow.transform = blocker_mask.transform = new_matrix.Translate(x_shift * 16, y_shift * 16) + +/// Updates the mask application to client by checking `stat` and `eye` +/datum/component/fov_handler/proc/update_mask() + SIGNAL_HANDLER + var/mob/parent_mob = parent + var/client/parent_client = parent_mob.client + if(!parent_client) //Love client volatility!! + return + var/user_living = parent_mob != DEAD + var/atom/top_most_atom = get_atom_on_turf(parent_mob) + var/user_extends_eye = parent_client.eye != top_most_atom + var/should_apply_mask = user_living && !user_extends_eye + + if(should_apply_mask == applied_mask) + return + + if(should_apply_mask) + add_mask() + else + remove_mask() + +/datum/component/fov_handler/proc/remove_mask() + var/mob/parent_mob = parent + var/client/parent_client = parent_mob.client + if(!parent_client) //Love client volatility!! + return + applied_mask = FALSE + parent_client.screen -= blocker_mask + parent_client.screen -= visual_shadow + +/datum/component/fov_handler/proc/add_mask() + var/mob/parent_mob = parent + var/client/parent_client = parent_mob.client + if(!parent_client) //Love client volatility!! + return + applied_mask = TRUE + parent_client.screen += blocker_mask + parent_client.screen += visual_shadow + +/// When a direction of the user changes, so do the masks +/datum/component/fov_handler/proc/on_dir_change(mob/source, old_dir, new_dir) + SIGNAL_HANDLER + blocker_mask.dir = new_dir + visual_shadow.dir = new_dir + +/// When a mob logs out, delete the component +/datum/component/fov_handler/proc/mob_logout(mob/source) + SIGNAL_HANDLER + qdel(src) + +/datum/component/fov_handler/RegisterWithParent() + . = ..() + RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/on_dir_change) + RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/update_mask) + RegisterSignal(parent, COMSIG_LIVING_REVIVE, .proc/update_mask) + RegisterSignal(parent, COMSIG_MOB_CLIENT_CHANGE_VIEW, .proc/update_fov_size) + RegisterSignal(parent, COMSIG_MOB_RESET_PERSPECTIVE, .proc/update_mask) + RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGOUT, .proc/mob_logout) + +/datum/component/fov_handler/UnregisterFromParent() + . = ..() + UnregisterSignal(parent, list(COMSIG_MOB_RESET_PERSPECTIVE, COMSIG_ATOM_DIR_CHANGE, COMSIG_MOB_DEATH, COMSIG_LIVING_REVIVE, COMSIG_MOB_CLIENT_LOGOUT)) diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index a074fe6f5f44..8bc2f34d4984 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -209,7 +209,7 @@ /datum/component/riding/human/Initialize() . = ..() - directional_vehicle_layers = list(TEXT_NORTH = MOB_LOWER_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER) + directional_vehicle_layers = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER) RegisterSignal(parent, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee) /datum/component/riding/human/vehicle_mob_unbuckle(datum/source, mob/living/M, force = FALSE) @@ -278,7 +278,7 @@ /datum/component/riding/cyborg/Initialize() . = ..() - directional_vehicle_layers = list(TEXT_NORTH = MOB_LOWER_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER) + directional_vehicle_layers = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER) /datum/component/riding/cyborg/ride_check(mob/user) var/atom/movable/AM = parent diff --git a/code/datums/components/storage/ui.dm b/code/datums/components/storage/ui.dm index d41d82ae7583..f10f6dabbcc6 100644 --- a/code/datums/components/storage/ui.dm +++ b/code/datums/components/storage/ui.dm @@ -49,7 +49,6 @@ ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE ND.sample_object.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]" ND.sample_object.maptext = "[(ND.number > 1)? "[ND.number]" : ""]" - ND.sample_object.layer = ABOVE_HUD_LAYER ND.sample_object.plane = ABOVE_HUD_PLANE . += ND.sample_object cx++ @@ -68,7 +67,6 @@ D.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip" D.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]" O.maptext = "" - O.layer = ABOVE_HUD_LAYER O.plane = ABOVE_HUD_PLANE . += D cx++ diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm index c336213388a8..911ca7ecbeff 100644 --- a/code/datums/components/tackle.dm +++ b/code/datums/components/tackle.dm @@ -370,7 +370,7 @@ user.emote("scream") user.gain_trauma(/datum/brain_trauma/severe/paralysis/spinesnapped) // oopsie indeed! shake_camera(user, 7, 7) - user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash) + user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash) user.clear_fullscreen("flash", 4.5) if(94 to 98) @@ -381,7 +381,7 @@ user.gain_trauma_type(BRAIN_TRAUMA_MILD) user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) shake_camera(user, 6, 6) - user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash) + user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash) user.clear_fullscreen("flash", 3.5) if(84 to 93) @@ -394,7 +394,7 @@ user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) user.DefaultCombatKnockdown(40) shake_camera(user, 5, 5) - user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash) + user.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash) user.clear_fullscreen("flash", 2.5) if(64 to 83) diff --git a/code/datums/elements/item_fov.dm b/code/datums/elements/item_fov.dm new file mode 100644 index 000000000000..57d93f4f5373 --- /dev/null +++ b/code/datums/elements/item_fov.dm @@ -0,0 +1,34 @@ +/// An element to unconditonally add a FOV trait to the wearer, removing it when an item is unequipped +/datum/element/item_fov + element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH + id_arg_index = 2 + /// Angle of the FoV we will apply when someone wears the clothing this element is attached to. + var/fov_angle + +/datum/element/item_fov/Attach(datum/target, fov_angle) + . = ..() + if(!isitem(target)) + return ELEMENT_INCOMPATIBLE + src.fov_angle = fov_angle + + RegisterSignal(target, COMSIG_ITEM_EQUIPPED, .proc/on_equip) + RegisterSignal(target, COMSIG_ITEM_DROPPED, .proc/on_drop) + +/datum/element/item_fov/Detach(datum/target) + UnregisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED)) + return ..() + +/// On dropping the item, remove the FoV trait. +/datum/element/item_fov/proc/on_drop(datum/source, mob/living/dropper) + SIGNAL_HANDLER + dropper.remove_fov_trait(source.type, fov_angle) + dropper.update_fov() + +/// On equipping the item, add the FoV trait. +/datum/element/item_fov/proc/on_equip(obj/item/source, mob/living/equipper, slot) + SIGNAL_HANDLER + if(!(source.slot_flags & slot)) //If EQUIPPED TO HANDS FOR EXAMPLE + return + + equipper.add_fov_trait(source.type, fov_angle) + equipper.update_fov() diff --git a/code/datums/elements/undertile.dm b/code/datums/elements/undertile.dm new file mode 100644 index 000000000000..baa17c55ee7a --- /dev/null +++ b/code/datums/elements/undertile.dm @@ -0,0 +1,66 @@ +/// The alpha we give to stuff under tiles, if they want it +#define ALPHA_UNDERTILE 128 + +///Add to an object if you want to be able to be hidden under tiles +/datum/element/undertile + element_flags = ELEMENT_BESPOKE | COMPONENT_DUPE_HIGHLANDER + id_arg_index = 2 + + ///the invisiblity trait applied, like TRAIT_T_RAY_VISIBLE + var/invisibility_trait + ///level of invisibility applied when under a tile. Could be INVISIBILITY_OBSERVER if you still want it to be visible to ghosts + var/invisibility_level + ///an overlay for the tile if we wish to apply that + var/tile_overlay + ///whether we use alpha or not. TRUE uses ALPHA_UNDERTILE because otherwise we have 200 different instances of this element for different alphas + var/use_alpha + ///We will switch between anchored and unanchored. for stuff like satchels that shouldn't be pullable under tiles but are otherwise unanchored + var/use_anchor + +/datum/element/undertile/Attach(datum/target, invisibility_trait, invisibility_level = INVISIBILITY_MAXIMUM, tile_overlay, use_alpha = TRUE, use_anchor = FALSE) + . = ..() + if(!ismovable(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_OBJ_HIDE, .proc/hide) + + src.invisibility_trait = invisibility_trait + src.invisibility_level = invisibility_level + src.tile_overlay = tile_overlay + src.use_alpha = use_alpha + src.use_anchor = use_anchor + +///called when a tile has been covered or uncovered +/datum/element/undertile/proc/hide(atom/movable/source, covered) + SIGNAL_HANDLER + + source.invisibility = covered ? invisibility_level : 0 + + var/turf/T = get_turf(source) + + if(covered) + if(invisibility_trait) + ADD_TRAIT(source, invisibility_trait, ELEMENT_TRAIT(type)) + if(tile_overlay) + T.add_overlay(tile_overlay) + if(use_alpha) + source.alpha = ALPHA_UNDERTILE + if(use_anchor) + source.set_anchored(TRUE) + + else + if(invisibility_trait) + REMOVE_TRAIT(source, invisibility_trait, ELEMENT_TRAIT(type)) + if(tile_overlay) + T.overlays -= tile_overlay + if(use_alpha) + source.alpha = 255 + if(use_anchor) + source.set_anchored(FALSE) + +/datum/element/undertile/Detach(atom/movable/AM, visibility_trait, invisibility_level = INVISIBILITY_MAXIMUM) + . = ..() + + hide(AM, FALSE) + +#undef ALPHA_UNDERTILE diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 2e7a7ea9d22e..6f699107d71c 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -816,7 +816,7 @@ /datum/status_effect/necropolis_curse/proc/apply_curse(set_curse) curse_flags |= set_curse if(curse_flags & CURSE_BLINDING) - owner.overlay_fullscreen("curse", /atom/movable/screen/fullscreen/scaled/curse, 1) + owner.overlay_fullscreen("curse", /atom/movable/screen/fullscreen/curse, 1) /datum/status_effect/necropolis_curse/proc/remove_curse(remove_curse) if(remove_curse & CURSE_BLINDING) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 2c34c67c5814..e50c1b683bd3 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -9,7 +9,7 @@ icon_state = "unknown" layer = AREA_LAYER //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE. - plane = BLACKNESS_PLANE + plane = AREA_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT invisibility = INVISIBILITY_LIGHTING diff --git a/code/game/area/areas/edina.dm b/code/game/area/areas/edina.dm index 75c99334f77c..30d4877b3d68 100644 --- a/code/game/area/areas/edina.dm +++ b/code/game/area/areas/edina.dm @@ -167,7 +167,6 @@ ////////////////Mapping helper///////////////////////// /obj/effect/mapping_helpers/planet_z name = "planet z helper" - layer = POINT_LAYER /obj/effect/mapping_helpers/planet_z/Initialize(mapload) . = ..() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fa3ff7290481..b0199eefa7f5 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -12,7 +12,6 @@ /// pass_flags that we are. If any of this matches a pass_flag on a moving thing, by default, we let them through. var/pass_flags_self = NONE - var/level = 2 ///If non-null, overrides a/an/some in all cases var/article diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 6beb8319ecc5..fb6e18039518 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -58,7 +58,7 @@ var/atom/movable/emissive_blocker/em_block /// Should we use tooltips, if the thing does not have the code implemented `get_tooltip_data()`, it will default to examine(src) - var/tooltips = FALSE + var/should_tooltip = FALSE /// How loudly we yell var/yell_power = 50 /// last time we yelled @@ -537,7 +537,7 @@ return -/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect) +/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, fov_effect = TRUE) if(!no_effect && (visual_effect_icon || used_item)) do_item_attack_animation(A, visual_effect_icon, used_item) @@ -561,6 +561,9 @@ pixel_x_diff = -8 turn_dir = -1 + if(fov_effect) + play_fov_effect(A, 5, "attack") + var/matrix/initial_transform = matrix(transform) var/matrix/rotated_transform = transform.Turn(15 * turn_dir) animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, transform=rotated_transform, time = 1, easing=BACK_EASING|EASE_IN) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 92ae0b764f52..965a9a0962fb 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -145,7 +145,6 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) 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 = ABOVE_HUD_LAYER P.wear_suit.plane = ABOVE_HUD_PLANE P.update_inv_wear_suit() if(P.head) @@ -154,7 +153,6 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) P.head.plane = initial(P.head.plane) P.head = null P.head = new/obj/item/clothing/head/helmet/space(P) - P.head.layer = ABOVE_HUD_LAYER P.head.plane = ABOVE_HUD_PLANE P.update_inv_head() if(P.wear_mask) @@ -163,7 +161,6 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) 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 = ABOVE_HUD_LAYER P.wear_mask.plane = ABOVE_HUD_PLANE P.update_inv_wear_mask() if(P.back) @@ -172,7 +169,6 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) P.back.plane = initial(P.back.plane) P.back = null P.back = new/obj/item/tank/jetpack/oxygen(P) - P.back.layer = ABOVE_HUD_LAYER P.back.plane = ABOVE_HUD_PLANE P.update_inv_back() P.internal = P.back diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index c720668a5ba9..76df121cc99f 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -4,9 +4,8 @@ icon_state = "floor_beaconf" name = "bluespace gigabeacon" desc = "A device that draws power from bluespace and creates a permanent tracking beacon." - level = 1 // underfloor layer = LOW_OBJ_LAYER - use_power = IDLE_POWER_USE + use_power = NO_POWER_USE idle_power_usage = 0 var/obj/item/beacon/Beacon @@ -16,27 +15,12 @@ Beacon = new(T) Beacon.invisibility = INVISIBILITY_MAXIMUM - hide(T.intact) + AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) /obj/machinery/bluespace_beacon/Destroy() QDEL_NULL(Beacon) return ..() -// update the invisibility and icon -/obj/machinery/bluespace_beacon/hide(intact) - invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() - -// update the icon_state -/obj/machinery/bluespace_beacon/update_icon_state() - var/state="floor_beacon" - - if(invisibility) - icon_state = "[state]f" - - else - icon_state = "[state]" - /obj/machinery/bluespace_beacon/process() if(QDELETED(Beacon)) //Don't move it out of nullspace BACK INTO THE GAME for the love of god var/turf/T = loc @@ -44,5 +28,3 @@ Beacon.invisibility = INVISIBILITY_MAXIMUM else if (Beacon.loc != loc) Beacon.forceMove(loc) - - update_icon() diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index d3e79d38c565..bd5bb300c88b 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -19,10 +19,6 @@ if(istext(id) && mapload && id[1] == "!") id = SSmapping.get_obfuscated_id(id) . = ..() - var/turf/T = get_turf_pixel(src) - if(iswallturf(T)) - plane = ABOVE_WALL_PLANE - if(built) setDir(ndir) pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 6e794b80722e..faba4999ea93 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -407,7 +407,7 @@ /obj/machinery/camera/get_remote_view_fullscreens(mob/user) if(view_range == short_range) //unfocused - user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 2) + user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2) /obj/machinery/camera/update_remote_sight(mob/living/user) user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index f4851fc33cfc..6294923f578f 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -93,4 +93,4 @@ overlay_state = "alert:0" . |= overlay_state SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, overlay_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha=128) + SSvis_overlays.add_vis_overlay(src, icon, overlay_state, null, EMISSIVE_PLANE, dir, alpha=128) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index ec897f97e2d1..667b5c9fceb4 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -6,7 +6,7 @@ icon_screen = "cameras" icon_keyboard = "security_key" circuit = /obj/item/circuitboard/computer/security - light_color = LIGHT_COLOR_RED + light_color = COLOR_SOFT_RED var/list/network = list("ss13") var/obj/machinery/camera/active_camera @@ -40,8 +40,10 @@ cam_screen.del_on_map_removal = FALSE cam_screen.screen_loc = "[map_name]:1,1" cam_plane_masters = list() - for(var/plane in subtypesof(/atom/movable/screen/plane_master)) - var/atom/movable/screen/instance = new plane() + for(var/plane in subtypesof(/atom/movable/screen/plane_master) - /atom/movable/screen/plane_master/blackness) + var/atom/movable/screen/plane_master/instance = new plane() + if(instance.blend_mode_override) + instance.blend_mode = instance.blend_mode_override instance.assigned_map = map_name instance.del_on_map_removal = FALSE instance.screen_loc = "[map_name]:CENTER" @@ -51,9 +53,9 @@ cam_background.del_on_map_removal = FALSE /obj/machinery/computer/security/Destroy() - qdel(cam_screen) + QDEL_NULL(cam_screen) QDEL_LIST(cam_plane_masters) - qdel(cam_background) + QDEL_NULL(cam_background) return ..() /obj/machinery/computer/security/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) @@ -62,6 +64,7 @@ network += "[idnum][i]" /obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/ui) + . = ..() // Update UI ui = SStgui.try_update_ui(user, src, ui) @@ -88,6 +91,12 @@ ui = new(user, src, "CameraConsole", name) ui.open() +/obj/machinery/computer/security/ui_status(mob/user) + . = ..() + if(. == UI_DISABLED) + return UI_CLOSE + return . + /obj/machinery/computer/security/ui_data() var/list/data = list() data["network"] = network @@ -118,7 +127,7 @@ return if(action == "switch_camera") - var/c_tag = params["name"] + var/c_tag = format_text(params["name"]) var/list/cameras = get_available_cameras() var/obj/machinery/camera/selected_camera = cameras[c_tag] active_camera = selected_camera @@ -166,6 +175,7 @@ cam_background.fill_rect(1, 1, size_x, size_y) /obj/machinery/computer/security/ui_close(mob/user) + . = ..() var/user_ref = REF(user) var/is_living = isliving(user) // Living creature or not, we remove you anyway. @@ -209,7 +219,7 @@ name = "security camera monitor" desc = "An old TV hooked into the station's camera network." icon_state = "television" - icon_keyboard = "no_keyboard" + icon_keyboard = null icon_screen = "detective_tv" pass_flags = PASSTABLE @@ -252,6 +262,7 @@ desc = "Used for watching an empty arena." icon = 'icons/obj/stationobjs.dmi' icon_state = "telescreen" + icon_keyboard = null layer = SIGN_LAYER network = list("thunder") density = FALSE @@ -262,6 +273,7 @@ icon_state = initial(icon_state) if(stat & BROKEN) icon_state += "b" + return ..() /obj/machinery/computer/security/telescreen/entertainment name = "entertainment monitor" @@ -275,6 +287,8 @@ var/icon_state_off = "entertainment_blank" var/icon_state_on = "entertainment" +MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/entertainment, 32) + /obj/machinery/computer/security/telescreen/entertainment/Initialize(mapload) . = ..() RegisterSignal(src, COMSIG_CLICK, .proc/BigClick) @@ -299,7 +313,7 @@ /obj/machinery/computer/security/telescreen/rd name = "\improper Research Director's telescreen" desc = "Used for watching the AI and the RD's goons from the safety of his office." - network = list("rd", "aicore", "aiupload", "minisat", "xeno", "test") + network = list("rd", "aicore", "aiupload", "minisat", "xeno", "test", "toxins") /obj/machinery/computer/security/telescreen/circuitry name = "research telescreen" diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 30463f4f01f1..9a370914df21 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -275,7 +275,7 @@ if(final) playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0) remote_eye.setLoc(get_turf(final)) - C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/flash/static) + C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static) C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console! else playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0) diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index df84d5a26a4f..607549942509 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -109,4 +109,4 @@ overlay_state = "alert:0" . |= overlay_state SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir) - SSvis_overlays.add_vis_overlay(src, icon, overlay_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha=128) + SSvis_overlays.add_vis_overlay(src, icon, overlay_state, null, EMISSIVE_PLANE, dir, alpha=128) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0b31ecdf9f49..8db4c1d7f298 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -479,15 +479,15 @@ if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, null, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, null, ABOVE_LIGHTING_PLANE) if(lights && hasPower()) if(locked) - lights_overlay = get_airlock_overlay("lights_bolts", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + lights_overlay = get_airlock_overlay("lights_bolts", overlays_file, null, ABOVE_LIGHTING_PLANE) else if(emergency) - lights_overlay = get_airlock_overlay("lights_emergency", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + lights_overlay = get_airlock_overlay("lights_emergency", overlays_file, null, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay(notetype, note_overlay_file) @@ -505,18 +505,18 @@ else panel_overlay = get_airlock_overlay("panel_closed", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, null, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, null, ABOVE_LIGHTING_PLANE) if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) - lights_overlay = get_airlock_overlay("lights_denied", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + lights_overlay = get_airlock_overlay("lights_denied", overlays_file, null, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay(notetype, note_overlay_file) if(AIRLOCK_EMAG) frame_overlay = get_airlock_overlay("closed", icon) - sparks_overlay = get_airlock_overlay("sparks", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + sparks_overlay = get_airlock_overlay("sparks", overlays_file, null, ABOVE_LIGHTING_PLANE) if(airlock_material) filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file) else @@ -527,9 +527,9 @@ else panel_overlay = get_airlock_overlay("panel_closed", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, null, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, null, ABOVE_LIGHTING_PLANE) if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) if(note) @@ -542,7 +542,7 @@ else filling_overlay = get_airlock_overlay("fill_closing", icon) if(lights && hasPower()) - lights_overlay = get_airlock_overlay("lights_closing", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + lights_overlay = get_airlock_overlay("lights_closing", overlays_file, null, ABOVE_LIGHTING_PLANE) if(panel_open) if(security_level) panel_overlay = get_airlock_overlay("panel_closing_protected", overlays_file) @@ -563,7 +563,7 @@ else panel_overlay = get_airlock_overlay("panel_open", overlays_file) if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_open", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + damag_overlay = get_airlock_overlay("sparks_open", overlays_file, null, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay("[notetype]_open", note_overlay_file) @@ -574,7 +574,7 @@ else filling_overlay = get_airlock_overlay("fill_opening", icon) if(lights && hasPower()) - lights_overlay = get_airlock_overlay("lights_opening", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) + lights_overlay = get_airlock_overlay("lights_opening", overlays_file, null, ABOVE_LIGHTING_PLANE) if(panel_open) if(security_level) panel_overlay = get_airlock_overlay("panel_opening_protected", overlays_file) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index c20911853733..67074fd83e08 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -21,7 +21,6 @@ icon = 'icons/obj/status_display.dmi' icon_state = "frame" desc = "A remote control for a door." - plane = ABOVE_WALL_PLANE req_access = list(ACCESS_SECURITY) density = FALSE var/id // id of linked machinery/lockers diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index 6416de70f1cb..6c8467dbd3f1 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -34,7 +34,7 @@ /obj/machinery/embedded_controller/radio/simple_vent_controller icon = 'icons/obj/airlock_machines.dmi' icon_state = "airlock_control_standby" - plane = ABOVE_WALL_PLANE + name = "vent controller" density = FALSE diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 0a0bed491b89..55613dd9a766 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -17,7 +17,6 @@ desc = "\"Pull this in case of emergency\". Thus, keep pulling it forever." icon = 'icons/obj/monitors.dmi' icon_state = "fire0" - plane = ABOVE_WALL_PLANE max_integrity = 250 integrity_failure = 0.4 armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 100, FIRE = 90, ACID = 30) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 9b16f4ad0c04..511203e5a899 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -5,7 +5,7 @@ desc = "A wall-mounted flashbulb device." icon = 'icons/obj/stationobjs.dmi' icon_state = "mflash1" - plane = ABOVE_WALL_PLANE + // base_icon_state = "mflash" max_integrity = 250 integrity_failure = 0.4 light_color = LIGHT_COLOR_WHITE @@ -17,6 +17,8 @@ var/strength = 100 //How knocked down targets are when flashed. var/base_state = "mflash" +MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/flasher, 26) + /obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored name = "portable flasher" desc = "A portable flashing device. Wrench to activate and deactivate. Cannot detect slow movements." diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index fa71960c9d41..17872fab6dee 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -9,7 +9,6 @@ icon_state = "floor_magnet-f" name = "electromagnetic generator" desc = "A device that uses station power to create points of magnetic energy." - level = 1 // underfloor layer = LOW_OBJ_LAYER use_power = IDLE_POWER_USE idle_power_usage = 50 @@ -29,9 +28,8 @@ /obj/machinery/magnetic_module/Initialize(mapload) ..() - var/turf/T = loc - hide(T.intact) - center = T + AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) + center = get_turf(src) SSradio.add_object(src, freq, RADIO_MAGNETS) return INITIALIZE_HINT_LATELOAD @@ -43,11 +41,6 @@ center = null return ..() -// update the invisibility and icon -/obj/machinery/magnetic_module/hide(intact) - invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() - // update the icon_state /obj/machinery/magnetic_module/update_icon_state() var/state="floor_magnet" diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 2bcb9b0762e7..b55a819dc0eb 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -5,19 +5,19 @@ icon = 'icons/obj/objects.dmi' icon_state = "navbeacon0-f" + base_icon_state = "navbeacon" name = "navigation beacon" desc = "A radio beacon used for bot navigation." - level = 1 // underfloor layer = LOW_OBJ_LAYER max_integrity = 500 armor = list(MELEE = 70, BULLET = 70, LASER = 70, ENERGY = 70, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 80) - var/open = FALSE // true if cover is open - var/locked = TRUE // true if controls are locked + var/open = FALSE // true if cover is open + var/locked = TRUE // true if controls are locked var/freq = FREQ_NAV_BEACON - var/location = "" // location response text - var/list/codes // assoc. list of transponder codes - var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value" + var/location = "" // location response text + var/list/codes // assoc. list of transponder codes + var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value" req_one_access = list(ACCESS_ENGINE, ACCESS_ROBOTICS) @@ -26,20 +26,12 @@ set_codes() - var/turf/T = loc - hide(T.intact) - if(codes["patrol"]) - if(!GLOB.navbeacons["[z]"]) - GLOB.navbeacons["[z]"] = list() - GLOB.navbeacons["[z]"] += src //Register with the patrol list! - if(codes["delivery"]) - GLOB.deliverybeacons += src - GLOB.deliverybeacontags += location + glob_lists_register(init=TRUE) + + AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE) /obj/machinery/navbeacon/Destroy() - if (GLOB.navbeacons["[z]"]) - GLOB.navbeacons["[z]"] -= src //Remove from beacon list, if in one. - GLOB.deliverybeacons -= src + glob_lists_deregister() return ..() /obj/machinery/navbeacon/onTransitZ(old_z, new_z) @@ -56,10 +48,10 @@ codes = new() - var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons + var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons for(var/e in entries) - var/index = findtext(e, "=") // format is "key=value" + var/index = findtext(e, "=") // format is "key=value" if(index) var/key = copytext(e, 1, index) var/val = copytext(e, index + length(e[index])) @@ -67,63 +59,71 @@ else codes[e] = "1" +/obj/machinery/navbeacon/proc/glob_lists_deregister() + if (GLOB.navbeacons["[z]"]) + GLOB.navbeacons["[z]"] -= src //Remove from beacon list, if in one. + GLOB.deliverybeacons -= src + GLOB.deliverybeacontags -= location -// called when turf state changes -// hide the object if turf is intact -/obj/machinery/navbeacon/hide(intact) - invisibility = intact ? INVISIBILITY_MAXIMUM : 0 - update_icon() +/obj/machinery/navbeacon/proc/glob_lists_register(init=FALSE) + if(!init) + glob_lists_deregister() + if(!codes) + return + if(codes["patrol"]) + if(!GLOB.navbeacons["[z]"]) + GLOB.navbeacons["[z]"] = list() + GLOB.navbeacons["[z]"] += src //Register with the patrol list! + if(codes["delivery"]) + GLOB.deliverybeacons += src + GLOB.deliverybeacontags += location // update the icon_state /obj/machinery/navbeacon/update_icon_state() - var/state="navbeacon[open]" + icon_state = "[base_icon_state][open]" + return ..() - if(invisibility) - icon_state = "[state]-f" // if invisible, set icon to faded version - // in case revealed by T-scanner - else - icon_state = "[state]" +/obj/machinery/navbeacon/screwdriver_act(mob/living/user, obj/item/tool) + add_fingerprint(user) + open = !open + user.visible_message(span_notice("[user] [open ? "opens" : "closes"] the beacon's cover."), span_notice("You [open ? "open" : "close"] the beacon's cover.")) + update_appearance() + tool.play_tool_sound(src, 50) + return TRUE /obj/machinery/navbeacon/attackby(obj/item/I, mob/user, params) var/turf/T = loc - if(T.intact) - return // prevent intraction when T-scanner revealed - - if(I.tool_behaviour == TOOL_SCREWDRIVER) - open = !open - - user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") - - update_icon() + if(T.underfloor_accessibility < UNDERFLOOR_INTERACTABLE) + return // prevent intraction when T-scanner revealed else if (istype(I, /obj/item/card/id)||istype(I, /obj/item/pda)) if(open) if (src.allowed(user)) src.locked = !src.locked - to_chat(user, "Controls are now [src.locked ? "locked" : "unlocked"].") + to_chat(user, span_notice("Controls are now [src.locked ? "locked" : "unlocked"].")) else - to_chat(user, "Access denied.") + to_chat(user, span_danger("Access denied.")) updateDialog() else - to_chat(user, "You must open the cover first!") + to_chat(user, span_warning("You must open the cover first!")) else return ..() /obj/machinery/navbeacon/attack_ai(mob/user) interact(user, 1) -/obj/machinery/navbeacon/attack_paw() +/obj/machinery/navbeacon/attack_paw(mob/user, list/modifiers) return /obj/machinery/navbeacon/ui_interact(mob/user) . = ..() var/ai = isAI(user) var/turf/T = loc - if(T.intact) - return // prevent intraction when T-scanner revealed + if(T.underfloor_accessibility < UNDERFLOOR_INTERACTABLE) + return // prevent intraction when T-scanner revealed - if(!open && !ai) // can't alter controls if not open, unless you're an AI - to_chat(user, "The beacon's control cover is closed!") + if(!open && !ai) // can't alter controls if not open, unless you're an AI + to_chat(user, span_warning("The beacon's control cover is closed!")) return @@ -150,9 +150,9 @@ Transponder Codes: