Refactor antag rule code (#23445)
* 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>
2024-02-29 06:25:10 +00:00
|
|
|
using Content.Shared.Random;
|
|
|
|
|
using Content.Shared.Roles;
|
2023-12-24 12:58:28 +03:00
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.GameTicking.Rules.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores data for <see cref="ThiefRuleSystem/">.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent, Access(typeof(ThiefRuleSystem))]
|
|
|
|
|
public sealed partial class ThiefRuleComponent : Component
|
|
|
|
|
{
|
Refactor antag rule code (#23445)
* 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>
2024-02-29 06:25:10 +00:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<WeightedRandomPrototype> BigObjectiveGroup = "ThiefBigObjectiveGroups";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<WeightedRandomPrototype> SmallObjectiveGroup = "ThiefObjectiveGroups";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<WeightedRandomPrototype> EscapeObjectiveGroup = "ThiefEscapeObjectiveGroups";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public float BigObjectiveChance = 0.7f;
|
|
|
|
|
|
2023-12-25 06:42:48 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Add a Pacified comp to thieves
|
|
|
|
|
/// </summary>
|
2023-12-27 23:42:15 +03:00
|
|
|
[DataField]
|
2023-12-25 06:42:48 +03:00
|
|
|
public bool PacifistThieves = true;
|
|
|
|
|
|
2023-12-24 12:58:28 +03:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<AntagPrototype> ThiefPrototypeId = "Thief";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public float MaxObjectiveDifficulty = 2.5f;
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public int MaxStealObjectives = 10;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Things that will be given to thieves
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
Refactor antag rule code (#23445)
* 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>
2024-02-29 06:25:10 +00:00
|
|
|
public List<EntProtoId> StarterItems = new() { "ToolboxThief", "ClothingHandsChameleonThief" };
|
2023-12-24 12:58:28 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-12-27 23:42:15 +03:00
|
|
|
/// All Thieves created by this rule
|
2023-12-24 12:58:28 +03:00
|
|
|
/// </summary>
|
2023-12-27 23:42:15 +03:00
|
|
|
[DataField]
|
|
|
|
|
public List<EntityUid> ThievesMinds = new();
|
2023-12-24 12:58:28 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Max Thiefs created by rule on roundstart
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public int MaxAllowThief = 3;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound played when making the player a thief via antag control or ghost role
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier? GreetingSound = new SoundPathSpecifier("/Audio/Misc/thief_greeting.ogg");
|
|
|
|
|
}
|