mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-05 02:22:21 +08:00
Compare commits
3 Commits
a9286d2839
...
4b632db315
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b632db315 | |||
| 2c4d1b8b0d | |||
| ba095d79f0 |
@@ -6,6 +6,10 @@
|
||||
* 2.3.31
|
||||
+ New feature: `Unlock Dyson Sphere max orbit radius`
|
||||
+ `Remove metadata consumption record in current game`: Fix implementation
|
||||
+ Add 3 buttons for creating illegal Dyson Sphere Shells, you must enable `IllegalDysonShellFunctionsEnabled` of `DysonSphere` section in config to see them.
|
||||
- `Generate an illegal dyson shell`
|
||||
- `Keep max production shells and remove others`
|
||||
- `Duplicate shells from that with highest production`
|
||||
* 2.3.30
|
||||
+ Fix a warning issue while `No condition build` or `No collision` is enabled.
|
||||
+ Increase performance for `Finish build immediately` greatly on pasting large blueprints.
|
||||
@@ -159,6 +163,10 @@
|
||||
* 2.3.31
|
||||
+ 新功能:`解锁戴森球最大轨道半径`
|
||||
+ `移除当前存档的元数据消耗记录`:修复实现
|
||||
+ 增加了3个用于制作仙术戴森壳的按钮,你必须在设置文件里开启`DysonSphere`分类的`IllegalDysonShellFunctionsEnabled`才能看到它们
|
||||
- `生成单层仙术戴森壳`
|
||||
- `保留发电量最高的戴森壳并移除其他戴森壳`
|
||||
- `从发电量最高的壳复制戴森壳`
|
||||
* 2.3.30
|
||||
+ 修复了启用`无条件建造`或`无碰撞`时的警告问题
|
||||
+ 粘贴大规模蓝图时大幅提升`立即完成建造`的性能表现
|
||||
|
||||
@@ -87,6 +87,10 @@ public class CheatEnabler : BaseUnityPlugin
|
||||
"Unlock Dyson Sphere max orbit radius");
|
||||
DysonSpherePatch.UnlockMaxOrbitRadiusValue = Config.Bind("DysonSphere", "MaxOrbitRadiusValue", 10_000_000f,
|
||||
"Unlocked Dyson Sphere max orbit radius value");
|
||||
Functions.DysonSphereFunctions.IllegalDysonShellFunctionsEnabled = Config.Bind("DysonSphere", "IllegalDysonShellFunctions", false,
|
||||
"Enable illegal dyson shell functions");
|
||||
Functions.DysonSphereFunctions.ShellsCountForFunctions = Config.Bind("DysonSphere", "ShellsCountForFunctions", 2048,
|
||||
"Shells count for various functions");
|
||||
CombatPatch.MechaInvincibleEnabled = Config.Bind("Battle", "MechaInvincible", false,
|
||||
"Mecha and Drones/Fleets invincible");
|
||||
CombatPatch.BuildingsInvincibleEnabled = Config.Bind("Battle", "BuildingsInvincible", false,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -106,7 +106,7 @@ public static class PlayerFunctions
|
||||
|
||||
if (itemCnt.All(cnt => cnt == 0))
|
||||
{
|
||||
UIMessageBox.Show("Remove all metadata consumption records".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), 0);
|
||||
UIMessageBox.Show("Remove all metadata consumption records".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), UIMessageBox.INFO);
|
||||
return;
|
||||
}
|
||||
var msg = "ClearAllMetadataConsumptionDetails".Translate();
|
||||
@@ -117,7 +117,7 @@ public static class PlayerFunctions
|
||||
msg += $"\n {LDB.items.Select(i + 6001).propertyName} x{itemCnt[i]}";
|
||||
}
|
||||
}
|
||||
UIMessageBox.Show("Remove all metadata consumption records".Translate(), msg, "取消".Translate(), "确定".Translate(), 2, null, () =>
|
||||
UIMessageBox.Show("Remove all metadata consumption records".Translate(), msg, "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, () =>
|
||||
{
|
||||
foreach (var data in propertySystem.propertyDatas)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ public static class PlayerFunctions
|
||||
var clusterPropertyData = propertySystem.propertyDatas.FirstOrDefault(cpd => cpd.seedKey == seedKey);
|
||||
if (clusterPropertyData == null)
|
||||
{
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), 0);
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), UIMessageBox.INFO);
|
||||
return;
|
||||
}
|
||||
var currentGamePropertyData = GameMain.data.history.propertyData;
|
||||
@@ -154,7 +154,7 @@ public static class PlayerFunctions
|
||||
|
||||
if (itemCnt.All(cnt => cnt == 0))
|
||||
{
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), 0);
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), "NoMetadataConsumptionRecord".Translate(), "OK".Translate(), UIMessageBox.INFO);
|
||||
return;
|
||||
}
|
||||
var msg = "ClearCurrentMetadataConsumptionDetails".Translate();
|
||||
@@ -165,7 +165,7 @@ public static class PlayerFunctions
|
||||
msg += $"\n {LDB.items.Select(i + 6001).propertyName} x{itemCnt[i]}";
|
||||
}
|
||||
}
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), msg, "取消".Translate(), "确定".Translate(), 2, null, () =>
|
||||
UIMessageBox.Show("Remove metadata consumption record in current game".Translate(), msg, "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, () =>
|
||||
{
|
||||
for (var i = 0; i < clusterPropertyData.totalConsumption.Count; i++)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,12 @@
|
||||
+ Skip absorption period
|
||||
+ Quick absorb
|
||||
+ Eject anyway
|
||||
+ Unlock Dyson Sphere max orbit radius
|
||||
+ Complete Dyson Sphere Shells instantly
|
||||
+ Buttons for creating illegal Dyson Sphere Shells, you must enable `IllegalDysonShellFunctionsEnabled` of `DysonSphere` section in config to see them.
|
||||
- Generate an illegal dyson shell
|
||||
- Keep max production shells and remove others
|
||||
- Duplicate shells from that with highest production
|
||||
+ Mecha/Combat:
|
||||
+ Mecha and Drones/Fleets invicible
|
||||
+ Buildings invicible
|
||||
@@ -114,7 +119,12 @@
|
||||
+ 跳过吸收阶段
|
||||
+ 快速吸收
|
||||
+ 全球弹射
|
||||
+ 解锁戴森球最大轨道半径
|
||||
+ 立即完成戴森壳建造
|
||||
+ 用于制作仙术戴森壳的按钮,你必须在设置文件里开启`DysonSphere`分类的`IllegalDysonShellFunctionsEnabled`才能看到它们
|
||||
- 生成单层仙术戴森壳
|
||||
- 保留发电量最高的戴森壳并移除其他戴森壳
|
||||
- 从发电量最高的壳复制戴森壳
|
||||
+ 机甲/战斗:
|
||||
+ 机甲和战斗无人机无敌
|
||||
+ 建筑无敌
|
||||
|
||||
@@ -68,6 +68,11 @@ public static class UIConfigWindow
|
||||
I18N.Add("Overclock Silos", "Overclock Silos (10x)", "高速发射井(10倍射速)");
|
||||
I18N.Add("Unlock Dyson Sphere max orbit radius", "Unlock Dyson Sphere max orbit radius", "解锁戴森球最大轨道半径");
|
||||
I18N.Add("Complete Dyson Sphere shells instantly", "Complete Dyson Sphere shells instantly", "立即完成戴森壳建造");
|
||||
I18N.Add("Generate illegal dyson shell", "Generate an illegal dyson shell (Put/Paste nodes first)", "生成单层仙术戴森壳(请先设置/粘贴节点)");
|
||||
I18N.Add("Keep max production shells and remove others", "Keep max production shells and remove others", "保留发电量最高的戴森壳并移除其他戴森壳");
|
||||
I18N.Add("Duplicate shells from that with highest production", "Duplicate shells from that with highest production", "从发电量最高的壳复制戴森壳");
|
||||
I18N.Add("WARNING: This operation can be very slow, continue?", "WARNING: This operation can be very slow, continue?", "警告:此操作可能非常慢,继续吗?");
|
||||
I18N.Add("WARNING: This operation is DANGEROUS, continue?", "WARNING: This operation is DANGEROUS, continue?", "警告:此操作非常危险,继续吗?");
|
||||
I18N.Add("Terraform without enough soil piles", "Terraform without enough soil piles", "沙土不够时依然可以整改地形");
|
||||
I18N.Add("Instant hand-craft", "Instant hand-craft", "快速手动制造");
|
||||
I18N.Add("Instant teleport (like that in Sandbox mode)", "Instant teleport (like that in Sandbox mode)", "快速传送(和沙盒模式一样)");
|
||||
@@ -101,6 +106,37 @@ public static class UIConfigWindow
|
||||
}
|
||||
}
|
||||
|
||||
class ShellsCountMapper : MyWindow.RangeValueMapper<int>
|
||||
{
|
||||
public ShellsCountMapper() : base(1, 139)
|
||||
{
|
||||
}
|
||||
|
||||
public override int ValueToIndex(int value)
|
||||
{
|
||||
return value switch
|
||||
{
|
||||
< 4 => value,
|
||||
< 64 => value / 4 + 3,
|
||||
< 256 => value / 16 + 15,
|
||||
< 4096 => value / 64 + 27,
|
||||
_ => value / 256 + 75,
|
||||
};
|
||||
}
|
||||
|
||||
public override int IndexToValue(int index)
|
||||
{
|
||||
return index switch
|
||||
{
|
||||
< 4 => index,
|
||||
< 19 => (index - 3) * 4,
|
||||
< 31 => (index - 15) * 16,
|
||||
< 91 => (index - 27) * 64,
|
||||
_ => (index - 75) * 256,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateUI(MyConfigWindow wnd, RectTransform trans)
|
||||
{
|
||||
_windowTrans = trans;
|
||||
@@ -166,7 +202,6 @@ public static class UIConfigWindow
|
||||
FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged += OnBeltSignalChanged;
|
||||
wnd.OnFree += () => { FactoryPatch.BeltSignalGeneratorEnabled.SettingChanged -= OnBeltSignalChanged; };
|
||||
OnBeltSignalChanged(null, null);
|
||||
|
||||
void OnBeltSignalChanged(object o, EventArgs e)
|
||||
{
|
||||
var on = FactoryPatch.BeltSignalGeneratorEnabled.Value;
|
||||
@@ -260,12 +295,40 @@ public static class UIConfigWindow
|
||||
{
|
||||
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);
|
||||
{
|
||||
y += 72f;
|
||||
var btn1 = wnd.AddButton(x, y, 300f, tab4, "Generate illegal dyson shell", 16, "button-generate-illegal-dyson-shells", () => {
|
||||
UIMessageBox.Show("Generate illegal dyson shell".Translate(), "WARNING: This operation can be very slow, continue?".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.WARNING, null,
|
||||
() => { DysonSphereFunctions.CreatePossibleFramesAndShells(); });
|
||||
});
|
||||
y += 36f;
|
||||
var btn2 = wnd.AddButton(x, y, 300f, tab4, "Keep max production shells and remove others", 16, "button-keep-max-production-shells", () => {
|
||||
UIMessageBox.Show("Keep max production shells and remove others".Translate(), "WARNING: This operation is DANGEROUS, continue?".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.WARNING, null,
|
||||
() => { DysonSphereFunctions.KeepMaxProductionShells(); });
|
||||
});
|
||||
y += 36f;
|
||||
var btn3 = wnd.AddButton(x, y, 300f, tab4, "Duplicate shells from that with highest production", 16, "button-duplicate-shells-from-the-highest-production", () => {
|
||||
UIMessageBox.Show("Duplicate shells from that with highest production".Translate(), "WARNING: This operation can be very slow, continue?".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.WARNING, null,
|
||||
() => { DysonSphereFunctions.DuplicateShellsWithHighestProduction(); });
|
||||
});
|
||||
y += 30f;
|
||||
var slider1 = wnd.AddSlider(x + 20f, y, tab4, DysonSphereFunctions.ShellsCountForFunctions, new ShellsCountMapper());
|
||||
Functions.DysonSphereFunctions.IllegalDysonShellFunctionsEnabled.SettingChanged += onIllegalDysonShellFunctionsChanged;
|
||||
wnd.OnFree += () => { Functions.DysonSphereFunctions.IllegalDysonShellFunctionsEnabled.SettingChanged -= onIllegalDysonShellFunctionsChanged; };
|
||||
onIllegalDysonShellFunctionsChanged(null, null);
|
||||
void onIllegalDysonShellFunctionsChanged(object o, EventArgs e)
|
||||
{
|
||||
var enabled = Functions.DysonSphereFunctions.IllegalDysonShellFunctionsEnabled.Value;
|
||||
btn1.gameObject.SetActive(enabled);
|
||||
btn2.gameObject.SetActive(enabled);
|
||||
btn3.gameObject.SetActive(enabled);
|
||||
slider1.gameObject.SetActive(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
var tab5 = wnd.AddTab(_windowTrans, "Mecha/Combat");
|
||||
x = 0f;
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
## Changlog
|
||||
|
||||
* 1.3.7
|
||||
+ `Re-initialize planet`: Fix a possible crash.
|
||||
+ `Auto-config logistic stations`: Add `Set default remote logic to storage`
|
||||
* 1.3.6
|
||||
+ `Dismantle blueprint selected buildings`:
|
||||
- Fix a crash on dismantling preview buildings.
|
||||
@@ -321,6 +324,9 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 1.3.7
|
||||
+ `重新初始化行星`: 修复可能导致崩溃的问题
|
||||
+ `自动配置物流站`: 增加`设置默认远程逻辑为仓储`
|
||||
* 1.3.6
|
||||
+ `拆除蓝图选中的建筑`:
|
||||
- 修复了拆除虚影建筑时崩溃的问题
|
||||
|
||||
@@ -207,13 +207,13 @@ public static class TechFunctions
|
||||
}
|
||||
if (!enough)
|
||||
{
|
||||
UIMessageBox.Show("元数据".Translate(), "元数据不足".Translate(), "确定".Translate(), 3);
|
||||
UIMessageBox.Show("元数据".Translate(), "元数据不足".Translate(), "确定".Translate(), UIMessageBox.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!history.hasUsedPropertyBanAchievement)
|
||||
{
|
||||
UIMessageBox.Show("初次使用元数据标题".Translate(), "初次使用元数据描述".Translate(), "取消".Translate(), "确定".Translate(), 2, null, DoUnlockCalculatedTechs);
|
||||
UIMessageBox.Show("初次使用元数据标题".Translate(), "初次使用元数据描述".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, DoUnlockCalculatedTechs);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ public static class TechFunctions
|
||||
if (consumption.Value <= 0) continue;
|
||||
msg += $"\n {LDB.items.Select(consumption.Key).propertyName}x{consumption.Value}";
|
||||
}
|
||||
UIMessageBox.Show("Batch buyout tech".Translate(), msg, "取消".Translate(), "确定".Translate(), 2, null, UnlockWithPropertiesImmediately);
|
||||
UIMessageBox.Show("Batch buyout tech".Translate(), msg, "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null, UnlockWithPropertiesImmediately);
|
||||
return;
|
||||
|
||||
void AddToMsg(ref string str, Tuple<TechProto, int, int> tuple)
|
||||
|
||||
@@ -436,12 +436,12 @@ public static class UIConfigWindow
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
wnd.AddButton(x, y, tab2, "Initialize This Planet", 16, "button-init-planet", () =>
|
||||
UIMessageBox.Show("Initialize This Planet".Translate(), "Initialize This Planet Confirm".Translate(), "取消".Translate(), "确定".Translate(), 2, null,
|
||||
UIMessageBox.Show("Initialize This Planet".Translate(), "Initialize This Planet Confirm".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null,
|
||||
() => { PlanetFunctions.RecreatePlanet(true); })
|
||||
);
|
||||
y += 36f;
|
||||
wnd.AddButton(x, y, tab2, "Dismantle All Buildings", 16, "button-dismantle-all", () =>
|
||||
UIMessageBox.Show("Dismantle All Buildings".Translate(), "Dismantle All Buildings Confirm".Translate(), "取消".Translate(), "确定".Translate(), 2, null,
|
||||
UIMessageBox.Show("Dismantle All Buildings".Translate(), "Dismantle All Buildings Confirm".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null,
|
||||
() => { PlanetFunctions.DismantleAll(false); })
|
||||
);
|
||||
y += 72f;
|
||||
@@ -720,7 +720,7 @@ public static class UIConfigWindow
|
||||
x = 400f;
|
||||
y = 10f;
|
||||
_dysonInitBtn = wnd.AddButton(x, y, tab5, "Initialize Dyson Sphere", 16, "init-dyson-sphere", () =>
|
||||
UIMessageBox.Show("Initialize Dyson Sphere".Translate(), "Initialize Dyson Sphere Confirm".Translate(), "取消".Translate(), "确定".Translate(), 2, null,
|
||||
UIMessageBox.Show("Initialize Dyson Sphere".Translate(), "Initialize Dyson Sphere Confirm".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null,
|
||||
() => { DysonSphereFunctions.InitCurrentDysonLayer(null, -1); })
|
||||
);
|
||||
y += 36f;
|
||||
@@ -732,7 +732,7 @@ public static class UIConfigWindow
|
||||
var btn = wnd.AddFlatButton(x, y, tab5, id.ToString(), 12, "dismantle-layer-" + id, () =>
|
||||
{
|
||||
var star = DysonSphereFunctions.CurrentStarForDysonSystem();
|
||||
UIMessageBox.Show("Dismantle selected layer".Translate(), "Dismantle selected layer Confirm".Translate(), "取消".Translate(), "确定".Translate(), 2, null,
|
||||
UIMessageBox.Show("Dismantle selected layer".Translate(), "Dismantle selected layer Confirm".Translate(), "取消".Translate(), "确定".Translate(), UIMessageBox.QUESTION, null,
|
||||
() => { DysonSphereFunctions.InitCurrentDysonLayer(star, id); });
|
||||
}
|
||||
).WithSize(40f, 20f);
|
||||
|
||||
Reference in New Issue
Block a user