Skip to content

Commit

Permalink
Merge pull request #187 from Chrezm/5.0.0-post2-dev
Browse files Browse the repository at this point in the history
5.0.0-post2
  • Loading branch information
Chrezm authored Dec 9, 2022
2 parents c0b437a + c3084c4 commit 568829d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 7 additions & 5 deletions server/client_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions server/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
3 changes: 3 additions & 0 deletions server/game_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion server/hub_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions server/tsuserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 568829d

Please sign in to comment.