pytower.object
- class pytower.object.TowerObject(item=None, properties=None, nocopy=False)[source]
Represents an object appearing in the Suitebro file. This includes all the sections of the object.
- __init__(item=None, properties=None, nocopy=False)[source]
Initializes TowerObject instance taking in uesave json data
To ensure uniqueness, this assigns a new GUID to this object
- add_connection(con)[source]
Adds a connection to this object
- Parameters:
con (
ItemConnectionObject) – The connection to add to this object
- copy()[source]
Creates a new TowerObject with the same item and properties as this one.
- Return type:
- Returns:
Copy of this TowerObject instance
- get_custom_name()[source]
Deprecated since version 0.3.0: Use TowerObject.custom_name instead
- Return type:
- get_property(path)[source]
Gets property value
- set_connections(cons)[source]
Set all the connections attached to this object. Useful when resetting/overriding connections
- Parameters:
cons (
list[ItemConnectionObject]) – List of connections to attach onto this object
- set_group_id(group_id)[source]
Deprecated since version 0.3.0: Assign to TowerObject.group_id instead
- Parameters:
group_id (int)