mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add ModInfo.id getter
Provide a simple unique identifier for mods consisting of the name followed by an underscore and then the version.
This commit is contained in:
1 parent
ddba58ca99
commit
867bb0c646
4 files changed
+13
-5
No files matched your search
@@ -16,6 +16,14 @@ import { integerModVersion, integerFactorioVersion, modVersionRegExp } from "./v
|
||||
* details of the invidiual fields sourced from info.json.
|
||||
*/
|
||||
export default class ModInfo {
|
||||
/**
|
||||
* String containing {mod.name}_{mod.version}, uniquely identifies this
|
||||
* mod.
|
||||
*/
|
||||
get id() {
|
||||
return `${this.name}_${this.version}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal name of this mod.
|
||||
* This is the name of the zip file as well as the name that appears in
|
||||
|
||||
Reference in new issue
Block a user