]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
convert it to entity category
authorKillerqu00 <killerqueen1777@gmail.com>
Wed, 29 Jan 2025 11:22:38 +0000 (12:22 +0100)
committerKillerqu00 <killerqueen1777@gmail.com>
Wed, 29 Jan 2025 11:22:38 +0000 (12:22 +0100)
24 files changed:
Content.IntegrationTests/Tests/PostMapInitTest.cs
Resources/Locale/en-US/entity-categories.ftl
Resources/Prototypes/Catalog/Fills/Lockers/service.yml
Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml
Resources/Prototypes/Entities/Clothing/Head/helmets.yml
Resources/Prototypes/Entities/Clothing/Head/misc.yml
Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml
Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/cannons.yml
Resources/Prototypes/Entities/Objects/Fun/bike_horn.yml
Resources/Prototypes/Entities/Objects/Fun/toys.yml
Resources/Prototypes/Entities/Objects/Misc/paper.yml
Resources/Prototypes/Entities/Objects/Misc/rubber_stamp.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/handheld_crew_monitor.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml
Resources/Prototypes/Entities/Objects/Specific/Research/disk.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/baseball_bat.yml
Resources/Prototypes/Entities/Objects/Weapons/Melee/weapon_toolbox.yml
Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
Resources/Prototypes/Entities/Structures/Machines/holopad.yml
Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml
Resources/Prototypes/Entities/Structures/Storage/Closets/closets.yml
Resources/Prototypes/Entities/categories.yml

index d1420bc4922771f593f36e5679f889e7aa129af1..906b96ebf02b3bb45bce046a87d735d6f1e30877 100644 (file)
@@ -161,15 +161,17 @@ namespace Content.IntegrationTests.Tests
                 // testing that maps have nothing with the "DO NOT MAP" suffix
                 // I do it here because it's basically copy-paste code for the most part
                 var yamlEntities = root["entities"];
+                if (!protoManager.TryIndex<EntityCategoryPrototype>("DoNotMap", out var dnmCategory))
+                    return;
                 foreach (var yamlEntity in (YamlSequenceNode)yamlEntities)
                 {
                     var protoId = yamlEntity["proto"].AsString();
                     protoManager.TryIndex(protoId, out var proto, false);
                     if (proto is null || proto.EditorSuffix is null)
                         continue;
-                    if (proto.EditorSuffix.ToUpper().Contains("DO NOT MAP") && !DoNotMapWhitelist.Contains(map.ToString()))
+                    if (proto.Categories.Contains(dnmCategory) && !DoNotMapWhitelist.Contains(map.ToString()))
                     {
-                        Assert.Fail($"\nMap {map} has the DO NOT MAP prototype {proto}");
+                        Assert.Fail($"\nMap {map} has the DO NOT MAP prototype {proto.Name}");
                     }
                 }
             }
index 4b6cf87942f930f1089457d1d3ce2e4dad262b15..a5ed66dd0118624c0685f3db9b27c4ad5a183248 100644 (file)
@@ -3,3 +3,6 @@ entity-category-name-game-rules = Game Rules
 entity-category-name-objectives = Objectives
 entity-category-name-roles = Mind Roles
 entity-category-name-mapping = Mapping
+entity-category-name-donotmap = Do not map
+
+entity-category-suffix-donotmap = DO NOT MAP
index 2d564e0eb0d284043aacf2918e90ee262e3b0fbb..55b2165dff7f09c0c5829be112391a7e89713786 100644 (file)
   id: ClosetJanitorBombFilled
   parent: ClosetJanitorBomb
   suffix: DO NOT MAP, Filled
+  categories: [ DoNotMap ]
   components:
   - type: StorageFill
     contents:
index b97df840a748ad3c6ad5f34e6d54d073220a280b..0c2ffa423daae159772cf4855a82f4838ba7a461 100644 (file)
   id: ClothingHeadHelmetHardsuitLuxury #DO NOT MAP - https://github.com/space-wizards/space-station-14/pull/19738#issuecomment-1703486738
   name: luxury mining hardsuit helmet
   description: A refurbished mining hardsuit helmet, fitted with satin cushioning and an extra (non-functioning) antenna, because you're that extra.
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Clothing/Head/Hardsuits/luxury.rsi
index 65ad2d523e84aee250bd40042bbeac61c92ef513..5fc6dd5a5636b484528464ee60e8febaa62d6906 100644 (file)
   id: ClothingHeadHelmetJanitorBombSuit
   name: janitorial bombsuit helmet
   description: A heavy helmet designed to withstand explosions formed from reactions between chemicals.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Clothing/Head/Helmets/janitor_bombsuit.rsi
