mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
[MDB Ignore] Adds a unit test for typepaths that are required to be mapped onto each station map (#74985)
## About The Pull Request 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. #### QA: Why not make this a linter? 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 #50468 #61013 #74967 Why is it always the CMO stamp? ## Changelog Not necessary (unless I find a map missing something, then this will be updated)
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
//HEAD OF STAFF DOCUMENTS
|
||||
|
||||
/obj/item/paperwork/cargo
|
||||
stamp_requested = /obj/item/stamp/qm
|
||||
stamp_requested = /obj/item/stamp/head/qm
|
||||
stamp_job = /datum/job/quartermaster
|
||||
stamp_icon = "paper_stamp-qm"
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
detailed_desc += span_info(" Despite how disorganized the documents are, they're all appropriately filled in. You should probably stamp this.")
|
||||
|
||||
/obj/item/paperwork/security
|
||||
stamp_requested = /obj/item/stamp/hos
|
||||
stamp_requested = /obj/item/stamp/head/hos
|
||||
stamp_job = /datum/job/head_of_security
|
||||
stamp_icon = "paper_stamp-hos"
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
detailed_desc += span_info(" What a bunch of crap, the security team were clearly just doing what they had to. You should probably stamp this.")
|
||||
|
||||
/obj/item/paperwork/service
|
||||
stamp_requested = /obj/item/stamp/hop
|
||||
stamp_requested = /obj/item/stamp/head/hop
|
||||
stamp_job = /datum/job/head_of_personnel
|
||||
stamp_icon = "paper_stamp-hop"
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
detailed_desc += span_info(" A MAXIMUM priority request like this is nothing to balk at. You should probably stamp this.")
|
||||
|
||||
/obj/item/paperwork/medical
|
||||
stamp_requested = /obj/item/stamp/cmo
|
||||
stamp_requested = /obj/item/stamp/head/cmo
|
||||
stamp_job = /datum/job/chief_medical_officer
|
||||
stamp_icon = "paper_stamp-cmo"
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
|
||||
/obj/item/paperwork/engineering
|
||||
stamp_requested = /obj/item/stamp/ce
|
||||
stamp_requested = /obj/item/stamp/head/ce
|
||||
stamp_job = /datum/job/chief_engineer
|
||||
stamp_icon = "paper_stamp-ce"
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
detailed_desc += span_info(" Damn, that's impressive stuff. You should probably stamp this.")
|
||||
|
||||
/obj/item/paperwork/research
|
||||
stamp_requested = /obj/item/stamp/rd
|
||||
stamp_requested = /obj/item/stamp/head/rd
|
||||
stamp_job = /datum/job/research_director
|
||||
stamp_icon = "paper_stamp-rd"
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
detailed_desc += span_info(" Regardless, they're still perfectly usable test results. You should probably stamp this.")
|
||||
|
||||
/obj/item/paperwork/captain
|
||||
stamp_requested = /obj/item/stamp/captain
|
||||
stamp_requested = /obj/item/stamp/head/captain
|
||||
stamp_job = /datum/job/captain
|
||||
stamp_icon = "paper_stamp-cap"
|
||||
|
||||
|
||||
@@ -26,46 +26,53 @@
|
||||
stamp_class = sheet.icon_class_name(icon_state)
|
||||
)
|
||||
|
||||
/obj/item/stamp/qm
|
||||
name = "quartermaster's rubber stamp"
|
||||
icon_state = "stamp-qm"
|
||||
dye_color = DYE_QM
|
||||
|
||||
/obj/item/stamp/law
|
||||
name = "law office's rubber stamp"
|
||||
icon_state = "stamp-law"
|
||||
dye_color = DYE_LAW
|
||||
|
||||
/obj/item/stamp/captain
|
||||
/obj/item/stamp/head
|
||||
|
||||
/obj/item/stamp/head/Initialize(mapload)
|
||||
. = ..()
|
||||
// All maps should have at least 1 of each head of staff stamp
|
||||
REGISTER_REQUIRED_MAP_ITEM(1, INFINITY)
|
||||
|
||||
/obj/item/stamp/head/captain
|
||||
name = "captain's rubber stamp"
|
||||
icon_state = "stamp-cap"
|
||||
dye_color = DYE_CAPTAIN
|
||||
|
||||
/obj/item/stamp/hop
|
||||
/obj/item/stamp/head/hop
|
||||
name = "head of personnel's rubber stamp"
|
||||
icon_state = "stamp-hop"
|
||||
dye_color = DYE_HOP
|
||||
|
||||
/obj/item/stamp/hos
|
||||
/obj/item/stamp/head/hos
|
||||
name = "head of security's rubber stamp"
|
||||
icon_state = "stamp-hos"
|
||||
dye_color = DYE_HOS
|
||||
|
||||
/obj/item/stamp/ce
|
||||
/obj/item/stamp/head/ce
|
||||
name = "chief engineer's rubber stamp"
|
||||
icon_state = "stamp-ce"
|
||||
dye_color = DYE_CE
|
||||
|
||||
/obj/item/stamp/rd
|
||||
/obj/item/stamp/head/rd
|
||||
name = "research director's rubber stamp"
|
||||
icon_state = "stamp-rd"
|
||||
dye_color = DYE_RD
|
||||
|
||||
/obj/item/stamp/cmo
|
||||
/obj/item/stamp/head/cmo
|
||||
name = "chief medical officer's rubber stamp"
|
||||
icon_state = "stamp-cmo"
|
||||
dye_color = DYE_CMO
|
||||
|
||||
/obj/item/stamp/head/qm
|
||||
name = "quartermaster's rubber stamp"
|
||||
icon_state = "stamp-qm"
|
||||
dye_color = DYE_QM
|
||||
|
||||
/obj/item/stamp/denied
|
||||
name = "\improper DENIED rubber stamp"
|
||||
icon_state = "stamp-deny"
|
||||
|
||||
Reference in New Issue
Block a user