forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exterminator midround minor antag (space-wizards#19946)
* terminator locale * terminate objective * terminator components and shared system * terminator roles rules and system * terminator events * skeleton recolour * terminator and endoskeleton * ghost role spawn * damage modifier sets * * * add antag prototype * ghost role locale * skynet * * * * add endoskeleton body prototype * * * smite locale * implement terminate smite * * * implement PopupBehavior * endoskeleton transform popup * move stuff from shared to server since nothing actually used it * recolour everything * update parts * * * ok fire was using the damage set, back to 1.0 * tweak * * * simplemob ops * 1 rule per pro * * * update some sprites * structural damage * * * Revert "update some sprites" This reverts commit 459196c. * offbrand, add die objective to maybe remove fear of murderbone * add shut down objective to the list * fix ghost role * fix control mob * * * please * naming * code changes for GenericAntag terminator * yml changes for GenericAntag terminator * * moved kill objective override to an objective component * use kill objective override * fix * oh * locale changes * change burn to heat for skin melting gib * change some endoskeleton stuff * pro * i already did this dementia ops * objective * fix * pro * swap out full sprite * update parts * forgor * fix mind transfer * type * endoskeleton has 500 mass * evil * fishops * warops --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
- Loading branch information
1 parent
d103003
commit 692c323
Showing
39 changed files
with
973 additions
and
4 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
30 changes: 30 additions & 0 deletions
30
Content.Server/Destructible/Thresholds/Behaviors/PopupBehavior.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.Shared.Popups; | ||
|
||
namespace Content.Server.Destructible.Thresholds.Behaviors; | ||
|
||
/// <summary> | ||
/// Shows a popup for everyone. | ||
/// </summary> | ||
[DataDefinition] | ||
public sealed partial class PopupBehavior : IThresholdBehavior | ||
{ | ||
/// <summary> | ||
/// Locale id of the popup message. | ||
/// </summary> | ||
[DataField("popup", required: true)] | ||
public string Popup; | ||
|
||
/// <summary> | ||
/// Type of popup to show. | ||
/// </summary> | ||
[DataField("popupType")] | ||
public PopupType PopupType; | ||
|
||
public void Execute(EntityUid uid, DestructibleSystem system, EntityUid? cause = null) | ||
{ | ||
var popup = system.EntityManager.System<SharedPopupSystem>(); | ||
// popup is placed at coords since the entity could be deleted after, no more popup then | ||
var coords = system.EntityManager.GetComponent<TransformComponent>(uid).Coordinates; | ||
popup.PopupCoordinates(Loc.GetString(Popup), coords, PopupType); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Content.Server/Objectives/Components/TerminatorTargetOverrideComponent.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,12 @@ | ||
using Content.Server.Objectives.Systems; | ||
|
||
namespace Content.Server.Objectives.Components; | ||
|
||
/// <summary> | ||
/// Sets this objective's target to the exterminator's target override, if it has one. | ||
/// If not it will be random. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(TerminatorTargetOverrideSystem))] | ||
public sealed partial class TerminatorTargetOverrideComponent : Component | ||
{ | ||
} |
41 changes: 41 additions & 0 deletions
41
Content.Server/Objectives/Systems/TerminatorTargetOverrideSystem.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,41 @@ | ||
using Content.Server.Objectives.Components; | ||
using Content.Server.Terminator.Components; | ||
using Content.Shared.Mind; | ||
using Content.Shared.Objectives.Components; | ||
|
||
namespace Content.Server.Objectives.Systems; | ||
|
||
/// <summary> | ||
/// Handles copying the exterminator's target override to this objective. | ||
/// </summary> | ||
public sealed class TerminatorTargetOverrideSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly TargetObjectiveSystem _target = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TerminatorTargetOverrideComponent, ObjectiveAssignedEvent>(OnAssigned); | ||
} | ||
|
||
private void OnAssigned(EntityUid uid, TerminatorTargetOverrideComponent comp, ref ObjectiveAssignedEvent args) | ||
{ | ||
if (args.Mind.OwnedEntity == null) | ||
{ | ||
args.Cancelled = true; | ||
return; | ||
} | ||
|
||
var user = args.Mind.OwnedEntity.Value; | ||
if (!TryComp<TerminatorComponent>(user, out var terminator)) | ||
{ | ||
args.Cancelled = true; | ||
return; | ||
} | ||
|
||
// this exterminator has a target override so set its objective target accordingly | ||
if (terminator.Target != null) | ||
_target.SetTarget(uid, terminator.Target.Value); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Content.Shared.Roles; | ||
|
||
namespace Content.Server.Roles; | ||
|
||
[RegisterComponent] | ||
public sealed partial class TerminatorRoleComponent : AntagonistRoleComponent | ||
{ | ||
} |
19 changes: 19 additions & 0 deletions
19
Content.Server/Terminator/Components/TerminatorComponent.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,19 @@ | ||
using Content.Server.Terminator.Systems; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; | ||
|
||
namespace Content.Server.Terminator.Components; | ||
|
||
/// <summary> | ||
/// Main terminator component, handles the target, if any, and objectives. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(TerminatorSystem))] | ||
public sealed partial class TerminatorComponent : Component | ||
{ | ||
/// <summary> | ||
/// Used to force the terminate objective's target. | ||
/// If null it will be a random person. | ||
/// </summary> | ||
[DataField("target")] | ||
public EntityUid? Target; | ||
} |
16 changes: 16 additions & 0 deletions
16
Content.Server/Terminator/Components/TerminatorTargetComponent.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,16 @@ | ||
using Content.Server.Terminator.Systems; | ||
|
||
namespace Content.Server.Terminator.Components; | ||
|
||
/// <summary> | ||
/// Sets <see cref="TerminatorComponent.Target"/> after the ghost role spawns. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(TerminatorSystem))] | ||
public sealed partial class TerminatorTargetComponent : Component | ||
{ | ||
/// <summary> | ||
/// The target to set after the ghost role spawns. | ||
/// </summary> | ||
[DataField("target")] | ||
public EntityUid? Target; | ||
} |
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,66 @@ | ||
using Content.Server.Body.Components; | ||
using Content.Server.GenericAntag; | ||
using Content.Server.Ghost.Roles.Events; | ||
using Content.Server.Roles; | ||
using Content.Server.Terminator.Components; | ||
using Content.Shared.Roles; | ||
using Robust.Shared.Map; | ||
|
||
namespace Content.Server.Terminator.Systems; | ||
|
||
public sealed class TerminatorSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedRoleSystem _role = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TerminatorComponent, MapInitEvent>(OnMapInit); | ||
SubscribeLocalEvent<TerminatorComponent, GhostRoleSpawnerUsedEvent>(OnSpawned); | ||
SubscribeLocalEvent<TerminatorComponent, GenericAntagCreatedEvent>(OnCreated); | ||
} | ||
|
||
private void OnMapInit(EntityUid uid, TerminatorComponent comp, MapInitEvent args) | ||
{ | ||
// cyborg doesn't need to breathe | ||
RemComp<RespiratorComponent>(uid); | ||
} | ||
|
||
private void OnSpawned(EntityUid uid, TerminatorComponent comp, GhostRoleSpawnerUsedEvent args) | ||
{ | ||
if (!TryComp<TerminatorTargetComponent>(args.Spawner, out var target)) | ||
return; | ||
|
||
comp.Target = target.Target; | ||
} | ||
|
||
private void OnCreated(EntityUid uid, TerminatorComponent comp, ref GenericAntagCreatedEvent args) | ||
{ | ||
var mindId = args.MindId; | ||
var mind = args.Mind; | ||
|
||
_role.MindAddRole(mindId, new RoleBriefingComponent | ||
{ | ||
Briefing = Loc.GetString("terminator-role-briefing") | ||
}, mind); | ||
_role.MindAddRole(mindId, new TerminatorRoleComponent(), mind); | ||
} | ||
|
||
/// <summary> | ||
/// Create a spawner at a position and return it. | ||
/// </summary> | ||
/// <param name="coords">Coordinates to create the spawner at</param> | ||
/// <param name="target">Optional target mind to force the terminator to target</param> | ||
public EntityUid CreateSpawner(EntityCoordinates coords, EntityUid? target) | ||
{ | ||
var uid = Spawn("SpawnPointGhostTerminator", coords); | ||
if (target != null) | ||
{ | ||
var comp = EnsureComp<TerminatorTargetComponent>(uid); | ||
comp.Target = target; | ||
} | ||
|
||
return uid; | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
Resources/Locale/en-US/game-ticking/game-rules/rule-terminator.ftl
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,14 @@ | ||
terminator-round-end-agent-name = nt-800 | ||
objective-issuer-susnet = [color=#d64119]Susnet[/color] | ||
terminator-role-greeting = | ||
You are the exterminator, a relentless assassin sent into the past to secure our future. | ||
We need you to eliminate {$target}, {$job}. | ||
Use any means at your disposal to complete the mission. | ||
Glory to Cybersun. | ||
terminator-role-briefing = Kill the target at all costs. | ||
terminator-endoskeleton-gib-popup = All the battered flesh falls apart, revealing a titanium endoskeleton! | ||
terminator-endoskeleton-burn-popup = The seared flesh is burned to a crisp, revealing a titanium endoskeleton! |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
objective-terminate-title = Terminate {$targetName}, {CAPITALIZE($job)} |
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.