125 lines
3.5 KiB
Markdown
125 lines
3.5 KiB
Markdown
# Server Content Manager
|
|
|
|
Workspace reference: [`GSP-WORKSPACE.md`](../../../GSP-WORKSPACE.md)
|
|
|
|
## Current State
|
|
|
|
`Panel/modules/addonsmanager` is the current home of GSP's Server Content / Add-ons work.
|
|
|
|
The module title has already been moved toward `Server Content Manager`, but the schema and some folder names remain backward-compatible.
|
|
|
|
Important files:
|
|
|
|
- `Panel/modules/addonsmanager/module.php`
|
|
- `Panel/modules/addonsmanager/addons_manager.php`
|
|
- `Panel/modules/addonsmanager/user_addons.php`
|
|
- `Panel/modules/addonsmanager/server_content_helpers.php`
|
|
- `Panel/modules/addonsmanager/server_content_categories.php`
|
|
|
|
## Database Tables
|
|
|
|
Known tables used by the module:
|
|
|
|
- `addons`
|
|
- `server_content_workshop`
|
|
- `server_content_workshop_catalog`
|
|
- `server_content_manifest`
|
|
- `server_content_install_history`
|
|
|
|
## Current Model
|
|
|
|
All server content installs through the scripted installer workflow.
|
|
|
|
`addon_type` is now treated as a category used for sorting and filtering only.
|
|
Examples:
|
|
|
|
- `Server Content`
|
|
- `Mod`
|
|
- `Map`
|
|
- `Config`
|
|
- `Bot`
|
|
- `Admin Tool`
|
|
- `DayZ Mod`
|
|
- `Minecraft Version`
|
|
- `Steam Workshop Collection`
|
|
- `Server-side Application`
|
|
|
|
Steam Workshop is no longer a user-facing Server Content category. Workshop access belongs to the dedicated `steam_workshop` module.
|
|
|
|
## Server-Side Applications
|
|
|
|
`Server-side Application` is a category plus optional startup-hook metadata.
|
|
Any content item with startup-hook metadata enabled writes an agent-readable
|
|
hook manifest under the target game home:
|
|
|
|
```text
|
|
_gsp_content/hooks/<app>.json
|
|
```
|
|
|
|
The agents generate runtime watchdog scripts in `_gsp_content/generated/` and
|
|
track side-application PIDs in `_gsp_content/runtime/server_content.pids`.
|
|
|
|
Use this category and hook metadata for companion applications such as BEC, Big
|
|
Brother Bot, Discord bridges, RCON tools, and log watchers. The application
|
|
files themselves may still be installed wherever the game requires them.
|
|
|
|
Detailed lifecycle documentation:
|
|
|
|
- `docs/features/SERVER_CONTENT_APPLICATION_HOOKS.md`
|
|
|
|
## Installer Fields
|
|
|
|
Every content item may use:
|
|
|
|
- install script
|
|
- optional download URL
|
|
- optional target path
|
|
- optional extract path
|
|
- version
|
|
- description
|
|
- stop server before install
|
|
- backup target path before install
|
|
- restart server after install
|
|
- cacheable flag
|
|
|
|
The install script is the source of truth. Helper fields can be used to
|
|
generate a basic scripted installer when a full script is not supplied.
|
|
|
|
## Where To Start Reading
|
|
|
|
1. `Panel/modules/addonsmanager/module.php`
|
|
2. `Panel/modules/addonsmanager/addons_manager.php`
|
|
3. `Panel/modules/addonsmanager/user_addons.php`
|
|
4. `Panel/modules/addonsmanager/server_content_categories.php`
|
|
|
|
## Important Concept
|
|
|
|
This module is the right place for:
|
|
|
|
- mods
|
|
- add-ons
|
|
- config packs
|
|
- script-driven installs
|
|
- server-side companion application hooks
|
|
- server content manifests
|
|
- install history
|
|
|
|
## Migration
|
|
|
|
Older category values are migrated or normalized as follows:
|
|
|
|
- `Downloadable Mod` / `file_download` / `plugin` -> `Mod`
|
|
- `Configuration Package` / `config_edit` / `config` -> `Config`
|
|
- `Scripted Installer` / `scripted_installer` -> `Server Content`
|
|
- `Server-side Application` / `server_app` -> `Server-side Application`
|
|
|
|
## Validation
|
|
|
|
Relevant smoke tests:
|
|
|
|
```bash
|
|
php Panel/modules/addonsmanager/tests/workshop_helpers_test.php
|
|
php Panel/modules/config_games/tests/validate_server_configs.php
|
|
```
|
|
|
|
`validate_server_configs.php` validates every XML file under `Panel/modules/config_games/server_configs/` against `schema_server_config.xml`.
|