From 2e8c10458377e88e366964c75541b780c76d2c12 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Wed, 21 Jan 2026 01:23:15 +0100 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20DontSellingGridSystems=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BE=D1=82=D0=B2=D1=80=D0=B0=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B8=20=D0=BD=D0=B5=D0=B4=D0=B5=D0=B9=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20Entity?= =?UTF-8?q?Uid.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_Sunrise/DontSellingGrid/DontSellingGridSystems.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs b/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs index 84252b80ac..79d55f583e 100644 --- a/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs +++ b/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs @@ -33,12 +33,18 @@ public sealed class StationDontSellingSystems : EntitySystem _lookup.GetGridEntities(uid, entities); foreach (var entityUid in entities) { + if (!entityUid.Owner.IsValid()) + continue; + DepreciatePrice(entityUid); } } private void DepreciatePrice(EntityUid uid) { + if (!uid.IsValid()) + return; + EnsureComp(uid); if (!TryComp(uid, out var containers)) @@ -65,6 +71,9 @@ public sealed class StationDontSellingSystems : EntitySystem { foreach (var gridUid in args.Station.Comp.Grids) { + if (!gridUid.IsValid()) + continue; + AddComp(gridUid); } }