feat: add database-driven Steam Workshop system
- Create 3 new DB tables: workshop_game_profiles, workshop_cache, server_workshop_mods - Add WorkshopRepository (DB access layer for all 3 tables) - Add WorkshopInstaller (rsync/robocopy/custom_script copy logic, SteamCMD download via agent exec) - Add WorkshopUpdater (scheduled cache update functions grouped by agent) - Add WorkshopPreStart (pre-start mod sync helper) - Add WorkshopProfileController (admin CRUD for profiles) - Add WorkshopModController (user install/remove/toggle/load_order/sync) - Add admin views: profiles list + profile_form - Add user views: user_workshop_index + user_workshop_mods - Add cron_update.php CLI entry point (--all/--agent-id/--home-id/--profile-id/--workshop-id) - Add prestart_sync.php CLI helper for XML pre_start hook - Update workshop_admin.php to route to profile management - Update main.php to route to new mod management (legacy fallback preserved) - Update module.php with DB migration SQL and version bump to 2.1 - Update lang/en_US.php with all new strings Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/dbeebd0e-e7a5-469d-8a8c-e63193d1ebb0 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
4ad46c4332
commit
8eff063a93
17 changed files with 3007 additions and 8 deletions
|
|
@ -103,4 +103,94 @@ return [
|
|||
'label_adapter_activation' => 'Activation template',
|
||||
'label_adapter_notes' => 'Notes',
|
||||
'error_missing_query' => 'Enter a search term before querying the Workshop.',
|
||||
|
||||
// -------------------------------------------------------
|
||||
// Workshop profile admin (WorkshopProfileController)
|
||||
// -------------------------------------------------------
|
||||
'nav_workshop_profiles' => 'Workshop Profiles (DB)',
|
||||
'profile_heading_list' => 'Workshop Game Profiles',
|
||||
'profile_intro' => 'One profile per supported game. Each profile drives mod install and caching behaviour.',
|
||||
'profile_btn_create' => 'Create Profile',
|
||||
'profile_list_empty' => 'No Workshop profiles defined yet.',
|
||||
'profile_col_game' => 'Game',
|
||||
'profile_col_key' => 'Game Key',
|
||||
'profile_col_method' => 'Copy Method',
|
||||
'profile_col_restart' => 'Restart?',
|
||||
'profile_col_status' => 'Status',
|
||||
'profile_confirm_delete' => 'Delete this Workshop profile? This will not affect already-installed server mods.',
|
||||
'profile_back_adapters' => 'Back to adapter management',
|
||||
'profile_back_list' => 'Back to profiles',
|
||||
'profile_heading_edit' => 'Edit Workshop Profile: %s',
|
||||
'profile_heading_create' => 'Create Workshop Profile',
|
||||
'profile_saved' => 'Workshop profile saved.',
|
||||
'profile_save_error' => 'Failed to save Workshop profile.',
|
||||
'profile_deleted' => 'Workshop profile deleted.',
|
||||
'profile_delete_error' => 'Failed to delete Workshop profile.',
|
||||
'profile_not_found' => 'Profile not found.',
|
||||
'profile_section_basic' => 'Basic info',
|
||||
'profile_section_paths' => 'Paths & templates',
|
||||
'profile_section_copy' => 'Copy / sync method',
|
||||
'profile_section_config' => 'Config & launch parameters',
|
||||
'profile_section_flags' => 'Flags',
|
||||
'profile_label_game_name' => 'Game name',
|
||||
'profile_label_os' => 'Supported OS',
|
||||
'profile_label_cache_path' => 'Cache path template',
|
||||
'profile_hint_cache_path' => 'Where SteamCMD downloads mods on the agent. E.g. {steamcmd_path}/steamapps/workshop/content/{workshop_app_id}/{mod_id}',
|
||||
'profile_label_install_path' => 'Install path template',
|
||||
'profile_hint_install_path' => 'Server-side mod directory. E.g. {server_path}/mods/{mod_folder}',
|
||||
'profile_label_folder_name' => 'Mod folder name template',
|
||||
'profile_hint_folder_name' => 'Folder name for each mod. Default: @{mod_id}',
|
||||
'profile_label_copy_method' => 'Copy method',
|
||||
'profile_label_install_script'=> 'Custom install script (admin-defined only, optional)',
|
||||
'profile_hint_install_script' => 'Only used when copy method is custom_script. Template variables are replaced before execution.',
|
||||
'profile_label_config_tpl' => 'Config file template (optional)',
|
||||
'profile_label_launch_tpl' => 'Launch parameter template (optional)',
|
||||
'profile_label_requires_restart' => 'Restart required after mod install/update',
|
||||
'profile_label_enabled' => 'Profile enabled',
|
||||
'profile_template_vars' => 'Available: {home_id} {agent_id} {workshop_app_id} {mod_id} {mod_title} {mod_folder} {steamcmd_path} {server_path} {install_path} {cache_path}',
|
||||
'error_game_key_invalid' => 'Game key may only contain letters, digits, underscores, dots, and hyphens.',
|
||||
'error_game_name_required' => 'Game name is required.',
|
||||
'error_app_id_required' => 'Workshop App ID is required (numeric).',
|
||||
'error_cache_path_required' => 'Cache path template is required.',
|
||||
'error_install_path_required' => 'Install path template is required.',
|
||||
|
||||
// -------------------------------------------------------
|
||||
// User mod management (WorkshopModController)
|
||||
// -------------------------------------------------------
|
||||
'user_workshop_heading' => 'Steam Workshop',
|
||||
'user_workshop_server_heading' => 'Workshop Mods – %s',
|
||||
'col_server' => 'Server',
|
||||
'col_game' => 'Game',
|
||||
'col_mods_count' => 'Installed mods',
|
||||
'col_profile' => 'Profile',
|
||||
'col_mod_id' => 'Workshop ID',
|
||||
'col_mod_title' => 'Title',
|
||||
'col_load_order' => 'Load order',
|
||||
'col_cache_status' => 'Cache status',
|
||||
'no_profile' => 'No profile',
|
||||
'hint_no_profile' => 'Ask an admin to create a Workshop profile for this game.',
|
||||
'btn_manage_mods' => 'Manage Mods',
|
||||
'no_profile_notice' => 'No Workshop profile is configured for this game. An administrator needs to create one first.',
|
||||
'heading_installed_mods' => 'Installed Mods',
|
||||
'no_installed_mods' => 'No mods installed yet.',
|
||||
'heading_cached_mods' => 'Available Cached Mods (this agent)',
|
||||
'heading_install_mod' => 'Install Mod by Workshop ID',
|
||||
'label_workshop_id_input' => 'Workshop ID',
|
||||
'placeholder_workshop_id' => 'e.g. 1234567890',
|
||||
'btn_install_mod' => 'Install',
|
||||
'btn_remove_mod' => 'Remove',
|
||||
'btn_sync_now' => 'Sync now',
|
||||
'confirm_remove_mod' => 'Remove this mod from this server? (Files on disk are not deleted.)',
|
||||
'mod_installed' => 'Mod installed successfully.',
|
||||
'mod_install_error' => 'Install failed: ',
|
||||
'restart_required' => 'A server restart is required to activate this mod.',
|
||||
'mod_removed' => 'Mod removed from this server.',
|
||||
'mod_remove_error' => 'Failed to remove mod.',
|
||||
'sync_success' => 'Mod synced successfully.',
|
||||
'sync_no_change' => 'Mod is already up to date.',
|
||||
'sync_error' => 'Sync failed: ',
|
||||
'error_missing_params' => 'Missing required parameters.',
|
||||
'error_no_profile' => 'No Workshop profile configured for this game.',
|
||||
'error_mod_not_found' => 'Mod or profile not found.',
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue