Skip to content

Commit

Permalink
Rebalance visions (#36)
Browse files Browse the repository at this point in the history
* new cost

* night vision in thermal vision only for innate
  • Loading branch information
Shegare authored Dec 22, 2024
1 parent 6d620c0 commit 3b8ae0c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 12 deletions.
29 changes: 19 additions & 10 deletions Content.Client/_Stories/ThermalVision/ThermalVisionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private void OnThermalVisionAttached(Entity<ThermalVisionComponent> ent, ref Loc

private void OnThermalVisionDetached(Entity<ThermalVisionComponent> ent, ref LocalPlayerDetachedEvent args)
{
Off();
Off(ent.Comp.Innate);
}

protected override void ThermalVisionChanged(Entity<ThermalVisionComponent> ent)
Expand All @@ -35,29 +35,38 @@ protected override void ThermalVisionChanged(Entity<ThermalVisionComponent> ent)
return;

if (ent.Comp.Enabled)
On();
else Off();
On(ent.Comp.Innate);
else
Off(ent.Comp.Innate);
}

protected override void ThermalVisionRemoved(Entity<ThermalVisionComponent> 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;
}
}
}
30 changes: 28 additions & 2 deletions Resources/Prototypes/_Stories/Catalog/uplink_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -45,7 +71,7 @@
discountDownTo:
Telecrystal: 6
cost:
Telecrystal: 9
Telecrystal: 8
categories:
- UplinkWearables
conditions:
Expand Down

0 comments on commit 3b8ae0c

Please sign in to comment.