remove deprecated warn

This commit is contained in:
Hay1tsme
2025-02-21 23:51:59 -05:00
parent d4394788b7
commit 0f52b89033
22 changed files with 79 additions and 79 deletions

View File

@@ -132,7 +132,7 @@ class SaoBase:
await self.data.profile.add_yui_medals(user_id, medal_num)
else:
self.logger.warn(f"User {user_id} Unhandled reward type {reward_type} -> {reward}")
self.logger.warning(f"User {user_id} Unhandled reward type {reward_type} -> {reward}")
async def hero_default_skills(self, skill_table_id: int) -> List[int]:
skills = await self.data.static.get_skill_table_by_subid(skill_table_id)
@@ -370,7 +370,7 @@ class SaoBase:
if not card:
# Validate that we're talking to a phone
if not int(pmm[2:4], 16) in self.data.card.moble_os_codes:
self.logger.warn(f"{req.serial_no} looked up non-moble chip ID {cid}!")
self.logger.warning(f"{req.serial_no} looked up non-moble chip ID {cid}!")
return SaoGetAccessCodeByKeitaiResponse("").make()
# TODO: Actual felica moble registration
@@ -378,7 +378,7 @@ class SaoBase:
#ac = await self.data.card.register_felica_moble_ac(idm, pmm)
# if we didn't get an access code, fail hard
if not ac:
self.logger.warn(f"Failed to register access code for chip ID {cid} requested by {req.serial_no}")
self.logger.warning(f"Failed to register access code for chip ID {cid} requested by {req.serial_no}")
return SaoGetAccessCodeByKeitaiResponse("").make()
self.logger.info(f"Successfully registered moble felica access code {ac} for chip ID {cid} requested by {req.serial_no}")
@@ -416,14 +416,14 @@ class SaoBase:
async def handle_c126(self, header: SaoRequestHeader, request: bytes, src_ip: str) -> bytes:
# common/validation_error_notification
req = SaoValidationErrorNotificationRequest(header, request)
self.logger.warn(f"User {req.user_id} on {'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
self.logger.warning(f"User {req.user_id} on {'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
+ f"Validation error: {req.send_protocol_name} || {req.send_data_to_fraud_value} || {req.send_data_to_modification_value}")
return SaoNoopResponse(GameconnectCmd.VALIDATION_ERROR_NOTIFICATION_RESPONSE).make()
async def handle_c128(self, header: SaoRequestHeader, request: bytes, src_ip: str) -> bytes:
# common/power_cutting_return_notification
req = SaoPowerCuttingReturnNotification(header, request)
self.logger.warn(f"User {req.user_id} on {'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
self.logger.warning(f"User {req.user_id} on {'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
+ f"Power outage return: Act Type {req.last_act_type} || {req.remaining_ticket_num} Remaining Tickets || {req.remaining_credit_num} Remaining Credits")
return SaoNoopResponse(GameconnectCmd.POWER_CUTTING_RETURN_NOTIFICATION_RESPONSE).make()
@@ -437,7 +437,7 @@ class SaoBase:
async def handle_c12c(self, header: SaoRequestHeader, request: bytes, src_ip: str) -> bytes:
# common/matching_error_notification
req = SaoMatchingErrorNotificationRequest(header, request)
self.logger.warn(f"{'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
self.logger.warning(f"{'game' if req.cabinet_type == 0 else 'terminal'} {req.serial_no} @ {req.store_name} ({src_ip} | Place ID {req.place_id}) " \
+ f"Matching error: {req.matching_error_data_list[0]}")
return SaoNoopResponse(GameconnectCmd.MATCHING_ERROR_NOTIFICATION_RESPONSE).make()
@@ -547,22 +547,22 @@ class SaoBase:
card = await self.data.profile.get_hero_card(req.profile_card_code)
if not card:
self.logger.warn(f"User {req.user_id} scanned unregistered QR code {req.profile_card_code}")
self.logger.warning(f"User {req.user_id} scanned unregistered QR code {req.profile_card_code}")
return resp.make()
hero = await self.data.item.get_hero_log_by_id(card['user_hero_id'])
if not hero: # Shouldn't happen
self.logger.warn(f"User {req.user_id} scanned QR code {req.profile_card_code} but does not have hero entry {card['user_hero_id']}")
self.logger.warning(f"User {req.user_id} scanned QR code {req.profile_card_code} but does not have hero entry {card['user_hero_id']}")
return resp.make()
hero_static_data = await self.data.static.get_hero_by_id(hero['hero_log_id'])
if not hero_static_data: # Shouldn't happen
self.logger.warn(f"No entry for hero {hero['hero_log_id']}, please run read.py")
self.logger.warning(f"No entry for hero {hero['hero_log_id']}, please run read.py")
return resp.make()
profile = await self.data.profile.get_profile(card['user'])
if not profile: # Shouldn't happen
self.logger.warn(f"No profile for user {card['user']}, something broke")
self.logger.warning(f"No profile for user {card['user']}, something broke")
return resp.make()
self.logger.info(f"User {req.user_id} scanned QR code {req.profile_card_code}")
@@ -587,7 +587,7 @@ class SaoBase:
card = await self.data.profile.get_resource_card(req.resource_card_code) # TODO: use count
if not card:
self.logger.warn(f"No resource card with serial {req.resource_card_code} exists!")
self.logger.warning(f"No resource card with serial {req.resource_card_code} exists!")
resp.header.err_status = 4832 # Theres a few error codes but none seem to do anything?
# Also not sure if it should be this or result
@@ -603,7 +603,7 @@ class SaoBase:
resp = SaoScanQrQuestResourceCardResponse(card['common_reward_type'], card['common_reward_id'], card['holographic_flag'])
else:
self.logger.warn(f"No resource card with serial {req.resource_card_code} exists!")
self.logger.warning(f"No resource card with serial {req.resource_card_code} exists!")
resp = SaoScanQrQuestResourceCardResponse()
resp.header.err_status = 4832 # Theres a few error codes but none seem to do anything?
# Also not sure if it should be this or result
@@ -719,7 +719,7 @@ class SaoBase:
append = HeroLogUserData.from_args(hero)
hero_static = await self.data.static.get_hero_by_id(hero['hero_log_id'])
if not hero_static:
self.logger.warn(f"No hero for id {hero['hero_log_id']}, please run reader")
self.logger.warning(f"No hero for id {hero['hero_log_id']}, please run reader")
resp.hero_log_user_data_list.append(append)
continue
@@ -757,7 +757,7 @@ class SaoBase:
e = EquipmentUserData.from_args(equipment)
weapon_static = await self.data.static.get_equipment_by_id(equipment['equipment_id'])
if not weapon_static:
self.logger.warn(f"No equipment for id {equipment['equipment_id']}, please run reader")
self.logger.warning(f"No equipment for id {equipment['equipment_id']}, please run reader")
resp.equipment_user_data_list.append(e)
continue
@@ -917,7 +917,7 @@ class SaoBase:
continue
else:
self.logger.warn(f"Unhandled disposal type {disposal.common_reward_type}")
self.logger.warning(f"Unhandled disposal type {disposal.common_reward_type}")
await self.data.profile.add_col(req.user_id, get_col)
return SaoDisposalResourceResponse(get_col).make()
@@ -978,7 +978,7 @@ class SaoBase:
await self.data.item.remove_hero_log(x.user_common_reward_id)
else:
self.logger.warn(f"Unhandled ype {x.common_reward_type}! (running {hero_exp})")
self.logger.warning(f"Unhandled ype {x.common_reward_type}! (running {hero_exp})")
hero_exp = int(hero_exp * 1.5)
await self.data.item.add_hero_xp(req.origin_user_hero_log_id, hero_exp)
@@ -1072,7 +1072,7 @@ class SaoBase:
await self.data.item.remove_hero_log(x.user_common_reward_id)
else:
self.logger.warn(f"Unhandled ype {x.common_reward_type}! (running {equipment_exp})")
self.logger.warning(f"Unhandled ype {x.common_reward_type}! (running {equipment_exp})")
equipment_exp = int(equipment_exp * 1.5)
await self.data.item.add_equipment_enhancement_exp(req_data.origin_user_equipment_id, equipment_exp)
@@ -1322,7 +1322,7 @@ class SaoBase:
# TODO
pass
else:
self.logger.warn(f"Unhandled EX Bonus condition {condition}")
self.logger.warning(f"Unhandled EX Bonus condition {condition}")
resp.play_end_response_data[0].ex_bonus_data_list.append(QuestScenePlayEndExBonusData.from_args(table_id, ach_thing))
@@ -1550,7 +1550,7 @@ class SaoBase:
# TODO
pass
else:
self.logger.warn(f"Unhandled EX Bonus condition {condition}")
self.logger.warning(f"Unhandled EX Bonus condition {condition}")
resp.play_end_response_data[0].ex_bonus_data_list.append(QuestScenePlayEndExBonusData.from_args(table_id, ach_thing))