Skip to content

Commit 92c5432

Browse files
committed
Update 2.5.7
1 parent ae7bc4d commit 92c5432

File tree

10 files changed

+38
-27
lines changed

10 files changed

+38
-27
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
- v2.5.7
2+
+ 修复部分图标缺失的问题
3+
4+
+ Fix the problem of missing icons
5+
6+
<details>
7+
<summary>点击展开日志 | Click to view all </summary>
8+
19
- v2.5.6
210
+ 调整部分图标
311
+ 调整部分文案
@@ -13,8 +21,6 @@
1321
+ Adjust the storage capacity and charging power of Logistics Station
1422
+ Add recipe: Glycerol Synthesis
1523

16-
<details>
17-
<summary>点击展开日志 | Click to view all </summary>
1824

1925
- v2.5.5
2026
+ 调整部分图标

ProjectGenesis.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127
<Compile Include="src\Patches\UI\MultiProductionPatches.cs" />
128128
<Compile Include="src\Patches\UI\UIAbnormalityTipPatches.cs" />
129129
<Compile Include="src\Patches\UI\UIPatches.cs" />
130-
<Compile Include="src\Patches\UI\UIPlanetFocus\MyWindowCtl.cs" />
131130
<Compile Include="src\Patches\UI\UIPlanetFocus\UIPlanetFocusWindow.cs" />
132131
<Compile Include="src\Patches\UI\UIPlanetFocus\UIPlanetDetailExpand.cs" />
133-
<Compile Include="src\Patches\UI\UIPlanetFocus\Util.cs" />
134132
<Compile Include="src\Patches\UI\UISignalPickerPatches.cs" />
135133
<Compile Include="src\Patches\UI\UpdateLogoPatches.cs" />
134+
<Compile Include="src\Patches\UI\Utils\MyWindowCtl.cs" />
135+
<Compile Include="src\Patches\UI\Utils\Util.cs" />
136136
<Compile Include="src\ProjectGenesis.cs" />
137137
<Compile Include="src\Utils\CopyModelUtils.cs" />
138138
<Compile Include="src\Utils\ERecipeType.cs" />

dependencies/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7976,7 +7976,7 @@
79767976
"ID": 7002,
79777977
"Name": "",
79787978
"Description": "I氨",
7979-
"IconPath": "Assets/texpack/氨_新",
7979+
"IconPath": "Assets/texpack/",
79807980
"GridIndex": 4113,
79817981
"StackSize": 20,
79827982
"Type": 2,

dependencies/recipes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3601,7 +3601,7 @@
36013601
"ID": 710,
36023602
"Name": "合成氨",
36033603
"Description": "R合成氨",
3604-
"IconPath": "Assets/texpack/氨_新",
3604+
"IconPath": "Assets/texpack/",
36053605
"Type": 2,
36063606
"GridIndex": 4113,
36073607
"Time": 120,

src/Patches/UI/DisplayTextPatches/DisplayTextPatches.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using HarmonyLib;
33
using ProjectGenesis.Utils;
44
using UnityEngine;
5+
using Utils_ERecipeType = ProjectGenesis.Utils.ERecipeType;
56

67
// ReSharper disable InconsistentNaming
78

