Track players nicks after death
Prevents horrible breakage in maelstrom
This commit is contained in:
parent
610874c5a1
commit
a10f6052a6
@ -3455,6 +3455,10 @@ def rename_player(cli, prefix, nick):
|
||||
if prefix in var.SPECTATING_WOLFCHAT:
|
||||
var.SPECTATING_WOLFCHAT.remove(prefix)
|
||||
var.SPECTATING_WOLFCHAT.add(nick)
|
||||
if prefix in var.ALL_PLAYERS:
|
||||
# ALL_PLAYERS needs to keep its ordering for purposes of mad scientist
|
||||
# it also needs updating after death to disallow epic breakages
|
||||
var.ALL_PLAYERS[var.ALL_PLAYERS.index(prefix)] = nick
|
||||
|
||||
event = Event("rename_player", {})
|
||||
event.dispatch(cli, var, prefix, nick)
|
||||
@ -3468,10 +3472,6 @@ def rename_player(cli, prefix, nick):
|
||||
var.ROLES[t].add(nick)
|
||||
var.ROLES[t].remove(prefix)
|
||||
|
||||
if prefix in var.ALL_PLAYERS:
|
||||
# ALL_PLAYERS needs to keep its ordering for purposes of mad scientist
|
||||
var.ALL_PLAYERS[var.ALL_PLAYERS.index(prefix)] = nick
|
||||
|
||||
if var.PHASE in ("night", "day"):
|
||||
for k,v in var.ORIGINAL_ROLES.items():
|
||||
if prefix in v:
|
||||
|
Loading…
Reference in New Issue
Block a user