Griatch
2b3a32e447
Reshuffling the Evennia package into the new template paradigm.
2015-01-06 14:53:45 +01:00
Griatch
0b5e2b94ff
Starting the move of typeclass methods off *DB models and onto the typeclasses.
2014-12-22 22:46:58 +01:00
Griatch
14086e3b3d
General database operations works with reworked, proxy-based typeclass system.
2014-12-22 14:14:21 +01:00
Griatch
2ee9e62336
Fixed correct and separate handling of database model bases as compared to its proxy classes using different managers for each type (e.g. ObjectDB.objects.all() will return all ObjectDB instances(including proxy instances) whereas Object.objects.all() will only return Objects)
2014-12-22 08:54:53 +01:00
Griatch
554d1b9834
Fixed the *_family manager methods to correctly return typeclasses subclassed at any depth.
2014-12-21 23:08:20 +01:00
Griatch
32e44dceab
Made the proxy typeclass system work in principle, using a wrapper of the __new__ method for the class.
2014-12-20 18:30:39 +01:00
Griatch
8314d8ba5e
Now solving issues with faulty imports. Still nothing functional.
2014-12-20 17:03:34 +01:00
Griatch
3adeade69a
Some errors in the proxy setting.
2014-12-19 16:41:20 +01:00
Griatch
236c0d17d3
First non-tested version of moving typeclasses to proxy models.
2014-12-19 16:29:41 +01:00
Griatch
5b42b31240
API change. Removed managers for Attributes and Tags - these are instead incoorporated into the TypedObjectManager which all Typeclassed object handlers inherit from. This concludes the refactor started in #529 . This means that access to Attributes/Permissions/Aliases and Tags/nicks are done directly through e.g. ObjectDB.objects.get_by_tag() (or ev.managers.objects.get_by_tag) rather than using Tag.get_obj_with_tag and specifying the model type manually. The create_tag() method was also moved into the TypedObjectManager as part of removing the Tagmanager. As part of this change, Tag and Attribute was also removed from the ev interface.
2014-10-25 22:40:38 +02:00
Griatch
9dfe620b2b
Started moving tag/attribute handlers to TypeObjectManager as per #529
2014-07-06 16:03:27 +02:00
Griatch
680e603c4d
Changed how Tags and Attribues cache and track which objects they use, as suggested in #529 .
2014-07-05 20:32:08 +02:00
Griatch
93d9545819
Added include_children and include_parents to the typeclass_search manager method, for searching typeclass parent- and child-hierarchies. Resolves #405 .
2014-04-21 15:18:13 +02:00
Griatch
85225b3084
Fixed ev.search_object_tag(), which was a bit too greedy before.
2014-02-16 22:22:18 +01:00
Griatch
b1e08c7da6
Continuing to clean up and fix bugs around Attribute/Tag
2014-02-16 22:09:35 +01:00
Griatch
bad24513e0
Fixed and corrected various bugs resulting from the change to Attributes/Tags).
2014-02-16 21:27:42 +01:00
Griatch
17123bf7ed
First rework of tag category handling by new fields db_model and db_tagtype.
2014-02-16 13:19:31 +01:00
Griatch
88d103b55f
Added @tag command for easily manipulating tags. Fixed some bugs at the same time.
2013-12-02 15:40:02 +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
Kelketek
851e6d00cc
Turned comms into typeclassed objects.
2013-09-28 22:23:30 -05:00
Griatch
06e858b3f6
Moved permissions into a the tag system as a separate handler. Permissions still don't work quite right yet.
2013-08-24 23:57:44 +02:00
Griatch
2f5c895f76
Removed LiteAttributes, made Nicks use Attributes. Added category and strvalue fields to Attribute. Made Attributes accessible through an AttributeHandler, like most other advanced properties.
2013-08-24 21:23:43 +02:00
Kelketek
e05bfcad85
Fixes to Tag Handler and Manager.
2013-08-04 12:47:00 -05:00
Kelketek
b0bf60cda4
Merge from DBenoy's branch.
2013-07-27 19:05:05 -05:00
Daniel Benoy
5a5de51a5c
Reimplemented get_dbref_range
...
It always returned every object in the database
2013-07-27 04:25:01 -04:00
Griatch
6bc16e46cc
Made aliases work with the new handler. The location.contents updated is not working yet - this causes locational information to not be available until objects and manually initialized (e.g. by calling examine #dbref)
2013-07-12 20:21:52 +02:00
Griatch
0061f884ae
Implemented NickHandler, AliasHandler and TagHandler in the typeclass to replace the old handlers. Some errors during login.
2013-07-12 14:44:49 +02:00
Griatch
e178963941
First implementation of new Tags and LiteAttribute models to replace Aliases and Nicks while offering more flexibility.
2013-07-12 11:12:21 +02:00
Griatch
a1d818f8aa
First test with moving Attributes to m2m field. Not working yet.
2013-07-08 18:13:21 +02:00
Griatch
80a6745a1e
Made Attribute value queries also work with database objects by overloading the Attribute manager methods in question. Added procpool support for the new serializer functions and cleaned up some things.
2013-04-14 16:36:44 +02:00
Griatch
86a44ab84d
Made sure the cmd-classes for 'home' and '@home' were differently named, which messed up their appearance in ev. Resolves Issue 285.
2012-10-14 16:03:02 +02:00
Griatch
5b5328e6ca
Changed default dbref search mechanic to require #N format and thus allow searching for objects named as integers (so "@create/drop 2" followed by 'look 2' will now work as expected instead of looking at the object with dbref=2). Doing "look #2 " will now look at the object with dbref 2 (Limbo). Resolves Issue 284.
2012-10-14 15:45:21 +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
5117bd2a0a
Minor fixes and reducing some sql calls in various managers.
2012-08-22 16:15:52 +02:00
Griatch
4edde61be4
Minor cleanups and a fix to manage.py that lead to a traceback if running without arguments.
2012-08-22 13:28:38 +02:00
Griatch
8a44daef7e
Further changes to allow dbrefs to be 0.
2012-08-18 23:35:11 +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
c0322c9eae
Cleaning some unnecessary whitespace, overall cleanup of various source codes.
2012-03-30 23:47:22 +02:00
Griatch
d4c97d7df8
Fixed a caching issue with TypedAttributes.
2012-03-29 20:30:35 +02:00
Griatch
da51cb063f
ev-API cleanups. ev can now be imported also from a non-django initiated python interpreter (it initiates itself). Gave some more info text and made sure wrapped db_ methods correctly forward their doc strings for introspection.
2012-03-27 09:59:11 +02:00
Griatch
42254fa3c4
Fixed an issue with creating new chars following the latest optimizations.
2012-02-26 19:04:57 +01:00
Griatch
018a98b92c
Optimized typeclass conversion in typeclass manager.
2012-02-26 16:04:19 +01:00
Griatch
23cd9e31b1
Restructured the way typeclasses are loaded. This makes it possible to run at_init() hooks at initiation also for objects without any custom cases for character/players. at_init() hooks are called only when an object is initiated. This means that a room's at_init() hook is only called when someone looks or enters it or a script operates on it, for example, rest of the time these objects are dormant, most efficiently.
2011-10-01 22:00:22 +02:00
Griatch
7f7016ad7d
Run Migrate. Implemented @search functionality with limits as per MUX (as part of the @find command). Added some more channel-related commands and changed locks for channels to have a "control" lock type rather than "admin". The migration converts this in existing channels..
2011-04-20 22:40:27 +00:00
Griatch
6c53ec2bdb
OBS: Run migrate! Made exit's destination into a database field for performance. Fixed a too greedy @reload that caused ContentTypes to loose information. Resolves issue 157.
...
Migrate with: "python manage.py migrate"
2011-04-08 23:10:04 +00:00
Griatch
3f703efc2d
Made changes to idmapper that might help alleviate issue101 (more people need to run it to make sure). Moved around default command modules to be more logically named and distributed.
2010-10-31 08:10:02 +00:00
Griatch
19dd476115
Changed object and alias search methods to be more effective. Made aliases a separate model to avoid overhead with large searches. The change of aliases meand you need to resync your database.
2010-10-30 18:42:37 +00:00
Griatch
8bedd4d793
Fixed and debugged object_search to more generically search for any attribute name except 'key' (issue110). Also included alias-search as a last-resort if normal searches fail. This is now also working for global searches (issue106).
2010-09-12 15:07:12 +00:00
Griatch
f83c2bddf8
Trunk: Merged the Devel-branch (branches/griatch) into /trunk. This constitutes a major refactoring of Evennia. Development will now continue in trunk. See the wiki and the past posts to the mailing list for info. /Griatch
2010-08-29 18:46:58 +00:00