mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 07:37:19 +08:00
Feat: Purchase Quantity Control for Skin Boxes
This commit is contained in:
@@ -1743,7 +1743,8 @@
|
|||||||
"GeneralShop": {
|
"GeneralShop": {
|
||||||
"UseGems": false,
|
"UseGems": false,
|
||||||
"Refresh": false,
|
"Refresh": false,
|
||||||
"BuySkinBox": false,
|
"BuySkinBox": "disabled",
|
||||||
|
"BuySkinBoxAmount": 0,
|
||||||
"ConsumeCoins": false,
|
"ConsumeCoins": false,
|
||||||
"Filter": "BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5"
|
"Filter": "BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9475,8 +9475,17 @@
|
|||||||
"value": false
|
"value": false
|
||||||
},
|
},
|
||||||
"BuySkinBox": {
|
"BuySkinBox": {
|
||||||
"type": "checkbox",
|
"type": "select",
|
||||||
"value": false
|
"value": "disabled",
|
||||||
|
"option": [
|
||||||
|
"disabled",
|
||||||
|
"unlimited",
|
||||||
|
"specified"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BuySkinBoxAmount": {
|
||||||
|
"type": "input",
|
||||||
|
"value": 0
|
||||||
},
|
},
|
||||||
"ConsumeCoins": {
|
"ConsumeCoins": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
|
|||||||
@@ -763,7 +763,10 @@ Island15:
|
|||||||
GeneralShop:
|
GeneralShop:
|
||||||
UseGems: false
|
UseGems: false
|
||||||
Refresh: false
|
Refresh: false
|
||||||
BuySkinBox: false
|
BuySkinBox:
|
||||||
|
value: disabled
|
||||||
|
option: [ disabled, unlimited, specified ]
|
||||||
|
BuySkinBoxAmount: 0
|
||||||
ConsumeCoins: false
|
ConsumeCoins: false
|
||||||
Filter: |-
|
Filter: |-
|
||||||
BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2
|
BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2
|
||||||
|
|||||||
@@ -403,7 +403,8 @@ class GeneratedConfig:
|
|||||||
# Group `GeneralShop`
|
# Group `GeneralShop`
|
||||||
GeneralShop_UseGems = False
|
GeneralShop_UseGems = False
|
||||||
GeneralShop_Refresh = False
|
GeneralShop_Refresh = False
|
||||||
GeneralShop_BuySkinBox = False
|
GeneralShop_BuySkinBox = 'disabled' # disabled, unlimited, specified
|
||||||
|
GeneralShop_BuySkinBoxAmount = 0
|
||||||
GeneralShop_ConsumeCoins = False
|
GeneralShop_ConsumeCoins = False
|
||||||
GeneralShop_Filter = 'BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5'
|
GeneralShop_Filter = 'BookRedT3 > BookYellowT3 > BookBlueT3 > BookRedT2\n> Cube\n> FoodT6 > FoodT5'
|
||||||
|
|
||||||
|
|||||||
@@ -2981,7 +2981,14 @@
|
|||||||
},
|
},
|
||||||
"BuySkinBox": {
|
"BuySkinBox": {
|
||||||
"name": "Buy Equip Skin Boxes",
|
"name": "Buy Equip Skin Boxes",
|
||||||
"help": "In order to reduce maintenance costs, the skin box selectors in the filter will not be updated with the game, but Alas will consider any unknown items with a quantity of 1 and consume 7000 coins as skin boxes and buy them."
|
"help": "In order to reduce maintenance costs, the skin box selectors in the filter will not be updated with the game, but Alas will consider any unknown items with a quantity of 1 and consume 7000 coins as skin boxes and buy them.",
|
||||||
|
"disabled": "Do Not Purchase",
|
||||||
|
"unlimited": "Unlimited Purchases",
|
||||||
|
"specified": "Purchase Specified Quantity"
|
||||||
|
},
|
||||||
|
"BuySkinBoxAmount": {
|
||||||
|
"name": "Purchase X Skin Boxes",
|
||||||
|
"help": "Takes effect when \"Purchase Specified Quantity\" is selected."
|
||||||
},
|
},
|
||||||
"ConsumeCoins": {
|
"ConsumeCoins": {
|
||||||
"name": "Consume Spilled Coins",
|
"name": "Consume Spilled Coins",
|
||||||
|
|||||||
@@ -2981,7 +2981,14 @@
|
|||||||
},
|
},
|
||||||
"BuySkinBox": {
|
"BuySkinBox": {
|
||||||
"name": "GeneralShop.BuySkinBox.name",
|
"name": "GeneralShop.BuySkinBox.name",
|
||||||
"help": "GeneralShop.BuySkinBox.help"
|
"help": "GeneralShop.BuySkinBox.help",
|
||||||
|
"disabled": "disabled",
|
||||||
|
"unlimited": "unlimited",
|
||||||
|
"specified": "specified"
|
||||||
|
},
|
||||||
|
"BuySkinBoxAmount": {
|
||||||
|
"name": "GeneralShop.BuySkinBoxAmount.name",
|
||||||
|
"help": "GeneralShop.BuySkinBoxAmount.help"
|
||||||
},
|
},
|
||||||
"ConsumeCoins": {
|
"ConsumeCoins": {
|
||||||
"name": "GeneralShop.ConsumeCoins.name",
|
"name": "GeneralShop.ConsumeCoins.name",
|
||||||
|
|||||||
@@ -2980,8 +2980,15 @@
|
|||||||
"help": "刷新需要消耗50钻石"
|
"help": "刷新需要消耗50钻石"
|
||||||
},
|
},
|
||||||
"BuySkinBox": {
|
"BuySkinBox": {
|
||||||
"name": "买外观装备箱",
|
"name": "买装备外观箱",
|
||||||
"help": "为降低维护成本,过滤器中的外观箱选择器不会随游戏更新,但Alas会将任何未知的,数量为1的,消耗7000物资的物品视为外观箱,并购买"
|
"help": "为降低维护成本,过滤器中的外观箱选择器不会随游戏更新,但Alas会将任何未知的,数量为1的,消耗7000物资的物品视为外观箱,并购买",
|
||||||
|
"disabled": "不购买",
|
||||||
|
"unlimited": "无限制购买",
|
||||||
|
"specified": "购买指定数量"
|
||||||
|
},
|
||||||
|
"BuySkinBoxAmount": {
|
||||||
|
"name": "购买 X 个外观箱",
|
||||||
|
"help": "在选择“购买指定数量”时生效"
|
||||||
},
|
},
|
||||||
"ConsumeCoins": {
|
"ConsumeCoins": {
|
||||||
"name": "消耗溢出物资",
|
"name": "消耗溢出物资",
|
||||||
|
|||||||
@@ -2981,7 +2981,14 @@
|
|||||||
},
|
},
|
||||||
"BuySkinBox": {
|
"BuySkinBox": {
|
||||||
"name": "買外觀裝備箱",
|
"name": "買外觀裝備箱",
|
||||||
"help": "為降低維護成本,過濾器中的外觀箱選擇器不會隨遊戲更新,但Alas會將任何未知的,數量為1的,消耗7000物資的物品視為外觀箱,併購買"
|
"help": "為降低維護成本,過濾器中的外觀箱選擇器不會隨遊戲更新,但Alas會將任何未知的,數量為1的,消耗7000物資的物品視為外觀箱,併購買",
|
||||||
|
"disabled": "不購買",
|
||||||
|
"unlimited": "無限制購買",
|
||||||
|
"specified": "購買指定數量"
|
||||||
|
},
|
||||||
|
"BuySkinBoxAmount": {
|
||||||
|
"name": "購買 X 個外觀箱",
|
||||||
|
"help": "在選擇「購買指定數量」時生效"
|
||||||
},
|
},
|
||||||
"ConsumeCoins": {
|
"ConsumeCoins": {
|
||||||
"name": "消耗溢出物資",
|
"name": "消耗溢出物資",
|
||||||
|
|||||||
@@ -125,12 +125,15 @@ class GeneralShop_250814(ShopClerk, ShopUI, ShopStatus):
|
|||||||
if item.cost == 'Coins':
|
if item.cost == 'Coins':
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if self.config.GeneralShop_BuySkinBox:
|
mode = self.config.GeneralShop_BuySkinBox
|
||||||
|
if (mode == 'unlimited' or (mode == 'specified' and self.config.GeneralShop_BuySkinBoxAmount > 0)):
|
||||||
if (not item.is_known_item()) and item.amount == 1 and item.cost == 'Coins' and item.price == 7000:
|
if (not item.is_known_item()) and item.amount == 1 and item.cost == 'Coins' and item.price == 7000:
|
||||||
# check a custom item that cannot be template matched as color
|
# check a custom item that cannot be template matched as color
|
||||||
# and design constantly changes i.e. equip skin box
|
# and design constantly changes i.e. equip skin box
|
||||||
logger.info(f'Item {item} is considered to be an equip skin box')
|
logger.info(f'Item {item} is considered to be an equip skin box')
|
||||||
if self._currency >= item.price:
|
if self._currency >= item.price:
|
||||||
|
if mode == 'specified':
|
||||||
|
self.config.GeneralShop_BuySkinBoxAmount -= 1
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user