Changelog¶
v1.2.0¶
Changes¶
Added a
move_worldfunction that replaces the data in a target world with the data from a source world.
v1.1.0¶
Changes/Fixes¶
serialize_worldanddeserialize_worldnow use strings as the dictionary keys, to permit using JSON as an interchange format.
v1.0.0¶
Fixes¶
Fixed a critical bug that caused
process_pending_deletionsto never actually remove the entities from the deletion queue, thus making every subsequent call fail.Fixed a critical bug in
register_componentthat prevented actually implementingComponent.serializeandComponent.deserialize, because it never detected a class as overridingdeserialize.Fixed another critical bug in
register_componentthat prevented Component names being registered, and so made it impossible to deserialize a World.
Changes¶
World.__init__()now accepts an optionalnameargument.Named worlds can be looked up by name when an explicit reference to them is not available, using the new class method
World.get_by_name(name).The name is used in
__repr__.The
worldargument toprocess_pending_deletions,serialize_world, anddeserialize_worldis now optional with a default of the default_world.This is to bring those functions in-line with all the other ones, and allow full “
World()-less” usage ofsnecs.
Backwards-incompatible Changes¶
Renamed
snecs.typestosnecs.typedefsto avoid name clashes with the standard library moduletypes.Moved
EntityIDtosnecs.types.This prevents the obscure scenario where PyCharm suggests to a user to import the name from where all the
snecscode imports it from (which was, previously,_detail) and then screeches about accessing private submodules.Renamed
querytoQuery.querywas far too handy of a name for a variable forsnecsto force its users to use something else.