]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make GameRule use entity category (#28294)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Mon, 3 Jun 2024 12:39:25 +0000 (12:39 +0000)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 12:39:25 +0000 (08:39 -0400)
Content.Server/GameTicking/Components/GameRuleComponent.cs
Resources/Locale/en-US/entity-categories.ftl
Resources/Prototypes/Entities/categories.yml
Resources/Prototypes/GameRules/cargo_gifts.yml
Resources/Prototypes/GameRules/events.yml
Resources/Prototypes/GameRules/midround.yml
Resources/Prototypes/GameRules/roundstart.yml
Resources/Prototypes/GameRules/variation.yml

index 1e6c3f0ab1df8c70ae0c01e2b7873642049ab5e7..635452b3f3c343483d5450ea903b8dc60ea91cfb 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Destructible.Thresholds;
+using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
 
 namespace Content.Server.GameTicking.Components;
@@ -7,7 +8,7 @@ namespace Content.Server.GameTicking.Components;
 /// Component attached to all gamerule entities.
 /// Used to both track the entity as well as store basic data
 /// </summary>
-[RegisterComponent]
+[RegisterComponent, EntityCategory("GameRules")]
 public sealed partial class GameRuleComponent : Component
 {
     /// <summary>
index 190fe5713ac455ff8d1f15a5154514ee9eb83173..457397845dad6692142538f718a9b3b2a7810034 100644 (file)
@@ -1 +1,2 @@
 entity-category-name-actions = Actions
+entity-category-name-game-rules = Game Rules
index 2fb56818f9442c8e5ebce472b4db207d1cf3c364..0535a8a4c27a411534689dae01171e7f566dd54f 100644 (file)
@@ -2,3 +2,8 @@
   id: Actions
   name: entity-category-name-actions
   hideSpawnMenu: true
+
+- type: entityCategory
+  id: GameRules
+  name: entity-category-name-game-rules
+  hideSpawnMenu: true
index c5a525129707211dfbf9579ff74ff2ea3b7685d4..ffc2ed404b703e4f3800603f1e10bb57af515b2a 100644 (file)
@@ -17,7 +17,6 @@
 - type: entity
   id: GiftsPizzaPartySmall
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 5
@@ -35,7 +34,6 @@
 - type: entity
   id: GiftsPizzaPartyLarge
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 2
@@ -53,7 +51,6 @@
 - type: entity
   id: GiftsEngineering
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 5
@@ -74,7 +71,6 @@
 - type: entity
   id: GiftsVendingRestock
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 4
@@ -95,7 +91,6 @@
 - type: entity
   id: GiftsJanitor
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 6
 - type: entity
   id: GiftsMedical
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 8
 - type: entity
   id: GiftsSpacingSupplies
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 4
 - type: entity
   id: GiftsFireProtection
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 4
 - type: entity
   id: GiftsSecurityGuns
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 3
 - type: entity
   id: GiftsSecurityRiot
   parent: CargoGiftsBase
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 4
index 9f6e6a812574585b5731a0a4bf5f736352c8debb..f421cf68183c58c55328c6eee53204810ea65300 100644 (file)
@@ -2,7 +2,6 @@
   id: BaseStationEvent
   parent: BaseGameRule
   abstract: true
-  noSpawn: true
   components:
     - type: GameRule
       delay:
@@ -13,7 +12,6 @@
   id: BaseStationEventShortDelay
   parent: BaseGameRule
   abstract: true
-  noSpawn: true
   components:
     - type: GameRule
       delay:
@@ -24,7 +22,6 @@
   id: BaseStationEventLongDelay
   parent: BaseGameRule
   abstract: true
-  noSpawn: true
   components:
     - type: GameRule
       delay:
@@ -34,7 +31,6 @@
 - type: entity
   id: AnomalySpawn
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncementColor: "#18abf5"
@@ -47,7 +43,6 @@
 - type: entity
   id: BluespaceArtifact
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: GameRule
     delay:
@@ -64,7 +59,6 @@
 - type: entity
   id: BluespaceLocker
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 2
@@ -76,7 +70,6 @@
 - type: entity
   id: BreakerFlip
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 7
@@ -87,7 +80,6 @@
 - type: entity
   id: BureaucraticError
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-bureaucratic-error-announcement
@@ -99,7 +91,6 @@
 - type: entity
   id: ClericalError
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-clerical-error-announcement
 - type: entity
   parent: BaseGameRule
   id: ClosetSkeleton
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 5
 - type: entity
   parent: BaseGameRule
   id: DragonSpawn
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 6.5
 - type: entity
   parent: BaseGameRule
   id: NinjaSpawn
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 6
 - type: entity
   parent: BaseGameRule
   id: RevenantSpawn
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 7.5
 #- type: entity
 #  id: FalseAlarm
 #  parent: BaseGameRule
-#  noSpawn: true
 #  components:
 #  - type: StationEvent
 #    weight: 15
 - type: entity
   id: GasLeak
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-gas-leak-start-announcement
 - type: entity
   id: KudzuGrowth
   parent: BaseStationEventLongDelay
-  noSpawn: true
   components:
   - type: StationEvent
     earliestStart: 15
 - type: entity
   id: MeteorSwarm
   parent: BaseStationEventLongDelay
-  noSpawn: true
   components:
   - type: StationEvent
     earliestStart: 30
 - type: entity
   id: MouseMigration
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-creatures-start-announcement
 - type: entity
   id: CockroachMigration
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-creatures-start-announcement
 - type: entity
   id: PowerGridCheck
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 5
 - type: entity
   id: RandomSentience
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 6
 - type: entity
   parent: BaseGameRule
   id: SolarFlare
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 8
 - type: entity
   id: VentClog
   parent: BaseStationEventLongDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-clog-start-announcement
 - type: entity
   id: SlimesSpawn
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-creatures-start-announcement
 - type: entity
   id: SpiderSpawn
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-creatures-start-announcement
 - type: entity
   id: SpiderClownSpawn
   parent: BaseStationEventShortDelay
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-vent-creatures-start-announcement
 - type: entity
   id: ZombieOutbreak
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     earliestStart: 50
         prototype: InitialInfected
 
 - type: entity
-  noSpawn: true
   parent: BaseNukeopsRule
   id: LoneOpsSpawn
   components:
         prototype: Nukeops
 
 - type: entity
-  noSpawn: true
   parent: BaseTraitorRule
   id: SleeperAgentsRule
   components:
 - type: entity
   id: MassHallucinations
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     weight: 7
 - type: entity
   id: ImmovableRodSpawn
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: StationEvent
     startAnnouncement: station-event-immovable-rod-start-announcement
       orGroup: rodProto
 
 - type: entity
-  noSpawn: true
   parent: BaseGameRule
   id: IonStorm
   components:
 - type: entity
   id: MimicVendorRule
   parent: BaseGameRule
-  noSpawn: true
   components:
     - type: StationEvent
       earliestStart: 0
index fe5af117e68b08fd2b571df6b05dfdc925db38e0..c190b0333ad69db514fe67d3c47d7333aab26d82 100644 (file)
@@ -18,7 +18,6 @@
     threats: NinjaThreats
 
 - type: entity
-  noSpawn: true
   parent: BaseGameRule
   id: Thief
   components:
index cf2c5b2f475a9c7208c38db37463f9a2653c2590..3493749457d52e8f1b4dfa3f3259c50b4ebfe39e 100644 (file)
@@ -1,12 +1,10 @@
 - type: entity
   id: BaseGameRule
   abstract: true
-  noSpawn: true
   components:
   - type: GameRule
 
 - type: entity
-  noSpawn: true
   parent: BaseGameRule
   id: RespawnDeadRule
   components:
@@ -17,7 +15,6 @@
     deleteBody: false
 
 - type: entity
-  noSpawn: true
   parent: BaseGameRule
   id: SubGamemodesRule
   components:
@@ -29,7 +26,6 @@
 - type: entity
   id: DeathMatch31
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: DeathMatchRule
     rewardSpawns:
@@ -59,7 +55,6 @@
 - type: entity
   id: InactivityTimeRestart
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: InactivityRule
     inactivityMaxTime: 600
@@ -68,7 +63,6 @@
 - type: entity
   id: MaxTimeRestart
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: MaxTimeRestartRule
     roundMaxTime: 300
@@ -88,7 +82,6 @@
   - type: AntagLoadProfileRule
 
 - type: entity
-  noSpawn: true
   parent: BaseNukeopsRule
   id: Nukeops
   components:
     agentName: traitor-round-end-agent-name
 
 - type: entity
-  noSpawn: true
   parent: BaseTraitorRule
   id: Traitor
   components:
 - type: entity
   id: Revolutionary
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: GameRule
     minPlayers: 15
 - type: entity
   id: Sandbox
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: SandboxRule
 
 - type: entity
   id: Secret
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: SecretRule
 
 - type: entity
   id: Zombie
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: GameRule
     minPlayers: 20
 - type: entity
   id: BasicStationEventScheduler
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: BasicStationEventScheduler
 
 - type: entity
   id: RampingStationEventScheduler
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: RampingStationEventScheduler
 
 - type: entity
   id: BasicRoundstartVariation
   parent: BaseGameRule
-  noSpawn: true
   components:
   - type: RoundstartStationVariationRule
     rules:
index 2884d5f9d6fa0146638f1f1b393fbd8c1df1a1c6..093a832d72f81688f8337aeb7388862902895e61 100644 (file)
@@ -4,7 +4,6 @@
   id: BaseVariationPass
   parent: BaseGameRule
   abstract: true
-  noSpawn: true
   components:
   - type: StationVariationPassRule
 
 - type: entity
   id: BasicPoweredLightVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: PoweredLightVariationPass
 
 - type: entity
   id: SolidWallRustingVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: WallReplaceVariationPass
   - type: EntityReplaceVariationPass
@@ -32,7 +29,6 @@
 - type: entity
   id: ReinforcedWallRustingVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: ReinforcedWallReplaceVariationPass
   - type: EntityReplaceVariationPass
@@ -44,7 +40,6 @@
 - type: entity
   id: BasicTrashVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: EntitySpawnVariationPass
     tilesPerEntityAverage: 35
 - type: entity
   id: BasicPuddleMessVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: PuddleMessVariationPass
     randomPuddleSolutionFill: RandomFillTrashPuddle
 - type: entity
   id: BloodbathPuddleMessVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: PuddleMessVariationPass
     tilesPerSpillAverage: 150
 - type: entity
   id: CutWireVariationPass
   parent: BaseVariationPass
-  noSpawn: true
   components:
   - type: CutWireVariationPass
     wireCutChance: 0.01