From 87ad4d8e7f25210cd28d9f2b372aa00aa3dab929 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 17 Apr 2018 14:54:50 +0100 Subject: Add online content repository Replaces mods and texture pack tabs with a single content tab --- doc/lua_api.txt | 11 ++++--- doc/menu_lua_api.txt | 85 ++++++++++++++++++++++++++++++++------------------- doc/texture_packs.txt | 11 ++++++- 3 files changed, 71 insertions(+), 36 deletions(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 0c7d44adf..70eb48c12 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -55,10 +55,10 @@ Where `gameid` is unique to each game. The game directory can contain the following files: -* `game.conf`, which contains: - * `name = ` e.g. `name = Minetest` - * Optionally, game.conf can also contain - `disallowed_mapgens = ` +* `game.conf`, with the following keys: + * `name` - required, human readable name e.g. `name = Minetest` + * `description` - Short description to be shown in the content tab + * `disallowed_mapgens = ` e.g. `disallowed_mapgens = v5,v6,flat` These mapgens are removed from the list of mapgens for the game. * `minetest.conf`: @@ -2544,6 +2544,9 @@ Helper functions * returns time with microsecond precision. May not return wall time. * `table.copy(table)`: returns a table * returns a deep copy of `table` +* `table.insert_all(table, other_table)`: + * Appends all values in `other_table` to `table` - uses `#table + 1` to + find new indices. * `minetest.pointed_thing_to_face_pos(placer, pointed_thing)`: returns a position. * returns the exact position on the surface of a pointed node diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt index 49c6fbef0..6b81e6bf5 100644 --- a/doc/menu_lua_api.txt +++ b/doc/menu_lua_api.txt @@ -33,14 +33,6 @@ core.close() Filesystem: core.get_builtin_path() ^ returns path to builtin root -core.get_modpath() (possible in async calls) -^ returns path to global modpath -core.get_clientmodpath() (possible in async calls) -^ returns path to global client-side modpath -core.get_gamepath() (possible in async calls) -^ returns path to global gamepath -core.get_texturepath() (possible in async calls) -^ returns path to default textures core.create_dir(absolute_path) (possible in async calls) ^ absolute_path to directory to create (needs to be absolute) ^ returns true/false @@ -71,6 +63,8 @@ core.get_video_drivers() ^ returns list of available video drivers' settings name and 'friendly' display name ^ e.g. { {name="opengl", friendly_name="OpenGL"}, {name="software", friendly_name="Software Renderer"} } ^ first element of returned list is guaranteed to be the NULL driver +core.get_mapgen_names([include_hidden=false]) -> table of map generator algorithms + registered in the core (possible in async calls) Formspec: core.update_formspec(formspec) @@ -111,29 +105,58 @@ core.get_screen_info() window_height = } -Packages: -core.get_game(index) -^ returns { - id = , - path = , - gamemods_path = , - name = , - menuicon_path = , - DEPRECATED: - addon_mods_paths = {[1] = ,}, -} -core.get_games() -> table of all games in upper format (possible in async calls) -core.get_mapgen_names([include_hidden=false]) -> table of map generator algorithms - registered in the core (possible in async calls) -core.get_mod_info(path) -^ returns { - name = "name of mod", - type = "mod" or "modpack", - description = "description", - path = "path/to/mod", - depends = {"mod", "names"}, - optional_depends = {"mod", "names"}, -} +### Content and Packages + +Content - an installed mod, modpack, game, or texture pack (txt) +Package - content which is downloadable from the content db, may or may not be installed. + +* core.get_modpath() (possible in async calls) + * returns path to global modpath +* core.get_clientmodpath() (possible in async calls) + * returns path to global client-side modpath +* core.get_gamepath() (possible in async calls) + * returns path to global gamepath +* core.get_texturepath() (possible in async calls) + * returns path to default textures +* core.get_game(index) + * returns: + + { + id = , + path = , + gamemods_path = , + name = , + menuicon_path = , + author = "author", + DEPRECATED: + addon_mods_paths = {[1] = ,}, + } + +* core.get_games() -> table of all games in upper format (possible in async calls) +* core.get_content_info(path) + * returns + + { + name = "name of content", + type = "mod" or "modpack" or "game" or "txp", + description = "description", + author = "author", + path = "path/to/content", + depends = {"mod", "names"}, -- mods only + optional_depends = {"mod", "names"}, -- mods only + } + +* core.get_package_list() -> downloads package list from content db + * returns a list of: + + { + name = "basename", + title = "human readable title", + author = "username", + type = "", -- mod, game, txp + short_description = "description", + url = "", + } Favorites: core.get_favorites(location) -> list of favorites (possible in async calls) diff --git a/doc/texture_packs.txt b/doc/texture_packs.txt index 1813c29e4..89fdc0826 100644 --- a/doc/texture_packs.txt +++ b/doc/texture_packs.txt @@ -9,6 +9,7 @@ Texture pack directory structure textures |-- Texture Pack + | |-- texture_pack.conf | |-- screenshot.png | |-- description.txt | |-- override.txt @@ -21,9 +22,17 @@ This is a directory containing the entire contents of a single texture pack. It can be chosen more or less freely and will also become the name of the texture pack. The name must not be “base”. +### `texture_pack.conf` +A key-value config file with the following keys: + +* `title` - human readable title +* `description` - short description, shown in the content tab + ### `description.txt` +**Deprecated**, you should use texture_pack.conf instead. + A file containing a short description of the texture pack to be shown in the -texture packs tab. +content tab. ### `screenshot.png` A preview image showing an in-game screenshot of this texture pack; it will be -- cgit v1.2.3