Changelog¶
v1.2.0¶
Changes¶
Added a
move_world
function that replaces the data in a target world with the data from a source world.
v1.1.0¶
Changes/Fixes¶
serialize_world
anddeserialize_world
now 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_deletions
to never actually remove the entities from the deletion queue, thus making every subsequent call fail.Fixed a critical bug in
register_component
that prevented actually implementingComponent.serialize
andComponent.deserialize
, because it never detected a class as overridingdeserialize
.Fixed another critical bug in
register_component
that prevented Component names being registered, and so made it impossible to deserialize a World.
Changes¶
World.__init__()
now accepts an optionalname
argument.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
world
argument toprocess_pending_deletions
,serialize_world
, anddeserialize_world
is 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.types
tosnecs.typedefs
to avoid name clashes with the standard library moduletypes
.Moved
EntityID
tosnecs.types
.This prevents the obscure scenario where PyCharm suggests to a user to import the name from where all the
snecs
code imports it from (which was, previously,_detail
) and then screeches about accessing private submodules.Renamed
query
toQuery
.query
was far too handy of a name for a variable forsnecs
to force its users to use something else.