diff options
-rw-r--r-- | lib/Properties.hs | 17 |
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 |