From 3b8ae0c9d5cb8986320d0f3568133563fb365b6e Mon Sep 17 00:00:00 2001 From: Shegare <147345753+Shegare@users.noreply.github.com> Date: Sun, 22 Dec 2024 20:45:26 +0300 Subject: [PATCH] Rebalance visions (#36) * new cost * night vision in thermal vision only for innate --- .../ThermalVision/ThermalVisionSystem.cs | 29 +++++++++++------- .../_Stories/Catalog/uplink_catalog.yml | 30 +++++++++++++++++-- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/Content.Client/_Stories/ThermalVision/ThermalVisionSystem.cs b/Content.Client/_Stories/ThermalVision/ThermalVisionSystem.cs index cf60161d09..f6ca9f2d58 100644 --- a/Content.Client/_Stories/ThermalVision/ThermalVisionSystem.cs +++ b/Content.Client/_Stories/ThermalVision/ThermalVisionSystem.cs @@ -26,7 +26,7 @@ private void OnThermalVisionAttached(Entity ent, ref Loc private void OnThermalVisionDetached(Entity ent, ref LocalPlayerDetachedEvent args) { - Off(); + Off(ent.Comp.Innate); } protected override void ThermalVisionChanged(Entity ent) @@ -35,8 +35,9 @@ protected override void ThermalVisionChanged(Entity ent) return; if (ent.Comp.Enabled) - On(); - else Off(); + On(ent.Comp.Innate); + else + Off(ent.Comp.Innate); } protected override void ThermalVisionRemoved(Entity ent) @@ -44,20 +45,28 @@ protected override void ThermalVisionRemoved(Entity ent) if (ent != _player.LocalEntity) return; - Off(); + Off(ent.Comp.Innate); } - private void Off() + private void Off(bool isInnate) { _overlay.RemoveOverlay(new ThermalVisionOverlay()); - _light.DrawShadows = true; - _light.DrawLighting = true; + + if(isInnate) + { + _light.DrawShadows = true; + _light.DrawLighting = true; + } } - private void On() + private void On(bool isInnate) { _overlay.AddOverlay(new ThermalVisionOverlay()); - _light.DrawShadows = false; - _light.DrawLighting = false; + + if(isInnate) + { + _light.DrawShadows = false; + _light.DrawLighting = false; + } } } diff --git a/Resources/Prototypes/_Stories/Catalog/uplink_catalog.yml b/Resources/Prototypes/_Stories/Catalog/uplink_catalog.yml index 1735c90bda..44ade682d9 100644 --- a/Resources/Prototypes/_Stories/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/_Stories/Catalog/uplink_catalog.yml @@ -13,10 +13,36 @@ name: Прибор ночного видения description: Позволяет видеть в полной темноте. Работает на ядерной батарее внутри и совсем не вреден для глаз. productEntity: ClothingEyesNightvision - cost: + discountCategory: rareDiscounts + discountDownTo: Telecrystal: 2 + cost: + Telecrystal: 4 categories: - UplinkWearables + conditions: + - !type:StoreWhitelistCondition + blacklist: + tags: + - NukeOpsUplink + +- type: listing + id: UplinkNightvisionNukeOps + name: Прибор ночного видения + description: Позволяет видеть в полной темноте. Работает на ядерной батарее внутри и совсем не вреден для глаз. + productEntity: ClothingEyesNightvision + discountCategory: rareDiscounts + discountDownTo: + Telecrystal: 4 + cost: + Telecrystal: 6 + categories: + - UplinkWearables + conditions: + - !type:StoreWhitelistCondition + whitelist: + tags: + - NukeOpsUplink - type: listing id: UplinkClothingEyesThermalVisionMonocular @@ -45,7 +71,7 @@ discountDownTo: Telecrystal: 6 cost: - Telecrystal: 9 + Telecrystal: 8 categories: - UplinkWearables conditions: