mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-06 22:37:27 +00:00
* Initial Pass, Rev, Thief
* Zombie initial pass
* Rebase, Traitor
* Nukeops, More overloads
* Revert RevolutionaryRuleComponent
* Use TryRoundStartAttempt, Rewrite nukie spawning
* Comments, Add task scheduler to GameRuleSystem
* Zombie initial testing done
* Sort methods, rework GameRuleTask
* Add CCVar, Initial testing continues
* Might as well get rid of the obsolete logging
* Oops, i dont know how to log apparently
* Suggested formatting fixes
* Suggested changes
* Fix merge issues
* Minor optimisation
* Allowed thief to choose other antags
* Review changes
* Spawn items on floor first, then inserting
* minor tweaks
* Shift as much as possible to ProtoId<>
* Remove unneeded
* Add exclusive antag attribute
* Fix merge issues
* Minor formatting fix
* Convert to struct
* Cleanup
* Review cleanup (need to test a lot)
* Some fixes, (mostly) tested
* oop
* Pass tests (for real)
---------
Co-authored-by: Rainfall <rainfey0+git@gmail.com>
Co-authored-by: AJCM <AJCM@tutanota.com>
(cherry picked from commit 4e6c59cfe5)
68 lines
2.1 KiB
C#
68 lines
2.1 KiB
C#
using Content.Shared.Roles;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Server.GameTicking.Rules.Components;
|
|
|
|
/// <summary>
|
|
/// Component for the RevolutionaryRuleSystem that stores info about winning/losing, player counts required for starting, as well as prototypes for Revolutionaries and their gear.
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(RevolutionaryRuleSystem))]
|
|
public sealed partial class RevolutionaryRuleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// When the round will if all the command are dead (Incase they are in space)
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
public TimeSpan CommandCheck;
|
|
|
|
/// <summary>
|
|
/// The amount of time between each check for command check.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan TimerWait = TimeSpan.FromSeconds(20);
|
|
|
|
/// <summary>
|
|
/// Stores players minds
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<string, EntityUid> HeadRevs = new();
|
|
|
|
[DataField]
|
|
public ProtoId<AntagPrototype> HeadRevPrototypeId = "HeadRev";
|
|
|
|
/// <summary>
|
|
/// Min players needed for Revolutionary gamemode to start.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public int MinPlayers = 15;
|
|
|
|
/// <summary>
|
|
/// Max Head Revs allowed during selection.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public int MaxHeadRevs = 3;
|
|
|
|
/// <summary>
|
|
/// The amount of Head Revs that will spawn per this amount of players.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public int PlayersPerHeadRev = 15;
|
|
|
|
/// <summary>
|
|
/// The gear head revolutionaries are given on spawn.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<EntProtoId> StartingGear = new()
|
|
{
|
|
"Flash",
|
|
"ClothingEyesGlassesSunglasses"
|
|
};
|
|
|
|
/// <summary>
|
|
/// The time it takes after the last head is killed for the shuttle to arrive.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public TimeSpan ShuttleCallTime = TimeSpan.FromMinutes(5);
|
|
}
|