Skip to content

Commit

Permalink
Плащ Невидимка и ПНВ для синдикеков, а также новый инвиз для ниндзи (#…
Browse files Browse the repository at this point in the history
…890)

## Описание PR
<!-- Что вы изменили в этом пулл реквесте? -->
Название, перенес с рмса невидимость
## Почему / Баланс
<!-- Почему оно было изменено? Ссылайтесь на любые обсуждения или
вопросы здесь. Пожалуйста, обсудите, как это повлияет на игровой баланс.
-->
хочу

## Медиа

![image](https://github.com/user-attachments/assets/14f29d73-b1ac-4c3f-82e9-09c3b7830c90)

![image](https://github.com/user-attachments/assets/459ad24d-f81a-4146-b6bf-c8c9e0a53c74)

- [x] Я прочитал(а) и следую [Руководство по созданию пулл
реквестов](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html).
Я понимаю, что в противном случае мой ПР может быть закрыт по усмотрению
мейнтейнера.
- [x] Я добавил скриншоты/видео к этому пулл реквесту, демонстрирующие
его изменения в игре, **или** этот пулл реквест не требует демонстрации
в игре

**Чейнджлог**
:cl: Inconnu и Пётр
- add: Добавлен плащ-невидимка в аплинки Синдиката и в один из наборов
вора.
- add: Добавлен прибор ночного видения в аплинки Синдиката и магазин
ОБР.
- add: Добавлен набор для создания пенных модульных гранат в аплинки
синдиката.
- tweak: Ниндзя получил новую невидимость, которая пришла на замену
старой.
- tweak: Увеличен кулдаун на стан от перчаток ниндзя.
- tweak: Снижение цен в аплинке Синдиката на предметы для тихого
выполнения целей.
- tweak: Увеличение емкости гипоручки(+5u) и уменьшение кулдауна между
вводом реагентов.
- tweak: Удален урон для глаз от вспышек у рас, взамен на это включенный
ПНВ теперь будет иметь данный эффект
- tweak: Клонирование через дебаг и клонерку теперь сохраняет ДНК 
- tweak: Ядерным хрюкерам дана возможность объявить войну при наличии
**3+** оперативников

---------

Co-authored-by: FaDeOkno <[email protected]>
Co-authored-by: PyotrIgn <[email protected]>
Co-authored-by: Eugeny <[email protected]>
  • Loading branch information
4 people authored Dec 18, 2024
1 parent 77e193e commit bf38418
Show file tree
Hide file tree
Showing 53 changed files with 1,087 additions and 95 deletions.
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

0 comments on commit bf38418

Please sign in to comment.