mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Refactor controller mod storage into ModStore
Structure the storage of mods on the controller into into a reusable component in preparation for the host using the same kind of mod storage to retrieve and cache the mods it needs to run mod packs on instances.
This commit is contained in:
1 parent
448cfbbb51
commit
853866492b
9 files changed
+174
-91
No files matched your search
@@ -90,7 +90,17 @@ export default class ModInfo {
|
||||
* Expected name of zip file containing this mod.
|
||||
*/
|
||||
get filename() {
|
||||
return `${this.name}_${this.version}.zip`;
|
||||
return ModInfo.filename(this.name, this.version);
|
||||
}
|
||||
|
||||
/**
|
||||
* Expected name of zip file containing mod with given name and version.
|
||||
* @param name - Mod's name
|
||||
* @param version - Mod's version
|
||||
* @returns string containing {name}_{version}.zip
|
||||
*/
|
||||
static filename(name: string, version: string) {
|
||||
return `${name}_${version}.zip`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user