intficpy.serializer module¶
-
class
intficpy.serializer.
LoadGame
(game, filename)¶ Bases:
object
-
add_thing_by_ix
(destination, ix)¶ Adds a Thing to a location (Room/Thing) by index. Makes a copy if a Thing of the specified index has already been placed. destination is a PhysicalEntity subclass instance
-
deserialize_attribute
(value)¶ Recursively deserialize an attribute Raises DeserializationError in the event of an attribute that cannot be deseriliazed
-
empty_contains
(obj)¶
-
is_valid
()¶ Try deserializing the data. On success, return True, and set load_file.validated_data On failure, delete the temporary objects, and return False
-
load
()¶
-
load_ifp_objects
()¶
-
load_locations
()¶
-
populate_contains
(root_obj, dict_in)¶ Uses a recursive depth first search to place all items in the correct location root_obj is the object to populate, dict_in is the dictionary to read from
-
allowed_keys
= ['ifp_objects', 'locations', 'active_sequence']¶
-
single_object_keys
= ['active_sequence']¶
-
-
class
intficpy.serializer.
SaveGame
(game, filename)¶ Bases:
object
-
create_save_file_path
(filename)¶
-
save_ifp_objects
()¶
-
save_locations
()¶
-
serialize_attribute
(value)¶ Recursively serialize an attribute Raises Unserializable in the event of unserializable attribute
-
serialize_contains
(obj)¶
-
serialize_ifp_object
(obj)¶
-