Files
Bubberstation/_maps/shuttles/aux_base_small.dmm
esainane b6f761468e [MDB IGNORE] dir sanity, primarily on WALLITEMs (#62601)
About The Pull Request

Wall items mostly use the direction from the floor to the wall in the named mapping helper. Wall items mostly use the direction from the wall to the floor for the internal dir variable.

This leads to a headache when it comes to working out what conflicts with what, and what needs placing where.

Wall frames provided a member, inverse, which specified whether or not to invert the direction of the item when looking for conflicts. It was also used to specify whether to look for conflicts outside of the wall (cameras and lights appear external to the wall) or inside the wall (most wall items). This flag was set for Intercoms, APCs, and Lights. Since APCs and Lights expect a floor-to-wall direction, and Intercoms expect a wall-to-floor direction, this means that APCs and Lights were getting the correct direction, and Intercoms were getting the wrong direction.

Some implications of this setup were:

    You could build an APC on top of another wall item, provided there was nothing external attached to the wall and the area didn't have an APC.
    You could stack Intercoms indefinitely on top of the same wall, provided you weren't in a one-tile wide corridor with something on the opposite wall.

Or both! Here's twenty Intercoms placed on the wall, and a freshly placed APC frame after placing all Intercoms and deconstructing the old APC:

endless-stack-of-intercoms

Not everything used this inverse variable to adjust to the correct direction. For example, /obj/machinery/defibrillator_mount just used a negative pixel_offset to be visually placed in the correct direction, even though the internal direction was wrong, and never set! This also let you stack an indefinite number of defib mounts on the same wall, provided it wasn't a northern wall... except you could do this to northern walls too, since defibs weren't considered a wall item for the purposes of checking collisions at all!

Ultimately, every constructable interior wall item either used this inverse variable to adjust to the correct placement, set a negative pixel_offset variable to have its offset adjusted to the correct placement, or overrode New or Initialize to run its own checks and assignment to pixel_x and pixel_y!
Inventory: Table of various paths, related paths, and the adjustments they used

Unfortunately, untangling /obj/structure/sign is going to be another major headache, and this has already exploded in scope enough already, so we can't get rid of the get_turf_pixel call just yet. This also doesn't fix problems with the special 2x1 /obj/structure/sign/barsign.

Some non-wall items have been made to use the new MAPPING_DIRECTIONAL_HELPERS as part of the directional cleanup.

tl;dr: All wall mounted items and some directional objects now use the same direction that they were labelled as. More consistent directional types everywhere.
Why It's Good For The Game

fml
Changelog

cl
refactor: Wall mounted and directional objects have undergone major internal simplification. Please report anything unusual!
fix: You can no longer stack an indefinite amount of Intercoms on the same wall.
fix: Defibrillator Mounts, Bluespace Gas Vendors, Turret Controlers, and Ticket Machines are now considered wall items.
fix: Wall mounted items on top of the wall now consistently check against other items on top of the wall, and items coming out of the wall now consistently check against other items coming out of the wall.
fix: The various directional pixel offsets within an APC, Fire Extinguisher Cabinet, Intercom, or Newscaster have been made consistent with each other.
fix: The pixel offsets of Intercoms, Fire Alarms, Fire Extinguisher Cabinets, Flashers, and Newscasters have been made consistent between roundstart and constructed instances.
fix: Constructed Turret Controls will no longer oddly overhang the wall they were placed on.
qol: Defibrillator mounts now better indicate which side of the wall they are on.
fix: Some instances where there were multiple identical lights on the same tile have been fixed to only have one.
/cl
2021-11-09 10:02:34 +13:00

144 lines
2.0 KiB
Plaintext

//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"b" = (
/obj/effect/turf_decal/stripes/line{
dir = 9
},
/obj/structure/ore_box,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"c" = (
/obj/effect/turf_decal/stripes/line{
dir = 1
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"d" = (
/obj/effect/turf_decal/stripes/line{
dir = 5
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"e" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"f" = (
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"g" = (
/obj/effect/turf_decal/stripes/line{
dir = 4
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"h" = (
/obj/machinery/camera/directional/south{
network = list("auxbase")
},
/obj/structure/mining_shuttle_beacon,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"i" = (
/obj/machinery/light/directional/east,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"j" = (
/obj/docking_port/mobile/auxiliary_base{
dir = 2
},
/obj/machinery/bluespace_beacon,
/turf/closed/wall,
/area/shuttle/auxiliary_base)
"k" = (
/obj/machinery/light/directional/west,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"l" = (
/obj/machinery/portable_atmospherics/canister/air,
/obj/effect/turf_decal/stripes/line{
dir = 10
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"m" = (
/obj/effect/turf_decal/stripes/line,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"n" = (
/obj/structure/closet/secure_closet/miner/unlocked,
/obj/effect/turf_decal/stripes/line{
dir = 6
},
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
"O" = (
/obj/machinery/computer/auxiliary_base/directional/north,
/turf/open/floor/plating,
/area/shuttle/auxiliary_base)
(1,1,1) = {"
b
e
e
e
e
e
l
"}
(2,1,1) = {"
c
f
f
f
f
f
m
"}
(3,1,1) = {"
c
f
f
i
f
f
m
"}
(4,1,1) = {"
c
f
h
j
O
f
m
"}
(5,1,1) = {"
c
f
f
k
f
f
m
"}
(6,1,1) = {"
c
f
f
f
f
f
m
"}
(7,1,1) = {"
d
g
g
g
g
g
n
"}