From 512dc97189e3e753cda6d646d440dbd67b99caeb Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:08:24 +0300 Subject: [PATCH 1/6] Update SolutionRegenerationSystem.cs --- .../Chemistry/EntitySystems/SolutionRegenerationSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index 5af181e4af5..05dbe5df6b5 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -11,10 +11,15 @@ public sealed class SolutionRegenerationSystem : EntitySystem { [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IGameTiming _timing = default!; + private readonly TimeSpan _updateTime = TimeSpan.Zero; public override void Update(float frameTime) { base.Update(frameTime); + + if (_updateTime > _timing.CurTime) + return; + _updateTime = _timing.CurTime + TimeSpan.FromSeconds(0.5); var query = EntityQueryEnumerator(); while (query.MoveNext(out var uid, out var regen, out var manager)) From 097d0512d17683e6627daad681939976fdf1d9ca Mon Sep 17 00:00:00 2001 From: Jerry <48524572+JerryImMouse@users.noreply.github.com> Date: Wed, 17 Apr 2024 01:17:14 +0500 Subject: [PATCH 2/6] =?UTF-8?q?=D0=A2=D1=83=D1=82=20=D0=BC=D0=BE=D0=B9=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=81=D1=8F=D0=BA,=20=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chemistry/EntitySystems/SolutionRegenerationSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index 05dbe5df6b5..d6fdba9d057 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -11,7 +11,7 @@ public sealed class SolutionRegenerationSystem : EntitySystem { [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly IGameTiming _timing = default!; - private readonly TimeSpan _updateTime = TimeSpan.Zero; + private TimeSpan _updateTime = TimeSpan.Zero; public override void Update(float frameTime) { From 694f66ed32f5570e91f26366b99703c5cdfa03b6 Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:28:49 +0300 Subject: [PATCH 3/6] Update SolutionRegenerationSystem.cs --- .../Chemistry/EntitySystems/SolutionRegenerationSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index d6fdba9d057..66a71911475 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -28,7 +28,7 @@ public override void Update(float frameTime) continue; // timer ignores if its full, it's just a fixed cycle - regen.NextRegenTime = _timing.CurTime + regen.Duration; + regen.NextRegenTime = _timing.CurTime + TimeSpan.FromSeconds(5); if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.Solution, out var solution)) { var amount = FixedPoint2.Min(solution.AvailableVolume, regen.Generated.Volume); From 11c98192de60697b9201d407284e073d71d11e33 Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:31:47 +0300 Subject: [PATCH 4/6] Update SolutionRegenerationComponent.cs --- .../Chemistry/Components/SolutionRegenerationComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs index 23bf6b21573..e124e6e02e0 100644 --- a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs @@ -33,7 +33,7 @@ public sealed partial class SolutionRegenerationComponent : Component /// How long it takes to regenerate once. /// [DataField("duration"), ViewVariables(VVAccess.ReadWrite)] - public TimeSpan Duration = TimeSpan.FromSeconds(1); + public TimeSpan Duration = TimeSpan.FromSeconds(5); /// /// The time when the next regeneration will occur. From d4340795c953b4969dfdff688ee6d8803d652116 Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:32:34 +0300 Subject: [PATCH 5/6] Update SolutionRegenerationComponent.cs --- .../Chemistry/Components/SolutionRegenerationComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs index e124e6e02e0..a0ca0b69384 100644 --- a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs @@ -33,12 +33,12 @@ public sealed partial class SolutionRegenerationComponent : Component /// How long it takes to regenerate once. /// [DataField("duration"), ViewVariables(VVAccess.ReadWrite)] - public TimeSpan Duration = TimeSpan.FromSeconds(5); + public TimeSpan Duration = TimeSpan.FromSeconds(1); /// /// The time when the next regeneration will occur. /// [DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] [AutoPausedField] - public TimeSpan NextRegenTime = TimeSpan.FromSeconds(0); + public TimeSpan NextRegenTime = TimeSpan.FromSeconds(5); } From ffccace33666694ecd5045b99eb7ed05a4357e04 Mon Sep 17 00:00:00 2001 From: Jerry <48524572+JerryImMouse@users.noreply.github.com> Date: Wed, 17 Apr 2024 01:33:22 +0500 Subject: [PATCH 6/6] =?UTF-8?q?=D1=8D=D1=85=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chemistry/EntitySystems/SolutionRegenerationSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index 66a71911475..d6fdba9d057 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -28,7 +28,7 @@ public override void Update(float frameTime) continue; // timer ignores if its full, it's just a fixed cycle - regen.NextRegenTime = _timing.CurTime + TimeSpan.FromSeconds(5); + regen.NextRegenTime = _timing.CurTime + regen.Duration; if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.Solution, out var solution)) { var amount = FixedPoint2.Min(solution.AvailableVolume, regen.Generated.Volume);