make thief a subgamemode (#25740)

* add SubGamemodes comp/sys

* remove RuleChance from thief rule

* use SubGamemodes for adding thief rule instead of adding ThiefRule component to random gamemodes

* clean up thief rule prototype

* add better logging + end rule if it fails to start

* march 1st incident

* preset ops

* the dreaded

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-03-02 16:33:24 +00:00
committed by GitHub
parent 709881f912
commit 7f060eb129
7 changed files with 58 additions and 21 deletions

View File

@@ -28,13 +28,12 @@
- CarpRiftsObjective
- DragonSurviveObjective
# need for admin panel antag create (because the rule doesn't have a roundstart entity like TraitorRule)
- type: entity
id: Thief
parent: BaseGameRule
noSpawn: true
parent: BaseGameRule
id: Thief
components:
- type: ThiefRule
- type: ThiefRule
- type: entity
noSpawn: true

View File

@@ -5,6 +5,16 @@
components:
- type: GameRule
- type: entity
noSpawn: true
parent: BaseGameRule
id: SubGamemodesRule
components:
- type: SubGamemodes
rules:
- id: Thief
prob: 0.5
- type: entity
id: DeathMatch31
parent: BaseGameRule
@@ -62,8 +72,6 @@
minPlayers: 20
- type: NukeopsRule
faction: Syndicate
- type: ThiefRule #the thieves come as an extension of another gamemode
ruleChance: 0.5
- type: entity
id: Pirates
@@ -78,8 +86,6 @@
noSpawn: true
components:
- type: TraitorRule
- type: ThiefRule #the thieves come as an extension of another gamemode
ruleChance: 0.5
- type: entity
id: Revolutionary
@@ -87,8 +93,6 @@
noSpawn: true
components:
- type: RevolutionaryRule
- type: ThiefRule #the thieves come as an extension of another gamemode
ruleChance: 0.5
- type: entity
id: Sandbox

View File

@@ -93,6 +93,7 @@
showInVote: false
rules:
- Traitor
- SubGamemodesRule
- BasicStationEventScheduler
- BasicRoundstartVariation
@@ -118,6 +119,7 @@
showInVote: false
rules:
- Nukeops
- SubGamemodesRule
- BasicStationEventScheduler
- BasicRoundstartVariation
@@ -132,6 +134,7 @@
showInVote: false
rules:
- Revolutionary
- SubGamemodesRule
- BasicStationEventScheduler
- BasicRoundstartVariation