Add: [TW] asset support for voucher shop (#1982)

This commit is contained in:
下面我簡單喵兩句 2022-12-11 14:52:19 +08:00 committed by GitHub
parent 873a6da0e2
commit da7efd102c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -36,11 +36,6 @@ class OSCampaignRun(OSMapOperation):
self.config.opsi_task_delay(ap_limit=True)
def opsi_voucher(self):
if self.config.SERVER in ['tw']:
logger.info(f'Opsi Voucher is not supported in {self.config.SERVER},'
' please contact server maintainers')
self.config.task_delay(server_update=True)
return
try:
self.load_campaign()
self.campaign.os_voucher()

View File

@ -14,8 +14,8 @@ AUTO_SEARCH_OS_MAP_OPTION_OFF = Button(area={'cn': (1205, 549, 1275, 566), 'en':
AUTO_SEARCH_OS_MAP_OPTION_ON = Button(area={'cn': (1205, 549, 1275, 566), 'en': (1201, 526, 1274, 536), 'jp': (1205, 573, 1275, 592), 'tw': (1206, 573, 1275, 591)}, color={'cn': (149, 176, 193), 'en': (108, 129, 150), 'jp': (145, 172, 190), 'tw': (123, 148, 169)}, button={'cn': (1205, 549, 1275, 566), 'en': (1201, 526, 1274, 536), 'jp': (1205, 573, 1275, 592), 'tw': (1206, 573, 1275, 591)}, file={'cn': './assets/cn/os_handler/AUTO_SEARCH_OS_MAP_OPTION_ON.png', 'en': './assets/en/os_handler/AUTO_SEARCH_OS_MAP_OPTION_ON.png', 'jp': './assets/jp/os_handler/AUTO_SEARCH_OS_MAP_OPTION_ON.png', 'tw': './assets/tw/os_handler/AUTO_SEARCH_OS_MAP_OPTION_ON.png'})
AUTO_SEARCH_REWARD = Button(area={'cn': (575, 598, 721, 646), 'en': (574, 597, 722, 648), 'jp': (577, 597, 722, 645), 'tw': (576, 598, 720, 647)}, color={'cn': (169, 168, 170), 'en': (168, 171, 174), 'jp': (165, 170, 175), 'tw': (171, 174, 179)}, button={'cn': (575, 598, 721, 646), 'en': (574, 597, 722, 648), 'jp': (577, 597, 722, 645), 'tw': (576, 598, 720, 647)}, file={'cn': './assets/cn/os_handler/AUTO_SEARCH_REWARD.png', 'en': './assets/en/os_handler/AUTO_SEARCH_REWARD.png', 'jp': './assets/jp/os_handler/AUTO_SEARCH_REWARD.png', 'tw': './assets/tw/os_handler/AUTO_SEARCH_REWARD.png'})
CLICK_SAFE_AREA = Button(area={'cn': (1104, 169, 1214, 284), 'en': (1104, 169, 1214, 284), 'jp': (1104, 169, 1214, 284), 'tw': (1104, 169, 1214, 284)}, color={'cn': (96, 114, 142), 'en': (96, 114, 142), 'jp': (96, 114, 142), 'tw': (96, 114, 142)}, button={'cn': (1104, 169, 1214, 284), 'en': (1104, 169, 1214, 284), 'jp': (1104, 169, 1214, 284), 'tw': (1104, 169, 1214, 284)}, file={'cn': './assets/cn/os_handler/CLICK_SAFE_AREA.png', 'en': './assets/en/os_handler/CLICK_SAFE_AREA.png', 'jp': './assets/jp/os_handler/CLICK_SAFE_AREA.png', 'tw': './assets/tw/os_handler/CLICK_SAFE_AREA.png'})
EXCHANGE_CHECK = Button(area={'cn': (144, 17, 249, 41), 'en': (143, 16, 240, 37), 'jp': (141, 16, 250, 42), 'tw': (144, 17, 249, 41)}, color={'cn': (153, 170, 209), 'en': (117, 133, 171), 'jp': (86, 98, 127), 'tw': (153, 170, 209)}, button={'cn': (144, 17, 249, 41), 'en': (143, 16, 240, 37), 'jp': (141, 16, 250, 42), 'tw': (144, 17, 249, 41)}, file={'cn': './assets/cn/os_handler/EXCHANGE_CHECK.png', 'en': './assets/en/os_handler/EXCHANGE_CHECK.png', 'jp': './assets/jp/os_handler/EXCHANGE_CHECK.png', 'tw': './assets/cn/os_handler/EXCHANGE_CHECK.png'})
EXCHANGE_ENTER = Button(area={'cn': (195, 629, 344, 693), 'en': (202, 640, 332, 690), 'jp': (195, 629, 345, 693), 'tw': (195, 629, 344, 693)}, color={'cn': (58, 54, 52), 'en': (64, 61, 59), 'jp': (53, 50, 48), 'tw': (58, 54, 52)}, button={'cn': (195, 629, 344, 693), 'en': (202, 640, 332, 690), 'jp': (195, 629, 345, 693), 'tw': (195, 629, 344, 693)}, file={'cn': './assets/cn/os_handler/EXCHANGE_ENTER.png', 'en': './assets/en/os_handler/EXCHANGE_ENTER.png', 'jp': './assets/jp/os_handler/EXCHANGE_ENTER.png', 'tw': './assets/cn/os_handler/EXCHANGE_ENTER.png'})
EXCHANGE_CHECK = Button(area={'cn': (144, 17, 249, 41), 'en': (143, 16, 240, 37), 'jp': (141, 16, 250, 42), 'tw': (142, 15, 250, 44)}, color={'cn': (153, 170, 209), 'en': (117, 133, 171), 'jp': (86, 98, 127), 'tw': (135, 151, 189)}, button={'cn': (144, 17, 249, 41), 'en': (143, 16, 240, 37), 'jp': (141, 16, 250, 42), 'tw': (142, 15, 250, 44)}, file={'cn': './assets/cn/os_handler/EXCHANGE_CHECK.png', 'en': './assets/en/os_handler/EXCHANGE_CHECK.png', 'jp': './assets/jp/os_handler/EXCHANGE_CHECK.png', 'tw': './assets/tw/os_handler/EXCHANGE_CHECK.png'})
EXCHANGE_ENTER = Button(area={'cn': (195, 629, 344, 693), 'en': (202, 640, 332, 690), 'jp': (195, 629, 345, 693), 'tw': (195, 629, 344, 693)}, color={'cn': (58, 54, 52), 'en': (64, 61, 59), 'jp': (53, 50, 48), 'tw': (59, 55, 54)}, button={'cn': (195, 629, 344, 693), 'en': (202, 640, 332, 690), 'jp': (195, 629, 345, 693), 'tw': (195, 629, 344, 693)}, file={'cn': './assets/cn/os_handler/EXCHANGE_ENTER.png', 'en': './assets/en/os_handler/EXCHANGE_ENTER.png', 'jp': './assets/jp/os_handler/EXCHANGE_ENTER.png', 'tw': './assets/tw/os_handler/EXCHANGE_ENTER.png'})
GET_ADAPTABILITY = Button(area={'cn': (538, 191, 742, 227), 'en': (527, 194, 659, 215), 'jp': (538, 191, 743, 227), 'tw': (539, 191, 741, 227)}, color={'cn': (166, 195, 246), 'en': (198, 207, 230), 'jp': (158, 190, 245), 'tw': (164, 195, 246)}, button={'cn': (538, 191, 742, 227), 'en': (527, 194, 659, 215), 'jp': (538, 191, 743, 227), 'tw': (539, 191, 741, 227)}, file={'cn': './assets/cn/os_handler/GET_ADAPTABILITY.png', 'en': './assets/en/os_handler/GET_ADAPTABILITY.png', 'jp': './assets/jp/os_handler/GET_ADAPTABILITY.png', 'tw': './assets/tw/os_handler/GET_ADAPTABILITY.png'})
GET_MEOWFFICER_ITEMS_1 = Button(area={'cn': (558, 211, 730, 242), 'en': (550, 211, 723, 247), 'jp': (538, 217, 732, 253), 'tw': (558, 211, 730, 242)}, color={'cn': (186, 200, 231), 'en': (165, 191, 241), 'jp': (143, 180, 249), 'tw': (186, 200, 231)}, button={'cn': (558, 211, 730, 242), 'en': (550, 211, 723, 247), 'jp': (538, 217, 732, 253), 'tw': (558, 211, 730, 242)}, file={'cn': './assets/cn/os_handler/GET_MEOWFFICER_ITEMS_1.png', 'en': './assets/en/os_handler/GET_MEOWFFICER_ITEMS_1.png', 'jp': './assets/jp/os_handler/GET_MEOWFFICER_ITEMS_1.png', 'tw': './assets/tw/os_handler/GET_MEOWFFICER_ITEMS_1.png'})
GET_MEOWFFICER_ITEMS_2 = Button(area={'cn': (558, 140, 730, 171), 'en': (550, 140, 723, 176), 'jp': (538, 146, 731, 182), 'tw': (558, 140, 730, 171)}, color={'cn': (186, 200, 231), 'en': (165, 191, 242), 'jp': (143, 179, 249), 'tw': (186, 200, 231)}, button={'cn': (558, 140, 730, 171), 'en': (550, 140, 723, 176), 'jp': (538, 146, 731, 182), 'tw': (558, 140, 730, 171)}, file={'cn': './assets/cn/os_handler/GET_MEOWFFICER_ITEMS_2.png', 'en': './assets/en/os_handler/GET_MEOWFFICER_ITEMS_2.png', 'jp': './assets/jp/os_handler/GET_MEOWFFICER_ITEMS_2.png', 'tw': './assets/tw/os_handler/GET_MEOWFFICER_ITEMS_2.png'})

View File

@ -94,7 +94,7 @@ class VoucherShop(ShopClerk):
# Original grid is:
# shop_grid = ButtonGrid(
# origin=(463, 200), delta=(156, 191), button_shape=(99, 99), grid_shape=(5, 2), name='SHOP_GRID')
if self.config.SERVER in ['cn', 'jp']:
if self.config.SERVER in ['cn', 'jp', 'tw']:
shop_grid = ButtonGrid(
origin=(305, origin_y), delta=(189.5, delta_y), button_shape=(99, 99), grid_shape=(5, row),
name='SHOP_GRID')