Skip to content

Commit 5fcd3d7

Browse files
authored
Merge pull request #1579 from heinezen/fix/modpack-load-v2
Modpack load fixes
2 parents 80fd9cc + 88180ad commit 5fcd3d7

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

doc/media/openage/modpack_definition_file.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,22 @@ The following parameters have to be specified.
3131

3232
`[info]` contains general information about the modpack.
3333

34-
| Parameter | Data Type | Optional | Description |
35-
| ------------------ | ------------- | -------- | ------------------------------------------------------------------------ |
36-
| `packagename` | String | No | Name of the modpack. |
37-
| `version` | String | No | Internal version number. Must have [semver](https://semver.org/) format. |
38-
| `versionstr` | String | Yes | Human-readable version string. |
39-
| `repo` | String | Yes | Name of the repo where the package is hosted. |
40-
| `alias` | String | Yes | Alias of the modpack. Aliases can be used for replacing other modpacks. |
41-
| `title` | String | Yes | Title used in UI. |
42-
| `description` | String | Yes | Path to a file with a short description (max 500 chars). |
43-
| `long_description` | String | Yes | Path to a file with a detailed description. |
44-
| `url` | String | Yes | Link to the modpack's website. |
45-
| `license` | Array[String] | Yes | License(s) of the modpack. |
46-
34+
| Parameter | Data Type | Optional | Description |
35+
| ------------------ | ------------- | -------- | ----------------------------------------------------------------------- |
36+
| `packagename` | String | No | Name of the modpack. |
37+
| `version`\* | String | No | The modpack's internal version number. Must use [semver] format. |
38+
| `versionstr`\* | String | Yes | Human-readable version string. |
39+
| `repo` | String | Yes | Name of the repo where the package is hosted. |
40+
| `alias` | String | Yes | Alias of the modpack. Aliases can be used for replacing other modpacks. |
41+
| `title` | String | Yes | Title used in UI. |
42+
| `description` | String | Yes | Path to a file with a short description (max 500 chars). |
43+
| `long_description` | String | Yes | Path to a file with a detailed description. |
44+
| `url` | String | Yes | Link to the modpack's website. |
45+
| `license` | Array[String] | Yes | License(s) of the modpack. |
46+
47+
[semver]: https://semver.org/
48+
49+
\* `version` is used by the engine to determine the most recent version of a modpack. Therefore, it should be bumped when something in the modpack changes (e.g. whenever a new version gets published). `versionstr` is what is displayed to the user and can contain any string, so it can be used to represent any sensible version format.
4750

4851
## [assets] Section
4952

libopenage/gamestate/game.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ void Game::load_data(const std::shared_ptr<assets::ModManager> &mod_manager) {
6767
recursive = true;
6868
if (parts.size() == 1) {
6969
// include = "**"
70-
search = include.substr(0, include.size() - 2);
70+
// start in root directory
71+
search = "";
7172
}
7273
else {
7374
// include = "path/to/somewhere/**"
74-
// remove the slash '/' too
75+
// remove the wildcard '**' and the slash '/'
7576
search = include.substr(0, include.size() - 3);
7677
}
7778
}

openage/convert/tool/api_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main(args, error):
3333
del error # unused
3434

3535
path = Union().root
36-
path.mount(Directory(args.dir))
36+
path.mount(Directory(args.dir).root)
3737

3838
export_api(path)
3939

0 commit comments

Comments
 (0)