diff --git a/CheatEnabler/CheatEnabler.csproj b/CheatEnabler/CheatEnabler.csproj
index 5e5a0f8..83f8b86 100644
--- a/CheatEnabler/CheatEnabler.csproj
+++ b/CheatEnabler/CheatEnabler.csproj
@@ -5,7 +5,7 @@
net472
org.soardev.cheatenabler
DSP MOD - CheatEnabler
- 2.3.6
+ 2.3.7
true
latest
CheatEnabler
@@ -16,7 +16,7 @@
-
+
@@ -27,7 +27,28 @@
-
+
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/CheatEnabler/FactoryPatch.cs b/CheatEnabler/FactoryPatch.cs
index 344950d..349a4b4 100644
--- a/CheatEnabler/FactoryPatch.cs
+++ b/CheatEnabler/FactoryPatch.cs
@@ -163,7 +163,7 @@ public static class FactoryPatch
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry), nameof(ConfigEntry.Value))),
new CodeInstruction(OpCodes.Brfalse, label1),
new CodeInstruction(OpCodes.Ldstr, "Build without condition is enabled!"),
- new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(StringTranslate), nameof(StringTranslate.Translate), new[] { typeof(string) })),
+ new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(Localization), nameof(Localization.Translate), new[] { typeof(string) })),
new CodeInstruction(OpCodes.Ldstr, "\r\n"),
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(string), nameof(string.Concat), new[] { typeof(string), typeof(string) })),
new CodeInstruction(OpCodes.Call, AccessTools.PropertySetter(typeof(WarningSystem), nameof(WarningSystem.criticalWarningTexts)))
diff --git a/CheatEnabler/PlanetPatch.cs b/CheatEnabler/PlanetPatch.cs
index 07a4429..6c10b8b 100644
--- a/CheatEnabler/PlanetPatch.cs
+++ b/CheatEnabler/PlanetPatch.cs
@@ -84,10 +84,10 @@ public static class PlanetPatch
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
new CodeMatch(OpCodes.Callvirt, AccessTools.Method(typeof(Player), "get_sandCount"))
- ).Advance(3).InsertAndAdvance(
- new CodeInstruction(OpCodes.Ldc_I4_0),
- new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(Math), "Max", new[] { typeof(int), typeof(int) }))
- ).Advance(1).RemoveInstructions(3);
+ ).Advance(4).InsertAndAdvance(
+ new CodeInstruction(OpCodes.Ldc_I8, 0L),
+ new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(Math), "Max", new[] { typeof(long), typeof(long) }))
+ ).Advance(1).RemoveInstructions(4);
return matcher.InstructionEnumeration();
}
}
diff --git a/CheatEnabler/README.md b/CheatEnabler/README.md
index d9a76c2..9bbc9b7 100644
--- a/CheatEnabler/README.md
+++ b/CheatEnabler/README.md
@@ -4,6 +4,9 @@
#### 添加一些作弊功能,同时屏蔽异常检测
## Changlog
+* 2.3.7
+ + Support game version 0.10.28.20759
+ + Fix belt signal that items' generation speed is not fit to number set sometimes.
* 2.3.6
+ Support for UXAssist's new function within `Finish build immediately`.
+ Add a warning message when `Build without condition` is enabled.
@@ -112,6 +115,9 @@
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
## 更新日志
+* 2.3.7
+ + 支持游戏版本0.10.28.20759
+ + 修复了传送带信号有时候物品生成速度和设置不匹配的问题
* 2.3.6
+ 在`建造秒完成`中支持UXAssist的新功能
+ 在启用`无条件建造`时添加警告信息
diff --git a/CheatEnabler/package/manifest.json b/CheatEnabler/package/manifest.json
index 5a6e2d4..baab843 100644
--- a/CheatEnabler/package/manifest.json
+++ b/CheatEnabler/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "CheatEnabler",
- "version_number": "2.3.6",
+ "version_number": "2.3.7",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
"dependencies": [
diff --git a/CompressSave/CompressSave.csproj b/CompressSave/CompressSave.csproj
index ceea18d..171861d 100644
--- a/CompressSave/CompressSave.csproj
+++ b/CompressSave/CompressSave.csproj
@@ -5,7 +5,7 @@
CompressSave
org.soardev.compresssave
DSP MOD - CompressSave
- 1.3.3
+ 1.3.4
true
latest
net472
@@ -15,7 +15,7 @@
-
+
@@ -24,6 +24,27 @@
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/CompressSave/I18N.cs b/CompressSave/I18N.cs
index 17f6837..150388c 100644
--- a/CompressSave/I18N.cs
+++ b/CompressSave/I18N.cs
@@ -17,17 +17,21 @@ public static class I18N
}
public static bool Initialized() => _initialized;
- private static int _nextID = 1;
- private static readonly List StringsToAdd = [];
- public static void Add(string key, string enus, string zhcn = null, string frfr = null)
+ private struct Translation
{
- var strProto = new StringProto
+ public string Key;
+ public string English;
+ public string Chinese;
+ }
+ private static readonly List StringsToAdd = [];
+ public static void Add(string key, string enus, string zhcn = null)
+ {
+ if (zhcn == null && key == enus) return;
+ var strProto = new Translation
{
- Name = key,
- SID = "",
- ENUS = enus,
- ZHCN = string.IsNullOrEmpty(zhcn) ? enus : zhcn,
- FRFR = string.IsNullOrEmpty(frfr) ? enus : frfr
+ Key = key,
+ English = enus,
+ Chinese = string.IsNullOrEmpty(zhcn) ? enus : zhcn
};
StringsToAdd.Add(strProto);
}
@@ -35,18 +39,52 @@ public static class I18N
public static void Apply()
{
if (!_initialized) return;
- var strings = LDB._strings;
- var index = strings.dataArray.Length;
- strings.dataArray = strings.dataArray.Concat(StringsToAdd).ToArray();
- StringsToAdd.Clear();
- var newIndex = strings.dataArray.Length;
- for (; index < newIndex; index++)
+ var indexer = Localization.namesIndexer;
+ var enIdx = -1;
+ var zhIdx = -1;
+ var llen = 0;
+ for (var i = 0; i < Localization.strings.Length; i++)
{
- var strProto = strings.dataArray[index];
- strProto.ID = GetNextID();
- strings.dataIndices[strProto.ID] = index;
- strings.nameIndices[strings.dataArray[index].Name] = index;
+ switch (Localization.Languages[i].lcId)
+ {
+ case Localization.LCID_ENUS:
+ if (!Localization.LanguageLoaded(i) && Localization.Loaded)
+ {
+ Localization.LoadLanguage(i);
+ }
+ enIdx = i;
+ break;
+ case Localization.LCID_ZHCN:
+ if (!Localization.LanguageLoaded(i) && Localization.Loaded)
+ {
+ Localization.LoadLanguage(i);
+ }
+ zhIdx = i;
+ llen = Localization.strings[i].Length;
+ break;
+ }
}
+ var enus = new string[StringsToAdd.Count];
+ var zhcn = new string[StringsToAdd.Count];
+ for (var i = 0; i < StringsToAdd.Count; i++)
+ {
+ var str = StringsToAdd[i];
+ enus[i] = str.English;
+ zhcn[i] = str.Chinese;
+ indexer[str.Key] = llen + i;
+ }
+
+ Localization.strings[enIdx] = Localization.strings[enIdx].Concat(enus).ToArray();
+ if (enIdx == Localization.currentLanguageIndex)
+ {
+ Localization.currentStrings = Localization.strings[enIdx];
+ }
+ Localization.strings[zhIdx] = Localization.strings[zhIdx].Concat(zhcn).ToArray();
+ if (zhIdx == Localization.currentLanguageIndex)
+ {
+ Localization.currentStrings = Localization.strings[zhIdx];
+ }
+ StringsToAdd.Clear();
}
[HarmonyPostfix, HarmonyPriority(Priority.Last), HarmonyPatch(typeof(VFPreload), "InvokeOnLoadWorkEnded")]
@@ -63,22 +101,4 @@ public static class I18N
Apply();
OnInitialized?.Invoke();
}
-
- private static int GetNextID()
- {
- var strings = LDB._strings;
- while (_nextID <= 12000)
- {
- if (!strings.dataIndices.ContainsKey(_nextID))
- {
- break;
- }
-
- _nextID++;
- }
-
- var result = _nextID;
- _nextID++;
- return result;
- }
}
\ No newline at end of file
diff --git a/CompressSave/README.md b/CompressSave/README.md
index 260a3ae..2ca2342 100644
--- a/CompressSave/README.md
+++ b/CompressSave/README.md
@@ -7,6 +7,9 @@
## Changelog
+### 1.3.4
+* Support for game version 0.10.28.20759.
+
### 1.3.3
* Fix a display issue on combobox of compression type.
@@ -137,6 +140,9 @@
## 更新日志
+### 1.3.4
+* 支持游戏版本 0.10.28.20759。
+
### 1.3.3
* 修复压缩类型下拉框显示问题。
diff --git a/CompressSave/SaveUtil.cs b/CompressSave/SaveUtil.cs
index 034eff1..14695dd 100644
--- a/CompressSave/SaveUtil.cs
+++ b/CompressSave/SaveUtil.cs
@@ -12,8 +12,8 @@ public static class SaveUtil
public static readonly Version VerifiedVersion = new()
{
Major = 0,
- Minor = 9,
- Release = 27,
+ Minor = 10,
+ Release = 28,
};
private static string UnzipToFile(DecompressionStream lzStream, string fullPath)
diff --git a/CompressSave/package/manifest.json b/CompressSave/package/manifest.json
index 5543d08..d4dba01 100644
--- a/CompressSave/package/manifest.json
+++ b/CompressSave/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "CompressSave",
- "version_number": "1.3.3",
+ "version_number": "1.3.4",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CompressSave",
"description": "Compress game saves to reduce space use and boost save speed / 压缩游戏存档以降低空间使用并提升保存速度",
"dependencies": ["xiaoye97-BepInEx-5.4.17"]
diff --git a/Dustbin/Dustbin.cs b/Dustbin/Dustbin.cs
index d9c9b79..1b68acc 100644
--- a/Dustbin/Dustbin.cs
+++ b/Dustbin/Dustbin.cs
@@ -69,7 +69,6 @@ public class Dustbin : BaseUnityPlugin, IModCanSave, IMultiplayerMod
var player = GameMain.mainPlayer;
var addCount = count * sandsPerItem;
player.sandCount += addCount;
- GameMain.history.OnSandCountChange(player.sandCount, addCount);
return count;
}
diff --git a/Dustbin/Dustbin.csproj b/Dustbin/Dustbin.csproj
index c91187d..b82d504 100644
--- a/Dustbin/Dustbin.csproj
+++ b/Dustbin/Dustbin.csproj
@@ -5,7 +5,7 @@
net472
org.soardev.dustbin
DSP MOD - Dustbin
- 1.3.0
+ 1.3.1
true
latest
Dustbin
@@ -16,7 +16,7 @@
-
+
@@ -26,13 +26,24 @@
-
-
-
-
- assemblies\Assembly-CSharp.dll
+ GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
diff --git a/Dustbin/GameAssembly/Assembly-CSharp.dll b/Dustbin/GameAssembly/Assembly-CSharp.dll
new file mode 100644
index 0000000..9e030cf
Binary files /dev/null and b/Dustbin/GameAssembly/Assembly-CSharp.dll differ
diff --git a/Dustbin/README.md b/Dustbin/README.md
index c495efa..7baffef 100644
--- a/Dustbin/README.md
+++ b/Dustbin/README.md
@@ -4,6 +4,9 @@
#### 储物仓和储液罐可以转变为垃圾桶(销毁送进的物品)
## Changelog
+* 1.3.1
+ + Support for game version 0.10.28.20759
+
* 1.3.0
+ Add a belt signal(you can find it in first tab of signal selection panel) as dustbin, which is the simplest way to destroy items.
+ Reworked dustbin support for Tanks, to improve performance and resolve known bugs.
@@ -32,6 +35,8 @@
+ You can get item ID list [here](https://dsp-wiki.com/Modding:Items_IDs).
## 更新日志
+* 1.3.1
+ + 支持游戏版本 0.10.28.20759
* 1.3.0
+ 添加了一个传送带信号(可以在信号选择面板的第一个页签中找到)作为垃圾桶,这是目前销毁物品最简单的方法
+ 重写了储液罐的垃圾桶实现,以提高性能并解决已知的bug
diff --git a/Dustbin/StoragePatch.cs b/Dustbin/StoragePatch.cs
index 55ca64e..3afd50d 100644
--- a/Dustbin/StoragePatch.cs
+++ b/Dustbin/StoragePatch.cs
@@ -106,7 +106,7 @@ public static class StoragePatch
[HarmonyPatch(typeof(UIStorageWindow), "_OnCreate")]
private static void UIStorageWindow__OnCreate_Postfix(UIStorageWindow __instance)
{
- _storageDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 50f, 50f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin");
+ _storageDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 50f, 50f, Localization.CurrentLanguageLCID == Localization.LCID_ZHCN ? "垃圾桶" : "Dustbin");
var window = __instance;
_storageDustbinCheckBox.OnChecked += () =>
{
diff --git a/Dustbin/TankPatch.cs b/Dustbin/TankPatch.cs
index e7f4132..81f3162 100644
--- a/Dustbin/TankPatch.cs
+++ b/Dustbin/TankPatch.cs
@@ -110,7 +110,7 @@ public static class TankPatch
[HarmonyPatch(typeof(UITankWindow), "_OnCreate")]
private static void UITankWindow__OnCreate_Postfix(UITankWindow __instance)
{
- _tankDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 120f, 20f, Localization.language == Language.zhCN ? "垃圾桶" : "Dustbin");
+ _tankDustbinCheckBox = UI.MyCheckBox.CreateCheckBox(false, __instance.transform, 120f, 20f, Localization.CurrentLanguageLCID == Localization.LCID_ZHCN ? "垃圾桶" : "Dustbin");
var window = __instance;
_tankDustbinCheckBox.OnChecked += () =>
{
diff --git a/Dustbin/assemblies/Assembly-CSharp.dll b/Dustbin/assemblies/Assembly-CSharp.dll
deleted file mode 100644
index 1d22e24..0000000
Binary files a/Dustbin/assemblies/Assembly-CSharp.dll and /dev/null differ
diff --git a/Dustbin/package/manifest.json b/Dustbin/package/manifest.json
index b2bf9c2..1a481e7 100644
--- a/Dustbin/package/manifest.json
+++ b/Dustbin/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "Dustbin",
- "version_number": "1.3.0",
+ "version_number": "1.3.1",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/Dustbin",
"description": "Can turn Storages and Tanks into Dustbin(Destroy incoming items) / 储物仓和储液罐可以转变为垃圾桶(销毁送进的物品)",
"dependencies": [
diff --git a/DustbinPreloader/DustbinPreloader.csproj b/DustbinPreloader/DustbinPreloader.csproj
index 9affc5a..b2579b9 100644
--- a/DustbinPreloader/DustbinPreloader.csproj
+++ b/DustbinPreloader/DustbinPreloader.csproj
@@ -5,7 +5,7 @@
net472
DustbinPreloader
DSP MOD - Prealoder for Dustbin
- 1.3.0
+ 1.3.1
true
latest
https://nuget.bepinex.dev/v3/index.json
@@ -14,10 +14,31 @@
-
+
-
+
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/GameAssembly/Assembly-CSharp.dll b/GameAssembly/Assembly-CSharp.dll
new file mode 100644
index 0000000..cbccfa6
Binary files /dev/null and b/GameAssembly/Assembly-CSharp.dll differ
diff --git a/GameAssembly/Unity.TextMeshPro.dll b/GameAssembly/Unity.TextMeshPro.dll
new file mode 100644
index 0000000..21da1e3
Binary files /dev/null and b/GameAssembly/Unity.TextMeshPro.dll differ
diff --git a/GameAssembly/UnityEngine.Networking.dll b/GameAssembly/UnityEngine.Networking.dll
new file mode 100644
index 0000000..a3ca302
Binary files /dev/null and b/GameAssembly/UnityEngine.Networking.dll differ
diff --git a/GameAssembly/UnityEngine.SpatialTracking.dll b/GameAssembly/UnityEngine.SpatialTracking.dll
new file mode 100644
index 0000000..9d9ae15
Binary files /dev/null and b/GameAssembly/UnityEngine.SpatialTracking.dll differ
diff --git a/GameAssembly/UnityEngine.Timeline.dll b/GameAssembly/UnityEngine.Timeline.dll
new file mode 100644
index 0000000..d0def3b
Binary files /dev/null and b/GameAssembly/UnityEngine.Timeline.dll differ
diff --git a/GameAssembly/UnityEngine.UI.dll b/GameAssembly/UnityEngine.UI.dll
new file mode 100644
index 0000000..bee997c
Binary files /dev/null and b/GameAssembly/UnityEngine.UI.dll differ
diff --git a/LabOpt/LabOpt.csproj b/LabOpt/LabOpt.csproj
index 672f6ca..ff99e59 100644
--- a/LabOpt/LabOpt.csproj
+++ b/LabOpt/LabOpt.csproj
@@ -15,14 +15,35 @@
-
+
-
+
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/LabOptPreloader/LabOptPreloader.csproj b/LabOptPreloader/LabOptPreloader.csproj
index 646cb60..ef83bed 100644
--- a/LabOptPreloader/LabOptPreloader.csproj
+++ b/LabOptPreloader/LabOptPreloader.csproj
@@ -14,13 +14,34 @@
-
+
+
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
diff --git a/UXAssist/Common/I18N.cs b/UXAssist/Common/I18N.cs
index 9836d76..c031551 100644
--- a/UXAssist/Common/I18N.cs
+++ b/UXAssist/Common/I18N.cs
@@ -17,17 +17,21 @@ public static class I18N
}
public static bool Initialized() => _initialized;
- private static int _nextID = 1;
- private static readonly List StringsToAdd = [];
- public static void Add(string key, string enus, string zhcn = null, string frfr = null)
+ private struct Translation
{
- var strProto = new StringProto
+ public string Key;
+ public string English;
+ public string Chinese;
+ }
+ private static readonly List StringsToAdd = [];
+ public static void Add(string key, string enus, string zhcn = null)
+ {
+ if (zhcn == null && key == enus) return;
+ var strProto = new Translation
{
- Name = key,
- SID = "",
- ENUS = enus,
- ZHCN = string.IsNullOrEmpty(zhcn) ? enus : zhcn,
- FRFR = string.IsNullOrEmpty(frfr) ? enus : frfr
+ Key = key,
+ English = enus,
+ Chinese = string.IsNullOrEmpty(zhcn) ? enus : zhcn
};
StringsToAdd.Add(strProto);
}
@@ -35,18 +39,52 @@ public static class I18N
public static void Apply()
{
if (!_initialized) return;
- var strings = LDB._strings;
- var index = strings.dataArray.Length;
- strings.dataArray = strings.dataArray.Concat(StringsToAdd).ToArray();
- StringsToAdd.Clear();
- var newIndex = strings.dataArray.Length;
- for (; index < newIndex; index++)
+ var indexer = Localization.namesIndexer;
+ var enIdx = -1;
+ var zhIdx = -1;
+ var llen = 0;
+ for (var i = 0; i < Localization.strings.Length; i++)
{
- var strProto = strings.dataArray[index];
- strProto.ID = GetNextID();
- strings.dataIndices[strProto.ID] = index;
- strings.nameIndices[strings.dataArray[index].Name] = index;
+ switch (Localization.Languages[i].lcId)
+ {
+ case Localization.LCID_ENUS:
+ if (!Localization.LanguageLoaded(i) && Localization.Loaded)
+ {
+ Localization.LoadLanguage(i);
+ }
+ enIdx = i;
+ break;
+ case Localization.LCID_ZHCN:
+ if (!Localization.LanguageLoaded(i) && Localization.Loaded)
+ {
+ Localization.LoadLanguage(i);
+ }
+ zhIdx = i;
+ llen = Localization.strings[i].Length;
+ break;
+ }
}
+ var enus = new string[StringsToAdd.Count];
+ var zhcn = new string[StringsToAdd.Count];
+ for (var i = 0; i < StringsToAdd.Count; i++)
+ {
+ var str = StringsToAdd[i];
+ enus[i] = str.English;
+ zhcn[i] = str.Chinese;
+ indexer[str.Key] = llen + i;
+ }
+
+ Localization.strings[enIdx] = Localization.strings[enIdx].Concat(enus).ToArray();
+ if (enIdx == Localization.currentLanguageIndex)
+ {
+ Localization.currentStrings = Localization.strings[enIdx];
+ }
+ Localization.strings[zhIdx] = Localization.strings[zhIdx].Concat(zhcn).ToArray();
+ if (zhIdx == Localization.currentLanguageIndex)
+ {
+ Localization.currentStrings = Localization.strings[zhIdx];
+ }
+ StringsToAdd.Clear();
}
[HarmonyPostfix, HarmonyPriority(Priority.Last), HarmonyPatch(typeof(VFPreload), "InvokeOnLoadWorkEnded")]
@@ -63,22 +101,4 @@ public static class I18N
Apply();
OnInitialized?.Invoke();
}
-
- private static int GetNextID()
- {
- var strings = LDB._strings;
- while (_nextID <= 12000)
- {
- if (!strings.dataIndices.ContainsKey(_nextID))
- {
- break;
- }
-
- _nextID++;
- }
-
- var result = _nextID;
- _nextID++;
- return result;
- }
}
\ No newline at end of file
diff --git a/UXAssist/FactoryPatch.cs b/UXAssist/FactoryPatch.cs
index 98c1fd9..d85484a 100644
--- a/UXAssist/FactoryPatch.cs
+++ b/UXAssist/FactoryPatch.cs
@@ -243,14 +243,14 @@ public static class FactoryPatch
var label1 = generator.DefineLabel();
var label2 = generator.DefineLabel();
matcher.MatchForward(false,
- new CodeMatch(OpCodes.Pop)
+ new CodeMatch(OpCodes.Stloc_1)
).Advance(1).InsertAndAdvance(
new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(NightLight), nameof(NightLight.Enabled))),
new CodeInstruction(OpCodes.Brfalse_S, label1),
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(GameMain), nameof(GameMain.mainPlayer))),
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Player), nameof(Player.transform))),
new CodeInstruction(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Transform), nameof(Transform.up))),
- new CodeInstruction(OpCodes.Stloc_1),
+ new CodeInstruction(OpCodes.Stloc_2),
new CodeInstruction(OpCodes.Br_S, label2)
);
matcher.Labels.Add(label1);
diff --git a/UXAssist/PlanetFunctions.cs b/UXAssist/PlanetFunctions.cs
index f7b2dc7..d33fe54 100644
--- a/UXAssist/PlanetFunctions.cs
+++ b/UXAssist/PlanetFunctions.cs
@@ -39,7 +39,7 @@ public static class PlanetFunctions
}
else
{
- factory.RemoveEntityWithComponents(etd.id);
+ factory.RemoveEntityWithComponents(etd.id, false);
}
}
}
diff --git a/UXAssist/README.md b/UXAssist/README.md
index 9d8fd6f..913b506 100644
--- a/UXAssist/README.md
+++ b/UXAssist/README.md
@@ -4,6 +4,9 @@
#### 一些提升用户体验的功能和补丁
## Changlog
+* 1.0.5
+ + Support game version 0.10.28.20759
+ + Sort blueprint structures before saving, to reduce generated blueprint data size a little.
* 1.0.4
+ Add new function: `Off-grid building and stepped rotation`
+ Fix an issue that window position not restored and can not be resized when function is enabled but game is started with different mod profiles.
@@ -66,6 +69,9 @@
* [OffGridConstruction](https://github.com/Velociraptor115-DSPModding/OffGridConstruction): Off-grid building & stepped rotation implementations
## 更新日志
+* 1.0.5
+ + 支持游戏版本0.10.28.20759
+ + 保存蓝图前对建筑进行排序,以减少生成的蓝图数据大小
* 1.0.4
+ 添加了新功能:`脱离网格建造和小角度旋转`
+ 修复了当功能启用但游戏使用不同的mod配置文件启动时窗口位置无法正确恢复和不可拖动改变大小的问题
diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj
index f241b24..d4c9b60 100644
--- a/UXAssist/UXAssist.csproj
+++ b/UXAssist/UXAssist.csproj
@@ -4,7 +4,7 @@
net472
org.soardev.uxassist
DSP MOD - UXAssist
- 1.0.4
+ 1.0.5
true
latest
UXAssist
@@ -15,14 +15,35 @@
-
+
-
+
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json
index e11d184..12c0666 100644
--- a/UXAssist/package/manifest.json
+++ b/UXAssist/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "UXAssist",
- "version_number": "1.0.4",
+ "version_number": "1.0.5",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
"dependencies": [
diff --git a/UniverseGenTweaks/MoreSettings.cs b/UniverseGenTweaks/MoreSettings.cs
index 7af7beb..a89c3f7 100644
--- a/UniverseGenTweaks/MoreSettings.cs
+++ b/UniverseGenTweaks/MoreSettings.cs
@@ -29,6 +29,10 @@ public class MoreSettings
private static Text _minStepText;
private static Text _maxStepText;
private static Text _flattenText;
+ private static Localizer _minDistLocalizer;
+ private static Localizer _minStepLocalizer;
+ private static Localizer _maxStepLocalizer;
+ private static Localizer _flattenLocalizer;
private static Harmony _harmony;
public static void Init()
@@ -58,12 +62,13 @@ public class MoreSettings
_harmony = null;
}
- private static void CreateSliderWithText(Slider orig, out Text title, out Slider slider, out Text text)
+ private static void CreateSliderWithText(Slider orig, out Text title, out Slider slider, out Text text, out Localizer loc)
{
var origText = orig.transform.parent.GetComponent();
title = Object.Instantiate(origText, origText.transform.parent);
slider = title.transform.FindChildRecur("Slider").GetComponent();
text = slider.transform.FindChildRecur("Text").GetComponent();
+ loc = title.GetComponent();
}
private static void TransformDeltaY(Transform trans, float delta)
@@ -79,10 +84,10 @@ public class MoreSettings
{
__instance.starCountSlider.maxValue = MaxStarCount.Value;
- CreateSliderWithText(__instance.starCountSlider, out _minDistTitle, out _minDistSlider, out _minDistText);
- CreateSliderWithText(__instance.starCountSlider, out _minStepTitle, out _minStepSlider, out _minStepText);
- CreateSliderWithText(__instance.starCountSlider, out _maxStepTitle, out _maxStepSlider, out _maxStepText);
- CreateSliderWithText(__instance.starCountSlider, out _flattenTitle, out _flattenSlider, out _flattenText);
+ CreateSliderWithText(__instance.starCountSlider, out _minDistTitle, out _minDistSlider, out _minDistText, out _minDistLocalizer);
+ CreateSliderWithText(__instance.starCountSlider, out _minStepTitle, out _minStepSlider, out _minStepText, out _minStepLocalizer);
+ CreateSliderWithText(__instance.starCountSlider, out _maxStepTitle, out _maxStepSlider, out _maxStepText, out _maxStepLocalizer);
+ CreateSliderWithText(__instance.starCountSlider, out _flattenTitle, out _flattenSlider, out _flattenText, out _flattenLocalizer);
_minDistTitle.name = "min-dist";
_minDistSlider.minValue = 10f;
@@ -108,6 +113,7 @@ public class MoreSettings
TransformDeltaY(_minStepTitle.transform, -36f * 2);
TransformDeltaY(_maxStepTitle.transform, -36f * 3);
TransformDeltaY(_flattenTitle.transform, -36f * 4);
+ TransformDeltaY(__instance.darkFogToggle.transform.parent, -36f * 4);
TransformDeltaY(__instance.resourceMultiplierSlider.transform.parent, -36f * 4);
TransformDeltaY(__instance.sandboxToggle.transform.parent, -36f * 4);
TransformDeltaY(__instance.propertyMultiplierText.transform, -36f * 4);
@@ -118,10 +124,31 @@ public class MoreSettings
[HarmonyPatch(typeof(UIGalaxySelect), nameof(UIGalaxySelect._OnOpen))]
private static void UIGalaxySelect__OnOpen_Prefix()
{
- _minDistTitle.text = "恒星最小距离".Translate();
- _minStepTitle.text = "步进最小距离".Translate();
- _maxStepTitle.text = "步进最大距离".Translate();
- _flattenTitle.text = "扁平度".Translate();
+ if (_minDistLocalizer)
+ {
+ _minDistLocalizer.stringKey = "恒星最小距离";
+ _minDistLocalizer.translation = "恒星最小距离".Translate();
+ }
+ _minDistText.text = "恒星最小距离".Translate();
+ if (_minStepLocalizer)
+ {
+ _minStepLocalizer.stringKey = "步进最小距离".Translate();
+ _minStepLocalizer.translation = "步进最小距离".Translate();
+ }
+ _minStepText.text = "步进最小距离".Translate();
+ if (_maxStepLocalizer)
+ {
+ _maxStepLocalizer.stringKey = "步进最大距离".Translate();
+ _maxStepLocalizer.text.text = "步进最大距离".Translate();
+ }
+ _maxStepText.text = "步进最大距离".Translate();
+ if (_flattenLocalizer)
+ {
+ _flattenLocalizer.stringKey = "扁平度".Translate();
+ _flattenLocalizer.translation = "扁平度".Translate();
+ }
+ _flattenText.text = "扁平度".Translate();
+
_minDistText.text = _minDist.ToString();
_minStepText.text = _minStep.ToString();
_maxStepText.text = _maxStep.ToString();
@@ -212,10 +239,10 @@ public class MoreSettings
[HarmonyPatch(typeof(GalaxyData), MethodType.Constructor)]
private static IEnumerable GalaxyData_Constructor_Transpiler(IEnumerable instructions, ILGenerator generator)
{
- // 25600 -> (MaxStarCount.Value + 1) * 100
+ // 25700 -> (MaxStarCount.Value + 1) * 100
var matcher = new CodeMatcher(instructions, generator);
matcher.MatchForward(false,
- new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4 && ci.OperandIs(25600))
+ new CodeMatch(ci => ci.opcode == OpCodes.Ldc_I4 && ci.OperandIs(25700))
).SetAndAdvance(OpCodes.Ldsfld, AccessTools.Field(typeof(MoreSettings), nameof(MoreSettings.MaxStarCount))).Insert(
new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(ConfigEntry), nameof(ConfigEntry.Value))),
new CodeInstruction(OpCodes.Ldc_I4_1),
diff --git a/UniverseGenTweaks/README.md b/UniverseGenTweaks/README.md
index 4383142..7c75e14 100644
--- a/UniverseGenTweaks/README.md
+++ b/UniverseGenTweaks/README.md
@@ -4,6 +4,8 @@
#### 宇宙生成参数调节
## Changelog
+* 1.2.2
+ + Support game version 0.10.28.20759
* 1.2.1
+ Use new tab layout of UXAssist 1.0.2
* 1.2.0
@@ -31,6 +33,8 @@
* High luminosity for birth star
## 更新日志
+* 1.2.2
+ + 支持游戏版本0.10.28.20759
* 1.2.1
+ 使用UXAssist 1.0.2的新页签布局
* 1.2.0
diff --git a/UniverseGenTweaks/UniverseGenTweaks.csproj b/UniverseGenTweaks/UniverseGenTweaks.csproj
index f155211..7a1495e 100644
--- a/UniverseGenTweaks/UniverseGenTweaks.csproj
+++ b/UniverseGenTweaks/UniverseGenTweaks.csproj
@@ -6,7 +6,7 @@
UniverseGenTweaks
org.soardev.universegentweaks
DSP MOD - UniverseGenTweaks
- 1.2.1
+ 1.2.2
true
latest
https://nuget.bepinex.dev/v3/index.json
@@ -15,7 +15,7 @@
-
+
@@ -27,6 +27,27 @@
+
+
+ ..\GameAssembly\Assembly-CSharp.dll
+
+
+ ..\GameAssembly\Unity.TextMeshPro.dll
+
+
+ ..\GameAssembly\UnityEngine.Networking.dll
+
+
+ ..\GameAssembly\UnityEngine.SpatialTracking.dll
+
+
+ ..\GameAssembly\UnityEngine.Timeline.dll
+
+
+ ..\GameAssembly\UnityEngine.UI.dll
+
+
+
diff --git a/UniverseGenTweaks/package/manifest.json b/UniverseGenTweaks/package/manifest.json
index c120a37..099595f 100644
--- a/UniverseGenTweaks/package/manifest.json
+++ b/UniverseGenTweaks/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "UniverseGenTweaks",
- "version_number": "1.2.1",
+ "version_number": "1.2.2",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UniverseGenTweaks",
"description": "Universe Generation Tweaks / 宇宙生成参数调节",
"dependencies": [