Skip to content

Commit

Permalink
[MDB Ignore] Adds a unit test for typepaths that are required to be m…
Browse files Browse the repository at this point in the history
…apped onto each station map (#74985)

Inspired by #74967 and #68459 , and the fact that Tramstation regresses
very often -

Adds a unit test, `required_map_items`, which ensures that certain
typepaths which should definitely be mapped onto every map is mapped
onto every map

It can also be used to ensure that items which should not be mapped in
multiple times are not, among other things.

I included a few examples -
- Min 1, max inf of each head of staff stamps
- Min 1, max 1 departmental order consoles
- Min 1, max inf comms console
- Min 1, max 1 Pun Pun
- Min 1, max 1 Poly
- Min 1, max 1 Ian

If, in the future, a mapper decides they (for some reason) do not want a
certain previously-required item on their map, the test can be adjusted
such that it allows excluding or something, but currently it should be
for items which require conscious thought about.

I attempted to make this a linter before realizing two things
1. Someone might make a spawner which spawns the items, or they might
get placed in a locker, in any case this accounts for everything on init
2. Linters run on every map, non-station maps included

So I went with a test

Why is it always the CMO stamp?

Not necessary (unless I find a map missing something, then this will be
updated)
  • Loading branch information
MrMelbert authored and Absolucy committed Jun 21, 2024
1 parent 2430931 commit 6211c74
Show file tree
Hide file tree
Showing 45 changed files with 291 additions and 118 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/SpaceRuins/hilbertresearchfacility.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@
"BL" = (
/obj/structure/table/wood,
/obj/item/folder/white,
/obj/item/stamp/rd,
/obj/item/stamp/head/rd,
/turf/open/floor/iron/grimy,
/area/ruin/space/has_grav/powered/hilbertresearchfacility)
"BM" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/SpaceRuins/waystation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
pixel_x = 7;
pixel_y = 4
},
/obj/item/stamp/qm{
/obj/item/stamp/head/qm{
pixel_x = 7;
pixel_y = -2
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomZLevels/moonoutpost19.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2904,7 +2904,7 @@
/obj/structure/window/reinforced/spawner/directional/north,
/obj/structure/window/reinforced/spawner/directional/west,
/obj/item/folder/white,
/obj/item/stamp/rd{
/obj/item/stamp/head/rd{
pixel_x = 3;
pixel_y = -2
},
Expand Down
4 changes: 2 additions & 2 deletions _maps/RandomZLevels/undergroundoutpost45.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5519,7 +5519,7 @@
/obj/structure/window/reinforced/spawner/directional/north,
/obj/structure/window/reinforced/spawner/directional/west,
/obj/item/folder/white,
/obj/item/stamp/rd{
/obj/item/stamp/head/rd{
pixel_x = 3;
pixel_y = -2
},
Expand Down Expand Up @@ -10161,7 +10161,7 @@
/obj/item/clothing/glasses/meson{
pixel_y = 4
},
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/obj/effect/turf_decal/tile/neutral/fourcorners,
/turf/open/floor/iron{
heat_capacity = 1e+006
Expand Down
14 changes: 7 additions & 7 deletions _maps/map_files/BoxStation/BoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -25289,7 +25289,7 @@
pixel_x = -6;
pixel_y = 7
},
/obj/item/stamp/qm{
/obj/item/stamp/head/qm{
pixel_x = 8;
pixel_y = 12
},
Expand Down Expand Up @@ -36714,7 +36714,7 @@
pixel_y = 4;
pixel_x = 9
},
/obj/item/stamp/hos{
/obj/item/stamp/head/hos{
pixel_x = 10;
pixel_y = 6
},
Expand Down Expand Up @@ -42943,7 +42943,7 @@
/obj/item/pen{
pixel_y = 4
},
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/turf/open/floor/iron,
/area/station/command/heads_quarters/ce)
"one" = (
Expand Down Expand Up @@ -58375,7 +58375,7 @@
/obj/structure/table,
/obj/item/paper_bin,
/obj/item/pen,
/obj/item/stamp/hop,
/obj/item/stamp/head/hop,
/turf/open/floor/carpet/royalblue,
/area/station/command/heads_quarters/hop)
"tyG" = (
Expand Down Expand Up @@ -59307,7 +59307,7 @@
/obj/item/paper_bin,
/obj/item/folder/blue,
/obj/item/pen/fountain,
/obj/item/stamp/captain,
/obj/item/stamp/head/captain,
/turf/open/floor/wood,
/area/station/command/heads_quarters/captain)
"tQJ" = (
Expand Down Expand Up @@ -65305,7 +65305,7 @@
pixel_x = 3;
pixel_y = 2
},
/obj/item/stamp/cmo,
/obj/item/stamp/head/cmo,
/turf/open/floor/iron/dark/side,
/area/station/command/heads_quarters/cmo)
"vPG" = (
Expand Down Expand Up @@ -65554,7 +65554,7 @@
/obj/item/pen{
pixel_y = 7
},
/obj/item/stamp/rd{
/obj/item/stamp/head/rd{
pixel_y = 10
},
/turf/open/floor/carpet/purple,
Expand Down
14 changes: 7 additions & 7 deletions _maps/map_files/Deltastation/DeltaStation2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -30978,7 +30978,7 @@
/obj/item/pen/red{
pixel_x = 1
},
/obj/item/stamp/hos{
/obj/item/stamp/head/hos{
pixel_x = 1;
pixel_y = -1
},
Expand Down Expand Up @@ -36025,7 +36025,7 @@
"iBB" = (
/obj/structure/table/reinforced,
/obj/item/folder/white,
/obj/item/stamp/rd,
/obj/item/stamp/head/rd,
/turf/open/floor/iron/white,
/area/station/command/heads_quarters/rd)
"iBO" = (
Expand Down Expand Up @@ -48340,7 +48340,7 @@
pixel_x = 3;
pixel_y = 3
},
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/turf/open/floor/iron,
/area/station/command/heads_quarters/ce)
"lwN" = (
Expand Down Expand Up @@ -51058,7 +51058,7 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/structure/table,
/obj/item/folder/yellow,
/obj/item/stamp/qm,
/obj/item/stamp/head/qm,
/obj/effect/turf_decal/tile/neutral/fourcorners,
/turf/open/floor/iron,
/area/station/cargo/quartermaster)
Expand Down Expand Up @@ -57359,7 +57359,7 @@
/obj/structure/table/glass,
/obj/effect/turf_decal/tile/blue/opposingcorners,
/obj/item/paper_bin,
/obj/item/stamp/cmo,
/obj/item/stamp/head/cmo,
/obj/structure/cable,
/obj/structure/disposalpipe/segment{
dir = 4
Expand Down Expand Up @@ -67253,7 +67253,7 @@
/obj/structure/table/wood,
/obj/item/folder/blue,
/obj/item/pen/fourcolor,
/obj/item/stamp/captain,
/obj/item/stamp/head/captain,
/obj/machinery/door/window/brigdoor/left/directional/north{
name = "Captain's Desk";
req_access = list("captain")
Expand Down Expand Up @@ -84088,7 +84088,7 @@
"ucZ" = (
/obj/structure/table/wood,
/obj/item/paper_bin/carbon,
/obj/item/stamp/hop,
/obj/item/stamp/head/hop,
/obj/machinery/requests_console/directional/north{
anon_tips_receiver = 1;
assistance_requestable = 1;
Expand Down
14 changes: 7 additions & 7 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -10248,7 +10248,7 @@
/obj/structure/table,
/obj/item/folder/white,
/obj/item/pen,
/obj/item/stamp/rd{
/obj/item/stamp/head/rd{
pixel_x = 3;
pixel_y = -2
},
Expand Down Expand Up @@ -19463,7 +19463,7 @@
/obj/machinery/light/directional/east,
/obj/structure/table/glass,
/obj/item/folder/white,
/obj/item/stamp/cmo,
/obj/item/stamp/head/cmo,
/obj/item/clothing/neck/stethoscope,
/obj/effect/turf_decal/tile/blue/fourcorners,
/turf/open/floor/iron/dark,
Expand Down Expand Up @@ -42233,7 +42233,7 @@
pixel_x = 8;
pixel_y = 3
},
/obj/item/stamp/hos{
/obj/item/stamp/head/hos{
pixel_x = 10;
pixel_y = 6
},
Expand Down Expand Up @@ -43718,7 +43718,7 @@
/area/station/maintenance/port/fore)
"nWk" = (
/obj/structure/table,
/obj/item/stamp/qm,
/obj/item/stamp/head/qm,
/turf/open/floor/carpet,
/area/station/cargo/quartermaster)
"nWr" = (
Expand Down Expand Up @@ -67203,7 +67203,7 @@
pixel_y = 7
},
/obj/item/pen,
/obj/item/stamp/hop,
/obj/item/stamp/head/hop,
/turf/open/floor/iron,
/area/station/command/heads_quarters/hop)
"vEE" = (
Expand Down Expand Up @@ -69276,7 +69276,7 @@
/obj/item/clipboard,
/obj/item/folder/yellow,
/obj/item/paper/monitorkey,
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/turf/open/floor/iron,
/area/station/command/heads_quarters/ce)
"woF" = (
Expand Down Expand Up @@ -75456,7 +75456,7 @@
"ykW" = (
/obj/structure/table/wood,
/obj/item/folder/blue,
/obj/item/stamp/captain,
/obj/item/stamp/head/captain,
/turf/open/floor/wood,
/area/station/command/heads_quarters/captain)
"ykZ" = (
Expand Down
12 changes: 6 additions & 6 deletions _maps/map_files/KiloStation/KiloStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8221,7 +8221,7 @@
pixel_y = 6
},
/obj/item/pen/fourcolor,
/obj/item/stamp/hop{
/obj/item/stamp/head/hop{
pixel_x = 8;
pixel_y = 6
},
Expand Down Expand Up @@ -15301,7 +15301,7 @@
pixel_x = 8;
pixel_y = 6
},
/obj/item/stamp/qm{
/obj/item/stamp/head/qm{
pixel_x = 8;
pixel_y = 10
},
Expand Down Expand Up @@ -31222,7 +31222,7 @@
},
/obj/item/lighter,
/obj/item/clothing/mask/cigarette/cigar/cohiba,
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/obj/effect/turf_decal/tile/neutral/half/contrasted,
/turf/open/floor/iron/dark,
/area/station/command/heads_quarters/ce)
Expand Down Expand Up @@ -49081,7 +49081,7 @@
pixel_y = 7
},
/obj/item/pen,
/obj/item/stamp/captain{
/obj/item/stamp/head/captain{
pixel_x = 8;
pixel_y = 6
},
Expand Down Expand Up @@ -66425,7 +66425,7 @@
pixel_x = 8;
pixel_y = 8
},
/obj/item/stamp/rd{
/obj/item/stamp/head/rd{
pixel_x = 8
},
/obj/machinery/power/apc/auto_name/directional/north,
Expand Down Expand Up @@ -72070,7 +72070,7 @@
"wTK" = (
/obj/structure/cable,
/obj/structure/table/wood,
/obj/item/stamp/hos,
/obj/item/stamp/head/hos,
/obj/item/stamp/denied{
pixel_x = 4;
pixel_y = 4
Expand Down
14 changes: 7 additions & 7 deletions _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3554,7 +3554,7 @@
"bkT" = (
/obj/structure/chair/office/light,
/obj/structure/cable,
/obj/item/stamp/cmo,
/obj/item/stamp/head/cmo,
/turf/open/floor/iron/white,
/area/station/command/heads_quarters/cmo)
"bla" = (
Expand Down Expand Up @@ -28994,7 +28994,7 @@
pixel_x = 7;
pixel_y = 4
},
/obj/item/stamp/qm{
/obj/item/stamp/head/qm{
pixel_x = 7;
pixel_y = -2
},
Expand Down Expand Up @@ -31399,7 +31399,7 @@
pixel_x = -2;
pixel_y = 4
},
/obj/item/stamp/hop{
/obj/item/stamp/head/hop{
pixel_x = -4;
pixel_y = 4
},
Expand Down Expand Up @@ -35922,7 +35922,7 @@
"mOa" = (
/obj/structure/table,
/obj/item/folder/white,
/obj/item/stamp/rd,
/obj/item/stamp/head/rd,
/obj/item/toy/figure/rd{
pixel_y = 10
},
Expand Down Expand Up @@ -37036,7 +37036,7 @@
/obj/item/radio/intercom/directional/east,
/obj/item/folder/blue,
/obj/item/hand_tele,
/obj/item/stamp/captain,
/obj/item/stamp/head/captain,
/turf/open/floor/wood,
/area/station/command/heads_quarters/captain/private)
"niG" = (
Expand Down Expand Up @@ -57179,7 +57179,7 @@
pixel_x = -7;
pixel_y = 6
},
/obj/item/stamp/hos,
/obj/item/stamp/head/hos,
/turf/open/floor/wood,
/area/station/command/heads_quarters/hos)
"uiB" = (
Expand Down Expand Up @@ -67639,7 +67639,7 @@
"xSA" = (
/obj/structure/table/reinforced,
/obj/item/folder/yellow,
/obj/item/stamp/ce,
/obj/item/stamp/head/ce,
/obj/item/reagent_containers/pill/patch/aiuri,
/obj/effect/turf_decal/tile/neutral/half/contrasted,
/turf/open/floor/iron,
Expand Down
Loading

0 comments on commit 6211c74

Please sign in to comment.