mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
DeathLink: add support for the cause field #2
This commit is contained in:
@@ -269,13 +269,14 @@ class CommonContext():
|
|||||||
else:
|
else:
|
||||||
logger.info(f"DeathLink: Received from {data['source']}")
|
logger.info(f"DeathLink: Received from {data['source']}")
|
||||||
|
|
||||||
async def send_death(self):
|
async def send_death(self, death_text: str = ""):
|
||||||
self.last_death_link = time.time()
|
self.last_death_link = time.time()
|
||||||
await self.send_msgs([{
|
await self.send_msgs([{
|
||||||
"cmd": "Bounce", "tags": ["DeathLink"],
|
"cmd": "Bounce", "tags": ["DeathLink"],
|
||||||
"data": {
|
"data": {
|
||||||
"time": self.last_death_link,
|
"time": self.last_death_link,
|
||||||
"source": self.player_names[self.slot]
|
"source": self.player_names[self.slot],
|
||||||
|
"cause": death_text
|
||||||
}
|
}
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@@ -123,7 +123,7 @@ class World(metaclass=AutoWorldRegister):
|
|||||||
self.player = player
|
self.player = player
|
||||||
|
|
||||||
# overridable methods that get called by Main.py, sorted by execution order
|
# overridable methods that get called by Main.py, sorted by execution order
|
||||||
# can also be implemented as a classmethod and called "stage_<original_name",
|
# can also be implemented as a classmethod and called "stage_<original_name>",
|
||||||
# in that case the MultiWorld object is passed as an argument and it gets called once for the entire multiworld.
|
# in that case the MultiWorld object is passed as an argument and it gets called once for the entire multiworld.
|
||||||
# An example of this can be found in alttp as stage_pre_fill
|
# An example of this can be found in alttp as stage_pre_fill
|
||||||
def generate_early(self):
|
def generate_early(self):
|
||||||
|
Reference in New Issue
Block a user