Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Плащ Невидимка и ПНВ для синдикеков, а также новый инвиз для ниндзи #890

Merged
merged 27 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4fe259f
инвиз
Inconnu1337 Dec 10, 2024
260f9d9
комит
Inconnu1337 Dec 12, 2024
c0da26d
Merge branch 'master' into ADTInvision
Inconnu1337 Dec 12, 2024
adc90fb
комит2
Inconnu1337 Dec 12, 2024
499b4cf
Update GunComponent.cs
Inconnu1337 Dec 12, 2024
745340a
Merge branch 'ADTInvision' of https://github.com/Inconnu1337/space_st…
Inconnu1337 Dec 12, 2024
51122fc
модифиед контенрррарар
Inconnu1337 Dec 12, 2024
0eccf38
Rename equipped-BACKPACK.png to equipped-NECK.png
Inconnu1337 Dec 12, 2024
f4fde7d
bruh
FaDeOkno Dec 12, 2024
0e9fbd1
Update uplink-catalog.ftl
PyotrIgn Dec 12, 2024
9cf921c
Update glasses.ftl
PyotrIgn Dec 12, 2024
b9ef281
Update cloaks.ftl
PyotrIgn Dec 12, 2024
b04ad34
Merge branch 'master' into ADTInvision
PyotrIgn Dec 12, 2024
393e7dd
скидки в аплинке, плащ-невидимка в тулбоксе вора
PyotrIgn Dec 13, 2024
2f845c1
набор модульных гранат
PyotrIgn Dec 14, 2024
e6da091
bugfix + locale
Inconnu1337 Dec 14, 2024
1549eaf
Merge branch 'ADTInvision' of https://github.com/Inconnu1337/space_st…
Inconnu1337 Dec 14, 2024
c45d5bb
Update Cloaks.yml
PyotrIgn Dec 14, 2024
3bbf9d3
фикс фикса
Inconnu1337 Dec 14, 2024
beb50be
Merge branch 'ADTInvision' of https://github.com/Inconnu1337/space_st…
Inconnu1337 Dec 14, 2024
d14b42a
фолс у фантома
PyotrIgn Dec 15, 2024
fbc8854
Merge branch 'ADTInvision' of https://github.com/Inconnu1337/space_st…
PyotrIgn Dec 15, 2024
ac0f915
Merge branch 'master' into ADTInvision
PyotrIgn Dec 15, 2024
c74b547
сон для слабых
Inconnu1337 Dec 18, 2024
4c6e608
Merge branch 'ADTInvision' of https://github.com/Inconnu1337/space_st…
Inconnu1337 Dec 18, 2024
2032a3b
Update chemical-bottles.ftl
Inconnu1337 Dec 18, 2024
02f4e86
Merge branch 'master' into ADTInvision
PyotrIgn Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using Content.Shared._RMC14.Stealth;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Prototypes;

namespace Content.Client._RMC14.Stealth;

public sealed class EntityInvisibilityVisualsSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototypes = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<EntityTurnInvisibleComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<EntityTurnInvisibleComponent, ComponentShutdown>(OnShutdown);
}

private void OnStartup(Entity<EntityTurnInvisibleComponent> ent, ref ComponentStartup args)
{
if (!TryComp(ent, out SpriteComponent? sprite))
return;

sprite.PostShader = _prototypes.Index<ShaderPrototype>("RMCInvisible").InstanceUnique();
}

private void OnShutdown(Entity<EntityTurnInvisibleComponent> ent, ref ComponentShutdown args)
{
if (TerminatingOrDeleted(ent))
return;

if (!TryComp(ent, out SpriteComponent? sprite))
return;

sprite.PostShader = null;
}

public override void Update(float frameTime)
{
var invisible = EntityQueryEnumerator<EntityTurnInvisibleComponent, SpriteComponent>();
while (invisible.MoveNext(out var uid, out var comp, out var sprite))
{
var opacity = TryComp<EntityActiveInvisibleComponent>(uid, out var activeInvisible) ? activeInvisible.Opacity : 1;
sprite.PostShader?.SetParameter("visibility", opacity);
}
}
}
4 changes: 4 additions & 0 deletions Content.Client/StatusIcon/StatusIconSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Configuration;
using Content.Shared._RMC14.Stealth; // ADT Tweak

namespace Content.Client.StatusIcon;

Expand Down Expand Up @@ -85,6 +86,9 @@ public bool IsVisible(Entity<MetaDataComponent> ent, StatusIconData data)
if (data.HideOnStealth && TryComp<StealthComponent>(ent, out var stealth) && stealth.Enabled)
return false;

if (data.HideOnStealth && HasComp<EntityActiveInvisibleComponent>(ent)) // ADT Tweak
return false;

if (data.ShowTo != null && !_entityWhitelist.IsValid(data.ShowTo, viewer))
return false;

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Server/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using Robust.Shared.Audio;
using Robust.Shared.Random;
using InventoryComponent = Content.Shared.Inventory.InventoryComponent;
using Content.Server.ADT.Eye.Blinding;
using Content.Shared.ADT.Eye.Blinding;

namespace Content.Server.Flash
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public sealed partial class NukeopsRuleComponent : Component
/// Minimal operatives count for war declaration
/// </summary>
[DataField]
public int WarDeclarationMinOps = 4;
public int WarDeclarationMinOps = 3; // adt tweak

[DataField]
public WinType WinType = WinType.Neutral;
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Verbs;
using Robust.Shared.GameObjects.Components.Localization;
using Robust.Shared.Prototypes; // ADT-Changeling-Tweak
using Content.Server.Forensics; // ADT DNA-Cloning Tweak