index 254eaf37c80f5c8a172eeea03eb493cf429ae2ec..28fe46e0fa0daf9a0ff1c9ec292610986b3f065f 100644 (file)
   id: ClothingHeadHatCatEars
   name: cat ears
   description: "NYAH!"
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Tag
     tags: [] # ignore "WhitelistChameleon" tag
   parent: [ClothingHeadHatCatEars, BaseToggleClothing]
   id: ClothingHeadHatCatEarsValid
   suffix: Valid, DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: ToggleClothing
     action: ActionBecomeValid
   id: ClothingHeadHatDogEars
   name: doggy ears
   description: Only for good boys.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Clothing/Head/Hats/dogears.rsi
index 0e84fca06d3bfd3b49eda5a13f34bb5b8bb8934a..dd51be6be96ce8152e98cdee6205637061d08bb2 100644 (file)
   id: ClothingOuterHardsuitLuxury #DO NOT MAP - https://github.com/space-wizards/space-station-14/pull/19738#issuecomment-1703486738
   name: luxury mining hardsuit
   description: A refurbished mining hardsuit, fashioned after the Quartermaster's colors. Graphene lining provides less protection, but is much easier to move.
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Clothing/OuterClothing/Hardsuits/luxury.rsi
index f78694a0fabe94281f824176228cf6e7961c891a..e6550dc01be5812dd4ce3ab1dd4b85e2ad209f8c 100644 (file)
@@ -33,7 +33,7 @@
   id: ClothingOuterSuitJanitorBomb
   name: janitorial bomb suit
   description: A heavy helmet designed to withstand explosions formed from reactions between chemicals.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Clothing/OuterClothing/Suits/janitor_bombsuit.rsi
   parent: ClothingOuterSuitCarp
   id: ClothingOuterHardsuitCarp
   suffix: Hardsuit, DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: PressureProtection
     highPressureMultiplier: 0.6
index 9bb793e47ad16a24857c9b041daffd2e3e5a0df5..5a32e57c429be774479fd73ad915371867f76164 100644 (file)
 - type: entity
   id: StationAiBrain
   parent: PositronicBrain
-  categories: [ HideSpawnMenu ]
-  suffix: DO NOT MAP
+  categories: [ HideSpawnMenu, DoNotMap ]
   components:
   - type: Sprite
     # Once it's in a core it's pretty much an abstract entity at that point.
   id: StationAiHolo
   name: AI eye
   description: The AI's viewer.
-  categories: [ HideSpawnMenu ]
-  suffix: DO NOT MAP
+  categories: [ HideSpawnMenu, DoNotMap ]
   components:
   - type: NoFTL
   - type: WarpPoint
   id: StationAiHoloLocal
   name: AI hologram
   description: A holographic representation of an AI.
-  categories: [ HideSpawnMenu ]
-  suffix: DO NOT MAP
+  categories: [ HideSpawnMenu, DoNotMap ]
   components:
   - type: Transform
     anchored: true
index 4b7a0ee55a35eeb62689e7819cf7b99f4f3e2cd2..6c6190c01a58409b577a3ce781b9b4383d0827d0 100644 (file)
@@ -6,6 +6,7 @@
   name: LSE-400c "Svalinn machine gun" machine board
   description: A machine printed circuit board for an LSE-400c "Svalinn machine gun".
   suffix: DO NOT MAP, Machine Board
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     state: security
@@ -23,6 +24,7 @@
   name: LSE-1200c "Perforator" machine board
   description: A machine printed circuit board for an LSE-1200c "Perforator".
   suffix: DO NOT MAP, Machine Board
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     state: security
@@ -40,6 +42,7 @@
   name: EXP-320g "Friendship" machine board
   description: A machine printed circuit board for an EXP-320g "Friendship".
   suffix: DO NOT MAP, Machine Board
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     state: security
@@ -57,6 +60,7 @@
   name: EXP-2100g "Duster" machine board
   description: A machine printed circuit board for an EXP-2100g "Duster".
   suffix: DO NOT MAP, Machine Board
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     state: security
@@ -75,6 +79,7 @@
   name: PTK-800 "Matter Dematerializer" machine board
   description: A machine printed circuit board for an PTK-800 "Matter Dematerializer".
   suffix: DO NOT MAP, Machine Board
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     state: security
index 7c69aa09013784015d3b1db51d3df37725a3e872..3e05c0e8ff95e5aec1742cfeb57f34b0918e76ce 100644 (file)
@@ -91,7 +91,7 @@
   parent: BikeHorn
   id: GoldenBikeHorn
   name: golden honker
