mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 14:53:30 +08:00
WIP
This commit is contained in:
@@ -28,6 +28,10 @@ public class CheatEnabler : BaseUnityPlugin
|
||||
"Belt signal generator");
|
||||
FactoryPatch.BeltSignalNumberAltFormat = Config.Bind("Build", "BeltSignalNumberFormat", false,
|
||||
"Belt signal number format alternative format (AAAA=generation speed in minutes, B=proliferate points, C=stack count):\n AAAABC by default\n BCAAAA as alternative");
|
||||
FactoryPatch.BeltSignalCountGenEnabled = Config.Bind("Build", "BeltSignalCountGenerations", true,
|
||||
"Belt signal count generations as production in statistics");
|
||||
FactoryPatch.BeltSignalCountRemEnabled = Config.Bind("Build", "BeltSignalCountRemovals", true,
|
||||
"Belt signal count removals as comsumption in statistics");
|
||||
FactoryPatch.BeltSignalCountRecipeEnabled = Config.Bind("Build", "BeltSignalCountRecipe", false,
|
||||
"Belt signal count all raws and intermediates in statistics");
|
||||
FactoryPatch.RemovePowerSpaceLimitEnabled = Config.Bind("Build", "RemovePowerDistanceLimit", false,
|
||||
|
||||
@@ -17,6 +17,8 @@ public static class FactoryPatch
|
||||
public static ConfigEntry<bool> NoCollisionEnabled;
|
||||
public static ConfigEntry<bool> BeltSignalGeneratorEnabled;
|
||||
public static ConfigEntry<bool> BeltSignalNumberAltFormat;
|
||||
public static ConfigEntry<bool> BeltSignalCountGenEnabled;
|
||||
public static ConfigEntry<bool> BeltSignalCountRemEnabled;
|
||||
public static ConfigEntry<bool> BeltSignalCountRecipeEnabled;
|
||||
public static ConfigEntry<bool> RemovePowerSpaceLimitEnabled;
|
||||
public static ConfigEntry<bool> BoostWindPowerEnabled;
|
||||
@@ -837,7 +839,7 @@ public static class FactoryPatch
|
||||
int itemId;
|
||||
if ((itemId = cargoPath.TryPickItem(belt.segIndex + belt.segPivotOffset - 5, 12, out var stack, out _)) > 0)
|
||||
{
|
||||
consumeRegister[itemId] += stack;
|
||||
if (BeltSignalCountRemEnabled.Value) consumeRegister[itemId] += stack;
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -894,7 +896,7 @@ public static class FactoryPatch
|
||||
var inc = beltSignal.Inc;
|
||||
if (!cargoPath.TryInsertItem(belt.segIndex + belt.segPivotOffset, signalId, stack, inc)) continue;
|
||||
if (hasSpeedLimit) beltSignal.Progress -= 3600;
|
||||
productRegister[signalId] += stack;
|
||||
if (BeltSignalCountGenEnabled.Value) productRegister[signalId] += stack;
|
||||
if (!countRecipe) continue;
|
||||
var sources = beltSignal.Sources;
|
||||
if (sources == null) continue;
|
||||
@@ -1275,5 +1277,4 @@ public static class FactoryPatch
|
||||
return matcher.InstructionEnumeration();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,10 @@
|
||||
#### 添加一些作弊功能,同时屏蔽异常检测
|
||||
|
||||
## Changlog
|
||||
* 2.3.16
|
||||
+ Add 2 options to `Belt signal item generation`:
|
||||
- `Count generations as production in statistics`
|
||||
- `Count removals as consumption in statistics`
|
||||
* 2.3.15
|
||||
+ New features:
|
||||
- `Instant teleport (like that in Sandbox mode)`
|
||||
@@ -15,10 +19,10 @@
|
||||
* 2.3.13
|
||||
+ Fix a bug that shortcuts are not working and have display issue on settings window.
|
||||
* 2.3.12
|
||||
+ Add a shortcut to toggle `No collision`(Alt+W by default), you can modify the shortcut on system settings window.
|
||||
+ Add a shortcut to toggle `No collision`, you can modify the shortcut on system settings window.
|
||||
+ Add realtime tips when toggling `No condition build` and `No collision` with shortcuts.
|
||||
* 2.3.11
|
||||
+ Add a shortcut to toggle `No condition build`(Alt+Q by default), you can modify the shortcut on system settings window. This depends on [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist) 1.0.15 or later.
|
||||
+ Add a shortcut to toggle `No condition build`, you can modify the shortcut on system settings window. This depends on [UXAssist](https://dsp.thunderstore.io/package/soarqin/UXAssist) 1.0.15 or later.
|
||||
* 2.3.10
|
||||
+ Fix following functions not working in new game updates:
|
||||
- `Pump Anywhere`
|
||||
@@ -113,6 +117,8 @@
|
||||
+ Build without condition
|
||||
+ No collision
|
||||
+ Belt signal item generation
|
||||
- Count generations as production in statistics
|
||||
- Count removals as consumption in statistics
|
||||
- Count all raws and intermediates in statistics
|
||||
- Belt signal alt format
|
||||
+ Remove space limit between wind turbines and solar panels
|
||||
@@ -143,6 +149,10 @@
|
||||
* [Multifunction_mod](https://github.com/blacksnipebiu/Multifunction_mod): Some cheat functions
|
||||
|
||||
## 更新日志
|
||||
* 2.3.16
|
||||
+ 为`传送带信号物品生成`添加了两个选项:
|
||||
- `统计信息里将生成计算为产物`
|
||||
- `统计信息里将移除计算为消耗`
|
||||
* 2.3.15
|
||||
+ 新功能:
|
||||
- `快速传送(和沙盒模式一样)`
|
||||
@@ -252,6 +262,8 @@
|
||||
+ 无条件建造
|
||||
+ 无碰撞
|
||||
+ 传送带信号物品生成
|
||||
- 统计信息里将生成计算为产物
|
||||
- 统计信息里将移除计算为消耗
|
||||
- 统计面板中计算所有原材料和中间产物
|
||||
- 传送带信号替换格式
|
||||
+ 风力发电机和太阳能板无间距限制
|
||||
|
||||
@@ -36,6 +36,8 @@ public static class UIConfigWindow
|
||||
I18N.Add("Belt signal alt format tips",
|
||||
"Belt signal number format alternative format:\n AAAABC by default\n BCAAAA as alternative\nAAAA=generation speed in minutes, B=proliferate points, C=stack count",
|
||||
"传送带信号物品生成数量格式:\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("Remove power space limit", "Remove space limit for winds and geothermals", "移除风力发电和地热发电的间距限制");
|
||||
I18N.Add("Boost wind power", "Boost wind power(x100,000)", "提升风力发电(x100,000)");
|
||||
@@ -97,11 +99,15 @@ public static class UIConfigWindow
|
||||
MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.NoCollisionEnabled, "No collision");
|
||||
y += 36f;
|
||||
MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalGeneratorEnabled, "Belt signal generator");
|
||||
y += 26f;
|
||||
x += 26f;
|
||||
var cb = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRecipeEnabled, "Count all raws and intermediates in statistics", 13);
|
||||
y += 26f;
|
||||
var cb2 = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalNumberAltFormat, "Belt signal alt format", 13);
|
||||
var cb1 = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountGenEnabled, "Count generations as production in statistics", 13);
|
||||
y += 26f;
|
||||
var cb2 = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRemEnabled, "Count removals as consumption in statistics", 13);
|
||||
y += 26f;
|
||||
var cb3 = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalCountRecipeEnabled, "Count all raws and intermediates in statistics", 13);
|
||||
y += 26f;
|
||||
var cb4 = MyCheckBox.CreateCheckBox(x, y, tab2, FactoryPatch.BeltSignalNumberAltFormat, "Belt signal alt format", 13);
|
||||
x += 180f;
|
||||
y += 6f;
|
||||
var tip1 = MyWindow.AddTipsButton(x, y, tab2, "Belt signal alt format", "Belt signal alt format tips", "belt-signal-alt-format-tips");
|
||||
@@ -188,8 +194,10 @@ public static class UIConfigWindow
|
||||
void OnBeltSignalChanged()
|
||||
{
|
||||
var on = FactoryPatch.BeltSignalGeneratorEnabled.Value;
|
||||
cb.gameObject.SetActive(on);
|
||||
cb1.gameObject.SetActive(on);
|
||||
cb2.gameObject.SetActive(on);
|
||||
cb3.gameObject.SetActive(on);
|
||||
cb4.gameObject.SetActive(on);
|
||||
tip1.gameObject.SetActive(on);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user