From 1a2992ce01dd9ed98af8363840f882c3b28981eb Mon Sep 17 00:00:00 2001 From: BL02DL Date: Tue, 22 Oct 2024 20:58:34 +0700 Subject: [PATCH 1/7] NVG (Port from _LostParadise) --- Content.Client/IoC/ClientContentIoC.cs | 2 + .../Clothing/NightVisionOverlay.cs | 54 +++++++ .../Clothing/NightVisionSystem.cs | 91 +++++++++++ .../Clothing/NightVisionSystem.cs | 56 +++++++ Content.Shared/Alert/AlertType.cs | 7 + .../Clothing/NightVisionComponent.cs | 49 ++++++ .../Clothing/SharedNightVisionSystem.cs | 94 +++++++++++ .../_LostParadise/NightVision/NightVision.ftl | 19 +++ .../_LostParadise/NightVision/NightVision.ftl | 19 +++ Resources/Prototypes/Alerts/alerts.yml | 1 + .../_LostParadise/Alerts/alerts.yml | 7 + .../Entities/Clothing/Eyes/NightVision.yml | 147 ++++++++++++++++++ .../_LostParadise/Shaders/shaders.yml | 4 + .../equipped-EYES.png | Bin 0 -> 204 bytes .../NVG/diagnosticnightvision.rsi/icon-on.png | Bin 0 -> 306 bytes .../NVG/diagnosticnightvision.rsi/icon.png | Bin 0 -> 306 bytes .../diagnosticnightvision.rsi/inhand-left.png | Bin 0 -> 233 bytes .../inhand-right.png | Bin 0 -> 230 bytes .../NVG/diagnosticnightvision.rsi/meta.json | 41 +++++ .../on-equipped-EYES.png | Bin 0 -> 277 bytes .../on-inhand-left.png | Bin 0 -> 305 bytes .../on-inhand-right.png | Bin 0 -> 309 bytes .../NVG/mednightvision.rsi/equipped-EYES.png | Bin 0 -> 204 bytes .../Eyes/NVG/mednightvision.rsi/icon-on.png | Bin 0 -> 306 bytes .../Eyes/NVG/mednightvision.rsi/icon.png | Bin 0 -> 306 bytes .../NVG/mednightvision.rsi/inhand-left.png | Bin 0 -> 233 bytes .../NVG/mednightvision.rsi/inhand-right.png | Bin 0 -> 230 bytes .../Eyes/NVG/mednightvision.rsi/meta.json | 41 +++++ .../mednightvision.rsi/on-equipped-EYES.png | Bin 0 -> 277 bytes .../NVG/mednightvision.rsi/on-inhand-left.png | Bin 0 -> 305 bytes .../mednightvision.rsi/on-inhand-right.png | Bin 0 -> 309 bytes .../Eyes/NVG/nightvision.rsi/alert.png | Bin 0 -> 874 bytes .../NVG/nightvision.rsi/equipped-EYES.png | Bin 0 -> 387 bytes .../Eyes/NVG/nightvision.rsi/icon-on.png | Bin 0 -> 218 bytes .../Eyes/NVG/nightvision.rsi/icon.png | Bin 0 -> 306 bytes .../Eyes/NVG/nightvision.rsi/inhand-left.png | Bin 0 -> 385 bytes .../Eyes/NVG/nightvision.rsi/inhand-right.png | Bin 0 -> 410 bytes .../Eyes/NVG/nightvision.rsi/meta.json | 44 ++++++ .../NVG/nightvision.rsi/on-equipped-EYES.png | Bin 0 -> 277 bytes .../NVG/nightvision.rsi/on-inhand-left.png | Bin 0 -> 305 bytes .../NVG/nightvision.rsi/on-inhand-right.png | Bin 0 -> 309 bytes .../NVG/secnightvision.rsi/equipped-EYES.png | Bin 0 -> 204 bytes .../Eyes/NVG/secnightvision.rsi/icon-on.png | Bin 0 -> 307 bytes .../Eyes/NVG/secnightvision.rsi/icon.png | Bin 0 -> 505 bytes .../NVG/secnightvision.rsi/inhand-left.png | Bin 0 -> 233 bytes .../NVG/secnightvision.rsi/inhand-right.png | Bin 0 -> 309 bytes .../Eyes/NVG/secnightvision.rsi/meta.json | 42 +++++ .../secnightvision.rsi/on-equipped-EYES.png | Bin 0 -> 277 bytes .../NVG/secnightvision.rsi/on-inhand-left.png | Bin 0 -> 305 bytes .../secnightvision.rsi/on-inhand-right.png | Bin 0 -> 309 bytes .../_LostParadise/Shaders/nightvision.swsl | 38 +++++ 51 files changed, 756 insertions(+) create mode 100644 Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs create mode 100644 Content.Client/_LostParadise/Clothing/NightVisionSystem.cs create mode 100644 Content.Server/_LostParadise/Clothing/NightVisionSystem.cs create mode 100644 Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs create mode 100644 Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs create mode 100644 Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl create mode 100644 Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl create mode 100644 Resources/Prototypes/_LostParadise/Alerts/alerts.yml create mode 100644 Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml create mode 100644 Resources/Prototypes/_LostParadise/Shaders/shaders.yml create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/alert.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png create mode 100644 Resources/Textures/_LostParadise/Shaders/nightvision.swsl diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs index 8c2b676c2e2..5c07736a4cb 100644 --- a/Content.Client/IoC/ClientContentIoC.cs +++ b/Content.Client/IoC/ClientContentIoC.cs @@ -21,6 +21,7 @@ using Content.Client.Replay; using Content.Shared.Administration.Managers; using Content.Shared.Players.PlayTimeTracking; +using Content.Client._LostParadise.Clothing; // _LostParadise namespace Content.Client.IoC @@ -54,6 +55,7 @@ public static void Register() collection.Register(); IoCManager.Register(); IoCManager.Register(); + IoCManager.Register(); // _LostParadise } } } diff --git a/Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs b/Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs new file mode 100644 index 00000000000..c3835531220 --- /dev/null +++ b/Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs @@ -0,0 +1,54 @@ +using Robust.Client.Graphics; +using Robust.Client.Player; +using Robust.Shared.Enums; +using Robust.Shared.Prototypes; + +namespace Content.Client._LostParadise.Clothing; + +/// +/// Made by BL02DL from _LostParadise +/// + +public sealed class NightVisionOverlay : Overlay +{ + private readonly IPrototypeManager _prototypeManager; + private readonly NightVisionEntitySystem _nightVisionEntitySystem; + + public override bool RequestScreenTexture => true; + public override OverlaySpace Space => OverlaySpace.WorldSpace; + + private readonly ShaderInstance _shader; + + public NightVisionOverlay() + { + IoCManager.InjectDependencies(this); + _nightVisionEntitySystem = IoCManager.Resolve(); + _prototypeManager = IoCManager.Resolve(); + _shader = _prototypeManager.Index("LPPNightVision").InstanceUnique(); + } + + protected override void Draw(in OverlayDrawArgs args) + { + if (ScreenTexture == null) + return; + + var handle = args.WorldHandle; + var nightcomp = _nightVisionEntitySystem.GetNightComp(); + + // Получение данных об оверлее Ночного Видения + if (nightcomp == null) + { + Logger.Error("Failed to get night vision component from eyes."); + return; + } + + _shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); + _shader.SetParameter("tint", nightcomp.Tint); + _shader.SetParameter("luminance_threshold", nightcomp.Strength); + _shader.SetParameter("noise_amount", nightcomp.Noise); + + handle.UseShader(_shader); + handle.DrawRect(args.WorldBounds, Color.White); + handle.UseShader(null); + } +} diff --git a/Content.Client/_LostParadise/Clothing/NightVisionSystem.cs b/Content.Client/_LostParadise/Clothing/NightVisionSystem.cs new file mode 100644 index 00000000000..ee8f70ce4ac --- /dev/null +++ b/Content.Client/_LostParadise/Clothing/NightVisionSystem.cs @@ -0,0 +1,91 @@ +using Content.Shared._LostParadise.Clothing; +using Content.Shared.GameTicking; +using Robust.Client.Player; +using Robust.Client.Graphics; +using Content.Client.Inventory; +using Content.Shared.Inventory.Events; + +namespace Content.Client._LostParadise.Clothing; + +/// +/// Made by BL02DL from _LostParadise +/// + +public sealed class NightVisionSystem : SharedNightVisionSystem +{ + [Dependency] private readonly IOverlayManager _overlayMan = default!; + [Dependency] private readonly ILightManager _lightManager = default!; + + private NightVisionOverlay _overlay = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnRestart); + SubscribeLocalEvent(OnGotUnequipped); + + _overlay = new(); + } + + protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component) + { + if (!Resolve(uid, ref component)) + { + return; + } + + state = state && component.On; + + if (state) + { + _lightManager.DrawLighting = false; + + /// Adding an overlay when the effect is activated + /// Добавление наложения при активированном эффекте + _overlayMan.AddOverlay(_overlay); + } + else + { + _lightManager.DrawLighting = true; + + /// Removing an overlay when the effect is deactivated + /// Удаление наложения при деактивированном эффекте + _overlayMan.RemoveOverlay(_overlay); + } + } + private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotUnequippedEvent args) + { + if (args.Slot == "eyes") + { + UpdateNightVisionEffects(args.Equipee, uid, false, component); + _overlayMan.RemoveOverlay(_overlay); + _lightManager.DrawLighting = true; + } + } + private void OnRestart(RoundRestartCleanupEvent ev) + { + /// Удаляем оверлей и врубаем свет на всякий по окончанию раунда + /// We remove the overlay and turn on the light just in case at the end of the round. + _overlayMan.RemoveOverlay(_overlay); + _lightManager.DrawLighting = true; + } +} + +public sealed class NightVisionEntitySystem : EntitySystem +{ + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; + public override void Initialize() + { + base.Initialize(); + } + + public NightVisionComponent? GetNightComp() + { + var playerUid = EntityUid.Parse(_playerManager.LocalPlayer?.ControlledEntity.ToString()); + var slot = _entityManager.GetComponent(playerUid); + _entityManager.TryGetComponent(slot.SlotData["eyes"].HeldEntity, out var nightvision); + return nightvision; + } +} \ No newline at end of file diff --git a/Content.Server/_LostParadise/Clothing/NightVisionSystem.cs b/Content.Server/_LostParadise/Clothing/NightVisionSystem.cs new file mode 100644 index 00000000000..1af9eb1064f --- /dev/null +++ b/Content.Server/_LostParadise/Clothing/NightVisionSystem.cs @@ -0,0 +1,56 @@ +using Content.Shared._LostParadise.Clothing; +using Content.Shared.Alert; +using Content.Shared.Inventory.Events; + +namespace Content.Server._LostParadise.Clothing; + +/// +/// Made by BL02DL from _LostParadise +/// + +public sealed class NightVisionSystem : SharedNightVisionSystem +{ + [Dependency] private readonly AlertsSystem _alertsSystem = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnGotEquipped); + SubscribeLocalEvent(OnGotUnequipped); + + } + + protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component) + { + if (!Resolve(uid, ref component)) + return; + state = state && component.On; + + if (state) + { + _alertsSystem.ShowAlert(parent, AlertType.LPPNightVision); + } + else + { + _alertsSystem.ClearAlert(parent, AlertType.LPPNightVision); + } + } + + private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotUnequippedEvent args) + { + if (args.Slot == "eyes") + { + UpdateNightVisionEffects(args.Equipee, uid, false, component); + _alertsSystem.ClearAlert(uid, AlertType.LPPNightVision); + } + } + + private void OnGotEquipped(EntityUid uid, NightVisionComponent component, GotEquippedEvent args) + { + if (args.Slot == "eyes") + { + UpdateNightVisionEffects(args.Equipee, uid, true, component); + } + } +} diff --git a/Content.Shared/Alert/AlertType.cs b/Content.Shared/Alert/AlertType.cs index bd8c1dbe257..1a20ff77358 100644 --- a/Content.Shared/Alert/AlertType.cs +++ b/Content.Shared/Alert/AlertType.cs @@ -50,6 +50,13 @@ public enum AlertType : byte Pulled, Pulling, Magboots, + + // Start _LostParadise + + LPPNightVision, + + // End _LostParadise + Internals, Toxins, Muted, diff --git a/Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs b/Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs new file mode 100644 index 00000000000..3345ebfc31e --- /dev/null +++ b/Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs @@ -0,0 +1,49 @@ +using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; + +namespace Content.Shared._LostParadise.Clothing; + +/// +/// Made by BL02DL from _LostParadise +/// + +[RegisterComponent, NetworkedComponent(), AutoGenerateComponentState] +[Access(typeof(SharedNightVisionSystem))] +public sealed partial class NightVisionComponent : Component +{ + [DataField] + public EntProtoId ToggleAction = "LPPActionToggleNightVision"; + + [DataField, AutoNetworkedField] + public EntityUid? ToggleActionEntity; + + [DataField("on"), AutoNetworkedField] + public bool On; + + [DataField("tint1"), ViewVariables(VVAccess.ReadWrite)] + public float Tint1 { get; set; } = 0.3f; + + [DataField("tint2"), ViewVariables(VVAccess.ReadWrite)] + public float Tint2 { get; set; } = 0.3f; + + [DataField("tint3"), ViewVariables(VVAccess.ReadWrite)] + public float Tint3 { get; set; } = 0.3f; + + [DataField("tint"), ViewVariables(VVAccess.ReadWrite)] + public Vector3 Tint + { + get => new(Tint1, Tint2, Tint3); + set + { + Tint1 = value.X; + Tint2 = value.Y; + Tint3 = value.Z; + } + } + + [DataField("strength"), ViewVariables(VVAccess.ReadWrite)] + public float Strength = 2f; + + [DataField("noise"), ViewVariables(VVAccess.ReadWrite)] + public float Noise = 0.5f; +} diff --git a/Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs b/Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs new file mode 100644 index 00000000000..5f073a97347 --- /dev/null +++ b/Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs @@ -0,0 +1,94 @@ +using Content.Shared.Actions; +using Content.Shared.Clothing.EntitySystems; +using Content.Shared.Inventory; +using Content.Shared.Item; +using Content.Shared.Toggleable; +using Content.Shared.Verbs; +using Robust.Shared.Containers; + +namespace Content.Shared._LostParadise.Clothing; + +/// +/// Made by BL02DL from _LostParadise +/// + +public abstract class SharedNightVisionSystem : EntitySystem +{ + [Dependency] private readonly ClothingSystem _clothing = default!; + [Dependency] private readonly InventorySystem _inventory = default!; + [Dependency] private readonly SharedActionsSystem _sharedActions = default!; + [Dependency] private readonly SharedActionsSystem _actionContainer = default!; + [Dependency] private readonly SharedAppearanceSystem _appearance = default!; + [Dependency] private readonly SharedContainerSystem _sharedContainer = default!; + [Dependency] private readonly SharedItemSystem _item = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>(AddToggleVerb); + SubscribeLocalEvent(OnGetActions); + SubscribeLocalEvent(OnToggleNightVision); + SubscribeLocalEvent(OnMapInit); + } + + private void OnMapInit(EntityUid uid, NightVisionComponent component, MapInitEvent args) + { + _actionContainer.AddAction(uid, ref component.ToggleActionEntity, component.ToggleAction); + Dirty(uid, component); + } + + private void OnToggleNightVision(EntityUid uid, NightVisionComponent component, ToggleNightVisionEvent args) + { + if (args.Handled) + return; + + args.Handled = true; + + ToggleNightVision(uid, component); + } + + private void ToggleNightVision(EntityUid uid, NightVisionComponent nightvision) + { + nightvision.On = !nightvision.On; + + if (_sharedContainer.TryGetContainingContainer(uid, out var container) && + _inventory.TryGetSlotEntity(container.Owner, "eyes", out var entityUid) && entityUid == uid) + UpdateNightVisionEffects(container.Owner, uid, true, nightvision); + + if (TryComp(uid, out var item)) + { + _item.SetHeldPrefix(uid, nightvision.On ? "on" : null, component: item); + _clothing.SetEquippedPrefix(uid, nightvision.On ? "on" : null); + } + + _appearance.SetData(uid, ToggleVisuals.Toggled, nightvision.On); + OnChanged(uid, nightvision); + Dirty(uid, nightvision); + } + + protected virtual void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component) { } + + protected void OnChanged(EntityUid uid, NightVisionComponent component) + { + _sharedActions.SetToggled(component.ToggleActionEntity, component.On); + } + + private void AddToggleVerb(EntityUid uid, NightVisionComponent component, GetVerbsEvent args) + { + if (!args.CanAccess || !args.CanInteract) + return; + + ActivationVerb verb = new(); + verb.Text = Loc.GetString("lpp-toggle-nightvision-verb-get-data-text"); + verb.Act = () => ToggleNightVision(uid, component); + args.Verbs.Add(verb); + } + + private void OnGetActions(EntityUid uid, NightVisionComponent component, GetItemActionsEvent args) + { + args.AddAction(ref component.ToggleActionEntity, component.ToggleAction); + } +} + +public sealed partial class ToggleNightVisionEvent : InstantActionEvent {} diff --git a/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl new file mode 100644 index 00000000000..18a0ef1fb99 --- /dev/null +++ b/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl @@ -0,0 +1,19 @@ +ent-LPPActionBaseToggleNightVision = Toggle NVG + .desc = Toggles the NVG on and off. +ent-LPPActionToggleNightVision = { ent-LPPActionBaseToggleNightVision } + .desc = { ent-LPPActionBaseToggleNightVision } +ent-LPPClothingEyesNVG = NVG + .desc = Now you can see in the dark! It has the label "BL CORP technology". +lpp-alerts-nightvision-name = Night Vision +lpp-alerts-nightvision-desc = I can see in the dark! It's a pity that my eyes are going to hurt soon... +lpp-toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles +ent-LPPClothingEyesNVG = NVG + .desc = Now you can see in the dark! It has the label "BL CORP technology". +ent-LPPClothingEyesMesonNVG = meson NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesMedNVG = medical NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesSecNVG = security NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesDiagnosticNVG = diagnostic NVG + .desc = { ent-LPPClothingEyesNVG.desc } \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl new file mode 100644 index 00000000000..18a0ef1fb99 --- /dev/null +++ b/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl @@ -0,0 +1,19 @@ +ent-LPPActionBaseToggleNightVision = Toggle NVG + .desc = Toggles the NVG on and off. +ent-LPPActionToggleNightVision = { ent-LPPActionBaseToggleNightVision } + .desc = { ent-LPPActionBaseToggleNightVision } +ent-LPPClothingEyesNVG = NVG + .desc = Now you can see in the dark! It has the label "BL CORP technology". +lpp-alerts-nightvision-name = Night Vision +lpp-alerts-nightvision-desc = I can see in the dark! It's a pity that my eyes are going to hurt soon... +lpp-toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles +ent-LPPClothingEyesNVG = NVG + .desc = Now you can see in the dark! It has the label "BL CORP technology". +ent-LPPClothingEyesMesonNVG = meson NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesMedNVG = medical NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesSecNVG = security NVG + .desc = { ent-LPPClothingEyesNVG.desc } +ent-LPPClothingEyesDiagnosticNVG = diagnostic NVG + .desc = { ent-LPPClothingEyesNVG.desc } \ No newline at end of file diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index bb0c47f48fb..4171e670f81 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -25,6 +25,7 @@ - category: Hunger - category: Thirst - alertType: Magboots + - alertType: LPPNightVision # _LostParadise - alertType: Pacified - alertType: Offer - alertType: Deflecting diff --git a/Resources/Prototypes/_LostParadise/Alerts/alerts.yml b/Resources/Prototypes/_LostParadise/Alerts/alerts.yml new file mode 100644 index 00000000000..d3edef6831c --- /dev/null +++ b/Resources/Prototypes/_LostParadise/Alerts/alerts.yml @@ -0,0 +1,7 @@ +- type: alert + id: LPPNightVision + icons: + - sprite: /Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi + state: alert + name: lpp-alerts-nightvision-name + description: lpp-alerts-nightvision-desc \ No newline at end of file diff --git a/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml b/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml new file mode 100644 index 00000000000..d637d1300ec --- /dev/null +++ b/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml @@ -0,0 +1,147 @@ +- type: entity + parent: ClothingEyesBase + id: LPPClothingEyesNVG + name: NVG + description: Now you can see in the dark! It has the label "BL CORP technology". + components: + - type: Sprite + sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi + layers: + - state: icon + map: [ "enum.ToggleVisuals.Layer" ] + - type: Clothing + sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi + - type: NightVision # MUST HAVE ALL TINT! + tint1: 0.3 # Red + tint2: 1.0 # Green + tint3: 0.3 # Blue + # strength: 2 # Add if you need + # noise: 0.5 # Add if you need + - type: Appearance + - type: GenericVisualizer + visuals: + enum.ToggleVisuals.Toggled: + enum.ToggleVisuals.Layer: + True: {state: icon-on} + False: {state: icon} + - type: StaticPrice + price: 200 + - type: Tag + tags: + - WhitelistChameleon + +- type: entity + id: LPPClothingEyesMesonNVG + parent: LPPClothingEyesNVG + name: meson NVG + components: + - type: EyeProtection + +- type: entity + id: LPPClothingEyesSecNVG + parent: [LPPClothingEyesNVG, ShowSecurityIcons] + name: sec NVG + components: + - type: Tag + tags: + - HudSecurity + - type: NightVision + toggleAction: LPPActionToggleSecNightVision + tint1: 1.0 + tint2: 0.3 + tint3: 0.3 + - type: Sprite + sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi + - type: Clothing + sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi + - type: FlashImmunity + +- type: entity + id: LPPClothingEyesMedNVG + parent: LPPClothingEyesNVG + name: medical NVG + components: + - type: ShowHealthBars + damageContainers: + - Biological + - type: ShowHealthIcons + damageContainers: + - Biological + - type: Tag + tags: + - HudMedical + - type: NightVision + toggleAction: LPPActionToggleMedNightVision + tint1: 0.3 + tint2: 0.3 + tint3: 0.7 + - type: Sprite + sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi + - type: Clothing + sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi + +- type: entity + id: LPPClothingEyesDiagnosticNVG + parent: LPPClothingEyesNVG + name: diagnostic NVG + components: + - type: NightVision + toggleAction: LPPActionToggleDiagnosticNightVision + tint1: 1.0 + tint2: 1.0 + tint3: 0.3 + - type: Sprite + sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi + - type: Clothing + sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi + - type: EyeProtection + - type: ShowHealthBars + damageContainers: + - Inorganic + - Silicon + +- type: entity + id: LPPActionBaseToggleNightVision + name: Toggle NVG + description: Toggles the NVG on and off. + noSpawn: true + components: + - type: InstantAction + itemIconStyle: NoItem + event: !type:ToggleNightVisionEvent + +- type: entity + id: LPPActionToggleNightVision + parent: LPPActionBaseToggleNightVision + noSpawn: true + components: + - type: InstantAction + icon: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: icon } + iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: icon-on } + +- type: entity + id: LPPActionToggleMedNightVision + parent: LPPActionBaseToggleNightVision + noSpawn: true + components: + - type: InstantAction + icon: { sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi, state: icon } + iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi, state: icon-on } + +- type: entity + id: LPPActionToggleSecNightVision + parent: LPPActionBaseToggleNightVision + noSpawn: true + components: + - type: InstantAction + icon: { sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi, state: icon } + iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi, state: icon-on } + +- type: entity + id: LPPActionToggleDiagnosticNightVision + parent: LPPActionBaseToggleNightVision + noSpawn: true + components: + - type: InstantAction + icon: { sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi, state: icon } + iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi, state: icon-on } \ No newline at end of file diff --git a/Resources/Prototypes/_LostParadise/Shaders/shaders.yml b/Resources/Prototypes/_LostParadise/Shaders/shaders.yml new file mode 100644 index 00000000000..77a87b5cf5a --- /dev/null +++ b/Resources/Prototypes/_LostParadise/Shaders/shaders.yml @@ -0,0 +1,4 @@ +- type: shader + id: LPPNightVision + kind: source + path: "/Textures/_LostParadise/Shaders/nightvision.swsl" \ No newline at end of file diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png new file mode 100644 index 0000000000000000000000000000000000000000..bc45f57ae028b5737f4335d90eacb1fb03c130bf GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NCfzVxPoX2 zC0#=sJLiBidB*peH6AZ?`F|==(E4#PP>!P{$S;`TKLlJo6=DPw^Ye6Z42fucd(DvV zfB}c|#TzP5{+au2E?qcvmEOdE(h&}6E!RG*-*MG{inFBF=UmUSy^fnt@8tpNeBRl; qY2W+bl{bw06{R-keX?O-h|{UR$|qH?0(Q z>tEG6U;NR&@{8%!W|`Uc7xF=FW$<+Mb6Mw<&;$Sm5pt*i literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8bcf7105c2ba36f66beaadf560b76a9e095f924d GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCil21AIbU?VJO24Q(VOltLquw`VCWjnv%JYH?##2vA-%W$|wy#aR;M7yKUz z7=ryPgg}A?9+AZi419+{nDKc2iWHz=x2KC^h=u>#37&k+iaacL-zNV2-+ei4zDJ)Sg7qp~XuIk%3Jr6%9C9(X0nn1$i0KY~V>9=9~Sid|BymH<$dA6Q|OX1S@O)G`n z`d78ixbDkXrrP|x``z2M%J-f0R4;o?D*hsWD6~k)WQhu=vS@I^?xt5)|0Ev}`lWu9 mpGBE_+J{c}7k{*`{9<~wS!TBVg?x}(89ZJ6T-G@yGywp$pK%)i literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..04fff80e4df5f5bfe6b670cf9f68368e945a073a GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NC)_YxB_Vj z2_;=a8$0KKGkM1Mnl&CTboqZO@&Et-xdI8oKxxjBAirP+ARi3OnPy)B3Z{FyIEF;D zzP)yk?|=dabHI`X|Ne{TZ+A86ev>k7-|S;TdqP_}Ufh?N@s8pCxopE;;RRtO^-kZd z{2adSo4^0Qd9w|pXvFOLue+Qj#rWKnl$5MImaWkFymHZ|6YAYw9~Q1S!l|RxzKdax XEW^!ZZ4OI-Rx)_H`njxgN@xNA_h(vM literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..d80344136fca4bab3f4e25ae0dc66b77c694904f GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NC)_YxB_Vj z2_;=a8$0KKGkM1Mnl&CTboqZO@&Et-xdI8oKxxjBAirP+ARi3OnPy)B3Z{6vIEF;D zzP)D6cR+!M`GSD@fxrHD`gG+r6SJS1Cr`epk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`031o(uw+BpYENGLsC=yI=FL)Xye|Ea_?dB#A=rE*`zffPqckYDhB2w=F^ zyf+dk##!JISk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z-fPyda}Llow2_cdI+JJo|NsBT3tj%7N(9PxMJ?X~q&Q20{DOhv zV89UUUm*k%EbxddW?^6d^XUabEY}=W*({p9SPIyuUf|o~s9M3E e&0@#A%K9Z|-2|phZ|?(L#o+1c=d#Wzp$PzG(Q+C9 literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..d891cb8cb203fe9bee2c3f58e2d3685d6a5ba968 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z+BpZ@Yu3;;v^kS!EFq!vc%jRGAUKr>l)qy#c|MThED7=p1_^=y zL$H5^5J<4VBeIx*f$uN~Gak=hkpdL#^K@|xiEw{A&06Sy0tc(0@0Wk-eG-q&jUO%X z{J1TE>&9|f5j!SE7A6(}4tpVinK5e(LyG5j-LN|Mm8)!8cELWr;;iS3ADXy(PHSe4 zjGx1GBDyPhrH{Jx*WdZC4*0#(7I08-U}$6jnJ{_5UE7i`fA79qn4FPc&M%u>zPb9v nj7MeDr=FER@9-f~;1Fy7y}EXjMaHXuE@SX?^>bP0l+XkKBdl=j literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png new file mode 100644 index 0000000000000000000000000000000000000000..518ee78ffec603c72ccb208b627befc0768b0785 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NCfzVxPoX2 zC0#=sJLdqErT1j}-#A}lBSEK+1yFFbTLoEE?PVnSoR^(y1`!@0C|L)6a^F0DZ zo?4Y2xS%E7a#i2P>3R4;DT(C|)C3Y92lzG0NWTr+$NJ@A;Fa^1$+PtwTnd-IZ(1qr z*1xKC#&uuDGS%ki-S6J6Rle_}r+V3IQt=o0L!m`VCQDQ}l|_RSb~nAc`X~8-&@c6) m{4C1c(>`>%zxbnl`Ni~Vv&?M!3;7_oGI+ZBxvXk44ofy`glX(f`NC)_YxB_Vj z2_;=a8$0I!m8JJ&``&Bq-~9de&6{l)MI&a{f8FIQDaPlnq@-l!v22CT=aq{#olx)g`mk`t5l$Vg_FW8n XWEpNQYjaovw35No)z4*}Q$iB}O9Nb- literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..f9c17318b4ee395b57eb4efab8c1756143523406 GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NC)_YxB_Vj z2_;=a8$0I!m8JJ&``Q#W5tJ z_3brlz5@z8%ohaI5B&AN)2A!1nV9|5JbCg(B^Q_f%oRV@G8f0K%`jMhv?RyjtK8Z9 zymw!(c4WQwZ1uMbJfHpqc>nl!m_blbP&O*Jzvt>V53`=z%DK1XeoF7KwR^#Ik44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`031o(uw+BpYENGLg9d?MTbM%U0L;s1A)rT2i6{D$IJfD}hbkYDhB2w=F^ zyf+dk##!JISk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z%J#ppa}Llow2_cdQdxTM|NsBa7oQ~j{|=N_TE}z@NO6_~`2_>T z!GIyyzd{HkSl|&^%)r2R7=#&*=dVZs3U+zAIEF;HzrA*vuR(#wC2-lN7ys)wUYnp0 zBrI*N_iWvTBgz}HF7*p4BmmK05f6v>UWWhi_o8oZy2I*mZ^`=QF=1Y-HaE=b`u+E? z?1I!6KO97Mu3c{Rx$&{c<+l9(>v9d>A$mb%2lMF#LM+!DRoN_>y;us^r(WROgf5UB%$(>gTe~DWM4fX0mb^ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..94d32783e0acbc14b78395389286e9db16ab87f4 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z+BpZv_P^0Jv{6}lPeMY;`QnrR|Nkfa{|=N-+4-LhNO6_~`2_<7 z!GIyyzd{HkSl|&^%)r2R7=#&*=dVZs3if%rIEF;Hznx|+bU=ZFRnYg#KlMI|$L7Y5 zmUw>L7Ql65xvYpC6C(=~ivWkckig8CwT2!YO)lSD p{bI(WvguRL%Aa@m5Ginowf|mSyU8NsRX~?9c)I$ztaD0e0sxf|ad7|u literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/alert.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/alert.png new file mode 100644 index 0000000000000000000000000000000000000000..d38018fc26d6fcc609e1de5e2e7df631412d8517 GIT binary patch literal 874 zcmV-w1C{)VP)G$8ao%fwQkkKE2-~)u z2)NjoIPR%{soi13*5r~tw~Z?zAOIuTi71QMe!ZYa_H8^qX6nQz0+s_QNQ!_sbjUMT zr>KKDuCAH@q|+(PYK=zvp(A1>S_C+eNM(jt|Mp#xj)1#z!!!X6FzCk8vWWB-Ex_o0{9*T_Vrf{lI##XTT74VtSaB#qefkkh zL5Dg3%I%ytW( zl=jwbxzuc&Q*Feb`!|86sx&WtdDrr`00@ZaHNw9OR$12Pw)t-#s8aQMS4BMO|5y)xJM&sW{DT+Ur+HP`sGE$7e0hfaN4p#5d)g4}&Km{s$+pREi3_*Uj-+Sk0%FD o-l-)SUA^y^Fg~k(_&$&}IPYm+xyRrwFmM?>UHx3vIVCg!09<{XZ2$lO literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png new file mode 100644 index 0000000000000000000000000000000000000000..bf770f70f8969ba008b8e4d2b2687cd602520849 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv=>VS)*8>L**f|I28rn!mD1}BQ zi!9KSsclyt1T!`qZMy~(> literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a2d457c0c9ee6c4663287764f4a677185827df74 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCil21AIbU?VJO24Q(VOltLqu1zXgFBXvDyYBg>$2g-{sjo}7ToFzei!T+Iv zA=tk{2qakG5n0T@z;_sg8IR|$NC66Vd%8G=Sopu4;K|3V$is5?ZQ{@W-IvqmdjyI+ zwJJSuK})*js=kfW^YDXG63ZW`2_!rY@N1NjejB!r^~=M+E9WhfXX`n*6fS+=v{Klu ze^u*@>%NR-s?E>4-@RR{eBVh=^|IHb;xF=tLW`74mZ)$liv}m`ZhCd~Px1kwU+PEs lS(Le_edu(5@kjg0FQ!+UWoFx7$OpNV!PC{xWt~$(6972UZY2N! literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..995b37471b38d3dbcef1e91888c4ed58239b2d29 GIT binary patch literal 385 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVD#{GaSW+oe0ytS)}a8AV;?79 zTDrUS+Q#IAP0lZsthSWoxw9WU{v!DYhg1B5>~=oQcTG*fg=?A>V|Tglb68?=^-eYO z#s71CKGf`de*CKH@t#%&CJu!LG~z%Yr^~+Gxjp%tUSD5r^X>EFvzGg-|4-4(F^q^Z znq&F=?YHVp)rX(%y813!_Xwq1POdh~sI^pF2$AHG+EHSOm8{6o=W#kb{d*H*u; zS^a$a*}YN)E5Bwqi(qjds&fl0m=50K3wI1TBe%n+zhXZBibaLCi>F;y-d9lL*MH>| rOUn$om3QkIfC6>yPr#m?k;`yJy1Mbjqo4nPLCfIj>gTe~DWM4fU$Cme literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..c3efa67f837fbc9cc5851d2ec09ce705d1bc7652 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU`+IMaSW+oe0ytS)}a82qaV*- zI(paX^^L%Q0*zQNYmK?LH#R>={vl!4^nkmhv>;%Yc+?A(J}Zr~mvWYk+>A$OyLd19 z_g={GyV~0qbm+$>=7ys&Nlh=Q< zJ!dO^ygOUHQG3Fv|Ldli?To*f`uzN=uk8ZK*JtUR*PLIZwZ3S#ynd*fZk_a9R-vmW zsw=~TEKR3G|E%SZ_IKFwA|qhSyU$x~P2=DG{(Shi#ZG}pxv9aGQ=@<0?f6!7|K*OY zQ`GdIZ7#TX)%Rz{DfjNVPVE`;cFGM5OdJaMh-%K9T5Fl-U7qDhM|P%(6`OryKf<{% z{5<>ZPQmAGm2;F^RICj@-Ef>4WXl*eqeQ*!+LOX1|M&}1Z*)FXu}}gTEi?as)UL{^ V#;mG;OXk;vd$@?2>@%NsSE%B literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json new file mode 100644 index 00000000000..0be37db9a95 --- /dev/null +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json @@ -0,0 +1,44 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from Blue Moon ss13", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-EYES", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "icon-on" + }, + { + "name": "on-equipped-EYES", + "directions": 4 + }, + { + "name": "on-inhand-left", + "directions": 4 + }, + { + "name": "on-inhand-right", + "directions": 4 + }, + { + "name": "alert" + } + ] +} diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png new file mode 100644 index 0000000000000000000000000000000000000000..5ddabf1024eef32d296990bf3f2eb62d3f11cca3 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`031o(uw+BpYENGL@fG!9JLeK1u>_xSvO zx2;@Ge}DL4-U;37o0^UvKELnaYz~19Ae6(rR@PTOpWn`^=@rm+22WQ%mvv4FO#mJK BU2^~c literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..f7ea640aeecc24689946bee1720f8081333c4f80 GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}ziY(Bxa}Llow2_cdlB%-%|NnpFLDMDA+<@}6Kbg(}DbA80zhIy^ z7%&9;R|tUw3p^r=85sBugD~Uq{1quc!7fi1$B+p3x7SYdH7M}71TOpZ;(z_dYZDZL zgr&{(o~^rZM0rEjrG7z$1R(k=;^7eA%kV$`Ui8gPcUV2{Em^-jCd_Nq=7w2azyBVV zU6A_Xhl9w@wacwOH$E1*+?L;eU9RCfL@$W!U_QM-h~=82Dw{>K7fS*A)C+uj991jW fvsvtzS6RR0tee2J>Fs@>s~9|8{an^LB{Ts5nQm|l literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..c90f8a486229a2eafdf651b180fb9d3d7fee3842 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z+BpY^EYQ<6w2`W^laNq~JZSp=|NkY=+<@}g%iq2OQk*40e!)ON zFklGwuMh$W7I;J!GcfQS24TkI`72U@f_L!c9Z=w474-e`PrXm#vAOZ1 zC7vI*1#sP1E-PZk#K^+LBEVrUBrr2(tzk&<{H_~T=e}~4P0KFW$5)*7eDOmQch70f z%#rbPxK2cO1+Vl`xBmJ&|J4D%ciI9D3Jwg73?LIGFSu)4^5yT{cMFp<^2_;Ulgl?( oznJl;Z2Hu*^5-2sL<$^Y?Y~#oZnDUD70_i2p00i_>zopr0MjXNf&c&j literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png new file mode 100644 index 0000000000000000000000000000000000000000..0c70aaa3ea716265a4ff0edc4eb4e5b949114625 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NCfzVxPoX2 zC0#=sJLiC6aot&>a(l#tZ(HzaII5X<=Th!JFfaqahBBjoab@`iE0qSWTRPc{q;aXR%k8QPSJdiDe589ZJ6T-G@yGywpj97s|C literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png new file mode 100644 index 0000000000000000000000000000000000000000..81f695aa460012731ca4108b2575d562f3164e03 GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCil21AIbU?VJO24Q(VOltLquAIM0|l(XG0rSadMA1I%3sm>Efah3%61^Px$vq?ljR9J=Wls`x#K@^8SgJ6*&m?l@?Zl_Ff8e zy@BhkEG+E=K@y0akb^`a5scXEs=Myispg7vf*Z5DL5nMHzG|5_^WN|G-p+tRp-}wq zOa%oSjfQWmQmu(`>#k$-YyYPwZ?RbP%`+V&U>v2=x=80V04&q+6*o@Ey9Ja=>jDT( zEcaEaHL>?&J85+P^s2LHk0(Mce_0-(;%JG zSX^9qb?)Ku3F&-mXIH#g!0MOp!gXw#Ohig)xWg6Vy_kHU` zf&|Fq<#vnZ%Nyc}6s}`a&~-M?jw!cWSf)WXlO&r-(yZ5U9ea4*G7XN74gyVv{)ClI zll=Su9fxlngK{KBJdq+lH{j$}qoA*_d3H=+MCpE*9Xba>i-&dqpf92T-1TQTnfja9 zb!;}GUpduc0OaQe^dd3Oxk-vcNCzy_;PBIDXt(G^VqAQjC;dEM>9kp|vzA)|4bR*s vCG-}Idw8TfdEZAFbszK+DijKZ;-B*e%6-anRB9Xj00000NkvXXu0mjf^S9-c literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..02b00b1591eea9b0c895e3a2a40ac644df2afe07 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`NC)_YxB_Vj z2_;=a8$0KKVsYJBqH=r0gl}8${Qv)7Ep<;nP@1zO$S;@y$Oi*+rrB43g6W6>n>+WF+O)CB_%75Wh-<(uUxe0gnGBvhlMMSaO!Ba?_$^^ W%W!j9o5K>Il?k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z+BpZz5|z_6v?&(Xm5@-{BPRU+|Nq+-JV5!=^5?$*DbA80zhIys z7%&9;R|tUw3p^r=85sBugD~Uq{1quc!9GtH$B+p3x6`bJ4k&Q23i^Ker`{*=*xdNh z63>s@0=RB0mld&NVq{@r5#X>F5||mY)-a@ae%B4Fb6>g2rezoG<15a3zWAYuyXUlK z=E(RtTqmNtf>-*eTYvqX|LTC>J8c061qX&k29ODp7u>Zi`SSPfyM@Ua`Q`kw$>p1? oU(9$^Hht<@`ST7RA_Wey_TQ^(H(6x73g|KhPgg&ebxsLQ0D|>x_W%F@ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json new file mode 100644 index 00000000000..5e93502c053 --- /dev/null +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json @@ -0,0 +1,42 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from Blue Moon ss13", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-EYES", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "icon-on" + }, + { + "name": "on-equipped-EYES", + "directions": 4 + }, + { + "name": "on-inhand-left", + "directions": 4 + }, + { + "name": "on-inhand-right", + "directions": 4 + } + ] +} + diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png new file mode 100644 index 0000000000000000000000000000000000000000..b73779a280ee8d0733f97a303b140de71482c706 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`031o(uw+BpYENGR6LI>K0f_e7&f2bL=avM!L4d9^SkV=hx-_IF+-hXYXb!BipLlGYC3-S{Jw*;IRrLk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z&JvZga}Llow2_cdDi+uM|Ns9UG2z=5JV1FxpRKMyinAohFBm8e z1`NUe6+$4v0*}aI1_r*vAk26?e?N7V}U eY!*A_Rn{*#>n1R5dV3$}Dh5wiKbLh*2~7acr)}Z@ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..6ba4b3e64ee173d9d8cc52d6da70949729f3c778 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`032l#}z+BpZz5|z_6v?&(Xm5@-{BPRU+|Nq+-JV5!=^5?$*DbA80zhIys z7%&9;R|tUw3p^r=85sBugD~Uq{1quc!9GtH$B+p3x6`bJ4k&Q23i^Ker`{*=*xdNh z63>s@0=RB0mld&NVq{@r5#X>F5||mY)-a@ae%B4Fb6>g2rezoG<15a3zWAYuyXUlK z=E(RtTqmNtf>-*eTYvqX|LTC>J8c061qX&k29ODp7u>Zi`SSPfyM@Ua`Q`kw$>p1? oU(9$^Hht<@`ST7RA_Wey_TQ^(H(6x73g|KhPgg&ebxsLQ0D|>x_W%F@ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Shaders/nightvision.swsl b/Resources/Textures/_LostParadise/Shaders/nightvision.swsl new file mode 100644 index 00000000000..8a3e7706ada --- /dev/null +++ b/Resources/Textures/_LostParadise/Shaders/nightvision.swsl @@ -0,0 +1,38 @@ +light_mode unshaded; + +uniform sampler2D SCREEN_TEXTURE; +uniform highp vec3 tint; // Colour of the tint +uniform highp float luminance_threshold; // number between 0 and 1 +uniform highp float noise_amount; // number between 0 and 1 + +lowp float rand (lowp vec2 n) { + return 0.5 + 0.5 * fract (sin (dot (n.xy, vec2 (12.9898, 78.233)))* 43758.5453); +} + +void fragment() { + + highp vec4 color = zTextureSpec(SCREEN_TEXTURE, FRAGCOORD.xy * SCREEN_PIXEL_SIZE); + + // convert color to grayscale using luminance + highp float grey = dot(color.rgb, vec3(0.298, 0.5882, 0.1137)); + + // calculate local threshold + highp float threshold = grey * luminance_threshold; + + // amplify low luminance parts + if (grey < threshold) { + grey += (threshold - grey) * 0.5; + if (grey > 1.0) { + grey = 1.0; + } + } + + // apply night vision color tint + color.rgb = mix(color.rgb, tint, grey); + + // add some noise for realism + lowp float noise = rand(FRAGCOORD.xy + TIME) * noise_amount / 10.0; + color.rgb += noise; + + COLOR = color; +} From f5960c31389883bf6953c32b939f9b250a0727e7 Mon Sep 17 00:00:00 2001 From: BL02DL Date: Tue, 22 Oct 2024 21:19:49 +0700 Subject: [PATCH 2/7] Update copyright --- .../_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json index 0be37db9a95..e819d10ae03 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13", + "copyright": "Taken from Blue Moon ss13, Alert by @timxx7019 from Lost Paradise", "size": { "x": 32, "y": 32 From 94f4454710a0f754e105cd79c941a88eb336304a Mon Sep 17 00:00:00 2001 From: BL02DL Date: Wed, 23 Oct 2024 00:23:46 +0700 Subject: [PATCH 3/7] Requested changes --- .../Clothing/NightVisionOverlay.cs | 14 ++--- .../Clothing/NightVisionSystem.cs | 46 +++++--------- Content.Client/IoC/ClientContentIoC.cs | 2 - .../Clothing/NightVisionSystem.cs | 24 +------- Content.Shared/Alert/AlertType.cs | 7 --- .../Clothing/NightVisionComponent.cs | 9 ++- .../Clothing/SharedNightVisionSystem.cs | 14 ++--- .../_LostParadise/NightVision/NightVision.ftl | 30 +++++---- .../_LostParadise/NightVision/NightVision.ftl | 34 +++++----- Resources/Prototypes/Alerts/alerts.yml | 1 - .../_LostParadise/Alerts/alerts.yml | 7 --- .../Entities/Clothing/Eyes/NightVision.yml | 58 +++++------------- .../_LostParadise/Shaders/shaders.yml | 2 +- .../NVG/diagnosticnightvision.rsi/meta.json | 2 +- .../Eyes/NVG/mednightvision.rsi/meta.json | 2 +- .../Eyes/NVG/nightvision.rsi/meta.json | 7 ++- .../Eyes/NVG/nightvision.rsi/toggle-off.png | Bin 0 -> 803 bytes .../{alert.png => toggle-on.png} | Bin .../Eyes/NVG/secnightvision.rsi/meta.json | 2 +- 19 files changed, 86 insertions(+), 175 deletions(-) rename Content.Client/{_LostParadise => }/Clothing/NightVisionOverlay.cs (70%) rename Content.Client/{_LostParadise => }/Clothing/NightVisionSystem.cs (78%) rename Content.Server/{_LostParadise => }/Clothing/NightVisionSystem.cs (57%) rename Content.Shared/{_LostParadise => }/Clothing/NightVisionComponent.cs (82%) rename Content.Shared/{_LostParadise => }/Clothing/SharedNightVisionSystem.cs (89%) delete mode 100644 Resources/Prototypes/_LostParadise/Alerts/alerts.yml create mode 100644 Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png rename Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/{alert.png => toggle-on.png} (100%) diff --git a/Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs b/Content.Client/Clothing/NightVisionOverlay.cs similarity index 70% rename from Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs rename to Content.Client/Clothing/NightVisionOverlay.cs index c3835531220..d680783f533 100644 --- a/Content.Client/_LostParadise/Clothing/NightVisionOverlay.cs +++ b/Content.Client/Clothing/NightVisionOverlay.cs @@ -1,9 +1,8 @@ using Robust.Client.Graphics; -using Robust.Client.Player; using Robust.Shared.Enums; using Robust.Shared.Prototypes; -namespace Content.Client._LostParadise.Clothing; +namespace Content.Client.Clothing; /// /// Made by BL02DL from _LostParadise @@ -12,19 +11,19 @@ namespace Content.Client._LostParadise.Clothing; public sealed class NightVisionOverlay : Overlay { private readonly IPrototypeManager _prototypeManager; - private readonly NightVisionEntitySystem _nightVisionEntitySystem; + private readonly NightVisionSystem _nightVisionSystem; public override bool RequestScreenTexture => true; public override OverlaySpace Space => OverlaySpace.WorldSpace; private readonly ShaderInstance _shader; - public NightVisionOverlay() + public NightVisionOverlay(NightVisionSystem nightVisionSystem) { IoCManager.InjectDependencies(this); - _nightVisionEntitySystem = IoCManager.Resolve(); + _nightVisionSystem = nightVisionSystem; _prototypeManager = IoCManager.Resolve(); - _shader = _prototypeManager.Index("LPPNightVision").InstanceUnique(); + _shader = _prototypeManager.Index("NightVision").InstanceUnique(); } protected override void Draw(in OverlayDrawArgs args) @@ -33,9 +32,8 @@ protected override void Draw(in OverlayDrawArgs args) return; var handle = args.WorldHandle; - var nightcomp = _nightVisionEntitySystem.GetNightComp(); + var nightcomp = _nightVisionSystem.GetNightComp(); - // Получение данных об оверлее Ночного Видения if (nightcomp == null) { Logger.Error("Failed to get night vision component from eyes."); diff --git a/Content.Client/_LostParadise/Clothing/NightVisionSystem.cs b/Content.Client/Clothing/NightVisionSystem.cs similarity index 78% rename from Content.Client/_LostParadise/Clothing/NightVisionSystem.cs rename to Content.Client/Clothing/NightVisionSystem.cs index ee8f70ce4ac..3b1ad60affc 100644 --- a/Content.Client/_LostParadise/Clothing/NightVisionSystem.cs +++ b/Content.Client/Clothing/NightVisionSystem.cs @@ -1,11 +1,11 @@ -using Content.Shared._LostParadise.Clothing; +using Content.Shared.Clothing; using Content.Shared.GameTicking; using Robust.Client.Player; using Robust.Client.Graphics; using Content.Client.Inventory; using Content.Shared.Inventory.Events; -namespace Content.Client._LostParadise.Clothing; +namespace Content.Client.Clothing; /// /// Made by BL02DL from _LostParadise @@ -15,6 +15,8 @@ public sealed class NightVisionSystem : SharedNightVisionSystem { [Dependency] private readonly IOverlayManager _overlayMan = default!; [Dependency] private readonly ILightManager _lightManager = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; private NightVisionOverlay _overlay = default!; @@ -25,32 +27,32 @@ public override void Initialize() SubscribeLocalEvent(OnRestart); SubscribeLocalEvent(OnGotUnequipped); - _overlay = new(); + _overlay = new(this); } - protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component) + public NightVisionComponent? GetNightComp() + { + var playerUid = EntityUid.Parse(_playerManager.LocalPlayer?.ControlledEntity.ToString()); + var slot = _entityManager.GetComponent(playerUid); + _entityManager.TryGetComponent(slot.SlotData["eyes"].HeldEntity, out var nightvision); + return nightvision; + } + + protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component = null) { if (!Resolve(uid, ref component)) - { return; - } - state = state && component.On; + state = state && component.Enabled; if (state) { _lightManager.DrawLighting = false; - - /// Adding an overlay when the effect is activated - /// Добавление наложения при активированном эффекте _overlayMan.AddOverlay(_overlay); } else { _lightManager.DrawLighting = true; - - /// Removing an overlay when the effect is deactivated - /// Удаление наложения при деактивированном эффекте _overlayMan.RemoveOverlay(_overlay); } } @@ -71,21 +73,3 @@ private void OnRestart(RoundRestartCleanupEvent ev) _lightManager.DrawLighting = true; } } - -public sealed class NightVisionEntitySystem : EntitySystem -{ - [Dependency] private readonly IPlayerManager _playerManager = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; - public override void Initialize() - { - base.Initialize(); - } - - public NightVisionComponent? GetNightComp() - { - var playerUid = EntityUid.Parse(_playerManager.LocalPlayer?.ControlledEntity.ToString()); - var slot = _entityManager.GetComponent(playerUid); - _entityManager.TryGetComponent(slot.SlotData["eyes"].HeldEntity, out var nightvision); - return nightvision; - } -} \ No newline at end of file diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs index 5c07736a4cb..8c2b676c2e2 100644 --- a/Content.Client/IoC/ClientContentIoC.cs +++ b/Content.Client/IoC/ClientContentIoC.cs @@ -21,7 +21,6 @@ using Content.Client.Replay; using Content.Shared.Administration.Managers; using Content.Shared.Players.PlayTimeTracking; -using Content.Client._LostParadise.Clothing; // _LostParadise namespace Content.Client.IoC @@ -55,7 +54,6 @@ public static void Register() collection.Register(); IoCManager.Register(); IoCManager.Register(); - IoCManager.Register(); // _LostParadise } } } diff --git a/Content.Server/_LostParadise/Clothing/NightVisionSystem.cs b/Content.Server/Clothing/NightVisionSystem.cs similarity index 57% rename from Content.Server/_LostParadise/Clothing/NightVisionSystem.cs rename to Content.Server/Clothing/NightVisionSystem.cs index 1af9eb1064f..68a80d7cf73 100644 --- a/Content.Server/_LostParadise/Clothing/NightVisionSystem.cs +++ b/Content.Server/Clothing/NightVisionSystem.cs @@ -1,8 +1,8 @@ -using Content.Shared._LostParadise.Clothing; +using Content.Shared.Clothing; using Content.Shared.Alert; using Content.Shared.Inventory.Events; -namespace Content.Server._LostParadise.Clothing; +namespace Content.Server.Clothing; /// /// Made by BL02DL from _LostParadise @@ -10,31 +10,12 @@ namespace Content.Server._LostParadise.Clothing; public sealed class NightVisionSystem : SharedNightVisionSystem { - [Dependency] private readonly AlertsSystem _alertsSystem = default!; - public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnGotEquipped); SubscribeLocalEvent(OnGotUnequipped); - - } - - protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, bool state, NightVisionComponent? component) - { - if (!Resolve(uid, ref component)) - return; - state = state && component.On; - - if (state) - { - _alertsSystem.ShowAlert(parent, AlertType.LPPNightVision); - } - else - { - _alertsSystem.ClearAlert(parent, AlertType.LPPNightVision); - } } private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotUnequippedEvent args) @@ -42,7 +23,6 @@ private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotU if (args.Slot == "eyes") { UpdateNightVisionEffects(args.Equipee, uid, false, component); - _alertsSystem.ClearAlert(uid, AlertType.LPPNightVision); } } diff --git a/Content.Shared/Alert/AlertType.cs b/Content.Shared/Alert/AlertType.cs index 1a20ff77358..bd8c1dbe257 100644 --- a/Content.Shared/Alert/AlertType.cs +++ b/Content.Shared/Alert/AlertType.cs @@ -50,13 +50,6 @@ public enum AlertType : byte Pulled, Pulling, Magboots, - - // Start _LostParadise - - LPPNightVision, - - // End _LostParadise - Internals, Toxins, Muted, diff --git a/Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs b/Content.Shared/Clothing/NightVisionComponent.cs similarity index 82% rename from Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs rename to Content.Shared/Clothing/NightVisionComponent.cs index 3345ebfc31e..8ca1cd3a6d0 100644 --- a/Content.Shared/_LostParadise/Clothing/NightVisionComponent.cs +++ b/Content.Shared/Clothing/NightVisionComponent.cs @@ -1,7 +1,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -namespace Content.Shared._LostParadise.Clothing; +namespace Content.Shared.Clothing; /// /// Made by BL02DL from _LostParadise @@ -12,13 +12,13 @@ namespace Content.Shared._LostParadise.Clothing; public sealed partial class NightVisionComponent : Component { [DataField] - public EntProtoId ToggleAction = "LPPActionToggleNightVision"; + public EntProtoId ToggleAction = "ActionToggleNightVision"; [DataField, AutoNetworkedField] public EntityUid? ToggleActionEntity; - [DataField("on"), AutoNetworkedField] - public bool On; + [DataField("enabled"), AutoNetworkedField] + public bool Enabled; [DataField("tint1"), ViewVariables(VVAccess.ReadWrite)] public float Tint1 { get; set; } = 0.3f; @@ -29,7 +29,6 @@ public sealed partial class NightVisionComponent : Component [DataField("tint3"), ViewVariables(VVAccess.ReadWrite)] public float Tint3 { get; set; } = 0.3f; - [DataField("tint"), ViewVariables(VVAccess.ReadWrite)] public Vector3 Tint { get => new(Tint1, Tint2, Tint3); diff --git a/Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs b/Content.Shared/Clothing/SharedNightVisionSystem.cs similarity index 89% rename from Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs rename to Content.Shared/Clothing/SharedNightVisionSystem.cs index 5f073a97347..a342bcb3e52 100644 --- a/Content.Shared/_LostParadise/Clothing/SharedNightVisionSystem.cs +++ b/Content.Shared/Clothing/SharedNightVisionSystem.cs @@ -6,7 +6,7 @@ using Content.Shared.Verbs; using Robust.Shared.Containers; -namespace Content.Shared._LostParadise.Clothing; +namespace Content.Shared.Clothing; /// /// Made by BL02DL from _LostParadise @@ -50,7 +50,7 @@ private void OnToggleNightVision(EntityUid uid, NightVisionComponent component, private void ToggleNightVision(EntityUid uid, NightVisionComponent nightvision) { - nightvision.On = !nightvision.On; + nightvision.Enabled = !nightvision.Enabled; if (_sharedContainer.TryGetContainingContainer(uid, out var container) && _inventory.TryGetSlotEntity(container.Owner, "eyes", out var entityUid) && entityUid == uid) @@ -58,11 +58,11 @@ private void ToggleNightVision(EntityUid uid, NightVisionComponent nightvision) if (TryComp(uid, out var item)) { - _item.SetHeldPrefix(uid, nightvision.On ? "on" : null, component: item); - _clothing.SetEquippedPrefix(uid, nightvision.On ? "on" : null); + _item.SetHeldPrefix(uid, nightvision.Enabled ? "on" : null, component: item); + _clothing.SetEquippedPrefix(uid, nightvision.Enabled ? "on" : null); } - _appearance.SetData(uid, ToggleVisuals.Toggled, nightvision.On); + _appearance.SetData(uid, ToggleVisuals.Toggled, nightvision.Enabled); OnChanged(uid, nightvision); Dirty(uid, nightvision); } @@ -71,7 +71,7 @@ protected virtual void UpdateNightVisionEffects(EntityUid parent, EntityUid uid, protected void OnChanged(EntityUid uid, NightVisionComponent component) { - _sharedActions.SetToggled(component.ToggleActionEntity, component.On); + _sharedActions.SetToggled(component.ToggleActionEntity, component.Enabled); } private void AddToggleVerb(EntityUid uid, NightVisionComponent component, GetVerbsEvent args) @@ -80,7 +80,7 @@ private void AddToggleVerb(EntityUid uid, NightVisionComponent component, GetVer return; ActivationVerb verb = new(); - verb.Text = Loc.GetString("lpp-toggle-nightvision-verb-get-data-text"); + verb.Text = Loc.GetString("toggle-nightvision-verb-get-data-text"); verb.Act = () => ToggleNightVision(uid, component); args.Verbs.Add(verb); } diff --git a/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl index 18a0ef1fb99..5fb37204c47 100644 --- a/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl +++ b/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl @@ -1,19 +1,17 @@ -ent-LPPActionBaseToggleNightVision = Toggle NVG +ent-ActionBaseToggleNightVision = Toggle NVG .desc = Toggles the NVG on and off. -ent-LPPActionToggleNightVision = { ent-LPPActionBaseToggleNightVision } - .desc = { ent-LPPActionBaseToggleNightVision } -ent-LPPClothingEyesNVG = NVG +ent-ActionToggleNightVision = { ent-ActionBaseToggleNightVision } + .desc = { ent-ActionBaseToggleNightVision } +ent-ClothingEyesNVG = NVG .desc = Now you can see in the dark! It has the label "BL CORP technology". -lpp-alerts-nightvision-name = Night Vision -lpp-alerts-nightvision-desc = I can see in the dark! It's a pity that my eyes are going to hurt soon... -lpp-toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles -ent-LPPClothingEyesNVG = NVG +toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles +ent-ClothingEyesNVG = NVG .desc = Now you can see in the dark! It has the label "BL CORP technology". -ent-LPPClothingEyesMesonNVG = meson NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesMedNVG = medical NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesSecNVG = security NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesDiagnosticNVG = diagnostic NVG - .desc = { ent-LPPClothingEyesNVG.desc } \ No newline at end of file +ent-ClothingEyesMesonNVG = meson NVG + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesMedNVG = medical NVG + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesSecNVG = security NVG + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesDiagnosticNVG = diagnostic NVG + .desc = { ent-ClothingEyesNVG.desc } \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl index 18a0ef1fb99..e9999dae776 100644 --- a/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl +++ b/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl @@ -1,19 +1,15 @@ -ent-LPPActionBaseToggleNightVision = Toggle NVG - .desc = Toggles the NVG on and off. -ent-LPPActionToggleNightVision = { ent-LPPActionBaseToggleNightVision } - .desc = { ent-LPPActionBaseToggleNightVision } -ent-LPPClothingEyesNVG = NVG - .desc = Now you can see in the dark! It has the label "BL CORP technology". -lpp-alerts-nightvision-name = Night Vision -lpp-alerts-nightvision-desc = I can see in the dark! It's a pity that my eyes are going to hurt soon... -lpp-toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles -ent-LPPClothingEyesNVG = NVG - .desc = Now you can see in the dark! It has the label "BL CORP technology". -ent-LPPClothingEyesMesonNVG = meson NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesMedNVG = medical NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesSecNVG = security NVG - .desc = { ent-LPPClothingEyesNVG.desc } -ent-LPPClothingEyesDiagnosticNVG = diagnostic NVG - .desc = { ent-LPPClothingEyesNVG.desc } \ No newline at end of file +ent-ActionBaseToggleNightVision = Переключить ПНВ + .desc = Включате и выключает ПНВ. +ent-ActionToggleNightVision = { ent-ActionBaseToggleNightVision } + .desc = { ent-ActionBaseToggleNightVision } +ent-ClothingEyesNVG = ПНВ + .desc = Теперь ты можешь видеть в темноте! Имеет этикетку "BL CORP technology". +toggle-nightvision-verb-get-data-text = Переключить прибор ночного видения +ent-ClothingEyesMesonNVG = мезонный ПНВ + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesMedNVG = медицинский ПНВ + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesSecNVG = охранный ПНВ + .desc = { ent-ClothingEyesNVG.desc } +ent-ClothingEyesDiagnosticNVG = диагностирующий ПНВ + .desc = { ent-ClothingEyesNVG.desc } \ No newline at end of file diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index 4171e670f81..bb0c47f48fb 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -25,7 +25,6 @@ - category: Hunger - category: Thirst - alertType: Magboots - - alertType: LPPNightVision # _LostParadise - alertType: Pacified - alertType: Offer - alertType: Deflecting diff --git a/Resources/Prototypes/_LostParadise/Alerts/alerts.yml b/Resources/Prototypes/_LostParadise/Alerts/alerts.yml deleted file mode 100644 index d3edef6831c..00000000000 --- a/Resources/Prototypes/_LostParadise/Alerts/alerts.yml +++ /dev/null @@ -1,7 +0,0 @@ -- type: alert - id: LPPNightVision - icons: - - sprite: /Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi - state: alert - name: lpp-alerts-nightvision-name - description: lpp-alerts-nightvision-desc \ No newline at end of file diff --git a/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml b/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml index d637d1300ec..faab1f81942 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml +++ b/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml @@ -1,6 +1,6 @@ - type: entity parent: ClothingEyesBase - id: LPPClothingEyesNVG + id: ClothingEyesNVG name: NVG description: Now you can see in the dark! It has the label "BL CORP technology". components: @@ -31,22 +31,21 @@ - WhitelistChameleon - type: entity - id: LPPClothingEyesMesonNVG - parent: LPPClothingEyesNVG + id: ClothingEyesMesonNVG + parent: ClothingEyesNVG name: meson NVG components: - type: EyeProtection - type: entity - id: LPPClothingEyesSecNVG - parent: [LPPClothingEyesNVG, ShowSecurityIcons] + id: ClothingEyesSecNVG + parent: [ClothingEyesNVG, ShowSecurityIcons] name: sec NVG components: - type: Tag tags: - HudSecurity - type: NightVision - toggleAction: LPPActionToggleSecNightVision tint1: 1.0 tint2: 0.3 tint3: 0.3 @@ -57,8 +56,8 @@ - type: FlashImmunity - type: entity - id: LPPClothingEyesMedNVG - parent: LPPClothingEyesNVG + id: ClothingEyesMedNVG + parent: ClothingEyesNVG name: medical NVG components: - type: ShowHealthBars @@ -71,7 +70,6 @@ tags: - HudMedical - type: NightVision - toggleAction: LPPActionToggleMedNightVision tint1: 0.3 tint2: 0.3 tint3: 0.7 @@ -81,12 +79,11 @@ sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi - type: entity - id: LPPClothingEyesDiagnosticNVG - parent: LPPClothingEyesNVG + id: ClothingEyesDiagnosticNVG + parent: ClothingEyesNVG name: diagnostic NVG components: - type: NightVision - toggleAction: LPPActionToggleDiagnosticNightVision tint1: 1.0 tint2: 1.0 tint3: 0.3 @@ -101,7 +98,7 @@ - Silicon - type: entity - id: LPPActionBaseToggleNightVision + id: ActionBaseToggleNightVision name: Toggle NVG description: Toggles the NVG on and off. noSpawn: true @@ -111,37 +108,10 @@ event: !type:ToggleNightVisionEvent - type: entity - id: LPPActionToggleNightVision - parent: LPPActionBaseToggleNightVision + id: ActionToggleNightVision + parent: ActionBaseToggleNightVision noSpawn: true components: - type: InstantAction - icon: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: icon } - iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: icon-on } - -- type: entity - id: LPPActionToggleMedNightVision - parent: LPPActionBaseToggleNightVision - noSpawn: true - components: - - type: InstantAction - icon: { sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi, state: icon } - iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi, state: icon-on } - -- type: entity - id: LPPActionToggleSecNightVision - parent: LPPActionBaseToggleNightVision - noSpawn: true - components: - - type: InstantAction - icon: { sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi, state: icon } - iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi, state: icon-on } - -- type: entity - id: LPPActionToggleDiagnosticNightVision - parent: LPPActionBaseToggleNightVision - noSpawn: true - components: - - type: InstantAction - icon: { sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi, state: icon } - iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi, state: icon-on } \ No newline at end of file + icon: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: toggle-on } + iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: toggle-off } diff --git a/Resources/Prototypes/_LostParadise/Shaders/shaders.yml b/Resources/Prototypes/_LostParadise/Shaders/shaders.yml index 77a87b5cf5a..9b9eb8ef6ec 100644 --- a/Resources/Prototypes/_LostParadise/Shaders/shaders.yml +++ b/Resources/Prototypes/_LostParadise/Shaders/shaders.yml @@ -1,4 +1,4 @@ - type: shader - id: LPPNightVision + id: NightVision kind: source path: "/Textures/_LostParadise/Shaders/nightvision.swsl" \ No newline at end of file diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json index 7b641d58daf..76398eb54e4 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13", + "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station", "size": { "x": 32, "y": 32 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json index 7b641d58daf..76398eb54e4 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13", + "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station", "size": { "x": 32, "y": 32 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json index e819d10ae03..75df5128f61 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13, Alert by @timxx7019 from Lost Paradise", + "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station, Alert by @timxx7019 from Lost Paradise", "size": { "x": 32, "y": 32 @@ -38,7 +38,10 @@ "directions": 4 }, { - "name": "alert" + "name": "toggle-on" + }, + { + "name": "toggle-off" } ] } diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png new file mode 100644 index 0000000000000000000000000000000000000000..93c05c1e5fb71684ededaf47323c1f1f084c4a38 GIT binary patch literal 803 zcmV+;1Kj+HP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0=P*;K~z{r#h1@& zQ$ZBQ=O(1JHIag3QE;I`Hxe(}9G#X30TrQbT+%v=Sy0k9_f?y`zz5f)IY@g8f zh>N#79n+(TqrUIyCh-v2nK4^nEE?MZrH(SDUag4wxLt~0=I0Nj3B*qyEeW`MA*=TU&)1{w(fpU8M7xFP{3 zXdc^V4CxGLX4@M2L?$$H2%{)6=9ZD4XE==U@b5dm2=K2u?jKJM;lBWY3ZiJ-0RS6> hZ577UFQe1Lm_Ozm2fF~m)*%1@002ovPDHLkV1mM5WN-ig literal 0 HcmV?d00001 diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/alert.png b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/alert.png rename to Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json index 5e93502c053..9e0e84aba42 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13", + "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station", "size": { "x": 32, "y": 32 From 12eb8864cf9b2d94a77a5f6420fd10b7cec09da3 Mon Sep 17 00:00:00 2001 From: BL02DL Date: Wed, 23 Oct 2024 00:26:34 +0700 Subject: [PATCH 4/7] Fix Copyright --- .../_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json index 75df5128f61..4f8e3c50c72 100644 --- a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json +++ b/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station, Alert by @timxx7019 from Lost Paradise", + "copyright": "Taken from Blue Moon ss13 https://github.com/BlueMoon-Labs/MOLOT-BlueMoon-Station, toggle-on/off by @timxx7019 from Lost Paradise", "size": { "x": 32, "y": 32 From 9bd2e919fcb19b4c60a73b8bd4b013dbaaaf8b43 Mon Sep 17 00:00:00 2001 From: BL02DL Date: Wed, 23 Oct 2024 00:42:48 +0700 Subject: [PATCH 5/7] Requested changes --- .../NightVision/NightVision.ftl | 16 +++++----- .../NightVision/NightVision.ftl | 0 .../Entities/Clothing/Eyes/NightVision.yml | 30 +++++++++--------- Resources/Prototypes/Shaders/shaders.yml | 7 +++- .../_LostParadise/Shaders/shaders.yml | 4 --- .../equipped-EYES.png | Bin .../NVG/diagnosticnightvision.rsi/icon-on.png | Bin .../NVG/diagnosticnightvision.rsi/icon.png | Bin .../diagnosticnightvision.rsi/inhand-left.png | Bin .../inhand-right.png | Bin .../NVG/diagnosticnightvision.rsi/meta.json | 0 .../on-equipped-EYES.png | Bin .../on-inhand-left.png | Bin .../on-inhand-right.png | Bin .../NVG/mednightvision.rsi/equipped-EYES.png | Bin .../Eyes/NVG/mednightvision.rsi/icon-on.png | Bin .../Eyes/NVG/mednightvision.rsi/icon.png | Bin .../NVG/mednightvision.rsi/inhand-left.png | Bin .../NVG/mednightvision.rsi/inhand-right.png | Bin .../Eyes/NVG/mednightvision.rsi/meta.json | 0 .../mednightvision.rsi/on-equipped-EYES.png | Bin .../NVG/mednightvision.rsi/on-inhand-left.png | Bin .../mednightvision.rsi/on-inhand-right.png | Bin .../NVG/nightvision.rsi/equipped-EYES.png | Bin .../Eyes/NVG/nightvision.rsi/icon-on.png | Bin .../Eyes/NVG/nightvision.rsi/icon.png | Bin .../Eyes/NVG/nightvision.rsi/inhand-left.png | Bin .../Eyes/NVG/nightvision.rsi/inhand-right.png | Bin .../Eyes/NVG/nightvision.rsi/meta.json | 0 .../NVG/nightvision.rsi/on-equipped-EYES.png | Bin .../NVG/nightvision.rsi/on-inhand-left.png | Bin .../NVG/nightvision.rsi/on-inhand-right.png | Bin .../Eyes/NVG/nightvision.rsi/toggle-off.png | Bin .../Eyes/NVG/nightvision.rsi/toggle-on.png | Bin .../NVG/secnightvision.rsi/equipped-EYES.png | Bin .../Eyes/NVG/secnightvision.rsi/icon-on.png | Bin .../Eyes/NVG/secnightvision.rsi/icon.png | Bin .../NVG/secnightvision.rsi/inhand-left.png | Bin .../NVG/secnightvision.rsi/inhand-right.png | Bin .../Eyes/NVG/secnightvision.rsi/meta.json | 0 .../secnightvision.rsi/on-equipped-EYES.png | Bin .../NVG/secnightvision.rsi/on-inhand-left.png | Bin .../secnightvision.rsi/on-inhand-right.png | Bin .../Shaders/nightvision.swsl | 0 44 files changed, 29 insertions(+), 28 deletions(-) rename Resources/Locale/en-US/{_LostParadise => }/NightVision/NightVision.ftl (53%) rename Resources/Locale/ru-RU/{_LostParadise => }/NightVision/NightVision.ftl (100%) rename Resources/Prototypes/{_LostParadise => }/Entities/Clothing/Eyes/NightVision.yml (73%) delete mode 100644 Resources/Prototypes/_LostParadise/Shaders/shaders.yml rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/icon.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/meta.json (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/icon.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/meta.json (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/icon.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/meta.json (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png (100%) rename Resources/Textures/{_LostParadise => }/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png (100%) rename Resources/Textures/{_LostParadise => }/Shaders/nightvision.swsl (100%) diff --git a/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/en-US/NightVision/NightVision.ftl similarity index 53% rename from Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl rename to Resources/Locale/en-US/NightVision/NightVision.ftl index 5fb37204c47..4c1c87d0c50 100644 --- a/Resources/Locale/en-US/_LostParadise/NightVision/NightVision.ftl +++ b/Resources/Locale/en-US/NightVision/NightVision.ftl @@ -1,17 +1,17 @@ -ent-ActionBaseToggleNightVision = Toggle NVG - .desc = Toggles the NVG on and off. +ent-ActionBaseToggleNightVision = Toggle night vision goggles + .desc = Toggles the night vision goggles on and off. ent-ActionToggleNightVision = { ent-ActionBaseToggleNightVision } .desc = { ent-ActionBaseToggleNightVision } -ent-ClothingEyesNVG = NVG +ent-ClothingEyesNVG = night vision goggles .desc = Now you can see in the dark! It has the label "BL CORP technology". toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles -ent-ClothingEyesNVG = NVG +ent-ClothingEyesNVG = night vision goggles .desc = Now you can see in the dark! It has the label "BL CORP technology". -ent-ClothingEyesMesonNVG = meson NVG +ent-ClothingEyesMesonNVG = meson night vision goggles .desc = { ent-ClothingEyesNVG.desc } -ent-ClothingEyesMedNVG = medical NVG +ent-ClothingEyesMedNVG = medical night vision goggles .desc = { ent-ClothingEyesNVG.desc } -ent-ClothingEyesSecNVG = security NVG +ent-ClothingEyesSecNVG = security night vision goggles .desc = { ent-ClothingEyesNVG.desc } -ent-ClothingEyesDiagnosticNVG = diagnostic NVG +ent-ClothingEyesDiagnosticNVG = diagnostic night vision goggles .desc = { ent-ClothingEyesNVG.desc } \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl b/Resources/Locale/ru-RU/NightVision/NightVision.ftl similarity index 100% rename from Resources/Locale/ru-RU/_LostParadise/NightVision/NightVision.ftl rename to Resources/Locale/ru-RU/NightVision/NightVision.ftl diff --git a/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml b/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml similarity index 73% rename from Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml rename to Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml index faab1f81942..9269d8ddbc1 100644 --- a/Resources/Prototypes/_LostParadise/Entities/Clothing/Eyes/NightVision.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml @@ -1,16 +1,16 @@ - type: entity parent: ClothingEyesBase id: ClothingEyesNVG - name: NVG + name: night vision goggles description: Now you can see in the dark! It has the label "BL CORP technology". components: - type: Sprite - sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi + sprite: Clothing/Eyes/NVG/nightvision.rsi layers: - state: icon map: [ "enum.ToggleVisuals.Layer" ] - type: Clothing - sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi + sprite: Clothing/Eyes/NVG/nightvision.rsi - type: NightVision # MUST HAVE ALL TINT! tint1: 0.3 # Red tint2: 1.0 # Green @@ -33,14 +33,14 @@ - type: entity id: ClothingEyesMesonNVG parent: ClothingEyesNVG - name: meson NVG + name: engineering night vision goggles components: - type: EyeProtection - type: entity id: ClothingEyesSecNVG parent: [ClothingEyesNVG, ShowSecurityIcons] - name: sec NVG + name: security night vision goggles components: - type: Tag tags: @@ -50,15 +50,15 @@ tint2: 0.3 tint3: 0.3 - type: Sprite - sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi + sprite: Clothing/Eyes/NVG/secnightvision.rsi - type: Clothing - sprite: _LostParadise/Clothing/Eyes/NVG/secnightvision.rsi + sprite: Clothing/Eyes/NVG/secnightvision.rsi - type: FlashImmunity - type: entity id: ClothingEyesMedNVG parent: ClothingEyesNVG - name: medical NVG + name: medical night vision goggles components: - type: ShowHealthBars damageContainers: @@ -74,23 +74,23 @@ tint2: 0.3 tint3: 0.7 - type: Sprite - sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi + sprite: Clothing/Eyes/NVG/mednightvision.rsi - type: Clothing - sprite: _LostParadise/Clothing/Eyes/NVG/mednightvision.rsi + sprite: Clothing/Eyes/NVG/mednightvision.rsi - type: entity id: ClothingEyesDiagnosticNVG parent: ClothingEyesNVG - name: diagnostic NVG + name: diagnostic night vision goggles components: - type: NightVision tint1: 1.0 tint2: 1.0 tint3: 0.3 - type: Sprite - sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi + sprite: Clothing/Eyes/NVG/diagnosticnightvision.rsi - type: Clothing - sprite: _LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi + sprite: Clothing/Eyes/NVG/diagnosticnightvision.rsi - type: EyeProtection - type: ShowHealthBars damageContainers: @@ -113,5 +113,5 @@ noSpawn: true components: - type: InstantAction - icon: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: toggle-on } - iconOn: { sprite: _LostParadise/Clothing/Eyes/NVG/nightvision.rsi, state: toggle-off } + icon: { sprite: Clothing/Eyes/NVG/nightvision.rsi, state: toggle-on } + iconOn: { sprite: Clothing/Eyes/NVG/nightvision.rsi, state: toggle-off } diff --git a/Resources/Prototypes/Shaders/shaders.yml b/Resources/Prototypes/Shaders/shaders.yml index 41d04137bbe..af8ae69e3fc 100644 --- a/Resources/Prototypes/Shaders/shaders.yml +++ b/Resources/Prototypes/Shaders/shaders.yml @@ -122,4 +122,9 @@ - type: shader id: Ethereal kind: source - path: "/Textures/Shaders/ethereal.swsl" \ No newline at end of file + path: "/Textures/Shaders/ethereal.swsl" + +- type: shader + id: NightVision + kind: source + path: "/Textures/Shaders/nightvision.swsl" \ No newline at end of file diff --git a/Resources/Prototypes/_LostParadise/Shaders/shaders.yml b/Resources/Prototypes/_LostParadise/Shaders/shaders.yml deleted file mode 100644 index 9b9eb8ef6ec..00000000000 --- a/Resources/Prototypes/_LostParadise/Shaders/shaders.yml +++ /dev/null @@ -1,4 +0,0 @@ -- type: shader - id: NightVision - kind: source - path: "/Textures/_LostParadise/Shaders/nightvision.swsl" \ No newline at end of file diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/icon.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/meta.json diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/diagnosticnightvision.rsi/on-inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/icon-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/icon.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/icon.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/icon.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/meta.json similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/meta.json rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/meta.json diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/mednightvision.rsi/on-inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/icon-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/icon.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/icon.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/icon.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/meta.json similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/meta.json rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/meta.json diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/on-inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/toggle-off.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png b/Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png rename to Resources/Textures/Clothing/Eyes/NVG/nightvision.rsi/toggle-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/icon-on.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/icon.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/icon.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/icon.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/inhand-right.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/meta.json similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/meta.json rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/meta.json diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-equipped-EYES.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-left.png diff --git a/Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png b/Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png similarity index 100% rename from Resources/Textures/_LostParadise/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png rename to Resources/Textures/Clothing/Eyes/NVG/secnightvision.rsi/on-inhand-right.png diff --git a/Resources/Textures/_LostParadise/Shaders/nightvision.swsl b/Resources/Textures/Shaders/nightvision.swsl similarity index 100% rename from Resources/Textures/_LostParadise/Shaders/nightvision.swsl rename to Resources/Textures/Shaders/nightvision.swsl From 250c0a9f315d549140e4db20da3b3fdc6e6b6ba3 Mon Sep 17 00:00:00 2001 From: BL02DL Date: Wed, 23 Oct 2024 00:45:07 +0700 Subject: [PATCH 6/7] fix ftl --- Resources/Locale/en-US/NightVision/NightVision.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/NightVision/NightVision.ftl b/Resources/Locale/en-US/NightVision/NightVision.ftl index 4c1c87d0c50..6475d00cc3f 100644 --- a/Resources/Locale/en-US/NightVision/NightVision.ftl +++ b/Resources/Locale/en-US/NightVision/NightVision.ftl @@ -7,7 +7,7 @@ ent-ClothingEyesNVG = night vision goggles toggle-nightvision-verb-get-data-text = Toggle Night Vision Goggles ent-ClothingEyesNVG = night vision goggles .desc = Now you can see in the dark! It has the label "BL CORP technology". -ent-ClothingEyesMesonNVG = meson night vision goggles +ent-ClothingEyesMesonNVG = engineering night vision goggles .desc = { ent-ClothingEyesNVG.desc } ent-ClothingEyesMedNVG = medical night vision goggles .desc = { ent-ClothingEyesNVG.desc } From 76344ab098fc051821f8560cc20586acdacf2e15 Mon Sep 17 00:00:00 2001 From: BL02DL Date: Wed, 23 Oct 2024 17:28:38 +0700 Subject: [PATCH 7/7] Requested changes --- Content.Client/Clothing/NightVisionOverlay.cs | 2 +- Content.Client/Clothing/NightVisionSystem.cs | 7 ++----- Content.Server/Clothing/NightVisionSystem.cs | 11 +++-------- Content.Shared/Clothing/NightVisionComponent.cs | 17 ++++++++++------- .../Clothing/SharedNightVisionSystem.cs | 2 +- .../Entities/Clothing/Eyes/NightVision.yml | 2 +- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/Content.Client/Clothing/NightVisionOverlay.cs b/Content.Client/Clothing/NightVisionOverlay.cs index d680783f533..feeddb01a6e 100644 --- a/Content.Client/Clothing/NightVisionOverlay.cs +++ b/Content.Client/Clothing/NightVisionOverlay.cs @@ -5,7 +5,7 @@ namespace Content.Client.Clothing; /// -/// Made by BL02DL from _LostParadise +/// Made by BL02DL from _LostParadise /// public sealed class NightVisionOverlay : Overlay diff --git a/Content.Client/Clothing/NightVisionSystem.cs b/Content.Client/Clothing/NightVisionSystem.cs index 3b1ad60affc..557f29921a7 100644 --- a/Content.Client/Clothing/NightVisionSystem.cs +++ b/Content.Client/Clothing/NightVisionSystem.cs @@ -8,7 +8,7 @@ namespace Content.Client.Clothing; /// -/// Made by BL02DL from _LostParadise +/// Made by BL02DL from _LostParadise /// public sealed class NightVisionSystem : SharedNightVisionSystem @@ -58,17 +58,14 @@ protected override void UpdateNightVisionEffects(EntityUid parent, EntityUid uid } private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotUnequippedEvent args) { - if (args.Slot == "eyes") + if (args.Slot == component.Slot) { - UpdateNightVisionEffects(args.Equipee, uid, false, component); _overlayMan.RemoveOverlay(_overlay); _lightManager.DrawLighting = true; } } private void OnRestart(RoundRestartCleanupEvent ev) { - /// Удаляем оверлей и врубаем свет на всякий по окончанию раунда - /// We remove the overlay and turn on the light just in case at the end of the round. _overlayMan.RemoveOverlay(_overlay); _lightManager.DrawLighting = true; } diff --git a/Content.Server/Clothing/NightVisionSystem.cs b/Content.Server/Clothing/NightVisionSystem.cs index 68a80d7cf73..16daec7ce35 100644 --- a/Content.Server/Clothing/NightVisionSystem.cs +++ b/Content.Server/Clothing/NightVisionSystem.cs @@ -1,11 +1,10 @@ using Content.Shared.Clothing; -using Content.Shared.Alert; using Content.Shared.Inventory.Events; namespace Content.Server.Clothing; /// -/// Made by BL02DL from _LostParadise +/// Made by BL02DL from _LostParadise /// public sealed class NightVisionSystem : SharedNightVisionSystem @@ -20,17 +19,13 @@ public override void Initialize() private void OnGotUnequipped(EntityUid uid, NightVisionComponent component, GotUnequippedEvent args) { - if (args.Slot == "eyes") - { + if (args.Slot == component.Slot) UpdateNightVisionEffects(args.Equipee, uid, false, component); - } } private void OnGotEquipped(EntityUid uid, NightVisionComponent component, GotEquippedEvent args) { - if (args.Slot == "eyes") - { + if (args.Slot == component.Slot) UpdateNightVisionEffects(args.Equipee, uid, true, component); - } } } diff --git a/Content.Shared/Clothing/NightVisionComponent.cs b/Content.Shared/Clothing/NightVisionComponent.cs index 8ca1cd3a6d0..ca186755d74 100644 --- a/Content.Shared/Clothing/NightVisionComponent.cs +++ b/Content.Shared/Clothing/NightVisionComponent.cs @@ -4,7 +4,7 @@ namespace Content.Shared.Clothing; /// -/// Made by BL02DL from _LostParadise +/// Made by BL02DL from _LostParadise /// [RegisterComponent, NetworkedComponent(), AutoGenerateComponentState] @@ -17,16 +17,16 @@ public sealed partial class NightVisionComponent : Component [DataField, AutoNetworkedField] public EntityUid? ToggleActionEntity; - [DataField("enabled"), AutoNetworkedField] + [DataField, AutoNetworkedField] public bool Enabled; - [DataField("tint1"), ViewVariables(VVAccess.ReadWrite)] + [DataField] public float Tint1 { get; set; } = 0.3f; - [DataField("tint2"), ViewVariables(VVAccess.ReadWrite)] + [DataField] public float Tint2 { get; set; } = 0.3f; - [DataField("tint3"), ViewVariables(VVAccess.ReadWrite)] + [DataField] public float Tint3 { get; set; } = 0.3f; public Vector3 Tint @@ -40,9 +40,12 @@ public Vector3 Tint } } - [DataField("strength"), ViewVariables(VVAccess.ReadWrite)] + [DataField] public float Strength = 2f; - [DataField("noise"), ViewVariables(VVAccess.ReadWrite)] + [DataField] public float Noise = 0.5f; + + [DataField] + public string Slot = "eyes"; } diff --git a/Content.Shared/Clothing/SharedNightVisionSystem.cs b/Content.Shared/Clothing/SharedNightVisionSystem.cs index a342bcb3e52..0c7ce6f753b 100644 --- a/Content.Shared/Clothing/SharedNightVisionSystem.cs +++ b/Content.Shared/Clothing/SharedNightVisionSystem.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Clothing; /// -/// Made by BL02DL from _LostParadise +/// Made by BL02DL from _LostParadise /// public abstract class SharedNightVisionSystem : EntitySystem diff --git a/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml b/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml index 9269d8ddbc1..a031e0e06a9 100644 --- a/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml +++ b/Resources/Prototypes/Entities/Clothing/Eyes/NightVision.yml @@ -11,7 +11,7 @@ map: [ "enum.ToggleVisuals.Layer" ] - type: Clothing sprite: Clothing/Eyes/NVG/nightvision.rsi - - type: NightVision # MUST HAVE ALL TINT! + - type: NightVision tint1: 0.3 # Red tint2: 1.0 # Green tint3: 0.3 # Blue