1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 00:13:36 +08:00

donet format

This commit is contained in:
2025-09-21 15:38:03 +08:00
parent 5f37b8b6d6
commit a25f74443d
32 changed files with 170 additions and 155 deletions

View File

@@ -13,7 +13,8 @@ public static class FactoryFunctions
// Clear entity connection
var factory = cargoTraffic.factory;
factory.ReadObjectConn(belt.entityId, 0, out var isOutput, out var otherObjId, out var otherSlot);
if (isOutput && factory.entityPool[otherObjId].beltId == belt.outputId) {
if (isOutput && factory.entityPool[otherObjId].beltId == belt.outputId)
{
factory.ClearObjectConnDirect(belt.entityId, 0);
factory.ClearObjectConnDirect(otherObjId, otherSlot);
}
@@ -194,7 +195,7 @@ public static class FactoryFunctions
bpBuildings.Add(new BPBuildingData { building = building, itemType = itemType, offset = offset });
}
}
HashSet<BlueprintBuilding> beltsWithInput = [..bpBelts.Select(pair => pair.Value.building.outputObj)];
HashSet<BlueprintBuilding> beltsWithInput = [.. bpBelts.Select(pair => pair.Value.building.outputObj)];
var beltHeads = bpBelts.Where(pair => !beltsWithInput.Contains(pair.Value.building)).ToDictionary(pair => pair.Key, pair => pair.Value);
// Sort belt buildings
List<BlueprintBuilding> sortedBpBelts = [];

View File

@@ -173,7 +173,8 @@ public static class PlanetFunctions
{
ref var warning = ref warningPool[i];
if (warning.id != i) continue;
switch (warning.factoryId) {
switch (warning.factoryId)
{
case -4:
if (warning.astroId == planetId)
warningSystem.RemoveWarningData(i);