Skip to content

Commit

Permalink
Website Maps Integration (CB #84 / GH #153)
Browse files Browse the repository at this point in the history
Co-authored-by: Benedikt Straub <[email protected]>
Co-authored-by: Widelands Bunnybot <[email protected]>
Co-authored-by: Benedikt Straub <[email protected]>
Co-committed-by: Benedikt Straub <[email protected]>
  • Loading branch information
3 people authored and The Widelands Bunny Bot committed Nov 23, 2024
1 parent e85bfa4 commit 3eed3d3
Show file tree
Hide file tree
Showing 6 changed files with 322 additions and 58 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Key | Description
`noticetype_transifex-issues` | Name of the notice type for Transifex string issues in the website database | `transifex-issues`
`noticetype_comment-added` | Name of the notice type for new comments in the website database | `comment-added`
`noticetype_comment-mention` | Name of the notice type for @mentions in comments in the website database | `comment-mention`
`website_maps_path` | Base path where website maps are stored | `/var/wlmedia`
`website_maps_slug` | Slug for the content type of comments on website maps | `wlmaps`
`deploy` | Whether this server is the real thing, not just a test environment | `true` or `false`

### The Database
Expand Down
39 changes: 34 additions & 5 deletions wl/server/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@ public enum Command {
* <code>CMD_LIST [2+: control]</code>
*
* <p>
* Supported command versions: 1-2 (default: 4/1, 5/2)
* Supported command versions: 1-3 (default: 4/1, 5/2)
*
* <p>
* List all available add-on names.
*
* <p>
* In CV 3+, website maps are also listed.
*
* <p> Parameters:
* <ul>
* <li> CV 1: No arguments.
Expand All @@ -139,6 +142,9 @@ public enum Command {
* </ul>
*
* <p>
* If CMD_INFOs are appended, they use the CV for the CMD_INFO as for this CMD_LIST.
*
* <p>
* Returns:
* <ul>
* <li> Number <var>N</var> of add-ons, <code>\n</code>
Expand All @@ -152,14 +158,19 @@ public enum Command {
* <code>CMD_INFO name</code>
*
* <p>
* Supported command versions: 1-2 (default: 4/1, 5/2)
* Supported command versions: 1-3 (default: 4/1, 5/2)
*
* <p>
* Returns detailed info about a specific addon or in CV3+ a map.
*
* <p>
* Returns detailed info about a specific addon.
* In CV3+, a map set add-on containing a single map map receive a .map response.
* In this case, the category string will be changed accordingly.
* For maps, the icon is the map's minimap.
*
* <p> Parameters:
* <ol>
* <li> Add-on name
* <li> Add-on name (.wad) or map slug (pseudo-extension .map; only in CV3+)
* </ol>
*
* <p>
Expand Down Expand Up @@ -205,6 +216,15 @@ public enum Command {
* <li> icon checksum (0 for no icon), <code>\n</code>
* <li> icon filesize (0 for no icon), <code>\n</code>
* <li> icon file as a byte stream
* <li> .map only: map file name, <code>\n</code>
* <li> .map only: unlocalized hint, <code>\n</code>
* <li> .map only: localized hint, <code>\n</code>
* <li> .map only: unlocalized uploader comment, <code>\n</code>
* <li> .map only: localized uploader comment, <code>\n</code>
* <li> .map only: map width, <code>\n</code>
* <li> .map only: map height, <code>\n</code>
* <li> .map only: number of players, <code>\n</code>
* <li> .map only: world name, <code>\n</code>
* <li> <code>ENDOFSTREAM\n</code>
* </ul>
*/
Expand All @@ -221,12 +241,14 @@ public enum Command {
*
* <p> Parameters:
* <ol>
* <li> Add-on name
* <li> Add-on or map name
* </ol>
*
* <p>
* Returns:
* <ul>
* <li> For add-ons:
* <ul>
* <li> Integer string denoting number <var>D</var> of directories, <code>\n</code>
* <li> <var>D</var> Directory names (with full paths), each followed by <code>\n</code>
* <li> For each of the <var>D</var> directories:
Expand All @@ -242,6 +264,13 @@ public enum Command {
* </ul>
* <li> <code>ENDOFSTREAM\n</code>
* </ul>
* <li> For maps:
* <ul>
* <li> checksum, <code>\n</code>
* <li> filesize in bytes, <code>\n</code>
* <li> The content of the file as a byte stream
* </ul>
* </ul>
*/
CMD_DOWNLOAD,

Expand Down
Loading

0 comments on commit 3eed3d3

Please sign in to comment.