mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 21:33:28 +08:00
UXAssist v1.0.2, UniverseGenTweaks v1.2.1, CheatEnabler v2.3.4
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<BepInExPluginGuid>org.soardev.cheatenabler</BepInExPluginGuid>
|
||||
<Description>DSP MOD - CheatEnabler</Description>
|
||||
<Version>2.3.2</Version>
|
||||
<Version>2.3.4</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageId>CheatEnabler</PackageId>
|
||||
|
||||
@@ -197,9 +197,8 @@ public static class DysonSpherePatch
|
||||
{
|
||||
var index = swarm.starData.index;
|
||||
var delta1 = endVec - swarm.starData.uPosition;
|
||||
var delta2 = VectorLF3.Cross(endVec - uPos, swarm.orbits[orbitId].up).normalized * Math.Sqrt(swarm.dysonSphere.gravity / swarm.orbits[orbitId].radius)
|
||||
+ RandomTable.SphericNormal(ref swarm.randSeed, 0.5);
|
||||
lock(swarm)
|
||||
var delta2 = VectorLF3.Cross(endVec - uPos, swarm.orbits[orbitId].up).normalized * Math.Sqrt(swarm.dysonSphere.gravity / swarm.orbits[orbitId].radius);
|
||||
lock (swarm)
|
||||
{
|
||||
var cache = _sailsCache[index];
|
||||
var len = _sailsCacheLen[index];
|
||||
@@ -218,7 +217,7 @@ public static class DysonSpherePatch
|
||||
}
|
||||
}
|
||||
_sailsCacheLen[index] = len + 1;
|
||||
cache[len].FromData(delta1, delta2, orbitId);
|
||||
cache[len].FromData(delta1, delta2 + RandomTable.SphericNormal(ref swarm.randSeed, 0.5), orbitId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,22 @@ public static class FactoryPatch
|
||||
[HarmonyPatch(typeof(PlanetData), nameof(PlanetData.NotifyFactoryLoaded))]
|
||||
private static void PlanetData_NotifyFactoryLoaded_Postfix(PlanetData __instance)
|
||||
{
|
||||
ArrivePlanet(__instance.factory);
|
||||
var main = GameMain.instance;
|
||||
if (main != null && main._running)
|
||||
{
|
||||
ArrivePlanet(__instance.factory);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GameMain), nameof(GameMain.Begin))]
|
||||
private static void GameMain_Begin_Postfix_For_ImmBuild()
|
||||
{
|
||||
var factory = GameMain.mainPlayer?.factory;
|
||||
if (factory != null)
|
||||
{
|
||||
ArrivePlanet(factory);
|
||||
}
|
||||
}
|
||||
|
||||
private static class ImmediateBuild
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
#### 添加一些作弊功能,同时屏蔽异常检测
|
||||
|
||||
## Changlog
|
||||
* 2.3.4
|
||||
+ Use new tab layout of UXAssist 1.0.2
|
||||
+ Minor bug fixes
|
||||
* 2.3.3
|
||||
+ Fix a crash in `Skip bullet period`.
|
||||
+ Unlock techs with Alt unlocks VeinUtil to 10000 instead of 7200 now, as bug fixed in UXAssist.
|
||||
* 2.3.2
|
||||
+ Birth star options moved to [UniverseGenTweaks](https://dsp.thunderstore.io/package/soarqin/UniverseGenTweaks/)
|
||||
+ Optimize `Quick absorb`, consumes less CPU time and take turns firing to nodes.
|
||||
@@ -74,8 +80,8 @@
|
||||
+ Build without condition
|
||||
+ No collision
|
||||
+ Belt signal item generation
|
||||
+ Count all raws and intermediates in statistics
|
||||
+ Belt signal alt format
|
||||
- Count all raws and intermediates in statistics
|
||||
- Belt signal alt format
|
||||
+ Remove space limit between wind turbines and solar panels
|
||||
+ Boost power generations for kinds of power generators
|
||||
+ Planet:
|
||||
@@ -100,6 +106,12 @@
|
||||
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
|
||||
|
||||
## 更新日志
|
||||
* 2.3.4
|
||||
+ 使用UXAssist 1.0.2的新页签布局
|
||||
+ 修复了一些小bug
|
||||
* 2.3.3
|
||||
+ 修复了`跳过子弹阶段`可能导致崩溃的问题
|
||||
+ 使用Alt解锁科技时,现在`矿物利用`的科技解锁到10000级而不是7200级,因为UXAssist已修复对应bug
|
||||
* 2.3.2
|
||||
+ 母星系的选项移动到了[UniverseGenTweaks](https://dsp.thunderstore.io/package/soarqin/UniverseGenTweaks/)
|
||||
+ 优化了`快速吸收`,现在消耗更少的CPU,并且会轮流打向各节点
|
||||
@@ -170,8 +182,8 @@
|
||||
+ 无条件建造
|
||||
+ 无碰撞
|
||||
+ 传送带信号物品生成
|
||||
+ 统计面板中计算所有原材料和中间产物
|
||||
+ 传送带信号替换格式
|
||||
- 统计面板中计算所有原材料和中间产物
|
||||
- 传送带信号替换格式
|
||||
+ 风力发电机和太阳能板无间距限制
|
||||
+ 提升各种发电设备发电量
|
||||
+ 行星:
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Reflection.Emit;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace CheatEnabler;
|
||||
|
||||
@@ -37,22 +38,16 @@ public static class TechPatch
|
||||
}
|
||||
}
|
||||
|
||||
private static void UnlockTechRecursive(TechProto proto, int maxLevel = 10000)
|
||||
private static void UnlockTechRecursive([NotNull] TechProto techProto, int maxLevel = 10000)
|
||||
{
|
||||
var history = GameMain.history;
|
||||
var techStates = history.techStates;
|
||||
var techID = proto.ID;
|
||||
var techID = techProto.ID;
|
||||
if (techStates == null || !techStates.ContainsKey(techID))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var techProto = LDB.techs.Select(techID);
|
||||
if (techProto == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var value = techStates[techID];
|
||||
if (value.unlocked)
|
||||
{
|
||||
@@ -128,7 +123,7 @@ public static class TechPatch
|
||||
}
|
||||
else if (VFInput.alt)
|
||||
{
|
||||
UnlockTechRecursive(node.techProto, node.techProto.ID == 3606 ? 7200 : 10000);
|
||||
UnlockTechRecursive(node.techProto, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ public static class UIConfigWindow
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
I18N.Add("General", "*General*", "*常规*");
|
||||
I18N.Add("Factory", "Factory", "工厂");
|
||||
I18N.Add("Planet", "Planet", "行星");
|
||||
I18N.Add("Enable Dev Shortcuts", "Enable Dev Shortcuts", "开发模式快捷键");
|
||||
I18N.Add("Disable Abnormal Checks", "Disable Abnormal Checks", "关闭数据异常检查");
|
||||
I18N.Add("Hotkey", "Hotkey", "快捷键");
|
||||
@@ -25,7 +26,6 @@ public static class UIConfigWindow
|
||||
"Click tech on tree while holding:\n Shift: Tech level + 1\n Ctrl: Tech level + 10\n Ctrl + Shift: Tech level + 100\n Alt: Tech level to MAX\n\nNote: all direct prerequisites will be unlocked as well.",
|
||||
"按住以下组合键点击科技树:\n Shift:科技等级+1\n Ctrl:科技等级+10\n Ctrl+Shift:科技等级+100\n Alt:科技等级升到最大\n\n注意:所有直接前置科技也会被解锁");
|
||||
I18N.Add("Assign game to current account", "Assign game to current account", "将游戏绑定给当前账号");
|
||||
I18N.Add("Factory", "*Factory*", "*工厂*");
|
||||
I18N.Add("Finish build immediately", "Finish build immediately", "建造秒完成");
|
||||
I18N.Add("Architect mode", "Architect mode", "建筑师模式");
|
||||
I18N.Add("Build without condition", "Build without condition check", "无条件建造");
|
||||
@@ -42,11 +42,9 @@ public static class UIConfigWindow
|
||||
I18N.Add("Boost fuel power", "Boost fuel power(x50,000)", "提升燃料发电(x50,000)");
|
||||
I18N.Add("Boost fuel power 2", "(x20,000 for deuteron, x10,000 for antimatter)", "(氘核燃料棒x20,000,反物质燃料棒x10,000)");
|
||||
I18N.Add("Boost geothermal power", "Boost geothermal power(x50,000)", "提升地热发电(x50,000)");
|
||||
I18N.Add("Planet", "*Planet*", "*行星*");
|
||||
I18N.Add("Infinite Natural Resources", "Infinite natural resources", "自然资源采集不消耗");
|
||||
I18N.Add("Fast Mining", "Fast mining", "高速采集");
|
||||
I18N.Add("Pump Anywhere", "Pump anywhere", "平地抽水");
|
||||
I18N.Add("Dyson Sphere", "*Dyson Sphere*", "*戴森球*");
|
||||
I18N.Add("Skip bullet period", "Skip bullet period", "跳过子弹阶段");
|
||||
I18N.Add("Skip absorption period", "Skip absorption period", "跳过吸收阶段");
|
||||
I18N.Add("Quick absorb", "Quick absorb", "快速吸收");
|
||||
@@ -54,17 +52,6 @@ public static class UIConfigWindow
|
||||
I18N.Add("Overclock Ejectors", "Overclock Ejectors (10x)", "高速弹射器(10倍射速)");
|
||||
I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)");
|
||||
I18N.Add("Terraform without enough sands", "Terraform without enough sands", "沙土不够时依然可以整改地形");
|
||||
I18N.Add("Birth", "*Birth Sys*", "*母星系*");
|
||||
I18N.Add("Silicon/Titanium on birth planet", "Silicon/Titanium on birth planet", "母星有硅和钛");
|
||||
I18N.Add("Fire ice on birth planet", "Fire ice on birth planet", "母星有可燃冰");
|
||||
I18N.Add("Kimberlite on birth planet", "Kimberlite on birth planet", "母星有金伯利矿");
|
||||
I18N.Add("Fractal silicon on birth planet", "Fractal silicon on birth planet", "母星有分形硅");
|
||||
I18N.Add("Organic crystal on birth planet", "Organic crystal on birth planet", "母星有有机晶体");
|
||||
I18N.Add("Optical grating crystal on birth planet", "Optical grating crystal on birth planet", "母星有光栅石");
|
||||
I18N.Add("Spiniform stalagmite crystal on birth planet", "Spiniform stalagmite crystal on birth planet", "母星有刺笋结晶");
|
||||
I18N.Add("Unipolar magnet on birth planet", "Unipolar magnet on birth planet", "母星有单极磁石");
|
||||
I18N.Add("Birth planet is solid flat (no water at all)", "Birth planet is solid flat (no water at all)", "母星是纯平的(没有水)");
|
||||
I18N.Add("Birth star has high luminosity", "Birth star has high luminosity", "母星系恒星高亮");
|
||||
I18N.Apply();
|
||||
MyConfigWindow.OnUICreated += CreateUI;
|
||||
MyConfigWindow.OnUpdateUI += UpdateUI;
|
||||
@@ -76,6 +63,8 @@ public static class UIConfigWindow
|
||||
// General tab
|
||||
var x = 0f;
|
||||
var y = 10f;
|
||||
wnd.AddSplitter(trans, 10f);
|
||||
wnd.AddTabGroup(trans, "Cheat Enabler", "tab-group-cheatenabler");
|
||||
var tab1 = wnd.AddTab(_windowTrans, "General");
|
||||
MyCheckBox.CreateCheckBox(x, y, tab1, DevShortcuts.Enabled, "Enable Dev Shortcuts");
|
||||
y += 36f;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "CheatEnabler",
|
||||
"version_number": "2.3.2",
|
||||
"version_number": "2.3.4",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/CheatEnabler",
|
||||
"description": "Add various cheat functions while disabling abnormal determinants / 添加一些作弊功能,同时屏蔽异常检测",
|
||||
"dependencies": [
|
||||
"xiaoye97-BepInEx-5.4.17",
|
||||
"soarqin-UXAssist-1.0.0"
|
||||
"soarqin-UXAssist-1.0.2"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user