-  suffix: No mapping
+  categories: [ DoNotMap ]
   description: A happy honk prize, pray to the gods for your reward.
   components:
   - type: Sprite
index c5e17c54d35503a39df9a7c099f1b72f968a5289..818cad777428e0a89a2998302645b89c1fa04aa5 100644 (file)
   parent: PlushieGhost
   id: PlushieGhostRevenant
   name: revenant soft toy
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   description: So soft it almost makes you want to take a nap...
   components:
     - type: Item
index e0862b884252d52ab2d6eb6952ea6253386b68e9..a1b287b8a72ccb7439b769e921b4c494006d615b 100644 (file)
   id: BoxFolderCentCom
   name: CentComm folder
   parent: BoxFolderBase
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   description: CentComm's miserable little pile of secrets!
   components:
   - type: Sprite
   id: TraitorCodePaper
   name: syndicate codeword
   description: A leaked codeword to possibly get in touch with the Syndicate.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: TraitorCodePaper
 
index 8707e6fca8998daf3b73fb3f734d0acab443cd2b..df038d3e2e41abe6c3facc86cf751db1d3093c07 100644 (file)
@@ -41,7 +41,7 @@
   name: captain's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampCaptain
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-captain
@@ -54,7 +54,7 @@
   name: CentComm rubber stamp
   parent: RubberStampBase
   id: RubberStampCentcom
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-centcom
@@ -67,7 +67,7 @@
   name: chaplain's rubber stamp
   parent: RubberStampBase
   id: RubberStampChaplain
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-chaplain
@@ -80,7 +80,7 @@
   name: lawyer's rubber stamp
   parent: RubberStampBase
   id: RubberStampLawyer
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-lawyer
@@ -93,7 +93,7 @@
   name: clown's rubber stamp
   parent: RubberStampBase
   id: RubberStampClown
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-clown
   name: chief engineer's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampCE
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-ce
   name: chief medical officer's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampCMO
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-cmo
   name: head of personnel's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampHop
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-hop
   name: head of security's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampHos
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-hos
   name: mime's rubber stamp
   parent: RubberStampBase
   id: RubberStampMime
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-mime
   name: quartermaster's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampQm
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-qm
   name: research director's rubber stamp
   parent: [RubberStampBase, BaseCommandContraband]
   id: RubberStampRd
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-rd
   name: syndicate rubber stamp
   parent: [RubberStampBase, BaseSyndicateContraband]
   id: RubberStampSyndicate
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-syndicate
   name: warden's rubber stamp
   parent: [RubberStampBase, BaseRestrictedContraband]
   id: RubberStampWarden
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-warden
   name: detective's rubber stamp
   parent: [RubberStampBase, BaseRestrictedContraband]
   id: RubberStampDetective
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Stamp
     stampedName: stamp-component-stamped-name-detective
   name: psychologist's rubber stamp
   parent: RubberStampBase
   id: RubberStampPsychologist
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   description: A rubber stamp for stamping important documents. Prescribe those treatments!
   components:
   - type: Stamp
-    stampedName: stamp-component-stamped-name-psychologist 
+    stampedName: stamp-component-stamped-name-psychologist
     stampedColor: "#5B97BC"
     stampState: "paper_stamp-psychologist"
   - type: Sprite
-    state: stamp-psychologist
\ No newline at end of file
+    state: stamp-psychologist
index d7a362d725398780b02e735b0844ad82de96a522..fc252fd9f5d7cba893433bd1d80765ef859b546c 100644 (file)
@@ -1,6 +1,6 @@
 - type: entity
   name: handheld crew monitor
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   parent: [ BaseHandheldComputer, BaseGrandTheftContraband ]
   # CMO-only bud, don't add more.
   id: HandheldCrewMonitor
index 46410a01643eaa6d4f6729cc84deb6e5b29986d0..a69d2a15872151eec801898e303b39a9aa244fbd 100644 (file)
   id: HealingToolbox
   name: healing toolbox
   description: A powerful toolbox imbued with robust energy. It can heal your wounds and fill you with murderous intent.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Specific/Medical/healing_toolbox.rsi
