-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent SecretRule From Picking Invalid Presets (#27456) (#1805)
trying to fix the prelobby heisentest we use votes anyway! fuck it, we ball --------- Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
- Loading branch information
1 parent
3898c65
commit d5d071a
Showing
16 changed files
with
228 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
Content.Server/GameTicking/Rules/Components/LoadMapRuleComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
using Content.Server.GameTicking.Rules; | ||
using Content.Server.Maps; | ||
using Content.Shared.GridPreloader.Prototypes; | ||
using Content.Shared.Storage; | ||
using Content.Shared.Whitelist; | ||
using Robust.Shared.Map; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Server.GameTicking.Rules.Components; | ||
|
||
/// <summary> | ||
/// This is used for a game rule that loads a map when activated. | ||
/// Works with <see cref="RuleGridsComponent"/>. | ||
/// </summary> | ||
[RegisterComponent] | ||
[RegisterComponent, Access(typeof(LoadMapRuleSystem))] | ||
public sealed partial class LoadMapRuleComponent : Component | ||
{ | ||
[DataField] | ||
public MapId? Map; | ||
|
||
/// <summary> | ||
/// A <see cref="GameMapPrototype"/> to load on a new map. | ||
/// </summary> | ||
[DataField] | ||
public ProtoId<GameMapPrototype>? GameMap; | ||
|
||
/// <summary> | ||
/// A map path to load on a new map. | ||
/// </summary> | ||
[DataField] | ||
public ResPath? MapPath; | ||
|
||
/// <summary> | ||
/// A <see cref="PreloadedGridPrototype"/> to move to a new map. | ||
/// If there are no instances left nothing is done. | ||
/// </summary> | ||
[DataField] | ||
public ProtoId<PreloadedGridPrototype>? PreloadedGrid; | ||
|
||
[DataField] | ||
public List<EntityUid> MapGrids = new(); | ||
|
||
[DataField] | ||
public EntityWhitelist? SpawnerWhitelist; | ||
} |
30 changes: 30 additions & 0 deletions
30
Content.Server/GameTicking/Rules/Components/RuleGridsComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Content.Server.GameTicking.Rules; | ||
using Content.Shared.Whitelist; | ||
using Robust.Shared.Map; | ||
|
||
/// <summary> | ||
/// Stores grids created by another gamerule component. | ||
/// With <c>AntagSelection</c>, spawners on these grids can be used for its antags. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(RuleGridsSystem))] | ||
public sealed partial class RuleGridsComponent : Component | ||
{ | ||
/// <summary> | ||
/// The map that was loaded. | ||
/// </summary> | ||
[DataField] | ||
public MapId? Map; | ||
|
||
/// <summary> | ||
/// The grid entities that have been loaded. | ||
/// </summary> | ||
[DataField] | ||
public List<EntityUid> MapGrids = new(); | ||
|
||
/// <summary> | ||
/// Whitelist for a spawner to be considered for an antag. | ||
/// All spawners must have <c>SpawnPointComponent</c> regardless to be found. | ||
/// </summary> | ||
[DataField] | ||
public EntityWhitelist? SpawnerWhitelist; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.