Skip to content

Commit

Permalink
Merge pull request #1579 from heinezen/fix/modpack-load-v2
Browse files Browse the repository at this point in the history
Modpack load fixes
  • Loading branch information
TheJJ committed Oct 17, 2023
2 parents 80fd9cc + 88180ad commit 5fcd3d7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
29 changes: 16 additions & 13 deletions doc/media/openage/modpack_definition_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,22 @@ The following parameters have to be specified.

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

| Parameter | Data Type | Optional | Description |
| ------------------ | ------------- | -------- | ------------------------------------------------------------------------ |
| `packagename` | String | No | Name of the modpack. |
| `version` | String | No | Internal version number. Must have [semver](https://semver.org/) format. |
| `versionstr` | String | Yes | Human-readable version string. |
| `repo` | String | Yes | Name of the repo where the package is hosted. |
| `alias` | String | Yes | Alias of the modpack. Aliases can be used for replacing other modpacks. |
| `title` | String | Yes | Title used in UI. |
| `description` | String | Yes | Path to a file with a short description (max 500 chars). |
| `long_description` | String | Yes | Path to a file with a detailed description. |
| `url` | String | Yes | Link to the modpack's website. |
| `license` | Array[String] | Yes | License(s) of the modpack. |

| Parameter | Data Type | Optional | Description |
| ------------------ | ------------- | -------- | ----------------------------------------------------------------------- |
| `packagename` | String | No | Name of the modpack. |
| `version`\* | String | No | The modpack's internal version number. Must use [semver] format. |
| `versionstr`\* | String | Yes | Human-readable version string. |
| `repo` | String | Yes | Name of the repo where the package is hosted. |
| `alias` | String | Yes | Alias of the modpack. Aliases can be used for replacing other modpacks. |
| `title` | String | Yes | Title used in UI. |
| `description` | String | Yes | Path to a file with a short description (max 500 chars). |
| `long_description` | String | Yes | Path to a file with a detailed description. |
| `url` | String | Yes | Link to the modpack's website. |
| `license` | Array[String] | Yes | License(s) of the modpack. |

[semver]: https://semver.org/

\* `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.

## [assets] Section

Expand Down
5 changes: 3 additions & 2 deletions libopenage/gamestate/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ void Game::load_data(const std::shared_ptr<assets::ModManager> &mod_manager) {
recursive = true;
if (parts.size() == 1) {
// include = "**"
search = include.substr(0, include.size() - 2);
// start in root directory
search = "";
}
else {
// include = "path/to/somewhere/**"
// remove the slash '/' too
// remove the wildcard '**' and the slash '/'
search = include.substr(0, include.size() - 3);
}
}
Expand Down
2 changes: 1 addition & 1 deletion openage/convert/tool/api_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def main(args, error):
del error # unused

path = Union().root
path.mount(Directory(args.dir))
path.mount(Directory(args.dir).root)

export_api(path)

Expand Down

0 comments on commit 5fcd3d7

Please sign in to comment.