make GameRule use entity category (#28294)

This commit is contained in:
deltanedas
2024-06-03 12:39:25 +00:00
committed by GitHub
parent 50f8de08a4
commit 977bd5ad6d
8 changed files with 8 additions and 68 deletions

View 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>

View File

@@ -1 +1,2 @@
entity-category-name-actions = Actions
entity-category-name-game-rules = Game Rules

View 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

View 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
@@ -113,7 +108,6 @@
- type: entity
id: GiftsMedical
parent: CargoGiftsBase
noSpawn: true
components:
- type: StationEvent
weight: 8
@@ -133,7 +127,6 @@
- type: entity
id: GiftsSpacingSupplies
parent: CargoGiftsBase
noSpawn: true
components:
- type: StationEvent
weight: 4
@@ -153,7 +146,6 @@
- type: entity
id: GiftsFireProtection
parent: CargoGiftsBase
noSpawn: true
components:
- type: StationEvent
weight: 4
@@ -171,7 +163,6 @@
- type: entity
id: GiftsSecurityGuns
parent: CargoGiftsBase
noSpawn: true
components:
- type: StationEvent
weight: 3
@@ -190,7 +181,6 @@
- type: entity
id: GiftsSecurityRiot
parent: CargoGiftsBase
noSpawn: true
components:
- type: StationEvent
weight: 4

View 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
@@ -111,7 +102,6 @@
- type: entity
parent: BaseGameRule
id: ClosetSkeleton
noSpawn: true
components:
- type: StationEvent
weight: 5
@@ -123,7 +113,6 @@
- type: entity
parent: BaseGameRule
id: DragonSpawn
noSpawn: true
components:
- type: StationEvent
weight: 6.5
@@ -153,7 +142,6 @@
- type: entity
parent: BaseGameRule
id: NinjaSpawn
noSpawn: true
components:
- type: StationEvent
weight: 6
@@ -166,7 +154,6 @@
- type: entity
parent: BaseGameRule
id: RevenantSpawn
noSpawn: true
components:
- type: StationEvent
weight: 7.5
@@ -180,7 +167,6 @@
#- type: entity
# id: FalseAlarm
# parent: BaseGameRule
# noSpawn: true
# components:
# - type: StationEvent
# weight: 15
@@ -190,7 +176,6 @@
- type: entity
id: GasLeak
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-gas-leak-start-announcement
@@ -203,7 +188,6 @@
- type: entity
id: KudzuGrowth
parent: BaseStationEventLongDelay
noSpawn: true
components:
- type: StationEvent
earliestStart: 15
@@ -215,7 +199,6 @@
- type: entity
id: MeteorSwarm
parent: BaseStationEventLongDelay
noSpawn: true
components:
- type: StationEvent
earliestStart: 30
@@ -233,7 +216,6 @@
- type: entity
id: MouseMigration
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-creatures-start-announcement
@@ -259,7 +241,6 @@
- type: entity
id: CockroachMigration
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-creatures-start-announcement
@@ -277,7 +258,6 @@
- type: entity
id: PowerGridCheck
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
weight: 5
@@ -294,7 +274,6 @@
- type: entity
id: RandomSentience
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
weight: 6
@@ -307,7 +286,6 @@
- type: entity
parent: BaseGameRule
id: SolarFlare
noSpawn: true
components:
- type: StationEvent
weight: 8
@@ -336,7 +314,6 @@
- type: entity
id: VentClog
parent: BaseStationEventLongDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-clog-start-announcement
@@ -351,7 +328,6 @@
- type: entity
id: SlimesSpawn
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-creatures-start-announcement
@@ -373,7 +349,6 @@
- type: entity
id: SpiderSpawn
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-creatures-start-announcement
@@ -391,7 +366,6 @@
- type: entity
id: SpiderClownSpawn
parent: BaseStationEventShortDelay
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-vent-creatures-start-announcement
@@ -409,7 +383,6 @@
- type: entity
id: ZombieOutbreak
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
earliestStart: 50
@@ -441,7 +414,6 @@
prototype: InitialInfected
- type: entity
noSpawn: true
parent: BaseNukeopsRule
id: LoneOpsSpawn
components:
@@ -475,7 +447,6 @@
prototype: Nukeops
- type: entity
noSpawn: true
parent: BaseTraitorRule
id: SleeperAgentsRule
components:
@@ -501,7 +472,6 @@
- type: entity
id: MassHallucinations
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
weight: 7
@@ -518,7 +488,6 @@
- type: entity
id: ImmovableRodSpawn
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
startAnnouncement: station-event-immovable-rod-start-announcement
@@ -556,7 +525,6 @@
orGroup: rodProto
- type: entity
noSpawn: true
parent: BaseGameRule
id: IonStorm
components:
@@ -569,7 +537,6 @@
- type: entity
id: MimicVendorRule
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
earliestStart: 0

View File

@@ -18,7 +18,6 @@
threats: NinjaThreats
- type: entity
noSpawn: true
parent: BaseGameRule
id: Thief
components:

View 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:
@@ -166,7 +159,6 @@
agentName: traitor-round-end-agent-name
- type: entity
noSpawn: true
parent: BaseTraitorRule
id: Traitor
components:
@@ -188,7 +180,6 @@
- type: entity
id: Revolutionary
parent: BaseGameRule
noSpawn: true
components:
- type: GameRule
minPlayers: 15
@@ -213,21 +204,18 @@
- 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
@@ -260,14 +248,12 @@
- type: entity
id: BasicStationEventScheduler
parent: BaseGameRule
noSpawn: true
components:
- type: BasicStationEventScheduler
- type: entity
id: RampingStationEventScheduler
parent: BaseGameRule
noSpawn: true
components:
- type: RampingStationEventScheduler
@@ -275,7 +261,6 @@
- type: entity
id: BasicRoundstartVariation
parent: BaseGameRule
noSpawn: true
components:
- type: RoundstartStationVariationRule
rules:

View File

@@ -4,7 +4,6 @@
id: BaseVariationPass
parent: BaseGameRule
abstract: true
noSpawn: true
components:
- type: StationVariationPassRule
@@ -13,14 +12,12 @@
- 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
@@ -105,7 +100,6 @@
- type: entity
id: BasicPuddleMessVariationPass
parent: BaseVariationPass
noSpawn: true
components:
- type: PuddleMessVariationPass
randomPuddleSolutionFill: RandomFillTrashPuddle
@@ -113,7 +107,6 @@
- type: entity
id: BloodbathPuddleMessVariationPass
parent: BaseVariationPass
noSpawn: true
components:
- type: PuddleMessVariationPass
tilesPerSpillAverage: 150
@@ -123,7 +116,6 @@
- type: entity
id: CutWireVariationPass
parent: BaseVariationPass
noSpawn: true
components:
- type: CutWireVariationPass
wireCutChance: 0.01