index 0cb605cee6461811060614bfbc5ee50796ef1f23..dd556d75f2b209645f4396b6556f5a2695394f88 100644 (file)
@@ -35,6 +35,7 @@
   id: ResearchDiskDebug
   name: research point disk
   suffix: DEBUG, DO NOT MAP
+  categories: [ DoNotMap ]
   description: A disk for the R&D server containing all the points you could ever need.
   components:
   - type: ResearchDisk
index 551fedfd9056aefa335a4a1b3d6d71fbbce1e14d..7aee3e5876b4e9b171f4832c10be2a1b469d996f 100644 (file)
@@ -63,7 +63,7 @@
   parent: BaseBallBat
   id: WeaponMeleeKnockbackStick
   description: And then he spleefed all over.
-  suffix: Do not map
+  categories: [ DoNotMap ]
   components:
   - type: MeleeThrowOnHit
   - type: MeleeWeapon
index 240a17a0a44e55b757b4cf65d114eaa7bad820f1..003967d33d39eec55f02509abab70cb7beb7c6b1 100644 (file)
@@ -3,7 +3,7 @@
   id: WeaponMeleeToolboxRobust
   name: robust toolbox
   description: A tider's weapon.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Tools/Toolboxes/toolbox_red.rsi
index 1180b370967f828947dded85254022d930ca7b64..fd8090a369cbf0099cbdccd83ea926588734661a 100644 (file)
   # Putting this as "DO NOT MAP" until the performance issues are fixed.
   # And it's more fleshed out.
   suffix: TESTING, DO NOT MAP
+  categories: [ DoNotMap ]
   components:
     - type: Sprite
       layers:
index c95609c55abd703432c7b8463619faa92de8c198..de7cfe3e278be3624e194e569f3a9de1cf8887a1 100644 (file)
 - type: entity
   id: HolopadHologram
   name: hologram
-  categories: [ HideSpawnMenu ]
-  suffix: DO NOT MAP
+  categories: [ HideSpawnMenu, DoNotMap ]
   components:
   - type: Transform
     anchored: true
index 47ac2ae7c943a2ed49681d95f0049a366640efce..030be38a910ee50f92610ad76bfc4e971ebae6ba 100644 (file)
@@ -61,7 +61,7 @@
   parent: [ ShuttleGunBase, ConstructibleMachine]
   name: LSE-400c "Svalinn machine gun"
   description: Basic stationary laser unit. Effective against live targets and electronics. Uses regular power cells to fire, and has an extremely high rate of fire.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Weapons/Guns/Shuttles/laser.rsi
   parent: [ ShuttleGunBase, ConstructibleMachine]
   name: LSE-1200c "Perforator"
   description: Advanced stationary laser unit. Annihilates electronics and is extremely dangerous to health! Uses the power cage to fire.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Weapons/Guns/Shuttles/laser.rsi
   parent: [ShuttleGunBase, ConstructibleMachine]
   name: EXP-320g "Friendship"
   description: A small stationary grenade launcher that holds 2 grenades.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Weapons/Guns/Shuttles/launcher.rsi
   parent: [ShuttleGunBase, ConstructibleMachine]
   name: EXP-2100g "Duster"
   description: A powerful stationary grenade launcher. A cartridge is required for use.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Weapons/Guns/Shuttles/launcher.rsi
   parent: [ ShuttleGunBase, ConstructibleMachine]
   name: PTK-800 "Matter Dematerializer"
   description: Salvage stationary mining turret. Gradually accumulates charges on its own, extremely effective for asteroid excavation.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Sprite
     sprite: Objects/Weapons/Guns/Shuttles/kinetic.rsi
index 8c8c493aa3adc4a87e96719915e98c9cc14329d5..778c80e6fb6d46f631aeb5776c87e88d94ce9a8d 100644 (file)
@@ -82,7 +82,7 @@
   name: janitorial bomb suit closet
   parent: ClosetSteelBase
   description: It's a storage unit for janitorial explosion-protective suits.
-  suffix: DO NOT MAP
+  categories: [ DoNotMap ]
   components:
   - type: Appearance
   - type: EntityStorageVisuals
index dffc6b6aaf98b4a70135b813073a52225e055181..5b8e794309d760b0eab5c726d7bfa82e2cf7ab16 100644 (file)
@@ -22,3 +22,8 @@
 - type: entityCategory
   id: Mapping
   name: entity-category-name-mapping
+
+- type: entityCategory
+  id: DoNotMap
+  name: entity-category-name-donotmap
+  suffix: entity-category-suffix-donotmap