Термалки (#466)

* - add: Rewrite night vision.

* - add: Thermals.

* - remove: Remove stuff from maps.

* - fix: Descriptions.
This commit is contained in:
Aviu00
2024-07-19 16:27:01 +00:00
committed by GitHub
parent 42b4aa4cef
commit 781e266fc2
36 changed files with 514 additions and 138 deletions

View File

@@ -672,12 +672,14 @@ public sealed partial class ChangelingSystem
if (HasComp<TemporaryNightVisionComponent>(ent))
{
RemComp<TemporaryNightVisionComponent>(ent);
RemComp<TemporaryThermalVisionComponent>(ent);
EnsureComp<FlashImmunityComponent>(ent);
EnsureComp<EyeProtectionComponent>(ent);
return;
}
EnsureComp<TemporaryNightVisionComponent>(ent);
EnsureComp<TemporaryThermalVisionComponent>(ent);
RemComp<FlashImmunityComponent>(ent);
RemComp<EyeProtectionComponent>(ent);
}
@@ -1054,6 +1056,19 @@ public sealed partial class ChangelingSystem
EntityManager.AddComponent(to, toAdd);
}
if (TryComp(from, out TemporaryThermalVisionComponent? thermal))
{
var toAdd = new TemporaryThermalVisionComponent
{
Color = thermal.Color,
Tint = thermal.Tint,
Strength = thermal.Strength,
Noise = thermal.Noise
};
EntityManager.AddComponent(to, toAdd);
}
if (TryComp(from, out NpcFactionMemberComponent? factionMember))
{
_faction.ClearFactions(to);