1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 00:53:39 +08:00

work in progress

This commit is contained in:
2024-08-24 00:34:09 +08:00
parent c93885da18
commit 12c5077abc
4 changed files with 27 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
## Changlog ## Changlog
* 1.1.5
+ `Quick build and dismantle stacking labs`: works for storages and tanks now
* 1.1.4 * 1.1.4
+ Fix `Remove some build conditions` + Fix `Remove some build conditions`
* 1.1.3 * 1.1.3
@@ -140,6 +142,8 @@
## 更新日志 ## 更新日志
* 1.1.5
+ `快速建造和拆除堆叠研究站`:现在也支持储物仓和储液罐
* 1.1.4 * 1.1.4
+ 修复了`移除部分不影响游戏逻辑的建造条件` + 修复了`移除部分不影响游戏逻辑的建造条件`
* 1.1.3 * 1.1.3

View File

@@ -1130,8 +1130,10 @@ public static class FactoryPatch
{ {
if (!VFInput._chainReaction) return true; if (!VFInput._chainReaction) return true;
var factory = dismantle.factory; var factory = dismantle.factory;
var prefDesc = dismantle.GetPrefabDesc(id); var proto = dismantle.GetItemProto(id);
if (!prefDesc.isLab) return true; var protoId = proto.ID;
var prefDesc = proto.prefabDesc;
if (!prefDesc.isLab && !prefDesc.isTank && (!prefDesc.isStorage || prefDesc.isBattleBase)) return true;
factory.ReadObjectConn(id, 14, out _, out var nextId, out _); factory.ReadObjectConn(id, 14, out _, out var nextId, out _);
/* We keep last lab if selected lab is not the ground one */ /* We keep last lab if selected lab is not the ground one */
if (nextId > 0) if (nextId > 0)
@@ -1140,11 +1142,13 @@ public static class FactoryPatch
{ {
factory.ReadObjectConn(nextId, 14, out _, out var nextNextId, out _); factory.ReadObjectConn(nextId, 14, out _, out var nextNextId, out _);
if (nextNextId <= 0) break; if (nextNextId <= 0) break;
var itemProto = dismantle.GetItemProto(nextId);
if (itemProto.ID != protoId) break;
var desc = itemProto.prefabDesc;
var pose = dismantle.GetObjectPose(nextId); var pose = dismantle.GetObjectPose(nextId);
var desc = dismantle.GetPrefabDesc(nextId);
var preview = new BuildPreview var preview = new BuildPreview
{ {
item = dismantle.GetItemProto(nextId), item = itemProto,
desc = desc, desc = desc,
lpos = pose.position, lpos = pose.position,
lrot = pose.rotation, lrot = pose.rotation,
@@ -1162,13 +1166,19 @@ public static class FactoryPatch
nextId = id; nextId = id;
while (true) while (true)
{ {
factory.ReadObjectConn(nextId, 15, out _, out nextId, out _); factory.ReadObjectConn(nextId, 15, out _, out var nextId2, out _);
if (nextId <= 0) break; if (nextId2 <= 0)
{
factory.ReadObjectConn(nextId, 13, out _, out nextId2, out _);
if (nextId2 <= 0) break;
}
nextId = nextId2;
var itemProto = dismantle.GetItemProto(nextId);
var desc = itemProto.prefabDesc;
var pose = dismantle.GetObjectPose(nextId); var pose = dismantle.GetObjectPose(nextId);
var desc = dismantle.GetPrefabDesc(nextId);
var preview = new BuildPreview var preview = new BuildPreview
{ {
item = dismantle.GetItemProto(nextId), item = itemProto,
desc = desc, desc = desc,
lpos = pose.position, lpos = pose.position,
lrot = pose.rotation, lrot = pose.rotation,
@@ -1188,8 +1198,8 @@ public static class FactoryPatch
{ {
if (!click.multiLevelCovering || !VFInput._chainReaction) return; if (!click.multiLevelCovering || !VFInput._chainReaction) return;
var prefDesc = click.GetPrefabDesc(click.castObjectId); var prefDesc = click.GetPrefabDesc(click.castObjectId);
if (!prefDesc.isLab) return; if (!prefDesc.isLab && !prefDesc.isTank && (!prefDesc.isStorage || prefDesc.isBattleBase)) return;
var levelMax = GameMain.history.labLevel; var levelMax = prefDesc.isLab ? GameMain.history.labLevel : GameMain.history.storageLevel;
var factory = click.factory; var factory = click.factory;
var currLevel = 2; var currLevel = 2;
var nid = click.castObjectId; var nid = click.castObjectId;

View File

@@ -30,7 +30,7 @@
- Enhanced control for logistic storage limits - Enhanced control for logistic storage limits
- Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity. - Logistic storage limits are not scaled on upgrading `Logistics Carrier Capacity`, if they are not set to maximum capacity.
- You can use arrow keys to adjust logistic storage limits gracefully. - You can use arrow keys to adjust logistic storage limits gracefully.
- Quick build and dismantle stacking labs - Quick build and dismantle stacking labs/storages/tanks
- Protect veins from exhaustion - Protect veins from exhaustion
- By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file. - By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file.
- When reach the protection value, veins/oils steeps will not be mined/extracted any longer. - When reach the protection value, veins/oils steeps will not be mined/extracted any longer.
@@ -121,7 +121,7 @@
- 物流塔存储数量限制控制改进 - 物流塔存储数量限制控制改进
- 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。 - 当升级`运输机舱扩容`时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。
- 你可以使用方向键微调物流塔存储限制 - 你可以使用方向键微调物流塔存储限制
- 快速建造和拆除堆叠研究站 - 快速建造和拆除堆叠研究站/储物仓/储液罐
- 保护矿脉不会耗尽 - 保护矿脉不会耗尽
- 默认矿脉数量保护在100采油速保护在1.0/s你可以在配置文件中自行设置。 - 默认矿脉数量保护在100采油速保护在1.0/s你可以在配置文件中自行设置。
- 当达到保护值时,矿脉和油井将不再被开采。 - 当达到保护值时,矿脉和油井将不再被开采。

View File

@@ -39,7 +39,7 @@ public static class UIConfigWindow
I18N.Add("Enhance control for logistic storage limits tips", "Logistic storage limits are not scaled on upgrading 'Logistics Carrier Capacity', if they are not set to maximum capacity.\nUse arrow keys to adjust logistic storage limits:\n \u2190/\u2192: -/+10 \u2193\u2191: -/+100", "当升级'运输机舱扩容'时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。\n你可以使用方向键微调物流塔存储限制\n \u2190\u2192: -/+10 \u2193\u2191: -/+100"); I18N.Add("Enhance control for logistic storage limits tips", "Logistic storage limits are not scaled on upgrading 'Logistics Carrier Capacity', if they are not set to maximum capacity.\nUse arrow keys to adjust logistic storage limits:\n \u2190/\u2192: -/+10 \u2193\u2191: -/+100", "当升级'运输机舱扩容'时,不会对各种物流塔的存储限制按比例提升,除非设置为最大允许容量。\n你可以使用方向键微调物流塔存储限制\n \u2190\u2192: -/+10 \u2193\u2191: -/+100");
I18N.Add("Enhanced count control for hand-make", "Enhanced count control for hand-make", "手动制造物品的数量控制改进"); I18N.Add("Enhanced count control for hand-make", "Enhanced count control for hand-make", "手动制造物品的数量控制改进");
I18N.Add("Enhanced count control for hand-make tips", "Maximum count is increased to 1000.\nHold Ctrl/Shift/Alt to change the count rapidly.", "最大数量提升至1000\n按住Ctrl/Shift/Alt可快速改变数量"); I18N.Add("Enhanced count control for hand-make tips", "Maximum count is increased to 1000.\nHold Ctrl/Shift/Alt to change the count rapidly.", "最大数量提升至1000\n按住Ctrl/Shift/Alt可快速改变数量");
I18N.Add("Quick build and dismantle stacking labs", "Quick build and dismantle stacking labs(hold shift)", "快速建造和拆除堆叠研究站(按住shift)"); I18N.Add("Quick build and dismantle stacking labs", "Quick build and dismantle stacking labs/storages/tanks(hold shift)", "快速建造和拆除堆叠研究站/储物仓/储液罐(按住shift)");
I18N.Add("Protect veins from exhaustion", "Protect veins from exhaustion", "保护矿脉不会耗尽"); I18N.Add("Protect veins from exhaustion", "Protect veins from exhaustion", "保护矿脉不会耗尽");
I18N.Add("Protect veins from exhaustion tips", "By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file.\nWhen reach the protection value, veins/oils steeps will not be mined/extracted any longer.\nClose this function to resume mining and pumping, usually when you have enough level on `Veins Utilization`", "默认矿脉数量保护于剩余100采油速保护于速度1.0/s你可以在配置文件中自行设置。\n当达到保护值时矿脉和油井将不再被开采。\n关闭此功能以恢复开采一般是当你在`矿物利用`上有足够的等级时。\n"); I18N.Add("Protect veins from exhaustion tips", "By default, the vein amount is protected at 100, and oil speed is protected at 1.0/s, you can set them yourself in config file.\nWhen reach the protection value, veins/oils steeps will not be mined/extracted any longer.\nClose this function to resume mining and pumping, usually when you have enough level on `Veins Utilization`", "默认矿脉数量保护于剩余100采油速保护于速度1.0/s你可以在配置文件中自行设置。\n当达到保护值时矿脉和油井将不再被开采。\n关闭此功能以恢复开采一般是当你在`矿物利用`上有足够的等级时。\n");
I18N.Add("Do not render factory entities", "Do not render factory entities (except belts and sorters)", "不渲染工厂建筑实体(除了传送带和分拣器)"); I18N.Add("Do not render factory entities", "Do not render factory entities (except belts and sorters)", "不渲染工厂建筑实体(除了传送带和分拣器)");