remove sleepy custom commands better (doesn't delete !w alias for wait now)

This commit is contained in:
jacob1 2015-10-31 16:26:49 -04:00
parent 10ad9d35a2
commit 0f6f41f263

View File

@ -783,14 +783,19 @@ class SleepyMode(GameMode):
events.remove_listener("chk_nightdone", self.prolong_night) events.remove_listener("chk_nightdone", self.prolong_night)
events.remove_listener("transition_day_begin", self.nightmare_kill) events.remove_listener("transition_day_begin", self.nightmare_kill)
events.remove_listener("del_player", self.happy_fun_times) events.remove_listener("del_player", self.happy_fun_times)
del decorators.COMMANDS["north"] def remove_command(name, command):
del decorators.COMMANDS["n"] if len(decorators.COMMANDS[name]) > 1:
del decorators.COMMANDS["east"] decorators.COMMANDS[name].remove(command)
del decorators.COMMANDS["e"] else:
del decorators.COMMANDS["south"] del decorators.COMMANDS[name]
del decorators.COMMANDS["s"] remove_command("north", self.north_cmd)
del decorators.COMMANDS["west"] remove_command("n", self.north_cmd)
del decorators.COMMANDS["w"] remove_command("east", self.east_cmd)
remove_command("e", self.east_cmd)
remove_command("south", self.south_cmd)
remove_command("s", self.south_cmd)
remove_command("west", self.west_cmd)
remove_command("w", self.west_cmd)
def dullahan_targets(self, evt, cli, var, dullahans, max_targets): def dullahan_targets(self, evt, cli, var, dullahans, max_targets):
for dull in dullahans: for dull in dullahans: