Skip to content

Commit 5cf7e6e

Browse files
committed
DeathLink: add support for the cause field #2
1 parent 720ef93 commit 5cf7e6e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CommonClient.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,14 @@ def on_deathlink(self, data: dict):
269269
else:
270270
logger.info(f"DeathLink: Received from {data['source']}")
271271

272-
async def send_death(self):
272+
async def send_death(self, death_text: str = ""):
273273
self.last_death_link = time.time()
274274
await self.send_msgs([{
275275
"cmd": "Bounce", "tags": ["DeathLink"],
276276
"data": {
277277
"time": self.last_death_link,
278-
"source": self.player_names[self.slot]
278+
"source": self.player_names[self.slot],
279+
"cause": death_text
279280
}
280281
}])
281282

worlds/AutoWorld.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __init__(self, world: MultiWorld, player: int):
123123
self.player = player
124124

125125
# overridable methods that get called by Main.py, sorted by execution order
126-
# can also be implemented as a classmethod and called "stage_<original_name",
126+
# can also be implemented as a classmethod and called "stage_<original_name>",
127127
# in that case the MultiWorld object is passed as an argument and it gets called once for the entire multiworld.
128128
# An example of this can be found in alttp as stage_pre_fill
129129
def generate_early(self):

0 commit comments

Comments
 (0)