diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a7d056..999353ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -882,3 +882,9 @@ ## 221204a (5.0.0-post1) * Fixed players being unable to play a track via the music list if it is a track of their hub music list but not of their personal music list + +## 221208a (5.0.0-post2) +* Fixed /randommusic failing halfway through +* Fixed games not asserting properties of player groups after mutator calls +* Fixed trials being internally initialized incorrectly, which prevented commands such as /nsd_accept and /nsd_reject from running properly +* Fixed players using clients that do not have a HIDE_CHARACTER argument in inbound IC messages (e.g. AO 2.10) occassionally failing to receive messages if they are in first person mode or not in forward sprites mode diff --git a/server/client_manager.py b/server/client_manager.py index 4e2ba54f..7aecdcbd 100644 --- a/server/client_manager.py +++ b/server/client_manager.py @@ -324,8 +324,8 @@ def send_ooc_others( def send_ic( self, - params: List = None, - sender: ClientManager.Client = None, + params: Dict[str, Any] = None, + sender: Union[ClientManager.Client, None] = None, bypass_text_replace: bool = False, bypass_deafened_starters: bool = False, use_last_received_sprites: bool = False, @@ -509,7 +509,9 @@ def pop_if_there(dictionary, argument): pargs['pos'] = last_args['pos'] pargs['anim_type'] = last_args['anim_type'] pargs['flip'] = last_args['flip'] - pargs['hide_character'] = last_args['hide_character'] + # Only DRO 1.1.0+ has this + if self.packet_handler.HAS_HIDE_CHARACTER_AS_MS_ARGUMENT: + pargs['hide_character'] = last_args['hide_character'] # Regardless of anything, pairing is visually canceled while in first person # so set them to default values @@ -644,8 +646,8 @@ def pop_if_there(dictionary, argument): def send_ic_others( self, - params: List = None, - sender: ClientManager.Client = None, + params: Dict[str, Any] = None, + sender: Union[ClientManager.Client, None] = None, bypass_text_replace: bool = False, bypass_deafened_starters: bool = False, use_last_received_sprites: bool = False, diff --git a/server/clients.py b/server/clients.py index 7161c43e..3cbae931 100644 --- a/server/clients.py +++ b/server/clients.py @@ -40,6 +40,7 @@ def __eq__(self, other): ALLOWS_INVISIBLE_BLANKPOSTS = True REPLACES_BASE_OPUS_FOR_MP3 = False ALLOWS_CHAR_LIST_RELOAD = True + HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = True DECRYPTOR_OUTBOUND = [ ('key', 34), # 0 @@ -359,6 +360,7 @@ class ClientDRO1d0d0(DefaultDROProtocol): HAS_JOINED_AREA = False REPLACES_BASE_OPUS_FOR_MP3 = True ALLOWS_CHAR_LIST_RELOAD = False + HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = False MS_INBOUND = [ ('msg_type', ArgType.STR), # 0 @@ -411,6 +413,7 @@ class ClientAO2d10(DefaultDROProtocol): ALLOWS_INVISIBLE_BLANKPOSTS = False REPLACES_BASE_OPUS_FOR_MP3 = True ALLOWS_CHAR_LIST_RELOAD = True + HAS_HIDE_CHARACTER_AS_MS_ARGUMENT = False MS_INBOUND = [ ('msg_type', ArgType.STR), # 0 diff --git a/server/commands.py b/server/commands.py index 401ed1e2..2126058e 100644 --- a/server/commands.py +++ b/server/commands.py @@ -7476,7 +7476,7 @@ def ooc_cmd_randommusic(client: ClientManager.Client, arg: str): # Find all music tracks music_names = list() - music_list = client.music_manager.get_music_data() + music_list = client.music_manager.get_music() for item in music_list: songs = item['songs'] diff --git a/server/game_manager.py b/server/game_manager.py index 59c36bf9..3331e175 100644 --- a/server/game_manager.py +++ b/server/game_manager.py @@ -1863,6 +1863,9 @@ def _check_structure(self): self._timer_manager._check_structure() self._team_manager._check_structure() + # 5. + super()._check_structure() + def __str__(self): """ Return a string representation of this game. diff --git a/server/hub_manager.py b/server/hub_manager.py index fb681d28..5700d47b 100644 --- a/server/hub_manager.py +++ b/server/hub_manager.py @@ -1898,7 +1898,7 @@ def __init__( self.area_manager = AreaManager(server, hub=self) self.load_areas() - self.trial_manager = TrialManager(self) + self.trial_manager = TrialManager(server) self._password = str(secrets.randbelow(9000) + 1000) # Cute trick to get 4-digit number diff --git a/server/tsuserver.py b/server/tsuserver.py index 02d15324..1d354415 100644 --- a/server/tsuserver.py +++ b/server/tsuserver.py @@ -67,8 +67,8 @@ def __init__(self, client_manager_type: Type[ClientManager] = None): self.release = 5 self.major_version = 0 self.minor_version = 0 - self.segment_version = 'post1' - self.internal_version = '221204a' + self.segment_version = 'post2' + self.internal_version = '221208a' version_string = self.get_version_string() self.software = 'TsuserverDR {}'.format(version_string) self.version = 'TsuserverDR {} ({})'.format(version_string, self.internal_version)