mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-05 03:42:20 +08:00
Compare commits
2 Commits
b566256748
...
51f694a892
| Author | SHA1 | Date | |
|---|---|---|---|
| 51f694a892 | |||
| 23aa8c1f13 |
@@ -71,6 +71,8 @@ public class CheatEnabler : BaseUnityPlugin
|
||||
"Enable warp without warper");
|
||||
DysonSpherePatch.SkipBulletEnabled = Config.Bind("DysonSphere", "SkipBullet", false,
|
||||
"Skip bullet");
|
||||
DysonSpherePatch.FireAllBulletsEnabled = Config.Bind("DysonSphere", "FireAllBullets", false,
|
||||
"Fire all bullets at once");
|
||||
DysonSpherePatch.SkipAbsorbEnabled = Config.Bind("DysonSphere", "SkipAbsorb", false,
|
||||
"Skip absorption");
|
||||
DysonSpherePatch.QuickAbsorbEnabled = Config.Bind("DysonSphere", "QuickAbsorb", false,
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Reflection.Emit;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
|
||||
namespace CheatEnabler.Patches;
|
||||
@@ -11,6 +10,7 @@ namespace CheatEnabler.Patches;
|
||||
public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
{
|
||||
public static ConfigEntry<bool> SkipBulletEnabled;
|
||||
public static ConfigEntry<bool> FireAllBulletsEnabled;
|
||||
public static ConfigEntry<bool> SkipAbsorbEnabled;
|
||||
public static ConfigEntry<bool> QuickAbsorbEnabled;
|
||||
public static ConfigEntry<bool> EjectAnywayEnabled;
|
||||
@@ -29,6 +29,8 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
OverclockEjectorEnabled.SettingChanged += (_, _) => OverclockEjector.Enable(OverclockEjectorEnabled.Value);
|
||||
OverclockSiloEnabled.SettingChanged += (_, _) => OverclockSilo.Enable(OverclockSiloEnabled.Value);
|
||||
UnlockMaxOrbitRadiusEnabled.SettingChanged += (_, _) => UnlockMaxOrbitRadius.Enable(UnlockMaxOrbitRadiusEnabled.Value);
|
||||
|
||||
FireAllBulletsEnabled.SettingChanged += (_, _) => SkipBulletPatch.SetFireAllBullets(FireAllBulletsEnabled.Value);
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
@@ -41,6 +43,7 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
OverclockSilo.Enable(OverclockSiloEnabled.Value);
|
||||
UnlockMaxOrbitRadius.Enable(UnlockMaxOrbitRadiusEnabled.Value);
|
||||
Enable(true);
|
||||
SkipBulletPatch.SetFireAllBullets(FireAllBulletsEnabled.Value);
|
||||
}
|
||||
|
||||
public static void Uninit()
|
||||
@@ -94,6 +97,12 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
private static long _sailLifeTime;
|
||||
private static DysonSailCache[][] _sailsCache;
|
||||
private static int[] _sailsCacheLen, _sailsCacheCapacity;
|
||||
private static bool _fireAllBullets;
|
||||
|
||||
public static void SetFireAllBullets(bool value)
|
||||
{
|
||||
_fireAllBullets = value;
|
||||
}
|
||||
|
||||
private struct DysonSailCache
|
||||
{
|
||||
@@ -181,25 +190,28 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
).Advance(2);
|
||||
var start = matcher.Pos;
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.Pop)
|
||||
).Advance(1);
|
||||
new CodeMatch(OpCodes.Ldc_I4_M1),
|
||||
new CodeMatch(OpCodes.Stfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.direction)))
|
||||
).Advance(2);
|
||||
var end = matcher.Pos;
|
||||
matcher.Start().Advance(start).RemoveInstructions(end - start).Insert(
|
||||
new CodeInstruction(OpCodes.Ldarg_3),
|
||||
new CodeInstruction(OpCodes.Ldarg_0),
|
||||
new CodeInstruction(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.orbitId))),
|
||||
new CodeInstruction(OpCodes.Ldarg_3),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 9),
|
||||
new CodeInstruction(OpCodes.Ldloc_S, 11),
|
||||
new CodeInstruction(OpCodes.Ldarg_S, 6),
|
||||
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(SkipBulletPatch), nameof(SkipBulletPatch.AddDysonSail)))
|
||||
);
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
|
||||
private static void AddDysonSail(DysonSwarm swarm, int orbitId, VectorLF3 uPos, VectorLF3 endVec)
|
||||
private static void AddDysonSail(ref EjectorComponent ejector, DysonSwarm swarm, VectorLF3 uPos, VectorLF3 endVec, int[] consumeRegister)
|
||||
{
|
||||
var index = swarm.starData.index;
|
||||
var orbitId = ejector.orbitId;
|
||||
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);
|
||||
var bulletCount = ejector.bulletCount;
|
||||
lock (swarm)
|
||||
{
|
||||
var cache = _sailsCache[index];
|
||||
@@ -209,6 +221,24 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
SetSailsCacheCapacity(index, 256);
|
||||
cache = _sailsCache[index];
|
||||
}
|
||||
if (_fireAllBullets)
|
||||
{
|
||||
var capacity = _sailsCacheCapacity[index];
|
||||
var leastCapacity = len + bulletCount;
|
||||
if (leastCapacity > capacity)
|
||||
{
|
||||
do
|
||||
{
|
||||
capacity *= 2;
|
||||
} while (leastCapacity > capacity);
|
||||
SetSailsCacheCapacity(index, capacity);
|
||||
cache = _sailsCache[index];
|
||||
}
|
||||
_sailsCacheLen[index] = len + bulletCount;
|
||||
var end = len + bulletCount;
|
||||
for (var i = len; i < end; i++)
|
||||
cache[i].FromData(delta1, delta2 + RandomTable.SphericNormal(ref swarm.randSeed, 0.5), orbitId);
|
||||
}
|
||||
else
|
||||
{
|
||||
var capacity = _sailsCacheCapacity[index];
|
||||
@@ -217,10 +247,44 @@ public class DysonSpherePatch : PatchImpl<DysonSpherePatch>
|
||||
SetSailsCacheCapacity(index, capacity * 2);
|
||||
cache = _sailsCache[index];
|
||||
}
|
||||
_sailsCacheLen[index] = len + 1;
|
||||
cache[len].FromData(delta1, delta2 + RandomTable.SphericNormal(ref swarm.randSeed, 0.5), orbitId);
|
||||
}
|
||||
_sailsCacheLen[index] = len + 1;
|
||||
cache[len].FromData(delta1, delta2 + RandomTable.SphericNormal(ref swarm.randSeed, 0.5), orbitId);
|
||||
}
|
||||
|
||||
if (_fireAllBullets)
|
||||
{
|
||||
if (!ejector.incUsed)
|
||||
{
|
||||
ejector.incUsed = ejector.bulletInc >= bulletCount;
|
||||
}
|
||||
ejector.bulletInc = 0;
|
||||
ejector.bulletCount = 0;
|
||||
lock (consumeRegister)
|
||||
{
|
||||
consumeRegister[ejector.bulletId] += bulletCount;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var inc = ejector.bulletInc / bulletCount;
|
||||
if (!ejector.incUsed)
|
||||
{
|
||||
ejector.incUsed = inc > 0;
|
||||
}
|
||||
ejector.bulletInc -= inc;
|
||||
ejector.bulletCount = bulletCount - 1;
|
||||
if (ejector.bulletCount == 0)
|
||||
{
|
||||
ejector.bulletInc = 0;
|
||||
}
|
||||
lock (consumeRegister)
|
||||
{
|
||||
consumeRegister[ejector.bulletId]++;
|
||||
}
|
||||
}
|
||||
ejector.time = ejector.coldSpend;
|
||||
ejector.direction = -1;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
|
||||
@@ -418,6 +418,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
|
||||
/*
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(ConstructionSystem), nameof(ConstructionSystem.AddBuildTargetToModules))]
|
||||
private static IEnumerable<CodeInstruction> ConstructionSystem_AddBuildTargetToModules_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
@@ -449,6 +450,7 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
);
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
*/
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(UXAssist.Functions.PlanetFunctions), nameof(UXAssist.Functions.PlanetFunctions.BuildOrbitalCollectors))]
|
||||
|
||||
@@ -45,7 +45,7 @@ public static class UIConfigWindow
|
||||
"传送带信号物品生成数量格式:\n 默认为AAAABC\n 勾选替换为BCAAAA\nAAAA=生成速度,B=增产点数,C=堆叠数量");
|
||||
I18N.Add("Count generations as production in statistics", "Count generations as production in statistics", "统计信息里将生成计算为产物");
|
||||
I18N.Add("Count removals as consumption in statistics", "Count removals as consumption in statistics", "统计信息里将移除计算为消耗");
|
||||
I18N.Add("Count all raws and intermediates in statistics","Count all raw materials in statistics", "统计信息里计算所有原料和中间产物");
|
||||
I18N.Add("Count all raws and intermediates in statistics", "Count all raw materials in statistics", "统计信息里计算所有原料和中间产物");
|
||||
I18N.Add("Remove power space limit", "Remove space limit for winds and geothermals", "移除风力发电和地热发电的间距限制");
|
||||
I18N.Add("Boost wind power", "Boost wind power(x100,000)", "提升风力发电(x100,000)");
|
||||
I18N.Add("Boost solar power", "Boost solar power(x100,000)", "提升太阳能发电(x100,000)");
|
||||
@@ -53,12 +53,14 @@ public static class UIConfigWindow
|
||||
I18N.Add("Boost fuel power 2", "(x20,000 for deuteron, x10,000 for antimatter)", "(氘核燃料棒x20,000,反物质燃料棒x10,000)");
|
||||
I18N.Add("Wind Turbines do global power coverage", "Wind Turbines do global power coverage", "风力涡轮机供电覆盖全球");
|
||||
I18N.Add("Boost geothermal power", "Boost geothermal power(x50,000)", "提升地热发电(x50,000)");
|
||||
I18N.Add("Increase maximum power usage in Logistic Stations and Advanced Mining Machines", "Increase maximum power usage in Logistic Stations and Advanced Mining Machines", "提升物流塔和大型采矿机的最大功耗");
|
||||
I18N.Add("Increase maximum power usage in Logistic Stations and Advanced Mining Machines", "Increase maximum power usage in Logistic Stations and Advanced Mining Machines",
|
||||
"提升物流塔和大型采矿机的最大功耗");
|
||||
I18N.Add("Retrieve/Place items from/to remote planets on logistics control panel", "Retrieve/Place items from/to remote planets on logistics control panel", "在物流总控面板上可以从非本地行星取放物品");
|
||||
I18N.Add("Infinite Natural Resources", "Infinite natural resources", "自然资源采集不消耗");
|
||||
I18N.Add("Fast Mining", "Fast mining", "高速采集");
|
||||
I18N.Add("Pump Anywhere", "Pump anywhere", "平地抽水");
|
||||
I18N.Add("Skip bullet period", "Skip bullet period", "跳过子弹阶段");
|
||||
I18N.Add("Fire all bullets at once", "Fire all bullets at once", "一次弹射所有太阳帆");
|
||||
I18N.Add("Skip absorption period", "Skip absorption period", "跳过吸收阶段");
|
||||
I18N.Add("Quick absorb", "Quick absorb", "快速吸收");
|
||||
I18N.Add("Eject anyway", "Eject anyway", "全球弹射");
|
||||
@@ -100,180 +102,185 @@ public static class UIConfigWindow
|
||||
}
|
||||
|
||||
private static void CreateUI(MyConfigWindow wnd, RectTransform trans)
|
||||
{
|
||||
_windowTrans = trans;
|
||||
// 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");
|
||||
var cb = wnd.AddCheckBox(x, y, tab1, GamePatch.DevShortcutsEnabled, "Enable Dev Shortcuts");
|
||||
x += cb.Width + 5f;
|
||||
y += 6f;
|
||||
wnd.AddTipsButton2(x, y, tab1, "Dev Shortcuts", "Dev Shortcuts Tips", "dev-shortcuts-tips");
|
||||
x = 0;
|
||||
y += 30f;
|
||||
wnd.AddCheckBox(x, y, tab1, GamePatch.AbnormalDisablerEnabled, "Disable Abnormal Checks");
|
||||
y += 36f;
|
||||
cb = wnd.AddCheckBox(x, y, tab1, GamePatch.UnlockTechEnabled, "Unlock Tech with Key-Modifiers");
|
||||
x += cb.Width + 5f;
|
||||
y += 6f;
|
||||
wnd.AddTipsButton2(x, y, tab1, "Unlock Tech with Key-Modifiers", "Unlock Tech with Key-Modifiers Tips", "unlock-tech-tips");
|
||||
x = 0f;
|
||||
y += 30f + 36f;
|
||||
wnd.AddButton(x, y, 400f, tab1, "Remove all metadata consumption records", 16, "button-remove-all-metadata-consumption", PlayerFunctions.RemoveAllMetadataConsumptions);
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 400f, tab1, "Remove metadata consumption record in current game", 16, "button-remove-current-metadata-consumption", PlayerFunctions.RemoveCurrentMetadataConsumptions);
|
||||
y += 36f;
|
||||
_clearBanBtn = wnd.AddButton(x, y, 400f, tab1, "Clear metadata flag which bans achievements", 16, "button-clear-ban-list", PlayerFunctions.ClearMetadataBanAchievements);
|
||||
x = 300f;
|
||||
y = 10f;
|
||||
_resignGameBtn = wnd.AddButton(x, y, 300f, tab1, "Assign gamesave to current account", 16, "resign-game-btn", () => { GameMain.data.account = AccountData.me; });
|
||||
|
||||
var tab2 = wnd.AddTab(_windowTrans, "Factory");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ImmediateEnabled, "Finish build immediately");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ArchitectModeEnabled, "Architect mode");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.NoConditionEnabled, "Build without condition");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.NoCollisionEnabled, "No collision");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalGeneratorEnabled, "Belt signal generator");
|
||||
x += 26f;
|
||||
y += 26f;
|
||||
var cb1 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountGenEnabled, "Count generations as production in statistics", 13);
|
||||
y += 26f;
|
||||
var cb2 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRemEnabled, "Count removals as consumption in statistics", 13);
|
||||
y += 26f;
|
||||
var cb3 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRecipeEnabled, "Count all raws and intermediates in statistics", 13);
|
||||
y += 26f;
|
||||
var cb4 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalNumberAltFormat, "Belt signal alt format", 13);
|
||||
x += cb4.Width + 5f;
|
||||
y += 6f;
|
||||
var tip1 = wnd.AddTipsButton2(x, y, tab2, "Belt signal alt format", "Belt signal alt format tips", "belt-signal-alt-format-tips");
|
||||
x = 0f;
|
||||
y += 30f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.GreaterPowerUsageInLogisticsEnabled, "Increase maximum power usage in Logistic Stations and Advanced Mining Machines");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ControlPanelRemoteLogisticsEnabled, "Retrieve/Place items from/to remote planets on logistics control panel");
|
||||
{
|
||||
_windowTrans = trans;
|
||||
// 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");
|
||||
var cb = wnd.AddCheckBox(x, y, tab1, GamePatch.DevShortcutsEnabled, "Enable Dev Shortcuts");
|
||||
x += cb.Width + 5f;
|
||||
y += 6f;
|
||||
wnd.AddTipsButton2(x, y, tab1, "Dev Shortcuts", "Dev Shortcuts Tips", "dev-shortcuts-tips");
|
||||
x = 0;
|
||||
y += 30f;
|
||||
wnd.AddCheckBox(x, y, tab1, GamePatch.AbnormalDisablerEnabled, "Disable Abnormal Checks");
|
||||
y += 36f;
|
||||
cb = wnd.AddCheckBox(x, y, tab1, GamePatch.UnlockTechEnabled, "Unlock Tech with Key-Modifiers");
|
||||
x += cb.Width + 5f;
|
||||
y += 6f;
|
||||
wnd.AddTipsButton2(x, y, tab1, "Unlock Tech with Key-Modifiers", "Unlock Tech with Key-Modifiers Tips", "unlock-tech-tips");
|
||||
x = 0f;
|
||||
y += 30f + 36f;
|
||||
wnd.AddButton(x, y, 400f, tab1, "Remove all metadata consumption records", 16, "button-remove-all-metadata-consumption", PlayerFunctions.RemoveAllMetadataConsumptions);
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 400f, tab1, "Remove metadata consumption record in current game", 16, "button-remove-current-metadata-consumption", PlayerFunctions.RemoveCurrentMetadataConsumptions);
|
||||
y += 36f;
|
||||
_clearBanBtn = wnd.AddButton(x, y, 400f, tab1, "Clear metadata flag which bans achievements", 16, "button-clear-ban-list", PlayerFunctions.ClearMetadataBanAchievements);
|
||||
x = 300f;
|
||||
y = 10f;
|
||||
_resignGameBtn = wnd.AddButton(x, y, 300f, tab1, "Assign gamesave to current account", 16, "resign-game-btn", () => { GameMain.data.account = AccountData.me; });
|
||||
FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged += OnBeltSignalChanged;
|
||||
wnd.OnFree += () => { FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged -= OnBeltSignalChanged; };
|
||||
OnBeltSignalChanged(null, null);
|
||||
|
||||
var tab2 = wnd.AddTab(_windowTrans, "Factory");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ImmediateEnabled, "Finish build immediately");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ArchitectModeEnabled, "Architect mode");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.NoConditionEnabled, "Build without condition");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.NoCollisionEnabled, "No collision");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalGeneratorEnabled, "Belt signal generator");
|
||||
x += 26f;
|
||||
y += 26f;
|
||||
var cb1 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountGenEnabled, "Count generations as production in statistics", 13);
|
||||
y += 26f;
|
||||
var cb2 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRemEnabled, "Count removals as consumption in statistics", 13);
|
||||
y += 26f;
|
||||
var cb3 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRecipeEnabled, "Count all raws and intermediates in statistics", 13);
|
||||
y += 26f;
|
||||
var cb4 = wnd.AddCheckBox(x, y, tab2, FactoryPatch.BeltSignalNumberAltFormat, "Belt signal alt format", 13);
|
||||
x += cb4.Width + 5f;
|
||||
y += 6f;
|
||||
var tip1 = wnd.AddTipsButton2(x, y, tab2, "Belt signal alt format", "Belt signal alt format tips", "belt-signal-alt-format-tips");
|
||||
x = 0f;
|
||||
y += 30f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.GreaterPowerUsageInLogisticsEnabled, "Increase maximum power usage in Logistic Stations and Advanced Mining Machines");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.ControlPanelRemoteLogisticsEnabled, "Retrieve/Place items from/to remote planets on logistics control panel");
|
||||
void OnBeltSignalChanged(object o, EventArgs e)
|
||||
{
|
||||
FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged += OnBeltSignalChanged;
|
||||
wnd.OnFree += () => { FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged -= OnBeltSignalChanged; };
|
||||
OnBeltSignalChanged(null, null);
|
||||
void OnBeltSignalChanged(object o, EventArgs e)
|
||||
{
|
||||
var on = FactoryPatch.BeltSignalGeneratorEnabled.Value;
|
||||
cb1.gameObject.SetActive(on);
|
||||
cb2.gameObject.SetActive(on);
|
||||
cb3.gameObject.SetActive(on);
|
||||
cb4.gameObject.SetActive(on);
|
||||
tip1.gameObject.SetActive(on);
|
||||
}
|
||||
var on = FactoryPatch.BeltSignalGeneratorEnabled.Value;
|
||||
cb1.gameObject.SetActive(on);
|
||||
cb2.gameObject.SetActive(on);
|
||||
cb3.gameObject.SetActive(on);
|
||||
cb4.gameObject.SetActive(on);
|
||||
tip1.gameObject.SetActive(on);
|
||||
}
|
||||
x = 350f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.RemovePowerSpaceLimitEnabled, "Remove power space limit");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.WindTurbinesPowerGlobalCoverageEnabled, "Wind Turbines do global power coverage");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostWindPowerEnabled, "Boost wind power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostSolarPowerEnabled, "Boost solar power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostGeothermalPowerEnabled, "Boost geothermal power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostFuelPowerEnabled, "Boost fuel power");
|
||||
y += 26f;
|
||||
wnd.AddText2(x + 32f, y, tab2, "Boost fuel power 2", 13);
|
||||
|
||||
// Planet Tab
|
||||
var tab3 = wnd.AddTab(_windowTrans, "Planet");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab3, ResourcePatch.InfiniteResourceEnabled, "Infinite Natural Resources");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, ResourcePatch.FastMiningEnabled, "Fast Mining");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlanetPatch.WaterPumpAnywhereEnabled, "Pump Anywhere");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlanetPatch.TerraformAnywayEnabled, "Terraform without enough soil piles");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantHandCraftEnabled, "Instant hand-craft");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantTeleportEnabled, "Instant teleport (like that in Sandbox mode)");
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "矿物掩埋标题", 16, "button-bury-all", () => { PlanetFunctions.BuryAllVeins(true); });
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "矿物还原标题", 16, "button-bury-restore-all", () => { PlanetFunctions.BuryAllVeins(false); });
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "铺满地基提示", 16, "button-reform-all", () =>
|
||||
{
|
||||
var player = GameMain.mainPlayer;
|
||||
if (player == null) return;
|
||||
var reformTool = player.controller.actionBuild.reformTool;
|
||||
var factory = GameMain.localPlanet?.factory;
|
||||
if (factory == null) return;
|
||||
GameMain.localPlanet.factory.PlanetReformAll(reformTool.brushType, reformTool.brushColor, reformTool.buryVeins);
|
||||
});
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "还原地形提示", 16, "button-reform-revert-all", () =>
|
||||
{
|
||||
var factory = GameMain.localPlanet?.factory;
|
||||
if (factory == null) return;
|
||||
GameMain.localPlanet.factory.PlanetReformRevert();
|
||||
});
|
||||
|
||||
var tab4 = wnd.AddTab(_windowTrans, "Dyson Sphere");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.SkipBulletEnabled, "Skip bullet period");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.SkipAbsorbEnabled, "Skip absorption period");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.QuickAbsorbEnabled, "Quick absorb");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.EjectAnywayEnabled, "Eject anyway");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.OverclockEjectorEnabled, "Overclock Ejectors");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.OverclockSiloEnabled, "Overclock Silos");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.UnlockMaxOrbitRadiusEnabled, "Unlock Dyson Sphere max orbit radius");
|
||||
y += 30f;
|
||||
{
|
||||
var slider = wnd.AddSlider(x + 20, y, tab4, DysonSpherePatch.UnlockMaxOrbitRadiusValue, new MaxOrbitRadiusValueMapper(), "##,#m").WithSmallerHandle(-40f);
|
||||
DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.SettingChanged += UnlockMaxOrbitRadiusChanged;
|
||||
wnd.OnFree += () => { DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.SettingChanged -= UnlockMaxOrbitRadiusChanged; };
|
||||
UnlockMaxOrbitRadiusChanged(null, null);
|
||||
void UnlockMaxOrbitRadiusChanged(object o, EventArgs e)
|
||||
{
|
||||
slider.slider.enabled = DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.Value;
|
||||
}
|
||||
;
|
||||
}
|
||||
x = 300f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 300f, tab4, "Complete Dyson Sphere shells instantly", 16, "button-complete-dyson-sphere-shells-instantly", DysonSphereFunctions.CompleteShellsInstantly);
|
||||
|
||||
var tab5 = wnd.AddTab(_windowTrans, "Mecha/Combat");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab5, CombatPatch.MechaInvincibleEnabled, "Mecha and Drones/Fleets invicible");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab5, CombatPatch.BuildingsInvincibleEnabled, "Buildings invicible");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab5, PlayerPatch.WarpWithoutSpaceWarpersEnabled, "Enable warp without space warpers");
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 200f, tab5, "Teleport to outer space", 16, "button-teleport-to-outer-space", PlayerFunctions.TeleportToOuterSpace);
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab5, "Teleport to selected astronomical", 16, "button-teleport-to-selected-astronomical", PlayerFunctions.TeleportToSelectedAstronomical);
|
||||
}
|
||||
x = 350f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.RemovePowerSpaceLimitEnabled, "Remove power space limit");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.WindTurbinesPowerGlobalCoverageEnabled, "Wind Turbines do global power coverage");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostWindPowerEnabled, "Boost wind power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostSolarPowerEnabled, "Boost solar power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostGeothermalPowerEnabled, "Boost geothermal power");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab2, FactoryPatch.BoostFuelPowerEnabled, "Boost fuel power");
|
||||
y += 26f;
|
||||
wnd.AddText2(x + 32f, y, tab2, "Boost fuel power 2", 13);
|
||||
|
||||
// Planet Tab
|
||||
var tab3 = wnd.AddTab(_windowTrans, "Planet");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab3, ResourcePatch.InfiniteResourceEnabled, "Infinite Natural Resources");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, ResourcePatch.FastMiningEnabled, "Fast Mining");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlanetPatch.WaterPumpAnywhereEnabled, "Pump Anywhere");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlanetPatch.TerraformAnywayEnabled, "Terraform without enough soil piles");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantHandCraftEnabled, "Instant hand-craft");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab3, PlayerPatch.InstantTeleportEnabled, "Instant teleport (like that in Sandbox mode)");
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "矿物掩埋标题", 16, "button-bury-all", () => { PlanetFunctions.BuryAllVeins(true); });
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "矿物还原标题", 16, "button-bury-restore-all", () => { PlanetFunctions.BuryAllVeins(false); });
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "铺满地基提示", 16, "button-reform-all", () =>
|
||||
{
|
||||
var player = GameMain.mainPlayer;
|
||||
if (player == null) return;
|
||||
var reformTool = player.controller.actionBuild.reformTool;
|
||||
var factory = GameMain.localPlanet?.factory;
|
||||
if (factory == null) return;
|
||||
GameMain.localPlanet.factory.PlanetReformAll(reformTool.brushType, reformTool.brushColor, reformTool.buryVeins);
|
||||
});
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab3, "还原地形提示", 16, "button-reform-revert-all", () =>
|
||||
{
|
||||
var factory = GameMain.localPlanet?.factory;
|
||||
if (factory == null) return;
|
||||
GameMain.localPlanet.factory.PlanetReformRevert();
|
||||
});
|
||||
|
||||
var tab4 = wnd.AddTab(_windowTrans, "Dyson Sphere");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.SkipBulletEnabled, "Skip bullet period");
|
||||
y += 26f;
|
||||
wnd.AddCheckBox(x + 26f, y, tab4, DysonSpherePatch.FireAllBulletsEnabled, "Fire all bullets at once", 13);
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.SkipAbsorbEnabled, "Skip absorption period");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.QuickAbsorbEnabled, "Quick absorb");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.EjectAnywayEnabled, "Eject anyway");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.OverclockEjectorEnabled, "Overclock Ejectors");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.OverclockSiloEnabled, "Overclock Silos");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab4, DysonSpherePatch.UnlockMaxOrbitRadiusEnabled, "Unlock Dyson Sphere max orbit radius");
|
||||
y += 30f;
|
||||
{
|
||||
var slider = wnd.AddSlider(x + 20, y, tab4, DysonSpherePatch.UnlockMaxOrbitRadiusValue, new MaxOrbitRadiusValueMapper(), "##,#m").WithSmallerHandle(-40f);
|
||||
DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.SettingChanged += UnlockMaxOrbitRadiusChanged;
|
||||
wnd.OnFree += () => { DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.SettingChanged -= UnlockMaxOrbitRadiusChanged; };
|
||||
UnlockMaxOrbitRadiusChanged(null, null);
|
||||
|
||||
void UnlockMaxOrbitRadiusChanged(object o, EventArgs e)
|
||||
{
|
||||
slider.slider.enabled = DysonSpherePatch.UnlockMaxOrbitRadiusEnabled.Value;
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
x = 300f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 300f, tab4, "Complete Dyson Sphere shells instantly", 16, "button-complete-dyson-sphere-shells-instantly", DysonSphereFunctions.CompleteShellsInstantly);
|
||||
|
||||
var tab5 = wnd.AddTab(_windowTrans, "Mecha/Combat");
|
||||
x = 0f;
|
||||
y = 10f;
|
||||
wnd.AddCheckBox(x, y, tab5, CombatPatch.MechaInvincibleEnabled, "Mecha and Drones/Fleets invicible");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab5, CombatPatch.BuildingsInvincibleEnabled, "Buildings invicible");
|
||||
y += 36f;
|
||||
wnd.AddCheckBox(x, y, tab5, PlayerPatch.WarpWithoutSpaceWarpersEnabled, "Enable warp without space warpers");
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, 200f, tab5, "Teleport to outer space", 16, "button-teleport-to-outer-space", PlayerFunctions.TeleportToOuterSpace);
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, 200f, tab5, "Teleport to selected astronomical", 16, "button-teleport-to-selected-astronomical", PlayerFunctions.TeleportToSelectedAstronomical);
|
||||
}
|
||||
|
||||
private static void UpdateUI()
|
||||
{
|
||||
@@ -289,6 +296,7 @@ public static class UIConfigWindow
|
||||
{
|
||||
_resignGameBtn.gameObject.SetActive(resignEnabled);
|
||||
}
|
||||
|
||||
var history = data.history;
|
||||
if (history == null) return;
|
||||
var banEnabled = history.hasUsedPropertyBanAchievement;
|
||||
|
||||
@@ -41,6 +41,8 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
public static ConfigEntry<int> LabBufferExtraCountForAdvancedAssemble;
|
||||
public static ConfigEntry<int> LabBufferMaxCountForResearch;
|
||||
public static ConfigEntry<int> ReceiverBufferCount;
|
||||
public static ConfigEntry<int> EjectorBufferCount;
|
||||
public static ConfigEntry<int> SiloBufferCount;
|
||||
public static ConfigEntry<bool> ShortcutKeysForBlueprintCopyEnabled;
|
||||
|
||||
private static PressKeyBind _doNotRenderEntitiesKey;
|
||||
@@ -126,6 +128,8 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
LabBufferExtraCountForAdvancedAssemble.SettingChanged += (_, _) => TweakBuildingBuffer.RefreshLabBufferMaxCountForAssemble();
|
||||
LabBufferMaxCountForResearch.SettingChanged += (_, _) => TweakBuildingBuffer.RefreshLabBufferMaxCountForResearch();
|
||||
ReceiverBufferCount.SettingChanged += (_, _) => TweakBuildingBuffer.RefreshReceiverBufferCount();
|
||||
EjectorBufferCount.SettingChanged += (_, _) => TweakBuildingBuffer.RefreshEjectorBufferCount();
|
||||
SiloBufferCount.SettingChanged += (_, _) => TweakBuildingBuffer.RefreshSiloBufferCount();
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
@@ -2053,6 +2057,24 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
patch.Patch(AccessTools.Method(typeof(PowerGeneratorComponent), nameof(PowerGeneratorComponent.GameTick_Gamma)), null, null, new HarmonyMethod(typeof(TweakBuildingBuffer), nameof(PowerGeneratorComponent_GameTick_Gamma_Transpiler)));
|
||||
}
|
||||
|
||||
public static void RefreshEjectorBufferCount()
|
||||
{
|
||||
if (!TweakBuildingBufferEnabled.Value) return;
|
||||
/* re-patch to use new value */
|
||||
var patch = Instance._patch;
|
||||
patch.Unpatch(AccessTools.Method(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate)), AccessTools.Method(typeof(TweakBuildingBuffer), nameof(EjectorComponent_InternalUpdate_Transpiler)));
|
||||
patch.Patch(AccessTools.Method(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate)), null, null, new HarmonyMethod(typeof(TweakBuildingBuffer), nameof(EjectorComponent_InternalUpdate_Transpiler)));
|
||||
}
|
||||
|
||||
public static void RefreshSiloBufferCount()
|
||||
{
|
||||
if (!TweakBuildingBufferEnabled.Value) return;
|
||||
/* re-patch to use new value */
|
||||
var patch = Instance._patch;
|
||||
patch.Unpatch(AccessTools.Method(typeof(SiloComponent), nameof(SiloComponent.InternalUpdate)), AccessTools.Method(typeof(TweakBuildingBuffer), nameof(SiloComponent_InternalUpdate_Transpiler)));
|
||||
patch.Patch(AccessTools.Method(typeof(SiloComponent), nameof(SiloComponent.InternalUpdate)), null, null, new HarmonyMethod(typeof(TweakBuildingBuffer), nameof(SiloComponent_InternalUpdate_Transpiler)));
|
||||
}
|
||||
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(PowerGeneratorComponent), nameof(PowerGeneratorComponent.GameTick_Gamma))]
|
||||
private static IEnumerable<CodeInstruction> PowerGeneratorComponent_GameTick_Gamma_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
@@ -2175,5 +2197,33 @@ public class FactoryPatch : PatchImpl<FactoryPatch>
|
||||
matcher.Repeat(m => m.SetAndAdvance(OpCodes.Ldc_I4, LabBufferMaxCountForResearch.Value * 3600));
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(EjectorComponent), nameof(EjectorComponent.InternalUpdate))]
|
||||
private static IEnumerable<CodeInstruction> EjectorComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(EjectorComponent), nameof(EjectorComponent.bulletCount))),
|
||||
new CodeMatch(ci => (ci.opcode == OpCodes.Ldc_I4 || ci.opcode == OpCodes.Ldc_I4_S) && ci.OperandIs(20))
|
||||
);
|
||||
matcher.Advance(2).Operand = EjectorBufferCount.Value;
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
|
||||
[HarmonyTranspiler]
|
||||
[HarmonyPatch(typeof(SiloComponent), nameof(SiloComponent.InternalUpdate))]
|
||||
private static IEnumerable<CodeInstruction> SiloComponent_InternalUpdate_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
|
||||
{
|
||||
var matcher = new CodeMatcher(instructions, generator);
|
||||
matcher.MatchForward(false,
|
||||
new CodeMatch(OpCodes.Ldarg_0),
|
||||
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(SiloComponent), nameof(SiloComponent.bulletCount))),
|
||||
new CodeMatch(ci => (ci.opcode == OpCodes.Ldc_I4 || ci.opcode == OpCodes.Ldc_I4_S) && ci.OperandIs(20))
|
||||
);
|
||||
matcher.Advance(2).Operand = SiloBufferCount.Value;
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +248,22 @@ public class MyWindow : ManualBehaviour
|
||||
public override int Max => max;
|
||||
}
|
||||
|
||||
public class RangeValueWithMultiplierMapper<T>(int min, int max, T multiplier) : ValueMapper<T>
|
||||
{
|
||||
public override int Min => min;
|
||||
public override int Max => max;
|
||||
|
||||
public override T IndexToValue(int index)
|
||||
{
|
||||
return (T)Convert.ChangeType((float)index * (float)Convert.ChangeType(multiplier, typeof(float)), typeof(T));
|
||||
}
|
||||
|
||||
public override int ValueToIndex(T value)
|
||||
{
|
||||
return Mathf.RoundToInt((float)Convert.ChangeType(value, typeof(float)) / (float)Convert.ChangeType(multiplier, typeof(float)));
|
||||
}
|
||||
}
|
||||
|
||||
private class ArrayMapper<T> : ValueMapper<T>
|
||||
{
|
||||
private readonly T[] _values;
|
||||
|
||||
@@ -121,6 +121,8 @@ public static class UIConfigWindow
|
||||
I18N.Add("Extra buffer count for Self-evolution Labs", "Extra buffer count for Self-evolution Labs", "自演化研究站矩阵额外缓冲数量");
|
||||
I18N.Add("Buffer count for researching in labs", "Buffer count for researching in labs", "研究站科研模式缓存数量");
|
||||
I18N.Add("Ray Receiver Graviton Lens buffer count", "Ray Receiver Graviton Lens buffer count", "射线接收器透镜缓冲数量");
|
||||
I18N.Add("Ejector Solar Sails buffer count", "Ejector Solar Sails buffer count", "弹射器太阳能帆缓冲数量");
|
||||
I18N.Add("Silo Rockets buffer count", "Silo Rockets buffer count", "发射井火箭缓冲数量");
|
||||
I18N.Add("Shortcut keys for Blueprint Copy mode", "Shortcut keys for Blueprint Copy mode", "蓝图复制模式快捷键");
|
||||
I18N.Add("Shortcut keys for Blueprint Copy mode tips", "You can set 2 shortcut keys in Settings panel:\n 1. Select all buildings\n 2. Dismantle selected buildings", "你可以在设置面板中设置2个快捷键:\n 1. 选择所有建筑\n 2. 拆除选中的建筑");
|
||||
I18N.Add("Shortcut keys for showing stars' name", "Shortcut keys for showing stars' name", "启用显示所有星系名称的快捷键");
|
||||
@@ -470,8 +472,14 @@ public static class UIConfigWindow
|
||||
y += 27f;
|
||||
txt = wnd.AddText2(x + 20f, y, tab2, "Ray Receiver Graviton Lens buffer count", 13);
|
||||
var nx6 = txt.preferredWidth + 5f;
|
||||
y -= 135f;
|
||||
var mx = Mathf.Max(nx1, nx2, nx3, nx4, nx5, nx6) + 20f;
|
||||
y += 27f;
|
||||
txt = wnd.AddText2(x + 20f, y, tab2, "Ejector Solar Sails buffer count", 13);
|
||||
var nx7 = txt.preferredWidth + 5f;
|
||||
y += 27f;
|
||||
txt = wnd.AddText2(x + 20f, y, tab2, "Silo Rockets buffer count", 13);
|
||||
var nx8 = txt.preferredWidth + 5f;
|
||||
y -= 189f;
|
||||
var mx = Mathf.Max(nx1, nx2, nx3, nx4, nx5, nx6, nx7, nx8) + 20f;
|
||||
var assemblerBufferTimeMultiplierSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.AssemblerBufferTimeMultiplier, new MyWindow.RangeValueMapper<int>(2, 10), "0", 80f).WithSmallerHandle();
|
||||
y += 27f;
|
||||
var assemblerBufferMininumMultiplierSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.AssemblerBufferMininumMultiplier, new MyWindow.RangeValueMapper<int>(2, 10), "0", 80f).WithSmallerHandle();
|
||||
@@ -483,6 +491,10 @@ public static class UIConfigWindow
|
||||
var labBufferMaxCountForResearchSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.LabBufferMaxCountForResearch, new MyWindow.RangeValueMapper<int>(2, 20), "0", 80f).WithSmallerHandle();
|
||||
y += 27f;
|
||||
var receiverBufferCountSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.ReceiverBufferCount, new MyWindow.RangeValueMapper<int>(1, 20), "0", 80f).WithSmallerHandle();
|
||||
y += 27f;
|
||||
var ejectorBufferCountSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.EjectorBufferCount, new MyWindow.RangeValueWithMultiplierMapper<int>(1, 80, 5), "0", 80f).WithSmallerHandle();
|
||||
y += 27f;
|
||||
var siloBufferCountSlider = wnd.AddSlider(x + mx, y + 5f, tab2, FactoryPatch.SiloBufferCount, new MyWindow.RangeValueMapper<int>(1, 50), "0", 80f).WithSmallerHandle();
|
||||
FactoryPatch.TweakBuildingBufferEnabled.SettingChanged += TweakBuildingBufferChanged;
|
||||
wnd.OnFree += () => { FactoryPatch.TweakBuildingBufferEnabled.SettingChanged -= TweakBuildingBufferChanged; };
|
||||
TweakBuildingBufferChanged(null, null);
|
||||
|
||||
@@ -134,6 +134,8 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
||||
FactoryPatch.LabBufferExtraCountForAdvancedAssemble = Config.Bind("Factory", "LabBufferExtraCountForAdvancedAssemble", 3, new ConfigDescription("Extra buffer count for Self-evolution Labs", new AcceptableValueRange<int>(1, 10)));
|
||||
FactoryPatch.LabBufferMaxCountForResearch = Config.Bind("Factory", "LabBufferMaxCountForResearch", 10, new ConfigDescription("Buffer count for researching in labs", new AcceptableValueRange<int>(2, 20)));
|
||||
FactoryPatch.ReceiverBufferCount = Config.Bind("Factory", "ReceiverBufferCount", 1, new ConfigDescription("Ray Receiver Graviton Lens buffer count", new AcceptableValueRange<int>(1, 20)));
|
||||
FactoryPatch.EjectorBufferCount = Config.Bind("Factory", "EjectorBufferCount", 1, new ConfigDescription("Ejector buffer count", new AcceptableValueRange<int>(1, 20)));
|
||||
FactoryPatch.SiloBufferCount = Config.Bind("Factory", "SiloBufferCount", 1, new ConfigDescription("Silo buffer count", new AcceptableValueRange<int>(1, 20)));
|
||||
FactoryPatch.ShortcutKeysForBlueprintCopyEnabled = Config.Bind("Factory", "DismantleBlueprintSelection", false,
|
||||
"Dismantle blueprint selected buildings");
|
||||
LogisticsPatch.AutoConfigLogisticsEnabled = Config.Bind("Factory", "AutoConfigLogistics", false,
|
||||
|
||||
Reference in New Issue
Block a user