Skip to content

Commit

Permalink
Fix extra text for /look_set+'statue'->'statue' in /passage_restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrezm committed Jan 19, 2020
1 parent 470041a commit 037623f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 10 deletions.
54 changes: 46 additions & 8 deletions server/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2976,23 +2976,26 @@ def ooc_cmd_look_set(client: ClientManager.Client, arg: str):
if len(arg) == 0:
client.area.description = client.area.default_description
client.send_ooc('Reset the area description to its original value.')
client.send_ooc_others('(X) {} reset the area description of your area to its original '
'value.'.format(client.name), is_zstaff_flex=True, in_area=True)
client.send_ooc_others('(X) {} reset the area description of area {} to its original value.'
.format(client.name, client.area.name), is_zstaff_flex=True)
.format(client.name, client.area.name), is_zstaff_flex=True,
in_area=False)
logger.log_server('[{}][{}]Reset the area description in {}.'
.format(client.area.id, client.get_char_name(), client.area.name), client)

else:
client.area.description = arg
client.send_ooc('Updated the area descriptions to {}'.format(arg))
client.send_ooc_others('(X) {} set the area descriptions of area {} to {}.'
client.send_ooc('Updated the area descriptions to `{}`.'.format(arg))
client.send_ooc_others('(X) {} set the area description of your area to `{}`.'
.format(client.area.name, client.area.description),
is_zstaff_flex=True, in_area=True)
client.send_ooc_others('(X) {} set the area descriptions of area {} to `{}`.'
.format(client.name, client.area.name, client.area.description),
is_zstaff_flex=True)
is_zstaff_flex=True, in_area=False)
logger.log_server('[{}][{}]Set the area descriptions to {}.'
.format(client.area.id, client.get_char_name(), arg), client)

client.send_ooc_others('The area description was updated to {}.'
.format(client.area.description), is_zstaff_flex=True, in_area=True)

def ooc_cmd_make_gm(client: ClientManager.Client, arg: str):
""" (MOD AND CM ONLY)
Makes a player by ID a GM without them needing to put in a GM password.
Expand Down Expand Up @@ -3779,7 +3782,7 @@ def ooc_cmd_passage_restore(client: ClientManager.Client, arg: str):
area.change_reachability_allowed = area.default_change_reachability_allowed

if areas[0] == areas[1]:
client.send_ooc('Passages in this area have been restored to their original statue.')
client.send_ooc('Passages in this area have been restored to their original state.')
else:
client.send_ooc('Passages in areas {} through {} have been restored to their original '
'state.'.format(areas[0].name, areas[1].name))
Expand Down Expand Up @@ -6491,6 +6494,41 @@ def ooc_cmd_toggle_allpasses(client: ClientManager.Client, arg: str):
client.send_ooc('You are {} receiving autopass notifications from players without autopass.'
.format(status[client.get_nonautopass_autopass]))

def ooc_cmd_lurk(client: ClientManager.Client, arg: str):

Constants.assert_command(client, arg, is_staff=True, parameters='=1')

# Check if valid length and convert to seconds
lurk_length = Constants.parse_time_length(arg) # Also internally validates
client.area.lurk_length = lurk_length

targets = [c for c in client.area if not c.is_staff() and c.char_id >= 0]
for target in targets:
client.server.tasker_create_task(target, ['as_lurk', lurk_length])

client.send_ooc('(X) You have enabled a lurk callout timer of length {} seconds in this area.'
.format(lurk_length))
client.send_ooc_others('(X) {} has enabled a lurk callout timer of length {} seconds in your '
'area.'.format(client.name, lurk_length),
is_zstaff_flex=True, in_area=True)
client.send_ooc_others('(X) {} has enabled a lurk callout timer of length {} seconds in area '
'{} ({}).'
.format(client.name, lurk_length, client.area.name, client.area.id),
is_zstaff_flex=True, in_area=False)

def ooc_cnd_lurk_cancel(client: ClientManager.Client, arg: str):
Constants.assert_command(client, arg, is_staff=True)

if client.area.lurk_length == 0:
raise ClientError('This area has no active lurk callout timer.')

client.send_ooc('(X) You have canceled the lurk callout timer in this area.')
client.send_ooc_others('(X) {} has canceled the lurk callout timer in your area.'
.format(client.name), is_zstaff_flex=True, in_area=True)
client.send_ooc_others('(X) {} has canceled the lurk callout timer in area {} ({}).'
.format(client.name, client.area.name, client.area.id),
is_zstaff_flex=True, in_area=False)

def ooc_cmd_exec(client: ClientManager.Client, arg: str):
"""
VERY DANGEROUS. SHOULD ONLY BE ENABLED FOR DEBUGGING.
Expand Down
4 changes: 2 additions & 2 deletions server/tsuserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def __init__(self, protocol=None, client_manager=None, in_test=False):
self.release = 4
self.major_version = 3
self.minor_version = 0
self.segment_version = 'a4'
self.internal_version = '200115b'
self.segment_version = 'a6'
self.internal_version = '200119b'
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 037623f

Please sign in to comment.