Skip to content

Commit

Permalink
Update 3.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Awbugl committed Nov 13, 2024
1 parent a01406c commit fb9cc96
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 43 deletions.
30 changes: 27 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
- v3.0.9
+ 调整开局赠送`无线输电塔`的科技为`高效电浆控制`
+ 提高了两种研究站的制造速度和上传速度
+ 提高了`批量建造`科技解锁的蓝图建筑数量
+ 提高了快速开局模式的可使用物品数量
+ 提高了`物质重组工厂`的制造成本和时间
+ 添加了量化计算器游戏内提示
+ 添加了`WeaponPlus`mod兼容补丁
+ 修复了`湮灭弹箱`配方开局解锁的问题
+ 量化计算器的默认建筑不再使用`物质重组工厂`

+ Adjusted the technology of the `Wireless Transmission Tower` given at the start to `Efficient Plasma Control`.
+ Increased the manufacturing and uploading speeds of two types of research labs.
+ Increased the number of blueprint buildings unlocked by the `Batch Build` technology.
+ Increased the number of items that can be used in Quick Start mode.
+ Increased the manufacturing cost and time of the Recombination Factory.
+ Added in-game hints for Calculator
+ Added `WeaponPlus` mod compatibility patch.
+ Fixed an issue with the unlocking of the `Obliteration Crates` recipe at the beginning of the game.
+ Fixed an issue with the unlocking of the recipe for the Annihilation Crates.
+ The default building for the Calculator no longer uses the Recombination Factory.


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


- v3.0.8
+ 调整了部分科技的研究需求、前置科技
+ 复合矩阵不再可被增产
Expand All @@ -7,9 +34,6 @@
+ Composite Matrix production can no longer be increased by proliferator
+ Fixed misalignment of item pickup UI

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


