Store ninja objectives in conditions 2 (#20894)

* move spider charge target from role

* shorter field names

* remove ninja role comment

* remove unused systems in SpaceNinjaSystem

* GenericAntagObjectivesAddedEvent

* check if warp point is on same map

* remove unnecessary import

* add missing loc when spider charge has no target

* a

* remove spider charge target requirement comp

* inline SpiderChargeTitle

* allow planting charge without objective

* remove map check

* fix role check when planting

* obj.Target

* Fix merge

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Vyacheslav Kovalevsky
2024-01-29 07:06:32 +03:00
committed by GitHub
parent 2a6705818b
commit 7311ce671f
10 changed files with 67 additions and 83 deletions

View File

@@ -6,9 +6,15 @@ 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), typeof(SpiderChargeSystem))]
[RegisterComponent, Access(typeof(NinjaConditionsSystem), typeof(SpiderChargeSystem), typeof(SpaceNinjaSystem))]
public sealed partial class SpiderChargeConditionComponent : Component
{
[DataField("spiderChargeDetonated"), ViewVariables(VVAccess.ReadWrite)]
public bool SpiderChargeDetonated;
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Detonated;
/// <summary>
/// Warp point that the spider charge has to target
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityUid? Target;
}