Skip to content

Commit

Permalink
Merge pull request #175 from Chrezm/4.3.5-post1-dev
Browse files Browse the repository at this point in the history
4.3.5-post1
  • Loading branch information
Chrezm authored Sep 27, 2022
2 parents 7a5f929 + a612351 commit 201ef5a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,3 +817,6 @@
* Changed console message indicating server address and port to reflect DRO no longer using the old syntax
* Fixed /lasterror providing duplicate error information
* Fixed /clock_period erroring out if a non-numerical invalid hour start or hour length was given.

### 220926a (4.3.5-post1)
* Fixed area list loading failing if there was a player in the process of joining a server
11 changes: 6 additions & 5 deletions server/area_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,14 @@ def get_rand_avail_char_id(self, allow_restricted: bool = False,

return self.server.random.choice(tuple(available))

def is_char_available(self, char_id: int, allow_restricted: bool = False,
def is_char_available(self, char_id: Union[int, None], allow_restricted: bool = False,
more_unavail_chars: Set[int] = None) -> bool:
"""
Decide whether a character can be selected in the current area.
Parameters
----------
char_id: int
char_id: Union[int, None]
ID of the character to test.
allow_restricted: bool, optional
Whether to include characters whose usage has been manually restricted in the area.
Expand All @@ -454,11 +454,12 @@ def is_char_available(self, char_id: int, allow_restricted: bool = False,
Returns
-------
bool
True if tested character ID is the spectator ID (which is always available), or
is not found to be among the area's unusable characters.
True if tested character ID is the spectator ID (which is always available) or None
(the ID that is given when on the lobby but before getting to the character select
screen), or is not found to be among the area's unusable characters.
"""

if char_id < 0:
if char_id is None or char_id < 0:
return True

unused = char_id in self.get_chars_unusable(allow_restricted=allow_restricted,
Expand Down
4 changes: 2 additions & 2 deletions server/tsuserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def __init__(self, protocol: AOProtocol = None,
self.release = 4
self.major_version = 3
self.minor_version = 5
self.segment_version = ''
self.internal_version = '220912a'
self.segment_version = 'post1'
self.internal_version = '220926a'
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 201ef5a

Please sign in to comment.