- v3.0.7
+ 调整了制造复合矩阵时的工作颜色(感谢karki)
Expand Down
9 changes: 9 additions & 0 deletions data/prefabDescs.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
"ModelID": 69,
"assemblerSpeed": 40000
},
{
"ModelID": 70,
"labAssembleSpeed": 40000
},
{
"ModelID": 71,
"powerConnectDistance": 90.5,
Expand Down Expand Up @@ -233,6 +237,11 @@
"ModelID": 434,
"AmmoBlastRadius1": 15
},
{
"ModelID": 455,
"labAssembleSpeed": 120000,
"labResearchSpeed": 3
},
{
"ModelID": 456,
"idleEnergyPerTick": 8000,
Expand Down
8 changes: 4 additions & 4 deletions data/recipes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4146,7 +4146,7 @@
"IconPath": "",
"Type": 10,
"GridIndex": 2313,
"Time": 240,
"Time": 1800,
"Input": [
6503,
5202,
Expand Down Expand Up @@ -4176,7 +4176,7 @@
"IconPath": "",
"Type": 10,
"GridIndex": 2404,
"Time": 240,
"Time": 1800,
"Input": [
6503,
5203,
Expand All @@ -4185,9 +4185,9 @@
],
"InCounts": [
8,
10,
30,
2
30,
6
],
"Output": [
2318
Expand Down
12 changes: 11 additions & 1 deletion data/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,17 @@
"Name": "制造类型调整介绍前字",
"ZHCN": "经过特化调整的制造台可以满足不同制造精度的需求,但除黑雾制造台外,不同制造台不能通用。",
"ENUS": "After specialization, the assemblers can meet the needs of different precision, but except for the dark fog assembler, different assembler can not be used universally."
},
},
{
"Name": "量化计算器介绍标题",
"ZHCN": "量化计算器",
"ENUS": "Calculator"
},
{
"Name": "量化计算器介绍前字",
"ZHCN": "创世之书MOD自带量化计算器,默认为 <color=\"#FD965ECC\">~</color> 键,可在量化计算器的设置UI中修改。",
"ENUS": "GenesisBook mod comes with a calculator, which defaults to the <color=\"#FD965ECC\">~</color> key, which can be changed in the settings in calculator ui."
},
{
"Name": "钨矿脉",
"ZHCN": "钨矿脉",
Expand Down
8 changes: 4 additions & 4 deletions data/techs.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@
"PreTechsMax": false,
"AddItems": [
2201,
2202,
6508
],
"AddItemCounts": [
3,
3,
1
],
Expand Down Expand Up @@ -174,10 +172,12 @@
"IsLabTech": false,
"PreTechsMax": false,
"AddItems": [
1401
1401,
2202
],
"AddItemCounts": [
10
10,
3
],
"PropertyOverrideItems": [],
"PropertyItemCounts": []
Expand Down
9 changes: 9 additions & 0 deletions data/tutorials.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,14 @@
"DeterminatorParams": [
2304
]
},
{
"ID": 36,
"Name": "量化计算器介绍标题",
"PreText": "量化计算器介绍前字",
"DeterminatorName": "TOR_GameSecond",
"DeterminatorParams": [
5
]
}
]
2 changes: 2 additions & 0 deletions src/Compatibility/InstallationCheckPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace ProjectGenesis.Compatibility
[BepInDependency(FastTravelEnabler.GUID, BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(GigaStationsUpdated.GUID, BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(LazyOutposting.GUID, BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency(WeaponPlus.GUID, BepInDependency.DependencyFlags.SoftDependency)]
public class InstallationCheckPlugin : BaseUnityPlugin
{
public const string MODGUID = "org.LoShin.GenesisBook.InstallationCheck";
Expand Down Expand Up @@ -65,6 +66,7 @@ public static void AwakeCompatibilityPatchers()
FastTravelEnabler.Awake();
GigaStationsUpdated.Awake();
LazyOutposting.Awake();
WeaponPlus.Awake();

try { GalacticScale.Awake(); }
catch (FileNotFoundException)
Expand Down
37 changes: 37 additions & 0 deletions src/Compatibility/WeaponPlus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;
using System.Reflection;
using BepInEx;
using BepInEx.Bootstrap;
using HarmonyLib;
using ProjectGenesis.Utils;

// ReSharper disable InconsistentNaming

namespace ProjectGenesis.Compatibility
{
internal static class WeaponPlus
{
internal const string GUID = "org.weaponplus.plugins.Xiaokls";

private static readonly Harmony HarmonyPatch = new Harmony("ProjectGenesis.Compatibility." + GUID);

internal static void Awake()
{
if (!Chainloader.PluginInfos.TryGetValue(GUID, out PluginInfo pluginInfo)) return;

Assembly assembly = pluginInfo.Instance.GetType().Assembly;

Type type = assembly.GetType("DSP_WeaponPlus.Utils.WPAddItem");

HarmonyPatch.Patch(AccessTools.Method(type, "AddDiyItem"), new HarmonyMethod(typeof(WeaponPlus), nameof(AddDiyItem_Prefix)));
}

public static void AddDiyItem_Prefix(int[] inputIds)
{
for (var i = 0; i < inputIds.Length; i++)
{
if (inputIds[i] == 1201) inputIds[i] = ProtoID.I铝块;
}
}
}
}
19 changes: 11 additions & 8 deletions src/Patches/Logic/FastStartOptionPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,35 @@ public static void SetForNewGame(GameData __instance)
}

AddItemToPackage(1131, 2000); // 地基
AddItemToPackage(2003, 600); // 三级带
AddItemToPackage(2003, 1200); // 三级带
AddItemToPackage(2013, 200); // 三级爪
AddItemToPackage(2103, 10); // 小塔
AddItemToPackage(2103, 20); // 小塔
AddItemToPackage(2104, 3); // 大塔
AddItemToPackage(5001, 400); // 小船
AddItemToPackage(5002, 8); // 大船
AddItemToPackage(6267, 10); // 大气
AddItemToPackage(2201, 98); // 电线杆
AddItemToPackage(2202, 4); // 充电杆
AddItemToPackage(2201, 97); // 电线杆
AddItemToPackage(2202, 7); // 充电杆
AddItemToPackage(2107, 20); // 配送器
AddItemToPackage(5003, 100); // 配送小飞机
AddItemToPackage(2203, 46); // 风电
AddItemToPackage(2204, 19); // 火电
AddItemToPackage(2205, 49); // 太阳能
AddItemToPackage(2211, 10); // 裂变
AddItemToPackage(2301, 46); // 矿机
AddItemToPackage(2302, 16); // 熔炉
AddItemToPackage(6230, 20); // 处理厂
AddItemToPackage(2301, 45); // 矿机
AddItemToPackage(2302, 36); // 熔炉
AddItemToPackage(6230, 30); // 处理厂
AddItemToPackage(2303, 16); // 制造台MK1
AddItemToPackage(2304, 16); // 制造台MK2
AddItemToPackage(2305, 16); // 制造台MK3
AddItemToPackage(2306, 20); // 抽水站
AddItemToPackage(2307, 10); // 抽油机
AddItemToPackage(2308, 30); // 精炼厂
AddItemToPackage(2309, 30); // 化工厂
AddItemToPackage(2901, 49); // 研究站
AddItemToPackage(6241, 60); // 燃料棒
AddItemToPackage(3001, 10); // 机枪
AddItemToPackage(3002, 10); // 激光
AddItemToPackage(3002, 20); // 激光
AddItemToPackage(3003, 10); // 加农炮
AddItemToPackage(3005, 10); // 导弹
AddItemToPackage(5102, 24); // 精准无人机
Expand Down
2 changes: 2 additions & 0 deletions src/Patches/Logic/InitialTechPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static void SetForNewGame(GameData __instance)
{
if (DSPGame.IsMenuDemo) { return; }

__instance.history.recipeUnlocked.Remove(5);

foreach (int tech in InitialTechs.Concat(BonusTechs))
{
if (__instance.history.TechUnlocked(tech)) { continue; }
Expand Down
21 changes: 12 additions & 9 deletions src/Patches/Logic/QTools/QTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,7 @@ internal static class QTools

case Utils.ERecipeType.所有制造:
{
dict.TryAddOrInsert(Utils.ERecipeType.Chemical, proto);
dict.TryAddOrInsert(Utils.ERecipeType.Refine, proto);
dict.TryAddOrInsert(Utils.ERecipeType.Assemble, proto);
dict.TryAddOrInsert(Utils.ERecipeType.Particle, proto);
dict.TryAddOrInsert(Utils.ERecipeType.标准制造, proto);
dict.TryAddOrInsert(Utils.ERecipeType.高精度加工, proto);
dict.TryAddOrInsert(Utils.ERecipeType.Research, proto);
dict.TryAddOrInsert(Utils.ERecipeType.高分子化工, proto);

// process later manually
continue;
}

Expand All @@ -83,6 +75,17 @@ internal static class QTools
}
}

ItemProto itemProto = LDB.items.Select(ProtoID.I物质重组工厂);

dict.TryAddOrInsert(Utils.ERecipeType.Chemical, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.Refine, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.Assemble, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.Particle, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.标准制造, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.高精度加工, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.Research, itemProto);
dict.TryAddOrInsert(Utils.ERecipeType.高分子化工, itemProto);

return dict;
}
}
Expand Down
27 changes: 14 additions & 13 deletions src/Patches/UI/QTools/UIQToolsWindow.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using CommonAPI.Systems;
using NGPT;
using ProjectGenesis.Patches.Logic.QTools;
Expand Down Expand Up @@ -33,7 +34,7 @@ public class UIQToolsWindow : ManualBehaviour
private Text _factoryLabelText;
private ObjectPool<ItemNeedDetail> _itemCounterPool;

private GameObject _labelTextPrefeb;
private GameObject _labelTextPrefab;
private RectTransform _list;
private RectTransform _listContent;

Expand Down Expand Up @@ -93,30 +94,30 @@ private void CreateUI()
_proliferatorComboBox = MyComboBox.MyComboBox.CreateComboBox<ProliferatorComboBox>(30, 380, _tabs[0], "默认增产策略");

_clearOptionsButton = Util.MakeHiliteTextButton("清空设置".TranslateFromJson(), 80, 24);
Util.NormalizeRectWithTopLeft(_clearOptionsButton, 1635, 2, _labelTextPrefeb.transform);
Util.NormalizeRectWithTopLeft(_clearOptionsButton, 1635, 2, _labelTextPrefab.transform);

CreateLabelText("工厂", 255, 0);
CreateLabelText("配方选取", 415, 0);
CreateLabelText("增产策略", 850, 0);

_labelTextPrefeb.GetComponent<Text>().text = "物品".TranslateFromJson();
Util.NormalizeRectWithTopLeft(_labelTextPrefeb.transform, -5, 0);
_labelTextPrefab.GetComponent<Text>().text = "物品".TranslateFromJson();
Util.NormalizeRectWithTopLeft(_labelTextPrefab.transform, -5, 0);

Util.NormalizeRectWithTopLeft(Util.CreateLabelText(_labelTextPrefeb, "添加需求:".TranslateFromJson()), 20, 19, _rightContent);
Util.NormalizeRectWithTopLeft(Util.CreateLabelText(_labelTextPrefab, "添加需求:".TranslateFromJson()), 20, 19, _rightContent);

_needLabelText = Util.CreateLabelText(_labelTextPrefeb, "需求:".TranslateFromJson());
_needLabelText = Util.CreateLabelText(_labelTextPrefab, "需求:".TranslateFromJson());
Util.NormalizeRectWithTopLeft(_needLabelText, 20, 60, _rightContent);

_asRawsLabelText = Util.CreateLabelText(_labelTextPrefeb, "额外输入:".TranslateFromJson());
_asRawsLabelText = Util.CreateLabelText(_labelTextPrefab, "额外输入:".TranslateFromJson());
Util.NormalizeRectWithTopLeft(_asRawsLabelText, 20, 160, _rightContent);

_rawsLabelText = Util.CreateLabelText(_labelTextPrefeb, "原料需求:".TranslateFromJson());
_rawsLabelText = Util.CreateLabelText(_labelTextPrefab, "原料需求:".TranslateFromJson());
Util.NormalizeRectWithTopLeft(_rawsLabelText, 20, 260, _rightContent);

_byproductsLabelText = Util.CreateLabelText(_labelTextPrefeb, "副产物:".TranslateFromJson());
_byproductsLabelText = Util.CreateLabelText(_labelTextPrefab, "副产物:".TranslateFromJson());
Util.NormalizeRectWithTopLeft(_byproductsLabelText, 20, 360, _rightContent);

_factoryLabelText = Util.CreateLabelText(_labelTextPrefeb, "工厂:".TranslateFromJson());
_factoryLabelText = Util.CreateLabelText(_labelTextPrefab, "工厂:".TranslateFromJson());
Util.NormalizeRectWithTopLeft(_factoryLabelText, 20, 460, _rightContent);

var inputObj = GameObject.Find("UI Root/Overlay Canvas/In Game/Planet & Star Details/planet-detail-ui/name-input");
Expand Down Expand Up @@ -370,7 +371,7 @@ public void SetTabIndex(int index, bool immediate)
}

private void CreateLabelText(string s, float left, float top) =>
Util.NormalizeRectWithTopLeft(Util.CreateLabelText(_labelTextPrefeb, s.TranslateFromJson()), left, top);
Util.NormalizeRectWithTopLeft(Util.CreateLabelText(_labelTextPrefab, s.TranslateFromJson()), left, top);

public override void _OnUpdate()
{
Expand Down Expand Up @@ -500,8 +501,8 @@ internal static UIQToolsWindow CreateWindow()

if (t.name == "title")
{
win._labelTextPrefeb = t.GetChild(0).gameObject;
Destroy(win._labelTextPrefeb.GetComponent<Localizer>());
win._labelTextPrefab = t.GetChild(0).gameObject;
Destroy(win._labelTextPrefab.GetComponent<Localizer>());

for (var j = 1; j < t.childCount; j++) Destroy(t.GetChild(j).gameObject);
}
Expand Down
Loading

0 comments on commit fb9cc96

Please sign in to comment.