@@ -13,35 +14,35 @@ internal static class DisplayTextPatches
1314
[HarmonyPatch(typeof(RecipeProto), "madeFromString", MethodType.Getter)]
1415
public static void RecipeProto_madeFromString(ref RecipeProto __instance, ref string __result)
1516
{
16-
var type = (Utils.ERecipeType)__instance.Type;
17+
var type = (Utils_ERecipeType)__instance.Type;
1718

1819
switch (type)
1920
{
20-
case Utils.ERecipeType.电路蚀刻:
21+
case Utils_ERecipeType.电路蚀刻:
2122
__result = "电路蚀刻机".TranslateFromJson();
2223
break;
2324

24-
case Utils.ERecipeType.高精度加工:
25+
case Utils_ERecipeType.高精度加工:
2526
__result = "高精度装配线".TranslateFromJson();
2627
break;
2728

28-
case Utils.ERecipeType.矿物处理:
29+
case Utils_ERecipeType.矿物处理:
2930
__result = "矿物处理厂".TranslateFromJson();
3031
break;
3132

32-
case Utils.ERecipeType.精密组装:
33+
case Utils_ERecipeType.精密组装:
3334
__result = "精密制造厂".TranslateFromJson();
3435
break;
3536

36-
case Utils.ERecipeType.聚变生产:
37+
case Utils_ERecipeType.聚变生产:
3738
__result = "紧凑式回旋加速器".TranslateFromJson();
3839
break;
3940

40-
case Utils.ERecipeType.垃圾回收:
41+
case Utils_ERecipeType.垃圾回收:
4142
__result = "物质分解设施".TranslateFromJson();
4243
break;
4344

44-
case Utils.ERecipeType.高分子化工:
45+
case Utils_ERecipeType.高分子化工:
4546
__result = "先进化学反应釜".TranslateFromJson();
4647
break;
4748
}
@@ -102,7 +103,7 @@ public static void GetPropValuePatch(ref ItemProto __instance, int index, ref st
102103
if (__instance.prefabDesc.isCollectStation && __instance.ID == ProtoIDUsedByPatches.I大气采集器) __result = "行星大气".TranslateFromJson();
103104

104105
return;
105-
106+
106107
case 22:
107108
if (GameMain.history.TechUnlocked(ProtoIDUsedByPatches.T化工技术革新) && __instance.prefabDesc.isAssembler)
108109
switch (__instance.prefabDesc.modelIndex)

src/Patches/UI/UIPlanetFocus/UIPlanetDetailExpand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using HarmonyLib;
2+
using ProjectGenesis.Patches.UI.Utils;
23
using ProjectGenesis.Utils;
34

45
// ReSharper disable InconsistentNaming

src/Patches/UI/UIPlanetFocus/UIPlanetFocusWindow.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
using CommonAPI.Systems;
22
using HarmonyLib;
3+
using ProjectGenesis.Patches.UI.Utils;
34
using ProjectGenesis.Utils;
45
using UnityEngine;
56
using UnityEngine.UI;
67
using static ProjectGenesis.Patches.Logic.PlanetFocus.PlanetFocusPatches;
8+
using static ProjectGenesis.Patches.UI.Utils.Util;
9+
using static ProjectGenesis.Patches.UI.Utils.MyWindowCtl;
710

811
namespace ProjectGenesis.Patches.UI.UIPlanetFocus
912
{
@@ -29,15 +32,15 @@ public class UIPlanetFocusWindow : ManualBehaviour
2932

3033
internal static UIPlanetFocusWindow CreateWindow()
3134
{
32-
var win = MyWindowCtl.CreateWindow<UIPlanetFocusWindow>("UIPlanetFocusWindow", "星球基地".TranslateFromJson());
35+
var win = CreateWindow<UIPlanetFocusWindow>("UIPlanetFocusWindow", "星球基地".TranslateFromJson());
3336
return win;
3437
}
3538

3639
public void OpenWindow() => MyWindowCtl.OpenWindow(this);
3740

3841
protected override void _OnCreate()
3942
{
40-
windowTrans = MyWindowCtl.GetRectTransform(this);
43+
windowTrans = GetRectTransform(this);
4144
windowTrans.sizeDelta = new Vector2(380f, 250f);
4245

4346
CreateUI();
@@ -47,25 +50,25 @@ private void CreateUI()
4750
{
4851
var tab = new GameObject();
4952
_tab1 = tab.AddComponent<RectTransform>();
50-
Util.NormalizeRectWithMargin(_tab1, 40, 40, 40, 40, windowTrans);
53+
NormalizeRectWithMargin(_tab1, 40, 40, 40, 40, windowTrans);
5154
tab.name = "tab-1";
5255

53-
nameText = Util.CreateText("星球倾向", 16);
54-
Util.NormalizeRectWithTopLeft(nameText.transform, 0f, 20f, _tab1);
56+
nameText = CreateText("星球倾向", 16);
57+
NormalizeRectWithTopLeft(nameText.transform, 0f, 20f, _tab1);
5558

5659
for (var i = 0; i < FocusMaxCount; ++i)
5760
{
58-
Util.CreateSignalIcon(out var iconBtn, out var iconImage);
61+
CreateSignalIcon(out var iconBtn, out var iconImage);
5962
_iconBtns[i] = iconBtn;
6063
_iconImgs[i] = iconImage;
61-
_iconTexts[i] = Util.CreateText("", 16);
64+
_iconTexts[i] = CreateText("", 16);
6265

6366
// works for 2x2
6467
// Util.NormalizeRectWithTopLeft(iconBtn.transform, (i & 1) * 60, 60 + (i >> 1) * 60, _tab1);
6568
// Util.NormalizeRectWithTopLeft(_iconTexts[i].transform, 150, 60 + i * 30, _tab1);
6669

67-
Util.NormalizeRectWithTopLeft(iconBtn.transform, 0, 60 + i * 60, _tab1);
68-
Util.NormalizeRectWithTopLeft(_iconTexts[i].transform, 55, 72 + i * 60, _tab1);
70+
NormalizeRectWithTopLeft(iconBtn.transform, 0, 60 + i * 60, _tab1);
71+
NormalizeRectWithTopLeft(_iconTexts[i].transform, 55, 72 + i * 60, _tab1);
6972

7073
var id = i;
7174
iconBtn.onClick += _ => OnIconBtnClick(id);

src/Patches/UI/UIPlanetFocus/MyWindowCtl.cs renamed to src/Patches/UI/Utils/MyWindowCtl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using UnityEngine;
22
using UnityEngine.UI;
33

4-
namespace ProjectGenesis.Patches.UI.UIPlanetFocus
4+
namespace ProjectGenesis.Patches.UI.Utils
55
{
66
/// <summary>
77
/// special thanks to https://github.com/hetima/DSP_PlanetFinder/tree/main/PlanetFinder
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.UI;
44

5-
namespace ProjectGenesis.Patches.UI.UIPlanetFocus
5+
namespace ProjectGenesis.Patches.UI.Utils
66
{
77
/// <summary>
88
/// special thanks to https://github.com/hetima/DSP_PlanetFinder/tree/main/PlanetFinder

src/ProjectGenesis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class ProjectGenesis : BaseUnityPlugin, IModCanSave, IMultiplayerModWithS
4343
{
4444
public const string MODGUID = "org.LoShin.GenesisBook";
4545
public const string MODNAME = "GenesisBook";
46-
public const string VERSION = "2.5.6";
46+
public const string VERSION = "2.5.7";
4747

4848
public string Version => VERSION;
4949

0 commit comments

Comments
 (0)