Fix compatibility with Rimfactory's digital storage

760/768 being the limit and errors getting thrown when randomly overhauling are issues PRF independently has, with nothing else present too
This commit is contained in:
bbradson
2024-01-27 12:48:22 +01:00
parent c8b764de68
commit 20aebe4e83
8 changed files with 78 additions and 10 deletions
@@ -18,7 +18,9 @@ public static class SlotGroupExtensions
public static bool ShouldHaveDistricts([NotNullWhen(true)] this SlotGroup? slotGroup, out int cellCountIfTrue,
out int totalSlotsIfTrue)
{
if (slotGroup is null || slotGroup.parent is Building { Spawned: false })
if (slotGroup is null
|| (slotGroup.parent is Building building
&& (!building.IsSpawned() || RimfactoryExtensionCacheValue.HasExtension(building))))
{
Unsafe.SkipInit(out cellCountIfTrue);
goto False;