Kelketek
adb3965888
Follow-up on that last one-- missed one of the Abstract models.
2013-02-03 09:54:36 -06:00
Kelketek
2e08517ec5
Changed lock storage from character-limit field to unlimited TextField.
2013-02-03 08:54:57 -06: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
ea545d7ff3
Added the ability to deactivate local caching, by use of the settings.GAME_CACHE_TYPE variable. A temporary solution for working with multiple processes. Will also be useful for debugging and profiling.
2013-01-09 19:43:46 +01:00
Griatch
15feb915e6
Fixing a missing report.
2013-01-08 09:45:59 +01:00
Griatch
45bf38679f
Moving a check for the connect channel, probably resolving a weird django error appearing in postgreSQL. Related to Issue 341.
2013-01-08 09:44:13 +01:00
Griatch
c615693a2a
Added a give command to the default command set. As part of this also fixed some bugs in how object typeclasses were compared.
2012-12-08 17:11:22 +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
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
28c625c12c
Re-activated connect-channel again, called from hooks. Fixed some bugs and minor things to give more control over how messages sent to channels are handled.
2012-11-13 21:24:05 +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
f3b50a20a8
OBS:Run migrations! Changed the comms.Msg.db_title field to db_header to better reflect its use.
2012-11-04 15:37:06 +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
52af816977
Added hooks at_access_success and at_access_failure to allow for custom messaging for certain lock errors. Resolves Issue 311.
2012-10-28 14:07:18 +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
87bfb97853
Rewrote the fuzzy-matching routine to correctly handle fuzzy, global searches on keys and aliases.
2012-10-23 20:29:03 +02:00
lagos
904884d4ed
Fixes multiple issues with searching.
...
* dbref now respect candidate lists. Previously a dbref match would ignore
candidates which permitted you to drop any object from anywhere by specifying
a dbref.
* If candidates is [], we now return right away. Without this, a candidate list
of [] would not filter out anything because short circuiting like:
cand_restriction = candidates and Q(pk__in=candidates_id) or Q()
will use Q() (what we really want is nothing to match). This would permit you
to drop any object you can refer by nick or name if your inventory was empty.
* Minor fix of 'ret_index' for typo'ed 'reg_index'.
2012-10-22 18:03:10 -07:00
Griatch
21408c56cf
Made the docstrings for objects' basetype_setup() more informative. Resolves Issue 302.
2012-10-20 09:33:40 +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
4830560ac5
Added better error checking for when trying to set an attribute on an object stored in an attribute but which after retrieved and cached was deleted. The fix doesn't fully fix the problem of stale caching but does give more information. Related to Issue 295.
...
Also fixed a curiously phrased import.
2012-10-14 19:29:56 +02:00
Griatch
c982cdbe3d
Fixed a traceback when searching with the *-syntax and not finding a match. Resolves Issue 297.
2012-10-14 17:27:57 +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
446dfe9509
Properly set the auto_help flag to False on Exit commands, so they don't show up in the help listings.
2012-10-14 16:37:36 +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
31daf5b013
Added an extra check to make sure the 'candidates' keyword to ev.search_object always contain proper dbobjs and not typeclasses. Resolves Issue 280.
2012-10-14 13:25:25 +02:00
Griatch
99c2dda8dc
Changed the way ExitCommands work by adding at_traverse() as a new hook to do the actual moving. This should allow for more flexibility in overloading new Exit typeclasses without having to re-implement the Exit Cmdset functionality more than necessary. By default the same error hooks are called wether the failure is due to a lock or some other error, this is (now) easy to modify as needed.
2012-10-14 13:11:13 +02:00
Griatch
532cbc5fb6
Changed initial look command (at login) to be called from at_post_login hook instead of from the default connect command, supposedly making it easier for those only wanting to change this one line rather than having to re-target connect. The player.at_post_login now also calls look in case no character is defined, for the cases when logging in without having a character selected. Resolves Issue 277.
2012-10-14 12:28:01 +02:00
Griatch
33c15e99d2
Added a check to allow obj.search to also search for 0.
2012-09-29 16:24:47 +02:00
Griatch
4944a589cc
Cleaned up and fixed problems in searching by attribute-value. Resolves Issue 267.
2012-09-29 00:09:55 +02:00
Griatch
9a3562148a
Reverting indexing of objattribute.db_value; it is a highly db-incompatible change, and also lacking the possibility to create unique indices with unclear results.
2012-09-28 09:08:43 +02:00
Griatch
b0ac916b9a
Obs-run migrations! Added an index to the ObjAttribute's values.
2012-09-28 00:14:29 +02:00
Griatch
c819cdc2a6
Added a change to get_objs_with_attr_values that means simple python lookup values will be searched for directly in the database by pickling the input argument in the form used by Attributes. This should lead to a more efficient attrvalue lookup for larger databases (as long as value is a string, int or float and not a compound object, at which the lookup is continuously done in two steps filtering through the Attribute value mechanism.
2012-09-28 00:02:31 +02:00
Griatch
56c28f7e44
Fixed a strange typo in object-manager's get_attribute_with_value(). Also implemented a few further suggestions and fixes to object search.
2012-09-27 22:18:46 +02:00
Griatch
59ccd3eb38
Fixed a bug in exact search pattern matching.
2012-09-27 21:29:01 +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
160d4a2807
Minor typo cleanups.
2012-09-17 22:16:18 +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
3c96dc9cc9
Fixed a too-inclusive .hgignore file as well as some other fixes.
2012-09-07 19:31:51 +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