+# A forwarder is a location that you can't actually stop in - when you go there
+# it ships some message (which is the point) then shifts you to a nexr location.
+# A forwarder has a zero-length array of notion verbs in its travel section.
+#
+# Here is an example forwarder declaration:
+#
+# - LOC_GRUESOME:
+# description:
+# long: 'There is now one more gruesome aspect to the spectacular vista.'
+# short: !!null
+# maptag: !!null
+# conditions: {DEEP: true}
+# travel: [
+# {verbs: [], action: [goto, LOC_NOWHERE]},
+# ]
+
+def is_forwarder(loc):
+ "Is a location a forwarder?"
+ travel = location_lookup[loc]['travel']
+ return len(travel) == 1 and len(travel[0]['verbs']) == 0
+
+def forward(loc):
+ "Chase a location through forwarding links."
+ while is_forwarder(loc):
+ loc = location_lookup[loc]["travel"][0]["action"][1]
+ return loc
+