Skip to content

Commit 5e298e4

Browse files
committed
Push locks
1 parent 0f2650f commit 5e298e4

File tree

5 files changed

+1050
-680
lines changed

5 files changed

+1050
-680
lines changed

worlds/dk64/client/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Common classes and functions for the N64 client for DK64."""
2+
23
import asyncio
34
from CommonClient import logger
45

@@ -7,6 +8,7 @@ class DK64MemoryMap:
78
"""
89
DK64MemoryMap is a class that contains memory addresses and offsets used in the game Donkey Kong 64.
910
"""
11+
1012
name_location = 0xD0A0A6F8
1113
memory_pointer = 0x807FFF1C
1214
counter_offset = 0x000
@@ -30,11 +32,13 @@ class N64Exception(Exception):
3032
Attributes:
3133
message (str): Explanation of the error.
3234
"""
35+
3336
pass
3437

3538

3639
all_tasks = set()
3740

41+
3842
def create_task_log_exception(awaitable) -> asyncio.Task:
3943
"""
4044
Creates an asyncio task that logs any exceptions raised during its execution.
@@ -45,6 +49,7 @@ def create_task_log_exception(awaitable) -> asyncio.Task:
4549
The task will log any exceptions raised during its execution using the logger.
4650
It will also remove itself from the `all_tasks` set upon completion.
4751
"""
52+
4853
async def _log_exception(awaitable):
4954
try:
5055
return await awaitable

worlds/dk64/client/convert.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from location_ids import location_flag_ids
2+
from id_data import location_names_to_id
3+
4+
# Using the values of the flag ids and the keys of the location names, print the matching location names
5+
for flag in location_flag_ids:
6+
value = location_flag_ids[flag]
7+
if location_names_to_id.get(value):
8+
print(value)
9+
10+
print(len(location_flag_ids))

0 commit comments

Comments
 (0)