Use conditions to store progress for Ninja objectives (#20254)
* TryGetObjectiveComp * helper function to get objective * store N of jacked doors in condition * store called in threat bool in condition * store techs in steal research condition * fix access * remove unused transform system * use popup from shared system * fix formatting * condition => obj everywhere * i fogror to remove downloaded nodes from role * change signature * use query * View Variables * spider charge detonated => condition
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Objectives.Systems;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
|
||||
namespace Content.Server.Objectives.Components;
|
||||
|
||||
@@ -6,7 +7,9 @@ namespace Content.Server.Objectives.Components;
|
||||
/// Objective condition that requires the player to be a ninja and have doorjacked at least a random number of airlocks.
|
||||
/// Requires <see cref="NumberObjectiveComponent"/> to function.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem))]
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem), typeof(SharedSpaceNinjaSystem))]
|
||||
public sealed partial class DoorjackConditionComponent : Component
|
||||
{
|
||||
[DataField("doorsJacked"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public int DoorsJacked;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Ninja.Systems;
|
||||
using Content.Server.Objectives.Systems;
|
||||
|
||||
namespace Content.Server.Objectives.Components;
|
||||
@@ -5,7 +6,9 @@ namespace Content.Server.Objectives.Components;
|
||||
/// <summary>
|
||||
/// Requires that the player is a ninja and blew up their spider charge at its target location.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem))]
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem), typeof(SpiderChargeSystem))]
|
||||
public sealed partial class SpiderChargeConditionComponent : Component
|
||||
{
|
||||
[DataField("spiderChargeDetonated"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool SpiderChargeDetonated;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Objectives.Systems;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
|
||||
namespace Content.Server.Objectives.Components;
|
||||
|
||||
@@ -6,7 +7,9 @@ namespace Content.Server.Objectives.Components;
|
||||
/// Objective condition that requires the player to be a ninja and have stolen at least a random number of technologies.
|
||||
/// Requires <see cref="NumberObjectiveComponent"/> to function.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem))]
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem), typeof(SharedSpaceNinjaSystem))]
|
||||
public sealed partial class StealResearchConditionComponent : Component
|
||||
{
|
||||
[DataField("downloadedNodes"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public HashSet<string> DownloadedNodes = new();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
using Content.Server.Objectives.Systems;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
|
||||
namespace Content.Server.Objectives.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Requires that the player is a ninja and has called in a threat.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem))]
|
||||
[RegisterComponent, Access(typeof(NinjaConditionsSystem), typeof(SharedSpaceNinjaSystem))]
|
||||
public sealed partial class TerrorConditionComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the comms console has been hacked
|
||||
/// </summary>
|
||||
[DataField("calledInThreat"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool CalledInThreat;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user