Griatch
ad8a9fbe69
Added warning message for puppeting to an object without neither location nor home set.
2013-04-20 16:14:12 +02:00
Griatch
75341ade6f
A first test using PickledObjectField and a rewritten dbserialize module to store Attributes. No migrations set up yet.
2013-04-13 15:15:02 +02:00
Griatch
5874505902
Changed object.player to return a typeclass. Resolves Issue 325. Also made sure that .typeclass always returns a typeclass, also if called on something which is already a typeclass.
2013-04-10 22:33:32 +02:00
Griatch
26ced2cb90
Heavily reworked the many-char system, cleaner and more consistent by not having any persistent links on the Object side once a player has unconnected.
2013-04-09 15:59:21 +02:00
Griatch
7581d65cb3
Made superuser able to have a separate "superuser character" in order to be able to have also test-characters without privileges.
2013-03-11 22:01:52 +01:00
Griatch
bbdf2e0896
Fixed a bug that caused superuser status to be cached only once for characters, even if the player was not yet connected.
2013-03-11 20:01:03 +01:00
Griatch
406800f254
Merge.
2013-03-09 12:16:50 +01:00
Griatch
47356ca632
Fixed a lingering error from turning off "quick assignment" that caused issues in TutorialWorld.
2013-02-18 20:08:05 +01:00
Griatch
458e3e7599
Added @sessions command for viewing active sessions connected to a given account.
2013-02-17 20:21:23 +01:00
Griatch
25505d69a6
Moved login and disconnect from session-level to sessionhandler level to make the process cleaner with hooks rather than direct calls.
2013-02-17 18:48:48 +01:00
Griatch
f1767251c6
Can now log in to a character selection screen. Lots more testing required before one-char-per-session works.
2013-02-03 00:25:06 +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
231af4a351
Continued work on multi-char-per-account. Added a new default login point. Still need to add sessid to commands.
2013-02-02 15:55:42 +01:00
Griatch
b50266623e
Merge.
2013-02-01 22:04:18 +01:00
Griatch
8b5938ddd0
Non-working intermediary commit.
2013-02-01 22:03:55 +01:00
Griatch
f734e9511c
Handle the case of doing aliases=<string> instead of aliases=[<string>] in create_object - this caused the malformed data to be stored in cache and causing tracebacks in cmdhandler until @reloaded.
2013-02-01 21:03:03 +01:00
Griatch
c0302f7cff
Added global_dbref argument to caller.search, for allowing e.g. the examine command to view globally by dbref yet local-only if supplying a name. Resolves Issue 327.
2012-12-08 14:09:42 +01:00
Griatch
9f6e3de637
Various cleanups and fixes found during refurbishing the unittest framework (not pushed yet)
2012-11-05 00:55:25 +01:00
Griatch
d2d9953f94
Cache changes: Moved all caches (except idmapper) to central caching module. This makes it easier to overview cache memory usage (and clean it) as well as plug-in external cache mechanisms.
2012-11-01 11:20:07 +01:00
Griatch
ce036e07f3
Added the ability of obj.move_to to accept a None location with a keyword to_none. Also changed the @tel command to accept a /tonone switch for putting things' location to None. Resolves Issue 307.
2012-10-23 22:31:51 +02:00
Griatch
7997cf62e8
Added a more comprehensive recursive location-loop checker that shouldn't be too expensive. Thanks to rcaskey for bouncing ideas in IRC!
2012-10-14 21:24:58 +02:00
Griatch
67dc11849f
Added a check for 1st level recursion of location. So self.location=self will no longer work. I did not add a full recursive check (it would need to go through all contents of the object and their contents etc) since this is expensive for something that should usually not be a common error. Further checks could be added higher up in the build commands if location-loops are considered a big problem. Resolves Issue 296.
2012-10-14 20:21:53 +02:00
Griatch
46ffd06c78
Followed the suggestion of making nicks set on Player be globally available (I liked this better than the old default behaviour). Changed for execute_cmd nick replacement ("inputline","channels") as well as for caller.search nick replamement ("player", "object"). A Character's nick overrule a same-named nick on the Player level, which sounds like the most expected behaviour. Resolves Issue 292.
2012-10-14 17:24:30 +02:00
Griatch
0141f94e9d
Fixed a bug in obj.copy() that tried to access contents without properly initializing the typeclass. Resolves Issue 288.
2012-10-14 16:31:22 +02:00
Griatch
4dff822764
Fixed bug in @batchcommand (Resolves Issue 287). Also updated @dig to again handle deleting ranges of dbrefs (with or without # in front).
2012-10-14 16:24:21 +02:00
Griatch
93d95377ce
Shifting ProcPool out of src and into a contrib, using the service plugin system.
2012-09-22 20:40:30 +02:00
Griatch
f677902811
Fixed a bug with setting a location to None.
2012-09-22 13:37:22 +02:00
Griatch
e874343387
Adjusted search() functionality to handle also a list of location(s) to search. Changed "get" command to not search inventory (which could lead to multimatch errors).
2012-09-21 08:36:59 +02:00
Griatch
c0b03c2ee3
Some further removal of recursive loops in the typeclass system.
2012-09-20 23:18:52 +02:00
Griatch
dc4340b34e
Bugfix for latest optimization.
2012-09-20 03:01:30 +02:00
Griatch
7a130cb442
Removing some of the last self-reference loops in object.models, based on profiling.
2012-09-20 02:52:21 +02:00
Griatch
4c83d3e7a1
Various speed optimizations in various places, following further profiling.
2012-09-20 00:47:28 +02:00
Griatch
ee450a4fed
Fixed a bug in the search method causing it to fail for commands ignoring the error handler (such as drop). Resolves issue 252.
2012-09-18 21:48:41 +02:00
Griatch
0dae03156c
Some optimizations, cleanup and a few bugfixes. Just changing a spurious property retrieval in the typeclass removed an extra, pointless database query.
2012-09-18 01:03:35 +02:00
Griatch
c53a9b5770
Changed how Objects are searched, using proper Django Q objects instead of hack-y evals to build queries. This has lead to a number of changes to the ObjectDB manager search. Notably there is now no way to supply a "location" to either of the manager search methods anymore. Instead you can now supply the keyword "candidates", a list of objects which should be used to limit the search. This is much more generic than giving location. The higher-level search (like caller.search, reached from commands) have not changed its API, so commands should work the same unless you are using the manager backbone directly. This search function is now using location to create the "candidates" list. Some other things, like matching for "me" and "here" have also been moved up to a level were it can be easily overloaded. "me" and "here" etc were also moved under i18n.
...
As part of this overhaul I implemented the partial_matching algorithm originally asked for by user "Adam_ASE" over IRC. This will allow for (local-only) partial matching of objects. So "big black sword" will now be matched by "bi", "sword", "bi bla" and so on. The partial matcher sits in src.utils.utils.py if one wants to use it for something else.
2012-09-17 15:31:50 +02:00
Griatch
cc6fa079b6
Added some more functionality to the copy method of objects, as well as some minor fixes.
2012-09-11 23:47:29 +02:00
Griatch
ffcf4b3c2f
Added cache-resyncing to ProcPool. This makes sure to update all affected object caches
...
whenever the subprocess returns (this is potentially not good enough for long-running scripts,
will have to ponder that one). Made ProcPool work with MySQL (where it works much better). Tested and fixed many
small bugs.
2012-09-03 01:11:14 +02:00
Griatch
f5caab093e
Fixed a spurious error messages from the location setter when logging out (need to check None location)
2012-08-19 21:36:01 +02:00
Griatch
5e33690f40
Optimization: Added caching of object contents. This makes obj.contents not have to hit
...
the database at all. So far there are no regressions from this, but time will tell if
there are any problems.
2012-08-19 18:48:29 +02:00
Griatch
2d46d0306b
Some more i18n strings added; also updated swedish translation.
2012-06-14 08:56:57 +02:00
Griatch
8ad4f4a9fc
Changed player.search to only search for players explicitly.
...
Added a MuxCommandOOC class to handle the OOC commands in a more uniform way.
Fixed the @ic/@ooc and page commands. Resolves issue 233. Resolves issue 234.
2012-05-17 19:42:37 +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
1a6ef5d983
Added more caching to channelhandler as well as players in order to cut back on unnecessary database calls.
2012-04-26 13:38:34 +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
bcf214ee0d
Changed so object.move_to() traverses exits by default - i.e. you will no longer end up INSIDE the exit object if you move_to the exit, but instead you will go to the exits destination. This should be the most common use. The use_destination keyword to object.move_to can be used to change this behaviour. Also @teleport (which uses move_to()) has gotten a new flag to allow for teleporting into exits if so specifically desired. Resolves issue 224.
2012-04-15 22:04:15 +02:00
Griatch
c8df141e89
Further cleanup of source; making class methods _private for clarity in the API.
2012-03-31 15:09:22 +02:00
Griatch
fc156b5a54
Continuing work on API, making local-use class properties _private to make things easier to explore.
2012-03-31 13:06:29 +02:00
Griatch
c0322c9eae
Cleaning some unnecessary whitespace, overall cleanup of various source codes.
2012-03-30 23:47:22 +02:00
Griatch
7a2cdd3842
Moved all command definitions of Typeclassed entities up one level, to Object, Player and Script respectively. The actual code is still on the models (ObjectDB, PlayerDB and ScriptDB), but one should not be able to use the methods without having to dig into the code as far. Also added extensive, up-to-date headers to the inheriting base objects in game/gamesrc.
2012-03-24 18:25:32 +01:00
Griatch
9660dd6656
Added caching to some more object properties.
2012-02-26 12:43:16 +01:00