Commit graph

222 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
2782e03478 Made unittest suite finish without errors using new proxy system. 2015-01-03 15:08:06 +01:00
Griatch
71b6600d87 Changed .typename to properly handle proxy classes. 2015-01-02 21:41:29 +01:00
Griatch
1130dc5757 Started to go through the unittest errors, fixing player creation. 2015-01-02 19:01:09 +01:00
Griatch
3d557f6bf9 Can log in, still errors all over the place due to missing .typeclass/.dbobj 2014-12-28 20:00:31 +01:00
Griatch
11449f3d62 Fixed some errors in channel loading. 2014-12-25 18:58:11 +01:00
Griatch
9af9f94fa0 Moved Players over to the new proxy system, made the start-hook called by the save-signal system into at_first_save() 2014-12-25 14:43:43 +01:00
Griatch
db512cbbf5 Moved object methods up from ObjectDB and mainly onto the typeclass. In the process of converting players in the same way. 2014-12-24 01:24:26 +01:00
Griatch
302f5bdd81 Refactored the typeclass base, moved Attributes/Tags into separate modules and the django-proxy patch to its on module too. Lots of other cleanups. 2014-12-23 22:25:39 +01:00
Griatch
24764743ff Made a new version of create_object function, and made Objects creatable using o=Object(). 2014-12-23 21:33:03 +01:00
Griatch
969b947ba0 One needs to turn off all imports of typeclasses in __init__ or django will create migrations for them. This might be interesting for the future but not for development. 2014-12-23 11:53:32 +01:00
Griatch
9321573c23 Fixed a typeclass call. 2014-12-22 22:14:23 +01:00
Griatch
e214c036c8 Resolved the setting of __dbclass__ which happened in the wrong order. 2014-12-22 21:27:32 +01:00
Griatch
c73e013459 Fixed bug in taghandler that stopped tags.get from working correctly with unset categories. 2014-12-22 14:34:02 +01:00
Griatch
14086e3b3d General database operations works with reworked, proxy-based typeclass system. 2014-12-22 14:14:21 +01:00
Griatch
9ee6b718da Some issues with unique restraint when re-saving objects. 2014-12-21 15:02:34 +01:00
Griatch
4e0b5be962 Fixed creation. Time to start cleaning the .dbobj hierarchy. 2014-12-20 19:29:38 +01:00
Griatch
e28d544fb0 The manager wrapper has trouble finding the path of the current class. 2014-12-20 19:19:48 +01:00
Griatch
043ebf7213 Fixed metaclass to handle proxy correctly. Some issues with getting path properties set correctly. 2014-12-20 19:04:49 +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
08d0442f9c Strange issue with __init__, proxy implementation not working at the moment. 2014-12-19 16:56:28 +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
5d08d3b3fb Added clear() method to nattributehandler. Resolves #542. 2014-08-05 09:05:44 +02:00
Griatch
3014909feb Fixed attribute bug in typeclass swap. 2014-08-04 12:15:10 +02:00
Griatch
a0189a91ad Fixed clearing in Tags vith tags.clear() 2014-07-08 09:22:49 +02:00
Griatch
50e7b37191 Addded sorted returns of Tags, as per #534. 2014-07-07 22:47:26 +02:00
Griatch
9dfe620b2b Started moving tag/attribute handlers to TypeObjectManager as per #529 2014-07-06 16:03:27 +02:00
Griatch
e6950aadf2 Changed how lazy-loading of handlers work, using a werkzeug recipe. Much more efficient now. 2014-07-06 13:10:03 +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
d05c92792c Some cleanup and making unittests succeed again 2014-07-01 01:10:44 +02:00
Griatch
05d21ef4f7 Updated create.create_object to be faster. Made AttributeHandler.add() handle bulk-adding of Attributes and with a slightly more efficient way to create new Attributes. 2014-07-01 00:46:20 +02:00
Griatch
cda13989f6 Run Migrations! Made Tags unique based on the combination of their db_key, db_category AND their db_tagtype fields. 2014-06-30 20:14:58 +02:00
Kelketek Rritaa
54bb593f5e Prevent editing of attributes which are not Python literals through the admin interface. 2014-06-29 09:14:01 -05:00
Kelketek Rritaa
a1b596a847 Fixed an issue where saving an attribute/tag would make duplicates. 2014-06-28 18:01:00 -05:00
Griatch
c60a5fdea1 Fixed and refactored OOB system and tested with new websocket client 2014-06-28 18:10:20 +02:00
Griatch
53b204bb76 Fixed code to pass unittests. Change script's is_valid method to correctly catch if it is checked on an object which is already deleted, as per #509. 2014-06-15 13:19:38 +02:00
Griatch
3a6a8d5c48 Made objects clear more handlers on deletion, also scramble some methods and all database access wrappers to avoid an object memory instance being accessed after it has been deleted. See #509. 2014-06-15 12:27:48 +02:00
Griatch
57144b2c21 Made objects auto-unsubscribe from tickerhandler when deleted (resolves #515). Fixed a bug that made typeclass loading mechanism not report errors as verbosely as it could. 2014-06-14 19:31:19 +02:00
Griatch
ce2d11ad12 Fixed bug in taghandler. Resolves #516. 2014-06-14 18:21:40 +02:00
Griatch
f49f33d40d Made more work around memory profiling, added a small Script and display program for logging memory usage 2014-05-18 10:54:04 +02:00
Griatch
58af67bdf2 Fixed flush protection for instances, memory is successfully made available on an idmapper flush now. 2014-05-17 14:38:43 +02:00
Griatch
5e4af3f851 Implemented and tested set_recache_protection() on all idmapped objects, to avoid them getting recached. Added successfully to nattribute handler. 2014-05-15 10:05:41 +02:00
Griatch
a617924fb0 Made flush_cache work correctly on idmapper; added _idmapper_cache_flush_safe variable for 'securing' objects from cache cleanups. Nothing using this system yet. 2014-05-15 09:51:24 +02:00
Griatch
cfd2f111f1 Updating to make unittests work 2014-05-11 19:41:37 +02:00
Griatch
9bfb829274 Implemented WeakSharedMemoryModel for Attributes. 2014-05-11 15:23:11 +02:00
Griatch
f67effa0f9 Made Attributes into a normal Model instead of a SharedMemoryModel (like Tags). Removed artificial exclusivity of strvalue and value on Attributes. 2014-05-11 08:57:36 +02:00
Griatch
e11b242365 Continued with weakref and lazyloading fixes. 2014-05-11 01:05:59 +02:00
Griatch
0030530021 Added weak reverse references from all handlers. 2014-05-10 17:12:49 +02:00