mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 03:33:29 +08:00
CheatEnabler v2.2.5
This commit is contained in:
@@ -256,7 +256,9 @@ public static class FactoryPatch
|
||||
{
|
||||
if (_sunlight == null)
|
||||
{
|
||||
_sunlight = GameMain.universeSimulator.LocalStarSimulator().sunLight;
|
||||
var simu = GameMain.universeSimulator;
|
||||
if (simu)
|
||||
_sunlight = simu.LocalStarSimulator()?.sunLight;
|
||||
if (_sunlight == null) return;
|
||||
}
|
||||
|
||||
@@ -715,7 +717,9 @@ public static class FactoryPatch
|
||||
_portalFrom = new Dictionary<long, int>();
|
||||
_portalTo = new Dictionary<int, HashSet<long>>();
|
||||
|
||||
foreach (var factory in GameMain.data.factories)
|
||||
var factories = GameMain.data?.factories;
|
||||
if (factories == null) return;
|
||||
foreach (var factory in factories)
|
||||
{
|
||||
var entitySignPool = factory?.entitySignPool;
|
||||
if (entitySignPool == null) continue;
|
||||
|
||||
Reference in New Issue
Block a user