def portals(self):
"""Map the portal directions for an area to neighbors."""
portals = {}
- if re.match(r"""^area:-?\d+,-?\d+,-?\d+$""", self.key):
+ if re.match(r"""^area\.-?\d+,-?\d+,-?\d+$""", self.key):
coordinates = [(int(x))
- for x in self.key.split(":")[1].split(",")]
+ for x in self.key.split(".")[-1].split(",")]
offsets = dict(
(x,
self.universe.contents["mudpy.movement.%s" % x].get("vector")
for portal in self.get("gridlinks"):
adjacent = map(lambda c, o: c + o,
coordinates, offsets[portal])
- neighbor = "area:" + ",".join(
+ neighbor = "area." + ",".join(
[(str(x)) for x in adjacent]
)
if neighbor in self.universe.contents: