Commit graph

3699 commits

Author SHA1 Message Date
Griatch
1b3fb8fca9 Rename convert_gamescript to custom_gamescript to reflect its new function. Change names of the settings variables used to TIME_* to better match the settings naming style elsewhere. Add updated docstring to module; pertains to #1217. 2017-02-16 00:04:09 +01:00
Griatch
b91e12db20 Some cleanup of docstrings. 2017-02-15 23:43:49 +01:00
Vincent Le Goff
a69b335a9e Clean up in the gametime utility 2017-02-15 23:43:49 +01:00
Vincent Le Goff
e867b343cf Update the documentation of the contrib convert_gametime 2017-02-15 23:43:49 +01:00
Vincent Le Goff
7cd7d68a5a Add the script/functions to schedule events with a standard calendar 2017-02-15 23:43:49 +01:00
Vincent Le Goff
c18bfe7388 Update the time-sensitive script
Since the game time doesn't drift much anymore, the script doesn't
need to restart on startup.  The restart on repeat is kept, small
drifts could accumulate otherwise.
2017-02-15 23:43:49 +01:00
Vincent Le Goff
95c8bf348b Save the game time before shutting down the server (avoids drfts) 2017-02-15 23:43:49 +01:00
Vincent Le Goff
c05a0a58bf Update the documentation for the schedule() function 2017-02-15 23:43:49 +01:00
Vincent Le Goff
753bd35226 The time epoch defined in settings can now be 0 (different from None).
The convert_gametime contrib now has a simple function to return gametime with units.
2017-02-15 23:43:49 +01:00
Vincent Le Goff
ee1fc0b648 Update the convert_gametime contrib (stable reload/restart) 2017-02-15 23:43:49 +01:00
Vincent Le Goff
ec63d43905 Add a check to not create a task to watch a script if the task already exists 2017-02-15 23:43:49 +01:00
Vincent Le Goff
f6988610cd Use Script.restart() in GametimeScript to change interval 2017-02-15 23:43:49 +01:00
Vincent Le Goff
64fd770b5a Add the gametime-sensitive script (errors in intervals) 2017-02-15 23:43:49 +01:00
Vincent Le Goff
c6ccc08ad0 Add the 'real_seconds_until' function in the gametime contrib 2017-02-15 23:43:49 +01:00
Vincent Le Goff
ab97f3674e Add optional settings to change game time measurement and units 2017-02-15 23:43:49 +01:00
Vincent Le Goff
175f4ed026 Add a list of game units in the convert_gametime contrib
This is a dictionary that can be overridden without rewriting the entire module.
2017-02-15 23:43:49 +01:00
BlauFeuer
ce48eae62f PEP 8: visual indent + implicit continuation
Also removed unnecessary hyphen from word
2017-02-12 20:42:32 -05:00
BlauFeuer
0143043319 refactor to avoid string concatenation in a loop
Trivial here since there's only 4 roots, but removes an LGTM alert.
2017-02-12 20:30:00 -05:00
BlauFeuer
a687cb7b26 comms.py update markup/PEP 8/whitespace,
Also removed redundant code
2017-02-12 19:21:40 -05:00
BlauFeuer
2079504c07 general.py update markup/PEP 8/typos/whitespace 2017-02-12 19:18:04 -05:00
BlauFeuer
1fb064c978 objects.py markup/whitespace/PEP 8/typo fixes 2017-02-12 19:05:18 -05:00
BlauFeuer
9ea8daf605 connection_screens.py update markup/format 2017-02-12 18:59:38 -05:00
BlauFeuer
5e93d41664 help.py display tweak + help aliased to ?
Display tweak resolves difference in display between Telnet and Webclient where coloration of command in format_help_list was not persisting across new lines.
Also updates depreciated markup
2017-02-12 14:51:30 -05:00
Griatch
27f57f7a1b Updated contrib README. 2017-02-12 19:16:56 +01:00
Griatch
22e22ffced Cleaned up the time command's output some more. 2017-02-12 19:16:56 +01:00
Griatch
008566f358 Move gametime conversion factors to contrib and remove them from the settings file with the motivation that the gametime constats were always highly game specific and a remnant from another time. Reworked the gametime library and add server epoch building from vincent-lg's original PR. The gametime module now deals exclusively in seconds. 2017-02-12 19:16:56 +01:00
Griatch
2a48a4d645 Add contrib convert_gametime.py from the game-specific parts moved out of utils.gametime.py. 2017-02-12 19:16:56 +01:00
Griatch
6b89945cd3 Extract the deprecation checks from the evennia launcher into its own module deprecations.py as it grows. 2017-02-12 19:16:56 +01:00
Vincent Le Goff
59a5315c79 Add a setting to handle absolute game time (assuing standard a calendar)
The `@time` command now displays the game time epoch (can be set
in settings) and current game time (as a datetime).
2017-02-12 19:16:56 +01:00
Griatch
24adc5286b Minor refactoring of text. 2017-02-12 13:23:24 +01:00
TehomCD
be107814e5 Update CODING_STYLE.md
Making a note about changing to google-style docstrings in pycharm
2017-02-12 13:19:57 +01:00
Griatch
7453cf325a Make 'codefunc' a callable kwarg of EvEditor instead of the code boolean, to offer potential more flexibility if using EvEditor in other conditions. Add :! as a way to run code without saving it. Add support for using the /time switch also with the code editor when using . 2017-02-12 13:17:13 +01:00
Vincent Le Goff
88fc854b36 Change commands to :< and :> in EvEditor (code mode) 2017-02-12 13:17:13 +01:00
Vincent Le Goff
1697263fd7 Add the /edit swtich to the @py command 2017-02-12 13:17:13 +01:00
Vincent Le Goff
36b268ca81 Leading spaces in the EvEditor are always taken into account 2017-02-12 13:17:13 +01:00
Vincent Le Goff
362e03a3f8 Fix a bug in :+ and := commands in EvEditor 2017-02-12 13:17:13 +01:00
Vincent Le Goff
bcba90f27a Add the 'code' keyword to EvEditor, with basic handling of indentation 2017-02-12 13:17:13 +01:00
Griatch
fe89f2eb52 Minor typo-fix to coding style info. 2017-02-12 11:17:31 +01:00
BlauFeuer
6d24f82054 Update building.py
Update string to result
2017-02-12 11:06:20 +01:00
BlauFeuer
5ed5e77562 Update building.py
Properly call join with result
2017-02-12 11:06:20 +01:00
BlauFeuer
9a5b6969f3 Update building.py
Result string in loop appended to list
2017-02-12 11:06:20 +01:00
Griatch
61ffe5f9fa Rename ADDITIONA_ANSI_MAPPING to COLOR_ANSI_EXTRA_MAP to better match the settings naming scheme. 2017-02-12 10:53:50 +01:00
Tehom
982108da33 correct import 2017-02-12 10:53:50 +01:00
Tehom
f263ea2aaa Allow additional ansi mappings to be passed from settings for easier customization. 2017-02-12 10:53:50 +01:00
Griatch
80f7bb1cb5 Change command-default setting names to be more consistent with other settings; changed Command.msg_share to Command.msg_all_sessions to make it clearer what it does. 2017-02-12 10:35:30 +01:00
Tehom
fafe2e779e Added comments to the individual settings. 2017-02-12 10:35:30 +01:00
Tehom
a54e511413 Made defaults drawn from settings file to allow them to be modified 2017-02-12 10:35:30 +01:00
Tehom
f538b65279 Create a command attribute to specify whether messages should be shared between sessions. 2017-02-12 10:35:30 +01:00
Simon Vermeersch
af7475c6b9 Cache non-existent attributes too to avoid querying for them more than
once.
2017-02-12 10:00:05 +01:00
Griatch
9103532498 Further change to ircstatus/ircbot privmsg who sorting. 2017-02-12 09:08:13 +01:00