summaryrefslogtreecommitdiff
path: root/lib/Properties.hs
diff options
context:
space:
mode:
authorstuebinm2021-12-29 20:56:29 +0100
committerstuebinm2021-12-29 20:57:17 +0100
commit09f6bbdad52e58a3d128c9806078d359832f07e1 (patch)
treec23f744d230140815f6bdfd8ba545d664b641b65 /lib/Properties.hs
parentfb877d6dc1ad3891ff1190de4da5b4194ea04b56 (diff)
apparently people are using inter-assembly links internally??
lol
Diffstat (limited to 'lib/Properties.hs')
-rw-r--r--lib/Properties.hs17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index b586c7e..35c4ce4 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -428,8 +428,21 @@ checkTileThing removeExits p@(Property name _value) = case name of
forbidEmptyLayer
unwrapURI (Proxy @"map") p
(\link -> do
- dependsOn (MapLink link)
- setProperty "exitUrl" link
+ assemblyslug <- lintConfig configAssemblyTag
+ case T.stripPrefix ("/@/rc3_21/"<>assemblyslug<>"/") link of
+ Nothing -> do
+ dependsOn (MapLink link)
+ setProperty "exitUrl" link
+ Just path -> case parsePath path of
+ OkRelPath (Path _ p frag) -> do
+ up <- askFileDepth
+ dependsOn (LocalMap (Path up p frag))
+ setProperty "exitUrl" path
+ warn "You should use relative links to your own assembly instead \
+ \of world://-style links (I've tried to adjust them \
+ \automatically for now)."
+ _ -> complain "There's a path I don't understand here. Perhaps try \
+ \asking a human?"
)
$ \path ->
let ext = getExtension path in