diff --git a/Content.Client/SS220/SuperMatter/Observer/SuperMatterObserverSystem.cs b/Content.Client/SS220/SuperMatter/Observer/SuperMatterObserverSystem.cs index a549ef14b1b5a5..929b7dd9f26ea5 100644 --- a/Content.Client/SS220/SuperMatter/Observer/SuperMatterObserverSystem.cs +++ b/Content.Client/SS220/SuperMatter/Observer/SuperMatterObserverSystem.cs @@ -19,6 +19,7 @@ public sealed class SuperMatterObserverSystem : EntitySystem private List _smReceiverUIOwnersToInit = new(); private TimeSpan _nextUpdateTime = default!; private HashSet> _receivers = new(); + private SortedList _processedReceivers = new(); public override void Initialize() { base.Initialize(); @@ -102,12 +103,18 @@ private void OnCrystalUpdate(SuperMatterStateUpdate args) _entityLookup.GetEntitiesOnMap(Transform(observerUid).MapID, _receivers); // logic foreach (var receiver in _receivers) - TrySendToUIState(receiver.Owner, new SuperMatterObserverUpdateState(args.Id, args.Name, args.Integrity, args.Pressure, - args.Temperature, args.Matter, args.InternalEnergy, args.Delaminate)); + { + if (_processedReceivers.ContainsKey(receiver.Owner.Id)) + continue; + if (TrySendToUIState(receiver.Owner, new SuperMatterObserverUpdateState(args.Id, args.Name, args.Integrity, args.Pressure, + args.Temperature, args.Matter, args.InternalEnergy, args.Delaminate))) + _processedReceivers.Add(receiver.Owner.Id, receiver.Owner); + } _receivers.Clear(); // RaiseLocalEvent(SMpanels -> accept information) } _observerEntities.Clear(); + _processedReceivers.Clear(); } private void OnReceiverBoundUIOpened(Entity entity, ref BoundUIOpenedEvent args) { diff --git a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverBUI.cs b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverBUI.cs index e5b8191f8758cf..d66be0bb84e2d4 100644 --- a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverBUI.cs +++ b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverBUI.cs @@ -17,16 +17,19 @@ protected override void Open() _menu.OnServerButtonPressed += (args, observerComp) => { - if (!args.Button.Pressed) - _menu.Observer = null; - else + if (args.Button.Pressed) _menu.Observer = observerComp; + else + _menu.Observer = null; _menu.CrystalKey = null; _menu.LoadCrystal(); }; - _menu.OnCrystalButtonPressed += (_, crystalKey) => + _menu.OnCrystalButtonPressed += (args, crystalKey) => { - _menu.CrystalKey = crystalKey; + if (args.Button.Pressed) + _menu.CrystalKey = crystalKey; + else + _menu.CrystalKey = null; _menu.LoadCachedData(); }; } diff --git a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml index 072eec7336d80c..1f267d8d5ce781 100644 --- a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml +++ b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml @@ -2,27 +2,54 @@ - - - - - - - - - - + + + + + + + + + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml.cs b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml.cs index 5ed83a591d71b3..de5191b4027295 100644 --- a/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml.cs +++ b/Content.Client/SS220/SuperMatter/Ui/SuperMatterObserverMenu.xaml.cs @@ -3,13 +3,14 @@ using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.XAML; -using Robust.Shared.Timing; using Robust.Client.UserInterface.Controls; using Content.Shared.SS220.SuperMatter.Ui; using Content.Client.SS220.UserInterface.PlotFigure; using Content.Client.SS220.SuperMatter.Observer; using System.Numerics; using System.Linq; +using Robust.Client.Graphics; +using Content.Shared.Atmos; namespace Content.Client.SS220.SuperMatter.Ui; @@ -17,23 +18,28 @@ namespace Content.Client.SS220.SuperMatter.Ui; [GenerateTypedNameReferences] public sealed partial class SuperMatterObserverMenu : FancyWindow { - + [Dependency] ILocalizationManager _localization = default!; public event Action? OnServerButtonPressed; public event Action? OnCrystalButtonPressed; public SuperMatterObserverComponent? Observer; public int? CrystalKey; + public Dictionary GasBarColors = new() + { + {Gas.Oxygen, Color.SeaBlue}, + {Gas.Nitrogen, Color.LightCoral}, + {Gas.Plasma, Color.Violet}, + {Gas.CarbonDioxide, Color.Gray} + }; public const int MAX_DATA_LENGTH = 180; - private int counter = 0; - private float conterAbobaX = 0f; - private float conterAbobaY = 0f; public SuperMatterObserverMenu() { IoCManager.InjectDependencies(this); RobustXamlLoader.Load(this); - PlotValueOverTime.SetLabels("time elapsed, s", " Integrity", " Crystal Integrity "); + PlotValueOverTime.SetLabels(_localization.GetString("smObserver-plotXLabel-integrity"), _localization.GetString("smObserver-plotYLabel-integrity"), _localization.GetString("smObserver-plotTitle-integrity")); ColorState.MakeMeshgrid((1, 100, 25), (1, 100, 100)); ColorState.EvalFunctionOnMeshgrid(GetIntegrityDamageMap); - ColorState.SetLabels("Matter, a.u.", "Internal energy, a.u.", " Safe operation "); + ColorState.SetLabels(_localization.GetString("smObserver-plotXLabel-colorState"), _localization.GetString("smObserver-plotYLabel-colorState"), _localization.GetString("smObserver-plotTitle-colorState")); + InitGasRatioBars(); } public void LoadState(List> observerEntities) { @@ -43,12 +49,17 @@ public void LoadState(List> observerEntitie var serverButton = new ServerButton { Text = observerUid.ToString(), + StyleBoxOverride = new StyleBoxFlat(Color.DarkGray), ObserverComponent = observerComp, + Margin = new Thickness(2, 0, 2, 0), ToggleMode = true, StyleClasses = { "OpenBoth" } }; - serverButton.OnPressed += args => OnServerButtonPressed?.Invoke(args, serverButton.ObserverComponent); + serverButton.OnPressed += args => + { + OnServerButtonPressed?.Invoke(args, serverButton.ObserverComponent); + }; ServerNavigationBar.AddChild(serverButton); } } @@ -62,12 +73,17 @@ public void LoadCrystal() var crystalButton = new CrystalButton { Text = name, + StyleBoxOverride = new StyleBoxFlat(Color.DarkGray), CrystalKey = crystalKey, ToggleMode = true, + Margin = new Thickness(2, 0, 2, 0), StyleClasses = { "OpenBoth" } }; - crystalButton.OnPressed += args => OnCrystalButtonPressed?.Invoke(args, crystalButton.CrystalKey); + crystalButton.OnPressed += args => + { + OnCrystalButtonPressed?.Invoke(args, crystalButton.CrystalKey); + }; CrystalNavigationBar.AddChild(crystalButton); } } @@ -77,7 +93,7 @@ public void LoadCachedData() || CrystalKey == null) return; PlotValueOverTime.LoadPlot2DTimePoints(new PlotPoints2D(MAX_DATA_LENGTH, Observer.Integrities[CrystalKey.Value], - -1f, -1f * Observer.Integrities[CrystalKey.Value].Count)); + -1f, Observer.Integrities[CrystalKey.Value].Count)); ColorState.LoadMovingPoint(new Vector2(Observer.Matters[CrystalKey.Value].Last().Value, Observer.InternalEnergy[CrystalKey.Value].Last().Value), new Vector2(Observer.Matters[CrystalKey.Value].Last().Derv, Observer.InternalEnergy[CrystalKey.Value].Last().Derv)); } @@ -85,15 +101,97 @@ public void UpdateState(SuperMatterObserverUpdateState msg) { if (Observer == null || CrystalKey == null) + { + SetMessageDataToTextInfo(); + return; + } + if (msg.Id != CrystalKey) return; - PlotValueOverTime.AddPointToPlot(new Vector2(PlotValueOverTime.GetLastAddedPointX() + 1, msg.Integrity)); + + PlotValueOverTime.AddPointToPlot(new Vector2(PlotValueOverTime.GetLastAddedPointX() + 1f, msg.Integrity)); ColorState.LoadMovingPoint(new Vector2(msg.Matter.Value, msg.InternalEnergy.Value), new Vector2(msg.Matter.Derivative, msg.InternalEnergy.Derivative)); + SetMessageDataToTextInfo(msg); + } + + private void SetMessageDataToTextInfo(SuperMatterObserverUpdateState msg) + { + NameLabel.SetMessage(_localization.GetString("smObserver-name", ("name", msg.Name))); + IntegrityLabel.SetMessage(_localization.GetString("smObserver-integrity", ("value", msg.Integrity))); + PressureLabel.SetMessage(_localization.GetString("smObserver-pressure", ("value", msg.Pressure))); + TemperatureLabel.SetMessage(_localization.GetString("smObserver-temperature", ("value", msg.Temperature))); + MatterLabel.SetMessage(_localization.GetString("smObserver-matter", ("value", msg.Matter.Value))); + InternalEnergyLabel.SetMessage(_localization.GetString("smObserver-internalEnergy", ("value", msg.InternalEnergy.Value))); + DelamStatus.SetMessage(_localization.GetString("smObserver-delamStatus", + ("status", msg.Delaminate.Delaminates), ("ETA", msg.Delaminate.ETOfDelamination))); + } + private void SetMessageDataToTextInfo() + { + NameLabel.SetMessage(_localization.GetString("smObserver-integrity-none")); + IntegrityLabel.SetMessage(_localization.GetString("smObserver-integrity-none")); + PressureLabel.SetMessage(_localization.GetString("smObserver-pressure-none")); + TemperatureLabel.SetMessage(_localization.GetString("smObserver-temperature-none")); + MatterLabel.SetMessage(_localization.GetString("smObserver-matter-none")); + InternalEnergyLabel.SetMessage(_localization.GetString("smObserver-internalEnergy-none")); + DelamStatus.SetMessage(_localization.GetString("smObserver-delamStatus-none")); } private float GetIntegrityDamageMap(float matter, float internalEnergy) { return SuperMatterFunctions.EnergyToMatterDamageFactorFunction( internalEnergy - SuperMatterFunctions.SafeInternalEnergyToMatterFunction(matter / SuperMatterFunctions.MatterNondimensionalization)); } + private void InitGasRatioBars() + { + foreach (var gas in Enum.GetValues()) + { + var gasBar = MakeGasRatioProgressBar(gas); + GasContainer.AddChild(gasBar); + } + } + private void UpdateGasRatioBars(Dictionary gasRatios) + { + foreach (var gasBar in GasContainer.Children) + { + if (gasBar.GetType() != typeof(GasBar)) + return; + + ((ProgressBar)gasBar).SetAsRatio(gasRatios[((GasBar)gasBar).GasId]); + } + } + private ProgressBar MakeGasRatioProgressBar(Gas gas) + { + + if (TryGetStyleProperty(ProgressBar.StylePropertyBackground, out var retBackground)) + retBackground.BackgroundColor = Color.FromHex("#2B2A26"); + else + retBackground = new StyleBoxFlat(Color.FromHex("#2B2A26")); + if (TryGetStyleProperty(ProgressBar.StylePropertyForeground, out var retForeground)) + retForeground.BackgroundColor = GasBarColors.TryGetValue(gas, out var color) ? color : Color.ForestGreen; + else + retForeground = new StyleBoxFlat(GasBarColors.TryGetValue(gas, out var color) ? color : Color.ForestGreen); + retForeground.BorderThickness = new Thickness(2f, 2f, 0f, 4f); + retBackground.BorderThickness = new Thickness(2f, 2f, 0f, 4f); + var gasBar = new GasBar + { + GasId = gas, + HorizontalExpand = true, + VerticalExpand = true, + MinValue = 0f, + MaxValue = 1f, + MinHeight = 20f, + Page = 0f, + Value = 0.5f, + BackgroundStyleBoxOverride = retBackground, + ForegroundStyleBoxOverride = retForeground, + }; + + var gasLabel = new Label + { + Margin = new Thickness(2f, 2f, 0f, 14f), + Text = gas.ToString(), + }; + gasBar.AddChild(gasLabel); + return gasBar; + } private sealed class ServerButton : Button { public SuperMatterObserverComponent? ObserverComponent; @@ -102,4 +200,10 @@ private sealed class CrystalButton : Button { public int CrystalKey; } + private sealed class GasBar : ProgressBar + { + public Gas GasId; + } } + + diff --git a/Content.Client/SS220/UserInterface/PlotFigure/Plot.cs b/Content.Client/SS220/UserInterface/PlotFigure/Plot.cs index 7a56408076e61f..2802f1b8072da4 100644 --- a/Content.Client/SS220/UserInterface/PlotFigure/Plot.cs +++ b/Content.Client/SS220/UserInterface/PlotFigure/Plot.cs @@ -11,7 +11,7 @@ internal abstract class Plot : Control { [Dependency] internal readonly IResourceCache ResourceCache = default!; public Color AxisColor = Color.WhiteSmoke; - public List AxisSteps = new() { 0.2f, 0.4f, 0.6f, 0.8f }; + public List AxisSteps = new() { 0.2f, 0.4f, 0.6f, 0.8f, 1f}; public float AxisBorderPosition = 20f; public float AxisThickness = 4f; public float SerifSize = 5f; @@ -64,11 +64,11 @@ internal void DrawAxis(DrawingHandleScreen handle, LabelContainer? mainLabels = foreach (var step in AxisSteps) { // X - DrawAxisLine(handle, CorrectVector(PixelWidth * step + AxisBorderPosition, AxisBorderPosition), - CorrectVector(PixelWidth * step + AxisBorderPosition, AxisBorderPosition + SerifSize)); + DrawAxisLine(handle, InsideVector(PixelWidth * step, 0f), + InsideVector(PixelWidth * step, SerifSize)); // Y - DrawAxisLine(handle, CorrectVector(AxisBorderPosition, PixelHeight * step), - CorrectVector(AxisBorderPosition + SerifSize, PixelHeight * step)); + DrawAxisLine(handle, InsideVector(0f, PixelHeight * step), + InsideVector(SerifSize, PixelHeight * step)); } // adding labels AddAxisLabels(handle, mainLabels); @@ -80,7 +80,7 @@ private void AddAxisLabels(DrawingHandleScreen handle, LabelContainer? labels) if (labels == null) return; if (labels.YLabel != null) - handle.DrawString(AxisFont, CorrectVector(AxisBorderPosition + SerifSize, PixelHeight - SerifSize), labels.YLabel, AxisColor); + handle.DrawString(AxisFont, CorrectVector(AxisBorderPosition + SerifSize, PixelHeight - AxisBorderPosition), labels.YLabel, AxisColor); if (labels.XLabel != null) handle.DrawString(AxisFont, CorrectVector(PixelWidth - FontSize * 3f / 4f * labels.XLabel.Length, 2f * AxisBorderPosition + SerifSize), labels.XLabel, AxisColor); if (labels.Title != null) @@ -90,6 +90,7 @@ internal Vector2 CorrectVector(float x, float y) { return new Vector2(GetCorrectX(x), GetCorrectY(y)); } + internal Vector2 CorrectVector(Vector2 vector) { return new Vector2(GetCorrectX(vector.X), GetCorrectY(vector.Y)); @@ -102,6 +103,24 @@ internal float GetCorrectY(float y) { return Math.Clamp(PixelHeight - y, 0f, PixelHeight); } + /// Helps with resizing into axises plot + internal Vector2 InsideVector(float x, float y) + { + return new Vector2(GetInsideX(x), GetInsideY(y)); + } + internal Vector2 InsideVector(Vector2 vector) + { + return new Vector2(GetInsideX(vector.X), GetInsideY(vector.Y)); + } + internal float GetInsideX(float x) + { + return GetCorrectX(x) / PixelWidth * (PixelWidth - 2 * AxisBorderPosition) + AxisBorderPosition; + } + internal float GetInsideY(float y) + { + y = Math.Clamp(y, 0f, MaxHeight); + return GetCorrectY(y / PixelHeight * (PixelHeight - 3 * AxisBorderPosition) + AxisBorderPosition); + } private void DrawArrowHeadHat(DrawingHandleScreen handle, Vector2 from, Vector2 to, float arrowRange, Color color, Vector2 perpendicularClockwise) { DrawTriangleStrip(handle, [ to + perpendicularClockwise * arrowRange, diff --git a/Content.Client/SS220/UserInterface/PlotFigure/PlotSequencedView.cs b/Content.Client/SS220/UserInterface/PlotFigure/PlotSequencedView.cs index b40307ef66a40d..2071bb5ea3144d 100644 --- a/Content.Client/SS220/UserInterface/PlotFigure/PlotSequencedView.cs +++ b/Content.Client/SS220/UserInterface/PlotFigure/PlotSequencedView.cs @@ -64,16 +64,17 @@ protected override void Draw(DrawingHandleScreen handle) if (!(PixelWidth - AxisBorderPosition > 0)) return; - var yMaxResult = (yMax + 0.1f) * 1.1f ?? 0.1f; + var yMaxResult = (yMax + 0.1f) ?? 0.1f; var xWidthResult = xWidth ?? 1f; - var deltaXWidth = (PixelWidth - (float) AxisBorderPosition) / _plotPoints.Point2Ds.Count; + + var deltaXWidth = PixelWidth / _plotPoints.Point2Ds.Count; var yNormalizer = PixelHeight / yMaxResult; var point2Ds = _plotPoints.Point2Ds; for (var i = 1; i < point2Ds.Count; i++) { - var firstPoint = CorrectVector(deltaXWidth * (i - 1) + AxisBorderPosition, point2Ds[i - 1].Y * yNormalizer); - var secondPoint = CorrectVector(deltaXWidth * i + AxisBorderPosition, point2Ds[i].Y * yNormalizer); + var firstPoint = InsideVector(deltaXWidth * (i - 1), point2Ds[i - 1].Y * yNormalizer); + var secondPoint = InsideVector(deltaXWidth * i, point2Ds[i].Y * yNormalizer); DrawFirstGraphicLine(handle, firstPoint, secondPoint); } @@ -88,9 +89,9 @@ private void DrawAxis(DrawingHandleScreen handle, float maxY, float xWidth) foreach (var step in AxisSteps) { // X - handle.DrawString(_font, CorrectVector(PixelWidth * step, AxisBorderPosition), $"{step * xWidth - xWidth:0.}"); + handle.DrawString(_font, InsideVector(PixelWidth * step, 0), $"{step * xWidth - xWidth:0.}"); // Y - handle.DrawString(_font, CorrectVector(AxisBorderPosition + SerifSize, PixelHeight * step), $"{step * maxY:0.}"); + handle.DrawString(_font, InsideVector(SerifSize, PixelHeight * step), $"{step * maxY:0.}"); } } } diff --git a/Content.Client/SS220/UserInterface/PlotFigure/Pseudo3DColoredView.cs b/Content.Client/SS220/UserInterface/PlotFigure/Pseudo3DColoredView.cs index 6641612040d726..3d17e8080050c8 100644 --- a/Content.Client/SS220/UserInterface/PlotFigure/Pseudo3DColoredView.cs +++ b/Content.Client/SS220/UserInterface/PlotFigure/Pseudo3DColoredView.cs @@ -54,8 +54,8 @@ public void LoadMovingPoint(Vector2 position, Vector2 moveDirection) || position.Y > _cachedParams.y.Offset + (_cachedParams.y.Size - 1) * _cachedParams.y.Step || position.X < _cachedParams.x.Offset || position.Y < _cachedParams.x.Offset) { - MakeMeshgrid((MakeOffsetFromCoord(position.X, _initCachedParams.x.Offset), _initCachedParams.x.Size, _initCachedParams.x.Step), - (MakeOffsetFromCoord(position.Y, _initCachedParams.x.Offset), _initCachedParams.y.Size, _initCachedParams.y.Step)); + MakeMeshgrid((MakeOffsetFromCoord(position.X, _initCachedParams.x), _initCachedParams.x.Size, _initCachedParams.x.Step), + (MakeOffsetFromCoord(position.Y, _initCachedParams.y), _initCachedParams.y.Size, _initCachedParams.y.Step)); if (_cachedFunction != null) EvalFunctionOnMeshgrid(_cachedFunction); } @@ -70,10 +70,10 @@ public void LoadMovingPoint(Vector2 position, Vector2 moveDirection) _movingPoint?.Update(position, moveDirection); } /// Make sure that we wont get into wrong position by changing Meshgrid - private float MakeOffsetFromCoord(float coord, float min) + private float MakeOffsetFromCoord(float coord, (float Min, float Size, float Step) parameters) { // TODO Make it to variables of plot and add difference between X and Y - return Math.Clamp(coord - _cachedParams.x.Size / 2 * _cachedParams.x.Step, min, float.PositiveInfinity); + return Math.Clamp(coord - parameters.Size / 2f * parameters.Step, parameters.Min, float.PositiveInfinity); } public void DeleteMovingPoint() => _movingPoint = null; @@ -99,6 +99,7 @@ protected override void Draw(DrawingHandleScreen handle) Colormap.GetCorrespondingColor((_curPoint.Z - _minZ) / (_maxZ - _minZ))); } } + DrawAxis(handle, _color2DPoint); if (_movingPoint != null) { _movingPoint.DrawMovingDirection(handle); @@ -108,11 +109,10 @@ protected override void Draw(DrawingHandleScreen handle) foreach (var step in AxisSteps) { // X - handle.DrawString(AxisFont, CorrectVector(PixelWidth * step, AxisBorderPosition), $"{_color2DPoint.X[(int) (_color2DPoint.X.Count * step)]:0.}"); + handle.DrawString(AxisFont, InsideVector(PixelWidth * step, 0f), $"{_color2DPoint.X[(int)((_color2DPoint.X.Count - 1) * step)]:0.}"); // Y - handle.DrawString(AxisFont, CorrectVector(AxisBorderPosition + SerifSize, PixelHeight * step), $"{_color2DPoint.Y[(int) (_color2DPoint.Y.Count * step)]:0.}"); + handle.DrawString(AxisFont, InsideVector(SerifSize, PixelHeight * step), $"{_color2DPoint.Y[(int)((_color2DPoint.Y.Count - 1) * step)]:0.}"); } - base.DrawAxis(handle, _color2DPoint); } /// Adjust vector to borders also offsets it with AxisBorderPosition @@ -126,6 +126,8 @@ private float MakeToPixelRange(float coord, float curMin, float curMax, float av } private void DrawPoint(DrawingHandleScreen handle, (float X, float Y) coords, (float X, float Y) size, Color color) { + size.X *= 1.05f; + size.Y *= 1.05f; _uIBox2 = UIBox2.FromDimensions(coords.X - size.X / 2, coords.Y + size.Y / 2, size.X, size.Y); handle.DrawRect(_uIBox2, color, true); } diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterInterior/SuperMatterInternalProcess.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterInterior/SuperMatterInternalProcess.cs index 26aa4f118c5deb..6665567c60d6c6 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterInterior/SuperMatterInternalProcess.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterInterior/SuperMatterInternalProcess.cs @@ -129,7 +129,7 @@ private static float DeltaChemistryPotentialFunction(float temperature, float pr var normalizedPressure = pressure / TriplePointPressure; var normalizedCombined = normalizedPressure * normalizedTemperature / ChemistryPotentialCombinedStretchCoeff; - return ChemistryPotentialCoeff * MathF.Pow(normalizedCombined, 2) * MathF.Exp(MathF.Pow(normalizedCombined, 2)); + return ChemistryPotentialCoeff * MathF.Pow(normalizedCombined, 2) * MathF.Exp(-MathF.Pow(normalizedCombined, 2)); } private const float ReleaseEnergyConversionEfficiencyCoeff = 0.01f; diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs index 9250df74898e5d..b3cc74624bb8d2 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs @@ -33,7 +33,9 @@ private void OnComponentInit(Entity entity, ref ComponentI if (!TryComp(uid, out arcShooterComponent)) arcShooterComponent = AddComp(uid); - radiationSource.Enabled = false; + radiationSource.Intensity = 1f; + radiationSource.Slope = 1f; + radiationSource.Enabled = true; arcShooterComponent.Enabled = false; arcShooterComponent.ShootRange = 3f; entity.Comp.InternalEnergy = GetSafeInternalEnergyToMatterValue(entity.Comp.Matter); @@ -45,7 +47,7 @@ private void OnHandInteract(Entity entity, ref InteractHan } private void OnItemInteract(Entity entity, ref InteractUsingEvent args) { - entity.Comp.Matter += MatterNondimensionalization / 10f; + entity.Comp.Matter += MatterNondimensionalization / 5f; ConsumeObject(args.User, entity); } private void OnCollideEvent(Entity entity, ref StartCollideEvent args) @@ -53,9 +55,9 @@ private void OnCollideEvent(Entity entity, ref StartCollid if (args.OtherBody.BodyType == BodyType.Static) return; if (TryComp(args.OtherEntity, out var projectile)) - entity.Comp.InternalEnergy += CHEMISTRY_POTENTIAL_BASE * MathF.Max((float) projectile.Damage.GetTotal(), 0f); + entity.Comp.InternalEnergy += CHEMISTRY_POTENTIAL_BASE * MathF.Max(4f * (float)projectile.Damage.GetTotal(), 0f); - entity.Comp.Matter += MatterNondimensionalization / 10f; + entity.Comp.Matter += MatterNondimensionalization / 5f; ConsumeObject(args.OtherEntity, entity, false); } private void OnActivationEvent(Entity entity, ref SuperMatterActivationEvent args) diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Integrity.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Integrity.cs index d7878544e27079..add8457e5f679d 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Integrity.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Integrity.cs @@ -38,8 +38,8 @@ public float GetIntegrity(SuperMatterComponent smComp) return MathF.Round(smComp.Integrity, 2); } - private const float MaxDamagePerSecond = 1.5f; - private const float MaxRegenerationPerSecond = 1.5f; + private const float MaxDamagePerSecond = 0.7f; + private const float MaxRegenerationPerSecond = 1.2f; /// Based lie, negative damage = heal, no exception will thrown /// Return false only if SM integrity WILL fall below zero, but wont set it to zero private bool TryImplementIntegrityDamage(SuperMatterComponent smComp) diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Thermodynamics.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Thermodynamics.cs index 95c07b5b5faaa1..d5bc87abb1b66a 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Thermodynamics.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Thermodynamics.cs @@ -53,16 +53,16 @@ private void EvaluateDeltaInternalEnergy(Entity crystal, G var deltaInternalEnergy = (smDeltaT * (matterToTemperatureRatio - newMatterToTemperatureRatio) * smComp.InternalEnergy - chemistryPotential * normalizedDeltaMatter) / (1 + newMatterToTemperatureRatio * smDeltaT); - smComp.InternalEnergy += deltaInternalEnergy * frameTime; if (smComp.InternalEnergy < 0) { // TODO loc it Log.Error($"Internal Energy of SuperMatter {crystal} became negative, forced to truthish value."); SendAdminChatAlert(crystal, "Physics law breaking! If it possible ask how they do it and convey it to developer"); + smComp.Matter += 20 * MatterNondimensionalization; smComp.InternalEnergy = EvaluateTruthishInternalEnergy(crystal); } - smComp.Matter = MathF.Max(smComp.Matter + deltaMatter * frameTime, MatterNondimensionalization); // actually should go boom at this low, but... + smComp.Matter = MathF.Max(smComp.Matter + deltaMatter * frameTime, 4 * MatterNondimensionalization); // actually should go boom at this low, but... smComp.Temperature = Math.Clamp(smComp.Temperature + smDeltaT * frameTime, Atmospherics.TCMB, Atmospherics.Tmax); // weird but okay _atmosphere.AddHeat(gasMixture, -crystalHeatFromGas * frameTime); } diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs index 2d65a01b1f735c..7bf859c81df9c9 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs @@ -30,16 +30,17 @@ public override void Initialize() public override void Update(float frameTime) { base.Update(frameTime); - + // 0.033f corresponds to 30 ticks per second. Just in case if server got very laggy + var flooredFrameTime = MathF.Min(frameTime, 0.033f); var query = EntityQueryEnumerator(); while (query.MoveNext(out var uid, out var smComp)) { var crystal = new Entity(uid, smComp); - UpdateDelayed(crystal, frameTime); + UpdateDelayed(crystal, flooredFrameTime); if (!smComp.Activated) continue; - SuperMatterUpdate(crystal, frameTime); + SuperMatterUpdate(crystal, flooredFrameTime); } } @@ -50,7 +51,7 @@ private void SuperMatterUpdate(Entity crystal, float frame return; if (!TryGetCrystalGasMixture(crystal.Owner, out var gasMixture)) { - Log.Error($"Got null GasMixture in {crystal}. AddedComponentToGetIt"); + Log.Error($"Got null GasMixture in {crystal}"); return; } @@ -62,12 +63,11 @@ private void SuperMatterUpdate(Entity crystal, float frame var decayedMatter = CalculateDecayedMatter(crystal, gasMixture) * frameTime; // this method make changes in SM parameters! EvaluateDeltaInternalEnergy(crystal, gasMixture, frameTime); - var smState = SuperMatterFunctions.GetSuperMatterPhase(crystal.Comp.Temperature, gasMixture.Pressure); var crystalTemperature = crystal.Comp.Temperature; var pressure = gasMixture.Pressure; - var releasedEnergyPerFrame = crystal.Comp.InternalEnergy * GetReleaseEnergyConversionEfficiency(crystalTemperature, pressure) + var releasedEnergyPerFrame = 0.1f * crystal.Comp.InternalEnergy * GetReleaseEnergyConversionEfficiency(crystalTemperature, pressure) * (SuperMatterGasResponse.GetGasInfluenceReleaseEnergyEfficiency(crystal.Comp, gasMixture) + 1); crystal.Comp.AccumulatedRadiationEnergy += releasedEnergyPerFrame * GetZapToRadiationRatio(crystalTemperature, pressure, smState); crystal.Comp.AccumulatedZapEnergy += releasedEnergyPerFrame * (1 - GetZapToRadiationRatio(crystalTemperature, pressure, smState)); @@ -138,6 +138,7 @@ private void ReleaseEnergy(Entity crystal) private void EjectGases(float decayedMatter, float crystalTemperature, SuperMatterPhaseState smState, GasMixture gasMixture) { var pressure = gasMixture.Pressure; + // TODO make 4f to variable! var oxygenMoles = decayedMatter * GetOxygenToPlasmaRatio(crystalTemperature, pressure, smState); var plasmaMoles = decayedMatter * (1 - GetOxygenToPlasmaRatio(crystalTemperature, pressure, smState)); var heatEnergy = GetChemistryPotential(crystalTemperature, gasMixture.Pressure) * decayedMatter / MatterNondimensionalization; diff --git a/Content.Shared/SS220/SuperMatter/Functions/SuperMatterFunctions.cs b/Content.Shared/SS220/SuperMatter/Functions/SuperMatterFunctions.cs index 93afac09a1e7e4..13364a0af2d813 100644 --- a/Content.Shared/SS220/SuperMatter/Functions/SuperMatterFunctions.cs +++ b/Content.Shared/SS220/SuperMatter/Functions/SuperMatterFunctions.cs @@ -88,7 +88,7 @@ public static float ResonanceTeslaEquilibriumPressureFunction(float temperature) (float) MathF.Pow(temperature + ResonanceTeslaEquilibriumTemperatureOffset, 0.7f); } //region Integrity - private const float EnergyToMatterDamageFactorWide = 1000f; + private const float EnergyToMatterDamageFactorWide = 2000f; private const float EnergyToMatterDamageFactorCoeff = 2f; private const float EnergyToMatterDamageFactorOffset = 1f; public static float EnergyToMatterDamageFactorFunction(float delta) diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index a61647df2301ac..6ec8dae9d6f2e3 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -308,6 +308,10 @@ types: Heat: 14 # mining laser real + # SS220 SM-Crystal-begin + - type: SuperMatterSpecificConsumable + additionalMatterOnConsumption: 8 + # SS220 SM-Crystal-end - type: GatheringProjectile - type: Tag tags: diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/supermatter_crystal.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/supermatter_crystal.yml index 48d382a494b2a3..cbf7256b3661a7 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/supermatter_crystal.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/supermatter_crystal.yml @@ -35,19 +35,24 @@ - type: SuperMatter # all things like radiation source etc will be added through SMSystem - type: HallucinationSource weightedRandom: HallucinationSupermatterCrystal - range: 6 - rangeEnd: 8 + range: 7 + rangeEnd: 9 betweenHallucinations: 4 hallucinationMinTime: 2 hallucinationMaxTime: 10 totalDuration: 20 eyeProtectionDependent: true - type: Sprite - sprite: SS220/Objects/Specific/jerrycan.rsi - state: icon + sprite: SS220/Objects/Specific/Supermatter/crystal.rsi + state: base - type: Icon - sprite: SS220/Objects/Specific/jerrycan.rsi + sprite: SS220/Objects/Specific/Supermatter/crystal.rsi state: icon + - type: PointLight + enabled: true + radius: 10 + energy: 5 + color: "#ffe000" - type: Speech speechSounds: Pai - type: IntrinsicRadioTransmitter diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/base.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/base.png new file mode 100644 index 00000000000000..42c2f4e8137832 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/base.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/field.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/field.png new file mode 100644 index 00000000000000..38f05a6230acc1 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/field.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/glow.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/glow.png new file mode 100644 index 00000000000000..7a1f1babb3f6ce Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/glow.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/icon.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/icon.png new file mode 100644 index 00000000000000..e1426eeb71b040 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/icon.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/meta.json b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/meta.json new file mode 100644 index 00000000000000..7533bd51c055bc --- /dev/null +++ b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/meta.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation", + "size": { + "x": 32, + "y": 48 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "psy" + }, + { + "name": "base", + "delays": [ + [ + 0.7, + 0.5, + 1 + ] + ] + }, + { + "name": "glow", + "delays": [ + [ + 1, + 0.5, + 0.1, + 1 + ] + ] + }, + { + "name": "field", + "delays": [ + [ + 10, + 1, + 1, + 1 + ] + ] + } + ] + } diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/psy.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/psy.png new file mode 100644 index 00000000000000..156cb69f4f2319 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/crystal.rsi/psy.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/broken.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/broken.png new file mode 100644 index 00000000000000..905d8136bc5dd0 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/broken.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/falling.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/falling.png new file mode 100644 index 00000000000000..3562887d12216c Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/falling.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/icon.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/icon.png new file mode 100644 index 00000000000000..dfca7b29a9a311 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/icon.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/meta.json b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/meta.json new file mode 100644 index 00000000000000..f1d91564e60686 --- /dev/null +++ b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/meta.json @@ -0,0 +1,68 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation", + "size": { + "x": 64, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "broken", + "delays": [ + [ + 1, + 1, + 1, + 67, + 20, + 10, + 10, + 30 + ] + ] + }, + { + "name": "off" + }, + { + "name": "num_0" + }, + { + "name": "num_1" + }, + { + "name": "num_2" + }, + { + "name": "num_3" + }, + { + "name": "num_4" + }, + { + "name": "num_5" + }, + { + "name": "num_6" + }, + { + "name": "num_7" + }, + { + "name": "num_8" + }, + { + "name": "num_9" + }, + { + "name": "rising" + }, + { + "name": "falling" + } + ] + } diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_0.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_0.png new file mode 100644 index 00000000000000..178a30e6aef3bf Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_0.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_1.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_1.png new file mode 100644 index 00000000000000..e1229d80cdc2d0 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_1.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_2.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_2.png new file mode 100644 index 00000000000000..6644e3b4b55170 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_2.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_3.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_3.png new file mode 100644 index 00000000000000..62776adace1ee0 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_3.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_4.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_4.png new file mode 100644 index 00000000000000..759fa4514a5652 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_4.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_5.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_5.png new file mode 100644 index 00000000000000..ad6ee3779f02a8 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_5.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_6.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_6.png new file mode 100644 index 00000000000000..f7e7cd3c14df6f Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_6.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_7.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_7.png new file mode 100644 index 00000000000000..d2321ac4e32be4 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_7.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_8.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_8.png new file mode 100644 index 00000000000000..98676d3be48528 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_8.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_9.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_9.png new file mode 100644 index 00000000000000..135673a8fb469b Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/num_9.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/off.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/off.png new file mode 100644 index 00000000000000..4d79e6f7946ca5 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/off.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/rising.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/rising.png new file mode 100644 index 00000000000000..98fcd126ea86ac Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/moth_stat_display.rsi/rising.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/advert1.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/advert1.png new file mode 100644 index 00000000000000..ca886b50ea2d62 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/advert1.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/broken.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/broken.png new file mode 100644 index 00000000000000..7a62f976783f8b Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/broken.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/falling.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/falling.png new file mode 100644 index 00000000000000..b4e3e610895e6b Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/falling.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/icon.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/icon.png new file mode 100644 index 00000000000000..06994bcb5a4987 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/icon.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/meta.json b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/meta.json new file mode 100644 index 00000000000000..92ec6ec0e4600a --- /dev/null +++ b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/meta.json @@ -0,0 +1,93 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/3f2ebd858fa918a0bd4afad227731376475d599f", + "size": { + "x": 64, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "broken", + "delays": [ + [ + 1, + 1, + 1, + 67, + 20, + 10, + 10, + 30 + ] + ] + }, + { + "name": "shame" + }, + { + "name": "off" + }, + { + "name": "num_0" + }, + { + "name": "num_1" + }, + { + "name": "num_2" + }, + { + "name": "num_3" + }, + { + "name": "num_4" + }, + { + "name": "num_5" + }, + { + "name": "num_6" + }, + { + "name": "num_7" + }, + { + "name": "num_8" + }, + { + "name": "num_9" + }, + { + "name": "rising" + }, + { + "name": "falling" + }, + { + "name": "advert1", + "delays": [ + [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 5, + 20 + ] + ] + } + ] + } diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_0.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_0.png new file mode 100644 index 00000000000000..178a30e6aef3bf Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_0.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_1.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_1.png new file mode 100644 index 00000000000000..e1229d80cdc2d0 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_1.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_2.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_2.png new file mode 100644 index 00000000000000..6644e3b4b55170 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_2.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_3.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_3.png new file mode 100644 index 00000000000000..62776adace1ee0 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_3.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_4.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_4.png new file mode 100644 index 00000000000000..759fa4514a5652 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_4.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_5.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_5.png new file mode 100644 index 00000000000000..ad6ee3779f02a8 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_5.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_6.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_6.png new file mode 100644 index 00000000000000..f7e7cd3c14df6f Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_6.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_7.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_7.png new file mode 100644 index 00000000000000..d2321ac4e32be4 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_7.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_8.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_8.png new file mode 100644 index 00000000000000..98676d3be48528 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_8.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_9.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_9.png new file mode 100644 index 00000000000000..135673a8fb469b Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/num_9.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/off.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/off.png new file mode 100644 index 00000000000000..e82cb7bd03c2d6 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/off.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/rising.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/rising.png new file mode 100644 index 00000000000000..13f651a57a61fe Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/rising.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/shame.png b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/shame.png new file mode 100644 index 00000000000000..68cb670d452cf2 Binary files /dev/null and b/Resources/Textures/SS220/Objects/Specific/Supermatter/stat_display.rsi/shame.png differ diff --git a/Resources/Textures/SS220/Objects/Specific/smCrystal.rsi/meta.json b/Resources/Textures/SS220/Objects/Specific/smCrystal.rsi/meta.json new file mode 100644 index 00000000000000..463f91364e0016 --- /dev/null +++ b/Resources/Textures/SS220/Objects/Specific/smCrystal.rsi/meta.json @@ -0,0 +1,49 @@ +{ +"version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/3f2ebd858fa918a0bd4afad227731376475d599f", + "size": { + "x": 32, + "y": 48 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "psy" + }, + { + "name": "base", + "delays": [ + [ + 0.7, + 0.5, + 1 + ] + ] + }, + { + "name": "glow", + "delays": [ + [ + 1, + 0.5, + 0.1, + 1 + ] + ] + }, + { + "name": "field", + "delays": [ + [ + 10, + 1, + 1, + 1 + ] + ] + } + ] + }