gatelogue_aggregator.types.node.town.Town
- class gatelogue_aggregator.types.node.town.Town(coordinates: ~gatelogue_types.Sourced[tuple[float, float]] | None = None, world: ~gatelogue_types.Sourced[~gatelogue_types.World] | None = None, proximity: dict[~gatelogue_types.ID, ~gatelogue_types.Sourced[~gatelogue_types.Proximity]] = <factory>, shared_facility: list[~gatelogue_types.Sourced[~gatelogue_types.ID]] = <factory>, *, i: ~gatelogue_types.ID = None, source: set[str] = <factory>, name: str, rank: ~gatelogue_types.Sourced[~gatelogue_types.Rank], mayor: ~gatelogue_types.Sourced[str], deputy_mayor: ~gatelogue_types.Sourced[str | None])
Bases:
Town,LocatedNode- __init__()
Methods
__init__()connect(src, node[, value, source])connect_one(src, node[, value, source])disconnect(src, node)equivalent(src, other)export(src)get_all(src, ty[, conn_ty])get_all_id(src, ty[, conn_ty])get_edge(src, node[, ty])get_edges(src, node[, ty])get_one(src, ty[, conn_ty])get_one_id(src, ty[, conn_ty])merge(src, other)merge_attrs(src, other)merge_if_equivalent(src, other)merge_key(src)merge_lists(src, self, other)new(src, *, name, rank, mayor, deputy_mayor)print_report(src, level, msg)process_code(s)ref(src)report(src)str_src(src)Attributes
Coordinates of the object
Deputy Mayor of the town
The ID of the node
Mayor of the town
Name of the town
References all objects that are near (within walking distance of) this object.
Rank of the town
References all objects that this object shares the same facility with (same building, station, hub etc)
All sources that prove the node's existence
Whether the object is in the New or Old world
- acceptable_list_node_types()
- acceptable_single_node_types()
- equivalent(src: TownSource, other: Self) bool
- export(src: TownSource) Town
- i: ID
The ID of the node
- merge_attrs(src: TownSource, other: Self)
- merge_key(src: TownSource) str
- classmethod new(src: TownSource, *, name: str, rank: Rank, mayor: str, deputy_mayor: str | None, world: World | None = None, coordinates: tuple[float, float] | None = None)
- static process_code(s: T) T
- proximity: dict[ID, Sourced[Proximity]]
References all objects that are near (within walking distance of) this object. It is represented as an inner mapping of object IDs to proximity data (
Proximity). For example,{1234: <proximity>}means that there is an object with ID1234near this object, and<proximity>is aProximityobject.
- ref(src: TownSource) NodeRef[Self]
- sanitise_strings()
References all objects that this object shares the same facility with (same building, station, hub etc)
- str_src(src: TownSource) str