Commit graph

71 commits

Author SHA1 Message Date
Griatch
2b3a32e447 Reshuffling the Evennia package into the new template paradigm. 2015-01-06 14:53:45 +01:00
Griatch
749715a193 Server can be connected to, not yet get to a command line; may need to work on different app_labels. 2014-12-22 23:03:00 +01:00
Griatch
f2f6c32d3f Removed cleanups of on-command properties after command conclusion to allow for post-command referencing (e.g. by the lineeditor contrib). Resolves #562. 2014-09-24 15:39:33 +02:00
Griatch
545804dffe Added ability to abort the command chain by returning a true value from cmd.at_pre_cmd(). 2014-08-26 09:09:55 +02:00
Griatch
58f6c05964 Change testing keyword to _testing in cmdhandler 2014-08-24 10:55:02 +02:00
Griatch
a88afabd60 Added **kwargs to cmdhandler and execute_cmd() methods, to set arbitrary flags on commands at run-time. Unused by default Evennia but may be useful to codedly change operation parameters on commands at run-time. 2014-08-24 09:43:55 +02:00
Griatch
9bfb829274 Implemented WeakSharedMemoryModel for Attributes. 2014-05-11 15:23:11 +02:00
Griatch
6ea4125ef1 Removed func_parts looping from cmdhandler - it didn't work as expected, as shown in #438. Instead reworked utils.delay() to implement the same functionality explicitly. 2014-02-15 23:33:19 +01:00
Griatch
e3d1866b0f Fixed unicode-decode error if sending a non-ascii character from a non-UTF-8 terminal. 2014-02-15 15:51:22 +01:00
Griatch
c321ccb332 Made examine command more verbose about the cmdset stack and just which cmdsets go into the currently merged set. This meant a change to merged sets where they store their component sets as a variable "merged_from". 2014-01-20 22:46:30 +01:00
Griatch
48bfc7e54a Made Empty cmdsets have priority -100, also changed their key from "Empty" to _EMPTY_CMDSET to make it clearer this is a special name. See also discussion in Issue 447. 2014-01-04 13:24:07 +01:00
Griatch
1ae17bcbe4 PEP8 cleanup of the entire codebase. Unchanged are many cases of too-long lines, partly because of the rewrite they would require but also because splitting many lines up would make the code harder to read. Also the third-party libraries (idmapper, prettytable etc) were not cleaned. 2013-11-14 19:31:17 +01:00
Griatch
30b7d2a405 Made changes to examine command (to also display SessionCmdSet) and also made some more fixes. 2013-11-12 21:39:15 +01:00
Griatch
efa6d85574 Added cmdset caching to cmdhandler. 2013-10-20 13:42:56 +02:00
Griatch
55423f6a2f Fixed a ZeroDivionError by adjusting what is returned by aliashandler.all() when no aliases are given ([] instead of ['']). Also made sure src.utils.stringsuggestions() don't crash in such a situation. 2013-10-18 16:15:51 +02:00
Griatch
a1646ec596 Fixed an issue with a CmdClock not being a part of the __all__ module handle (this causes ev.py to fail to import it) 2013-10-18 15:09:03 +02:00
Griatch
acdea41a67 Merge from Kelketek's clone. Added fixes to migrations of Tags. Issues with ContentTypes meaning that this revision is not possible to start. 2013-10-17 23:44:52 +02:00
Griatch
96c6ad4aff Fixed an issue with channel-sending crashing when ooc. Resolves Issue 429. 2013-09-27 21:31:47 +02:00
Griatch
4659ddbfc3 Changed object.msg() to relay directly to connected session rather than via the player.msg() method. 2013-09-22 11:39:24 +02:00
Griatch
e36c7d5cc1 Cleaned up worst instability. Test suite does validate yet. 2013-09-21 17:33:48 +02:00
Griatch
1e96b13920 Changed cmdhandler to include Session-level cmdset. 2013-09-08 00:14:06 +02:00
Griatch
92a8e39de5 Changed how the cmdset's errmessage is propagated. Adding failing cmdsets added ErrorCmdsets to the cmdhandler. This was for callback reasons, but it clutters up things for no good reason. 2013-07-02 15:50:42 +02:00
Griatch
47a324f720 Made cmdhandler merge same-prio cmdsets in groups. Before this fix one could face the following situation: Two exits "allcom" and "test". Both have exit cmdsets with prio 9. If "test" merges first, it contains no "allcom" command to overload the "allcom" in the Player cmdset (prio -5). But the merged set now has a priority of 9 thanks to merging the "test" set. So when merging the "allcom" exit-command, it merges with a same-prio set. And since exit-cmdsets have the duplicate-flag set, there will be two allcom commands in the final set. The problem does not show up if "allcom" happened to be merged first, making this effect non-consistent and buggy.
Merging the same-prio exit-sets first, then merging onto the lower-prio sets resolves this issue.
2013-07-02 13:38:38 +02:00
Griatch
4715499958 Fixed a missing sessid on System commands. Resolves Issue 377. 2013-05-26 19:29:42 +02:00
Griatch
0fddf433dc Updated all Player-level commands to properly relay messages using self.msg rather than caller.msg (the former will properly relay to the right sessid without needing any extra arguments). 2013-04-12 14:27:36 +02:00
Griatch
406800f254 Merge. 2013-03-09 12:16:50 +01:00
Griatch
743edd88ff Renamed cmd.funcparts to cmd.func_parts for naming consistency with other command optionals. 2013-02-20 00:27:44 +01:00
Griatch
65e370f93b Added an abort condition to the cmd's funcparts chain. 2013-02-20 00:17:50 +01:00
Griatch
0121f36ac0 Added cmd.funcpart as a way of adding multiple-part commands, each with a possibility to yield with a deferred. This allows for flexible implementation of delayed commands and other asynchronous goodies. 2013-02-19 23:30:33 +01:00
Griatch
00584365ae Added sessids to command objects and changed how the "login"-hooks are called. Those will probably have to be changed to better names, at least for characters. 2013-02-02 22:41:56 +01:00
Griatch
949da47917 Removed some old and now confusing, unsused variables and added some documenting strings. 2012-12-08 15:39:09 +01:00
Griatch
4c83d3e7a1 Various speed optimizations in various places, following further profiling. 2012-09-20 00:47:28 +02:00
Griatch
0d1f9d5bdc Fixed a bug in object's __eq__ that returned erroneous fails. 2012-08-12 09:55:19 +02:00
Griatch
ca0920e635 Added "raw_string" (unformatted, no stripping) as a property on commands, inspired by work by user Kelketek. 2012-06-23 11:03:16 +02:00
Griatch
44bf35cd81 Make sure to forward no_channels, no_objs and no_exits flags across cmdset merges. Also changes how system commands are saved across merges. Resolves Issue 243. 2012-06-20 21:16:34 +02:00
Griatch
4c849ec351 Cleaned and updated the i18n strings for various server-core system. Removed i18n for all strings that are only visible on stdout or in logs. Still missing i18n on certain specific things such as model field help and attribute warnings. Updated Swedish translation to match. 2012-06-14 02:43:35 +02:00
Griatch
0e42eb74ed Updated how cmdsethandler reports syntaxerrors in command modules - this used to lead to rather opaque error messages. Now a dummy cmdset is created instead, with the key _ERROR_CMDSET and holding the error message. This allows the user to see that an error was reported instead of just being left in the blank. Full tracebacks are reported to log as usual. 2012-05-01 16:15:49 +02:00
Griatch
6e08c011a1 Further caching and optimization, making some operations noticeable faster in the end. 2012-04-26 17:47:25 +02:00
Griatch
c688865e10 Slightly changed text on not-found command. 2012-04-22 22:58:23 +02:00
Griatch
e4006bf386 Further cleanup in the error logic for commands - the system now gives resonable suggestions for all commands. 2012-04-22 20:04:24 +02:00
Griatch
0c292b5ff2 Changed how command not found errors are handled by default: Implemented a cos-likeness algorithm (Coling 2008) for comparing strings, which allows for decent suggestions and speed. 2012-04-22 16:36:31 +02:00
Griatch
4678234e9a Multiple fixes to ev and utils:
Made utils.variable_from_module more generic (it can now load pretty much any form of module it's given and also supports searching and returning multiple variables).

Removed the variable-load functionality from utils.load_module; this is now purely a loader - use variable_from_module instead.

I found out that one couldn't import from src.commands.default due to the __init__ file being restrictive for the sake of the ev API. Removed that and instead imported the default commands into ev.py with the help of utils.variable_from_module instead. Some more fixes in ev followed on this.
2012-04-22 12:23:42 +02:00
Griatch
6501f30cbc Fixed an elusive bug in utils.get_variable_from_module() that caused the connection screen to sometimes not load properly, due to the imported modules being erroneously extracted and used. 2012-04-15 19:05:50 +02:00
Griatch
c728524c72 Made get_and_merge_cmdsets visible to default cmds. 2012-03-31 16:13:01 +02:00
Griatch
d44dd92b5f Continuing to make more methods _private to simplify API. 2012-03-31 16:09:48 +02:00
Griatch
c0322c9eae Cleaning some unnecessary whitespace, overall cleanup of various source codes. 2012-03-30 23:47:22 +02:00
Griatch
562a32107e Added more yields to cmdhandler, removed unnecessary callback to return. 2012-02-22 16:00:41 +01:00
Griatch
641d829154 Added inlineCallback operator for cmdhandler, allowing the system to yield more often. 2012-02-20 21:40:28 +01:00
Griatch
6fdfbe657b Changed the flag save_next to save_for_next, it makes more sense. 2012-02-17 19:02:57 +01:00
Griatch
6e53e6a1fd Added state persistence to commands. For commands that want to, their state will be saved for the next command to access through the self.caller.ndb.last_cmd variable. The state only persists one command before it is cleared or replaced. 2012-02-17 18:53:47 +01:00