1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-02-04 20:22:17 +08:00

Compare commits

..

4 Commits

Author SHA1 Message Date
cdfe5aa842 partial fix belt signal 2025-09-21 23:01:46 +08:00
cf858f1838 more fixes to make sure nothing working wrong on game 2025-09-21 23:01:46 +08:00
6cd9aba7b6 we make them compile first 2025-09-21 23:01:46 +08:00
d6a8275938 minor fix 2025-09-21 23:01:29 +08:00

View File

@@ -1140,7 +1140,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
/* BEGIN: Item sources calculation */ /* BEGIN: Item sources calculation */
private static readonly Dictionary<int, ItemSource> ItemSources = new(); private static readonly Dictionary<int, ItemSource> ItemSources = [];
private static bool _itemSourcesInitialized; private static bool _itemSourcesInitialized;
private class ItemSource private class ItemSource
@@ -1211,7 +1211,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
for (var i = 0; i < len; i++) for (var i = 0; i < len; i++)
{ {
if (ItemSources.ContainsKey(res[i])) continue; if (ItemSources.ContainsKey(res[i])) continue;
var rs = new ItemSource { Count = rescnt[i], From = new Dictionary<int, float>() }; var rs = new ItemSource { Count = rescnt[i], From = [], Extra = null };
var it = recipe.Items; var it = recipe.Items;
var itcnt = recipe.ItemCounts; var itcnt = recipe.ItemCounts;
var len2 = it.Length; var len2 = it.Length;
@@ -1222,7 +1222,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
if (len > 1) if (len > 1)
{ {
rs.Extra = new Dictionary<int, float>(); rs.Extra = [];
for (var k = 0; k < len; k++) for (var k = 0; k < len; k++)
{ {
if (i != k) if (i != k)