From 3f3da4ff85e6bf4a2b412bd379ddfad3e9baf1d5 Mon Sep 17 00:00:00 2001 From: LA-DI-DA <11174151+0O0o0oOoO00@users.noreply.github.com> Date: Fri, 13 Oct 2023 11:00:03 +0800 Subject: [PATCH] Add: user setting of scrolling dock and scrolling fleet --- config/template.json | 4 ++++ module/config/argument/args.json | 16 ++++++++++++++++ module/config/argument/argument.yaml | 4 ++++ module/config/config_generated.py | 4 ++++ module/config/i18n/en-US.json | 16 ++++++++++++++++ module/config/i18n/ja-JP.json | 16 ++++++++++++++++ module/config/i18n/zh-CN.json | 16 ++++++++++++++++ module/config/i18n/zh-TW.json | 16 ++++++++++++++++ module/gg_handler/gg_u2.py | 10 +++++++++- 9 files changed, 101 insertions(+), 1 deletion(-) diff --git a/config/template.json b/config/template.json index 5929c6fd0..d5d391f2c 100644 --- a/config/template.json +++ b/config/template.json @@ -1969,12 +1969,16 @@ "ChangeShip": { "Enable": false, "PushLua": false, + "ScrollDock": true, + "ScrollFleet": true, "TargetType": "BB", "ShipData": "106021;1;6\n107041;1;6\n206011;1;6\n107011;1;6\n" }, "ChangeAttribute": { "Enable": false, "PushLua": false, + "ScrollDock": true, + "ScrollFleet": true, "ShipData": null }, "Storage": { diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 177c299e3..389efdcec 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -9442,6 +9442,14 @@ "type": "checkbox", "value": false }, + "ScrollDock": { + "type": "checkbox", + "value": true + }, + "ScrollFleet": { + "type": "checkbox", + "value": true + }, "TargetType": { "type": "select", "value": "BB", @@ -9464,6 +9472,14 @@ "type": "checkbox", "value": false }, + "ScrollDock": { + "type": "checkbox", + "value": true + }, + "ScrollFleet": { + "type": "checkbox", + "value": true + }, "ShipData": { "type": "textarea", "value": "" diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 70882d299..cc3a52975 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -731,6 +731,8 @@ PowerLimit: ChangeShip: Enable: false PushLua: false + ScrollDock: true + ScrollFleet: true TargetType: value: BB option: @@ -746,6 +748,8 @@ ChangeShip: ChangeAttribute: Enable: false PushLua: false + ScrollDock: true + ScrollFleet: true ShipData: type: textarea value: '' diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 3492fc3cb..1382909b3 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -454,12 +454,16 @@ class GeneratedConfig: # Group `ChangeShip` ChangeShip_Enable = False ChangeShip_PushLua = False + ChangeShip_ScrollDock = True + ChangeShip_ScrollFleet = True ChangeShip_TargetType = 'BB' # CV, BB ChangeShip_ShipData = '106021;1;6\n107041;1;6\n206011;1;6\n107011;1;6\n' # Group `ChangeAttribute` ChangeAttribute_Enable = False ChangeAttribute_PushLua = False + ChangeAttribute_ScrollDock = True + ChangeAttribute_ScrollFleet = True ChangeAttribute_ShipData = None # Group `InfiniteDelay` diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index fdc496466..a8470f296 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -2540,6 +2540,14 @@ "name": "ChangeShip.PushLua.name", "help": "ChangeShip.PushLua.help" }, + "ScrollDock": { + "name": "ChangeShip.ScrollDock.name", + "help": "ChangeShip.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeShip.ScrollFleet.name", + "help": "ChangeShip.ScrollFleet.help" + }, "TargetType": { "name": "ChangeShip.TargetType.name", "help": "ChangeShip.TargetType.help", @@ -2564,6 +2572,14 @@ "name": "ChangeAttribute.PushLua.name", "help": "ChangeAttribute.PushLua.help" }, + "ScrollDock": { + "name": "ChangeAttribute.ScrollDock.name", + "help": "ChangeAttribute.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeAttribute.ScrollFleet.name", + "help": "ChangeAttribute.ScrollFleet.help" + }, "ShipData": { "name": "ChangeAttribute.ShipData.name", "help": "ChangeAttribute.ShipData.help" diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index bfecb0387..280a9c5cb 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -2540,6 +2540,14 @@ "name": "ChangeShip.PushLua.name", "help": "ChangeShip.PushLua.help" }, + "ScrollDock": { + "name": "ChangeShip.ScrollDock.name", + "help": "ChangeShip.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeShip.ScrollFleet.name", + "help": "ChangeShip.ScrollFleet.help" + }, "TargetType": { "name": "ChangeShip.TargetType.name", "help": "ChangeShip.TargetType.help", @@ -2564,6 +2572,14 @@ "name": "ChangeAttribute.PushLua.name", "help": "ChangeAttribute.PushLua.help" }, + "ScrollDock": { + "name": "ChangeAttribute.ScrollDock.name", + "help": "ChangeAttribute.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeAttribute.ScrollFleet.name", + "help": "ChangeAttribute.ScrollFleet.help" + }, "ShipData": { "name": "ChangeAttribute.ShipData.name", "help": "ChangeAttribute.ShipData.help" diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 61e985143..d6db3fa6e 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -2540,6 +2540,14 @@ "name": "始终推送Lua", "help": "有时推送时会失败,视情况开启或者关闭" }, + "ScrollDock": { + "name": "强制加载船坞数据", + "help": "设备运行慢或者无法修改时需要开启" + }, + "ScrollFleet": { + "name": "强制加载编队数据", + "help": "设备运行慢或者无法修改时需要开启" + }, "TargetType": { "name": "目标舰种", "help": "困难图中后排锁定的舰种", @@ -2564,6 +2572,14 @@ "name": "始终推送Lua", "help": "有时推送时会失败,视情况开启或者关闭" }, + "ScrollDock": { + "name": "强制加载船坞数据", + "help": "设备运行慢或者无法修改时需要开启" + }, + "ScrollFleet": { + "name": "强制加载编队数据", + "help": "设备运行慢或者无法修改时需要开启" + }, "ShipData": { "name": "舰船数据", "help": "格式为\"舰船Id;舰船星级;类型Id:属性>目标值[;属性>目标值...]\"\n参考https://github.com/0O0o0oOoO00/SmallKai中的数据" diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index af4b12258..b3da0225f 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -2540,6 +2540,14 @@ "name": "ChangeShip.PushLua.name", "help": "ChangeShip.PushLua.help" }, + "ScrollDock": { + "name": "ChangeShip.ScrollDock.name", + "help": "ChangeShip.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeShip.ScrollFleet.name", + "help": "ChangeShip.ScrollFleet.help" + }, "TargetType": { "name": "ChangeShip.TargetType.name", "help": "ChangeShip.TargetType.help", @@ -2564,6 +2572,14 @@ "name": "ChangeAttribute.PushLua.name", "help": "ChangeAttribute.PushLua.help" }, + "ScrollDock": { + "name": "ChangeAttribute.ScrollDock.name", + "help": "ChangeAttribute.ScrollDock.help" + }, + "ScrollFleet": { + "name": "ChangeAttribute.ScrollFleet.name", + "help": "ChangeAttribute.ScrollFleet.help" + }, "ShipData": { "name": "ChangeAttribute.ShipData.name", "help": "ChangeAttribute.ShipData.help" diff --git a/module/gg_handler/gg_u2.py b/module/gg_handler/gg_u2.py index afa6c53c6..04152bc67 100644 --- a/module/gg_handler/gg_u2.py +++ b/module/gg_handler/gg_u2.py @@ -37,8 +37,16 @@ class GGU2(UI, Base): return _skipped def set_on(self, factor=200): - if deep_get(self.config.data, keys='GameManager.ChangeAttribute.Enable') or deep_get(self.config.data, keys='GameManager.ChangeShip.Enable'): + if deep_get(self.config.data, keys='GameManager.ChangeAttribute.Enable') \ + and deep_get(self.config.data, keys='GameManager.ChangeAttribute.ScrollDock') \ + or deep_get(self.config.data, keys='GameManager.ChangeShip.Enable') \ + and deep_get(self.config.data, keys='GameManager.ChangeShip.ScrollDock'): self.ScrollDockToLoadAllShipData() + + if deep_get(self.config.data, keys='GameManager.ChangeAttribute.Enable') \ + and deep_get(self.config.data, keys='GameManager.ChangeAttribute.ScrollFleet') \ + or deep_get(self.config.data, keys='GameManager.ChangeShip.Enable') \ + and deep_get(self.config.data, keys='GameManager.ChangeShip.ScrollFleet'): self.ScrollFleetToLoadAllFleetData() _name_dict = { 'en': 'Azur Lane',