namespace Content.Server.Humanoid;

Expand Down Expand Up @@ -67,6 +68,12 @@ public void SetAppearance(HumanoidAppearanceComponent sourceHumanoid, HumanoidAp
grammar.Gender = sourceHumanoid.Gender;
}

if (TryComp<DnaComponent>(targetHumanoid.Owner, out var targetDNAComp) &&
TryComp<DnaComponent>(sourceHumanoid.Owner, out var sourceDNAComp))
{
targetDNAComp.DNA = sourceDNAComp.DNA; // ADT DNA-Cloning Tweak
}

Dirty(targetHumanoid.Owner, targetHumanoid);
}
// ADT-Changeling-Tweak-End
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace Content.Server.ADT.Eye.Blinding;
using Robust.Shared.GameStates;

[RegisterComponent]
[Access(typeof(DamageEyesOnFlashSystem))]
namespace Content.Shared.ADT.Eye.Blinding;

[RegisterComponent, NetworkedComponent]
public sealed partial class DamageEyesOnFlashedComponent : Component
{
[DataField]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Robust.Shared.GameStates;

namespace Content.Shared.ADT.Eye.Blinding;

[RegisterComponent, NetworkedComponent]
public sealed partial class NoEyeDamageOnFlashComponent : Component
{
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Content.Server.ADT.Eye.Blinding;
namespace Content.Shared.ADT.Eye.Blinding;

[ByRefEvent]
public record struct FlashedEvent(EntityUid? User, EntityUid? Used);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Shared.Eye.Blinding.Systems;
using Robust.Shared.Timing;

namespace Content.Server.ADT.Eye.Blinding;
namespace Content.Shared.ADT.Eye.Blinding;

public sealed class DamageEyesOnFlashSystem : EntitySystem
{
Expand Down
11 changes: 8 additions & 3 deletions Content.Shared/ADT/NightVision/SharedNightVisionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Content.Shared.Rounding;
using Content.Shared.Toggleable;
using Robust.Shared.Timing;
using Content.Shared.ADT.Eye.Blinding;

namespace Content.Shared.ADT.NightVision;

Expand Down Expand Up @@ -127,10 +128,10 @@ private void UpdateAlert(Entity<NightVisionComponent> ent)
{
if (ent.Comp.Alert is { } alert)
{
var level = MathF.Max((int) NightVisionState.Off, (int) ent.Comp.State);
var level = MathF.Max((int)NightVisionState.Off, (int)ent.Comp.State);
var max = _alerts.GetMaxSeverity(alert);
var severity = max - ContentHelpers.RoundToLevels(level, (int) NightVisionState.Full, max + 1);
_alerts.ShowAlert(ent, alert, (short) severity);
var severity = max - ContentHelpers.RoundToLevels(level, (int)NightVisionState.Full, max + 1);
_alerts.ShowAlert(ent, alert, (short)severity);
}

NightVisionChanged(ent);
Expand Down Expand Up @@ -161,6 +162,9 @@ private void EnableNightVisionItem(Entity<NightVisionItemComponent> item, Entity
var nightVision = EnsureComp<NightVisionComponent>(user);
nightVision.State = NightVisionState.Full;
Dirty(user, nightVision);

var eyeDamage = EnsureComp<DamageEyesOnFlashedComponent>(user);
Dirty(user, eyeDamage);
}

_actions.SetToggled(item.Comp.Action, true);
Expand All @@ -187,6 +191,7 @@ protected void DisableNightVisionItem(Entity<NightVisionItemComponent> item, Ent
!nightVision.Innate)
{
RemCompDeferred<NightVisionComponent>(user.Value);
RemCompDeferred<DamageEyesOnFlashedComponent>(user.Value);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Content.Shared.Humanoid;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

namespace Content.Shared._RMC14.Armor.ThermalCloak;

[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ThermalCloakComponent : Component
{
public bool Enabled;

[DataField, AutoNetworkedField]
public TimeSpan Cooldown = TimeSpan.FromSeconds(3);

[DataField, AutoNetworkedField]
public TimeSpan ForcedCooldown = TimeSpan.FromSeconds(10);

[DataField, AutoNetworkedField]
public float Opacity = 0.1f;

[DataField, AutoNetworkedField]
public SoundSpecifier? CloakSound;

[DataField, AutoNetworkedField]
public SoundSpecifier? UncloakSound;

[DataField, AutoNetworkedField]
public bool RestrictWeapons;

/// <summary>
/// Layers to hide while cloaked
/// </summary>
[DataField]
public HashSet<HumanoidVisualLayers> CloakedHideLayers = new();

/// <summary>
/// Amount of time after uncloaking weapons remain locked
/// </summary>
[DataField]
[AutoNetworkedField]
public TimeSpan UncloakWeaponLock = TimeSpan.FromSeconds(1);

[DataField, AutoNetworkedField]
public EntProtoId ActionId = "ADTActionToggleCloak";

[DataField, AutoNetworkedField]
public EntityUid? Action;

[DataField, AutoNetworkedField]
public EntProtoId CloakEffect = "RMCEffectCloak";

[DataField, AutoNetworkedField]
public EntProtoId UncloakEffect = "RMCEffectUncloak";

[DataField, AutoNetworkedField]
public bool NinjaSuit = false;

[DataField, AutoNetworkedField]
public bool HandsBlock = true;
}
Loading
Loading