Files
crystall-punk-14/Content.Shared/Ninja/Systems/NinjaGlovesSystem.cs

257 lines
9.8 KiB
C#
Raw Normal View History

[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
using Content.Shared.Actions;
using Content.Shared.Administration.Logs;
using Content.Shared.CombatMode;
using Content.Shared.Damage.Components;
using Content.Shared.Database;
using Content.Shared.Doors.Components;
using Content.Shared.DoAfter;
using Content.Shared.Electrocution;
using Content.Shared.Emag.Systems;
using Content.Shared.Examine;
using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Inventory.Events;
using Content.Shared.Ninja.Components;
using Content.Shared.Popups;
using Content.Shared.Research.Components;
using Content.Shared.Tag;
using Content.Shared.Timing;
using Content.Shared.Toggleable;
using Robust.Shared.Network;
using Robust.Shared.Timing;
using System.Diagnostics.CodeAnalysis;
namespace Content.Shared.Ninja.Systems;
public abstract class SharedNinjaGlovesSystem : EntitySystem
{
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedCombatModeSystem _combatMode = default!;
[Dependency] protected readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedElectrocutionSystem _electrocution = default!;
[Dependency] private readonly EmagSystem _emag = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly SharedNinjaSystem _ninja = default!;
[Dependency] protected readonly SharedPopupSystem Popups = default!;
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
[Dependency] private readonly TagSystem _tags = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly UseDelaySystem _useDelay = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<NinjaGlovesComponent, GetItemActionsEvent>(OnGetItemActions);
SubscribeLocalEvent<NinjaGlovesComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<NinjaGlovesComponent, ToggleActionEvent>(OnToggleAction);
SubscribeLocalEvent<NinjaGlovesComponent, GotUnequippedEvent>(OnUnequipped);
SubscribeLocalEvent<NinjaDoorjackComponent, InteractionAttemptEvent>(OnDoorjack);
SubscribeLocalEvent<NinjaStunComponent, InteractionAttemptEvent>(OnStun);
SubscribeLocalEvent<NinjaDrainComponent, InteractionAttemptEvent>(OnDrain);
SubscribeLocalEvent<NinjaDrainComponent, DrainDoAfterEvent>(OnDrainDoAfter);
SubscribeLocalEvent<NinjaDownloadComponent, InteractionAttemptEvent>(OnDownload);
SubscribeLocalEvent<NinjaDownloadComponent, DownloadDoAfterEvent>(OnDownloadDoAfter);
SubscribeLocalEvent<NinjaTerrorComponent, InteractionAttemptEvent>(OnTerror);
SubscribeLocalEvent<NinjaTerrorComponent, TerrorDoAfterEvent>(OnTerrorDoAfter);
}
/// <summary>
/// Disable glove abilities and show the popup if they were enabled previously.
/// </summary>
public void DisableGloves(NinjaGlovesComponent comp, EntityUid user)
{
if (comp.User != null)
{
comp.User = null;
Popups.PopupEntity(Loc.GetString("ninja-gloves-off"), user, user);
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
}
}
private void OnGetItemActions(EntityUid uid, NinjaGlovesComponent comp, GetItemActionsEvent args)
{
args.Actions.Add(comp.ToggleAction);
}
private void OnToggleAction(EntityUid uid, NinjaGlovesComponent comp, ToggleActionEvent args)
{
// client prediction desyncs it hard
if (args.Handled || !_timing.IsFirstTimePredicted)
return;
args.Handled = true;
var user = args.Performer;
// need to wear suit to enable gloves
if (!TryComp<NinjaComponent>(user, out var ninja)
|| ninja.Suit == null
|| !HasComp<NinjaSuitComponent>(ninja.Suit.Value))
{
ClientPopup(Loc.GetString("ninja-gloves-not-wearing-suit"), user);
return;
}
var enabling = comp.User == null;
var message = Loc.GetString(enabling ? "ninja-gloves-on" : "ninja-gloves-off");
ClientPopup(message, user);
if (enabling)
{
comp.User = user;
_ninja.AssignGloves(ninja, uid);
// set up interaction relay for handling glove abilities, comp.User is used to see the actual user of the events
_interaction.SetRelay(user, uid, EnsureComp<InteractionRelayComponent>(user));
}
else
{
comp.User = null;
_ninja.AssignGloves(ninja, null);
RemComp<InteractionRelayComponent>(user);
}
}
private void OnExamined(EntityUid uid, NinjaGlovesComponent comp, ExaminedEvent args)
{
if (!args.IsInDetailsRange)
return;
args.PushText(Loc.GetString(comp.User != null ? "ninja-gloves-examine-on" : "ninja-gloves-examine-off"));
}
private void OnUnequipped(EntityUid uid, NinjaGlovesComponent comp, GotUnequippedEvent args)
{
comp.User = null;
if (TryComp<NinjaComponent>(args.Equipee, out var ninja))
_ninja.AssignGloves(ninja, null);
}
/// <summary>
/// Helper for glove ability handlers, checks gloves, range, combat mode and stuff.
/// </summary>
protected bool GloveCheck(EntityUid uid, InteractionAttemptEvent args, [NotNullWhen(true)] out NinjaGlovesComponent? gloves,
out EntityUid user, out EntityUid target)
{
if (args.Target != null && TryComp<NinjaGlovesComponent>(uid, out gloves)
&& gloves.User != null
&& !_combatMode.IsInCombatMode(gloves.User)
&& _timing.IsFirstTimePredicted
&& TryComp<HandsComponent>(gloves.User, out var hands)
&& hands.ActiveHandEntity == null)
{
user = gloves.User.Value;
target = args.Target.Value;
if (_interaction.InRangeUnobstructed(user, target))
return true;
}
gloves = null;
user = target = EntityUid.Invalid;
return false;
}
private void OnDoorjack(EntityUid uid, NinjaDoorjackComponent comp, InteractionAttemptEvent args)
{
if (!GloveCheck(uid, args, out var gloves, out var user, out var target))
return;
// only allowed to emag non-immune doors
if (!HasComp<DoorComponent>(target) || _tags.HasTag(target, comp.EmagImmuneTag))
return;
var handled = _emag.DoEmagEffect(user, target);
if (!handled)
return;
ClientPopup(Loc.GetString("ninja-doorjack-success", ("target", Identity.Entity(target, EntityManager))), user, PopupType.Medium);
_adminLogger.Add(LogType.Emag, LogImpact.High, $"{ToPrettyString(user):player} doorjacked {ToPrettyString(target):target}");
}
private void OnStun(EntityUid uid, NinjaStunComponent comp, InteractionAttemptEvent args)
{
if (!GloveCheck(uid, args, out var gloves, out var user, out var target))
return;
// short cooldown to prevent instant stunlocking
if (_useDelay.ActiveDelay(uid))
return;
// battery can't be predicted since it's serverside
if (user == target || _net.IsClient || !HasComp<StaminaComponent>(target))
return;
// take charge from battery
if (!_ninja.TryUseCharge(user, comp.StunCharge))
{
Popups.PopupEntity(Loc.GetString("ninja-no-power"), user, user);
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
return;
}
// not holding hands with target so insuls don't matter
_electrocution.TryDoElectrocution(target, uid, comp.StunDamage, comp.StunTime, false, ignoreInsulation: true);
_useDelay.BeginDelay(uid);
}
// can't predict PNBC existing so only done on server.
protected virtual void OnDrain(EntityUid uid, NinjaDrainComponent comp, InteractionAttemptEvent args) { }
private void OnDrainDoAfter(EntityUid uid, NinjaDrainComponent comp, DrainDoAfterEvent args)
{
if (args.Cancelled || args.Handled || args.Target == null)
return;
_ninja.TryDrainPower(args.User, comp, args.Target.Value);
}
private void OnDownload(EntityUid uid, NinjaDownloadComponent comp, InteractionAttemptEvent args)
{
if (!GloveCheck(uid, args, out var gloves, out var user, out var target))
return;
// can only hack the server, not a random console
if (!TryComp<TechnologyDatabaseComponent>(target, out var database) || HasComp<ResearchClientComponent>(target))
return;
// fail fast if theres no tech right now
if (database.TechnologyIds.Count == 0)
{
ClientPopup(Loc.GetString("ninja-download-fail"), user);
return;
}
var doAfterArgs = new DoAfterArgs(user, comp.DownloadTime, new DownloadDoAfterEvent(), target: target, used: uid, eventTarget: uid)
{
BreakOnDamage = true,
BreakOnUserMove = true,
MovementThreshold = 0.5f,
CancelDuplicate = false
};
_doAfter.TryStartDoAfter(doAfterArgs);
args.Cancel();
}
// can't predict roles so only done on server.
protected virtual void OnDownloadDoAfter(EntityUid uid, NinjaDownloadComponent comp, DownloadDoAfterEvent args) { }
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
// cant predict roles for checking if already called
protected virtual void OnTerror(EntityUid uid, NinjaTerrorComponent comp, InteractionAttemptEvent args) { }
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
// can't predict roles or anything announcements related so only done on server.
protected virtual void OnTerrorDoAfter(EntityUid uid, NinjaTerrorComponent comp, TerrorDoAfterEvent args) { }
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
private void ClientPopup(string msg, EntityUid user, PopupType type = PopupType.Small)
{
if (_net.IsClient)
Popups.PopupEntity(msg, user, user, type);
[Antag] add space ninja as midround antag (#14069) * start of space ninja midround antag * suit has powercell, can be upgraded only (not replaced with equal or worse battery) * add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks * :skull: * add basic suit power display that uses stamina rsi * add draining apc/sub/smes - no wires yet * add research downloading * ninja starts implanted, move some stuff to yaml * add Automated field to OnUseTimerTrigger * implement spider charge and objective * fix client crash when taking suit off, some refactor * add survive condition and tweak locale * add comms console icon for objective * add calling in a threat - currently revenant and dragon * combine all glove abilities * locale * spark sounds when draining, refactoring * toggle is actually toggle now * prevent crash if disabling stealth with outline * add antag ctrl for ninja, hopefully show greentext * fix greentext and some other things * disabling gloves if taken off or suit taken off * basic energy katana, change ninja loadout * recallable katana, refactoring * start of dash - not done yet * katana dashing ability * merge upstream + compiling, make AutomatedTimer its own component * docs and stuff * partial refactor of glove abilities, still need to move handling * make dooremaggedevent by ref * move bunch of stuff to shared - broken * clean ninja antag verb * doc * mark rule config fields as required * fix client crash * wip systems refactor * big refactor of systems * fuck * make TryDoElectrocution callable from shared * finish refactoring? * no guns * start with internals on * clean up glove abilities, add range check * create soap, in place of ninja throwing stars * add emp suit ability * able to eat chefs stolen food in space * stuff, tell client when un/cloaked but there is bug with gloves * fix prediction breaking gloves on client * ninja soap despawns after a minute * ninja spawns outside the station now, with gps + station coords to navigate * add cooldown to stun ability * cant use glove abilities in combat mode * require empty hand to use glove abilities * use ghost role spawner * Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> * some review changes * show powercell charge on examine * new is needed * address some reviews * ninja starts with jetpack, i hope * partial feedback * uhh * pro * remove pirate from threats list * use doafter refactor * pro i gave skeleton jetpack * some stuff * use auto gen state * mr handy * use EntityQueryEnumerator * cleanup * spider charge target anti-troll * mmmmmm --------- Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 07:33:27 +00:00
}
}