mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
* 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
* :trollface:
* :trollface:
* add antag prototype
* ghost role locale
* skynet
* :trollface:
* :trollface:
* :trollface:
* add endoskeleton body prototype
* :trollface:
* :trollface:
* smite locale
* implement terminate smite
* :trollface:
* :trollface:
* implement PopupBehavior
* endoskeleton transform popup
* move stuff from shared to server since nothing actually used it
* recolour everything
* update parts
* :trollface:
* :trollface:
* ok fire was using the damage set, back to 1.0
* tweak
* :trollface:
* :trollface:
* simplemob ops
* 1 rule per pro
* :trollface:
* :trollface:
* update some sprites
* structural damage
* :trollface:
* :trollface:
* Revert "update some sprites"
This reverts commit 459196c6a8942c5412885d5fe2f1a83a48408ddc.
* offbrand, add die objective to maybe remove fear of murderbone
* add shut down objective to the list
* fix ghost role
* fix control mob
* :trollface:
* :trollface:
* please
* naming
* code changes for GenericAntag terminator
* yml changes for GenericAntag terminator
* :trollface:
* 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>
(cherry picked from commit 52532e4075)
67 lines
2.1 KiB
C#
67 lines
2.1 KiB
C#
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;
|
|
}
|
|
}
|