Skip to content

Commit

Permalink
Zillion: remove deprecated Logger.warn (ArchipelagoMW#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
beauxq authored May 13, 2024
1 parent f38655d commit 77cce68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion worlds/zillion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def finalize_item_locations(self) -> GenData:
assert isinstance(z_loc, ZillionLocation)
# debug_zz_loc_ids[z_loc.zz_loc.name] = id(z_loc.zz_loc)
if z_loc.item is None:
self.logger.warn("generate_output location has no item - is that ok?")
self.logger.warning("generate_output location has no item - is that ok?")
z_loc.zz_loc.item = empty
elif z_loc.item.player == self.player:
z_item = z_loc.item
Expand Down
14 changes: 7 additions & 7 deletions worlds/zillion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,20 +231,20 @@ def on_package(self, cmd: str, args: Dict[str, Any]) -> None:
if cmd == "Connected":
logger.info("logged in to Archipelago server")
if "slot_data" not in args:
logger.warn("`Connected` packet missing `slot_data`")
logger.warning("`Connected` packet missing `slot_data`")
return
slot_data = args["slot_data"]

if "start_char" not in slot_data:
logger.warn("invalid Zillion `Connected` packet, `slot_data` missing `start_char`")
logger.warning("invalid Zillion `Connected` packet, `slot_data` missing `start_char`")
return
self.start_char = slot_data['start_char']
if self.start_char not in {"Apple", "Champ", "JJ"}:
logger.warn("invalid Zillion `Connected` packet, "
f"`slot_data` `start_char` has invalid value: {self.start_char}")
logger.warning("invalid Zillion `Connected` packet, "
f"`slot_data` `start_char` has invalid value: {self.start_char}")

if "rescues" not in slot_data:
logger.warn("invalid Zillion `Connected` packet, `slot_data` missing `rescues`")
logger.warning("invalid Zillion `Connected` packet, `slot_data` missing `rescues`")
return
rescues = slot_data["rescues"]
self.rescues = {}
Expand Down Expand Up @@ -272,8 +272,8 @@ def on_package(self, cmd: str, args: Dict[str, Any]) -> None:
self.loc_mem_to_id[mem] = id_

if len(self.loc_mem_to_id) != 394:
logger.warn("invalid Zillion `Connected` packet, "
f"`slot_data` missing locations in `loc_mem_to_id` - len {len(self.loc_mem_to_id)}")
logger.warning("invalid Zillion `Connected` packet, "
f"`slot_data` missing locations in `loc_mem_to_id` - len {len(self.loc_mem_to_id)}")

self.got_slot_data.set()

Expand Down

0 comments on commit 77cce68

Please sign in to comment.