tsunamods-codes/7th-Heaven

[Feature Request] Allow mods to setup links to other folders within the games path

开放

#57 创建于 2022年1月27日

 (0 条评论) (0 个反应) (0 位负责人)C# (45 个派生)auto 404
enhancementhelp wantedpriority/P2

仓库指标

星标
 (269 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

So it has been requested that we stop duplicating files inside mods (a reasonable request) to do this we need to look at setting up a link system in the mod.xml so a mod can register links.

Thinking something like

<Links>
    <Link src="$(GamePath)/somefile.jpg" des="${modPath}/somefile.jpg" />
</Link>

For security both src and destination will be barred from containing, ../, ./, : or starting with / this prevents people from making links outside of the game directory, it will also block links to .exe, .bat, .cmd, .msi or any other windows executable format (this should outright prevent the mods being loaded and tell the user why)

Need to make sure when parsing mod.xml we ignore links for IROs, as IROs are never extracted to the file system for use links won't work they are a file system, system, but maybe a system for the file loader to know that there is a link instead (more research required)

贡献者指南