From 09f6bbdad52e58a3d128c9806078d359832f07e1 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 29 Dec 2021 20:56:29 +0100 Subject: apparently people are using inter-assembly links internally?? lol --- lib/Properties.hs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib/Properties.hs') 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 -- cgit v1.2.3