Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SvS event fixes, enable SvS in secret rotation #218

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Server/Objectives/Systems/KeepAliveCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private void OnAssigned(EntityUid uid, RandomTraitorAliveComponent comp, ref Obj
return;
}

//Fallback to assign people who COULD be assigned as traitor
//Fallback to assign people who COULD be assigned as traitor - might need to just do this from the start on ForceAll rounds, limiting it to existing traitors could be skewing the numbers towards just a few people.
var allHumans = _mind.GetAliveHumansExcept(args.MindId);
var allValidTraitorCandidates = new List<EntityUid>();
if (_traitorRule.CurrentAntagPool != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private void OnTraitorAssigned(EntityUid uid, PickRandomTraitorComponent comp, r
return;
}

//Fallback to assign people who COULD be assigned as traitor
//Fallback to assign people who COULD be assigned as traitor - might need to just do this from the start on ForceAll rounds, limiting it to existing traitors could be skewing the numbers towards just a few people.
var allValidTraitorCandidates = new List<EntityUid>();
if (_traitorRule.CurrentAntagPool != null)
{
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
- id: SleeperAgents
- id: ZombieOutbreak

- type: entityTable
id: SleeperlessAntagEventsTable
table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp
children:
- id: ClosetSkeleton
- id: DragonSpawn
- id: KingRatMigration
- id: NinjaSpawn
- id: RevenantSpawn
- id: ZombieOutbreak

- type: entity
id: BaseStationEvent
Expand Down
29 changes: 25 additions & 4 deletions Resources/Prototypes/GameRules/roundstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@

- type: entity
parent: BaseTraitorRuleNoRandomObjectives
id: SpyVsSpy5TC
id: SpyVsSpy3TC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just rename this to something like SpyVsSpyLowTC so the name doesn't have to change with the value

components:
- type: TraitorRule
startingBalance: 5
startingBalance: 3
- type: GameRule
minPlayers: 15
delay:
Expand All @@ -223,6 +223,7 @@
- type: AntagSelection
definitions:
- prefRoles: [ Traitor ]
fallbackRoles: [ TraitorSleeper ]
max: 100
playerRatio: 1
blacklist:
Expand All @@ -243,8 +244,8 @@
- type: GameRule
minPlayers: 15
delay:
min: 240
max: 420
min: 2
max: 4
- type: AntagObjectives
objectives:
- KillRandomTraitorSvSObjective
Expand All @@ -253,6 +254,7 @@
- type: AntagSelection
definitions:
- prefRoles: [ Traitor ]
fallbackRoles: [ TraitorSleeper ]
max: 100
playerRatio: 1
blacklist:
Expand Down Expand Up @@ -345,6 +347,17 @@
- !type:NestedSelector
tableId: CargoGiftsTable

- type: entityTable
id: SleeperlessGameRulesTable
table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp
children:
- !type:NestedSelector
tableId: BasicCalmEventsTable
- !type:NestedSelector
tableId: SleeperlessAntagEventsTable
- !type:NestedSelector
tableId: CargoGiftsTable

- type: entityTable
id: SpaceTrafficControlTable
table: !type:AllSelector # we need to pass a list of rules, since rules have further restrictions to consider via StationEventComp
Expand All @@ -364,6 +377,14 @@
scheduledGameRules: !type:NestedSelector
tableId: BasicGameRulesTable

- type: entity
id: SleeperlessStationEventScheduler
parent: BaseGameRule
components:
- type: BasicStationEventScheduler
scheduledGameRules: !type:NestedSelector
tableId: SleeperlessGameRulesTable

- type: entity
id: RampingStationEventScheduler
parent: BaseGameRule
Expand Down
49 changes: 33 additions & 16 deletions Resources/Prototypes/game_presets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,41 +159,58 @@
- BasicRoundstartVariation

- type: gamePreset
id: SecretSpyVsSpy #For Admin Use: Runs SpyVsSpy but shows "Secret" in lobby.
id: SpyVsSpy
alias:
- secretsvs
name: secret-title
description: secret-description
showInVote: false #Admin Use
- svs
- theship
name: spy-vs-spy-title
description: spy-vs-spy-description
showInVote: false
rules:
- SpyVsSpy
- BasicStationEventScheduler
- SleeperlessStationEventScheduler
- MeteorSwarmScheduler
- SpaceTrafficControlEventScheduler
- BasicRoundstartVariation

- type: gamePreset
id: SpyVsSpy5TC
id: SpyVsSpy3TC
name: spy-vs-spy-title
description: spy-vs-spy-description
showInVote: false
rules:
- SpyVsSpy5TC
- BasicStationEventScheduler
- SpyVsSpy3TC
- SleeperlessStationEventScheduler
- MeteorSwarmScheduler
- SpaceTrafficControlEventScheduler
- BasicRoundstartVariation

- type: gamePreset
id: SpyVsSpy
id: SecretSpyVsSpy #For Admin Use: Runs SpyVsSpy but shows "Secret" in lobby.
alias:
- svs
- theship
name: spy-vs-spy-title
description: spy-vs-spy-description
showInVote: false
- secretsvs
name: secret-title
description: secret-description
showInVote: false #Admin Use
rules:
- SpyVsSpy
- BasicStationEventScheduler
- SleeperlessStationEventScheduler
- MeteorSwarmScheduler
- SpaceTrafficControlEventScheduler
- BasicRoundstartVariation

- type: gamePreset
id: SecretSpyVsSpy3TC #For Admin Use: Runs SpyVsSpy3TC but shows "Secret" in lobby.
alias:
- secretsvs
name: secret-title
description: secret-description
showInVote: false #Admin Use
rules:
- SpyVsSpy3TC
- SleeperlessStationEventScheduler
- MeteorSwarmScheduler
- SpaceTrafficControlEventScheduler
- BasicRoundstartVariation

- type: gamePreset
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/secret_weights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
weights:
Nukeops: 0.20
Traitor: 0.60
SpyVsSpy: 0.20
Changeling: 0.20
Zombie: 0.04
Zombieteors: 0.01
Expand Down
Loading