More artifacts triggers and tweaks (#6723)
Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Content.Server.Radiation;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@ using Content.Server.Clothing.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
|
||||
@@ -2,9 +2,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using Content.Server.Atmos;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
|
||||
@@ -21,10 +19,23 @@ public sealed class TemperatureArtifactSystem : EntitySystem
|
||||
{
|
||||
var transform = Transform(uid);
|
||||
|
||||
var environment = _atmosphereSystem.GetTileMixture(transform.Coordinates, true);
|
||||
if (environment == null)
|
||||
var center = _atmosphereSystem.GetTileMixture(transform.Coordinates, true);
|
||||
if (center == null)
|
||||
return;
|
||||
UpdateTileTemperature(component, center);
|
||||
|
||||
if (component.EffectAdjacentTiles)
|
||||
{
|
||||
var adjacent = _atmosphereSystem.GetAdjacentTileMixtures(transform.Coordinates, invalidate: true);
|
||||
foreach (var mixture in adjacent)
|
||||
{
|
||||
UpdateTileTemperature(component, mixture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTileTemperature(TemperatureArtifactComponent component, GasMixture environment)
|
||||
{
|
||||
var dif = component.TargetTemperature - environment.Temperature;
|
||||
var absDif = Math.Abs(dif);
|
||||
if (absDif < component.MaxTemperatureDifference)
|
||||
|
||||
Reference in New Issue
Block a user