Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT] Adds a unit test for typepaths that are required to be mapped onto each station map #2346

Merged
merged 22 commits into from
Jul 1, 2024

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Jun 21, 2024

About The Pull Request

Port of tgstation/tgstation#74985

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 It's Good For The Game

Why is it always the CMO stamp?

Changelog

🆑
fix: TramStation now has the CMO's stamp properly mapped in.
fix: KiloStation now has the CMO's stamp, prefilled cassette rack, and the curator's radio "properly" mapped in.
add: Mapped ATMs and holomaps into Blueshift.
/:cl:

@@ -12,6 +12,9 @@
},
"space_ruin_levels": 0,
"space_empty_levels": 2,
"ignored_unit_tests": [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added northstar to the ignore list bc it's not in rotation and i don't think anyone pays attention to it while PRing lol

this can ofc be removed if we ever actually start using northstar

…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)
@dwasint
Copy link
Collaborator

dwasint commented Jun 22, 2024

this is so fucking blessed

@Absolucy Absolucy changed the title [MDB Ignore] [PORT] Adds a unit test for typepaths that are required to be mapped onto each station map [PORT] Adds a unit test for typepaths that are required to be mapped onto each station map Jun 28, 2024
@dwasint dwasint merged commit 0212e79 into Monkestation:master Jul 1, 2024
20 checks passed
github-actions bot added a commit that referenced this pull request Jul 1, 2024
@Absolucy Absolucy deleted the maptest branch July 1, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants