Compare commits

...
Author SHA1 Message Date
Дмитрий 88747c8da1 feat: portable play settings, improved offline messaging, and system tray support 2026-10-28 08:14:36 +05:00
Corfirean 925a81f4f2 Merge pull request #164 from Corfirean/feat/custom-races-report-target
Add Custom Races and Content Scaling report destinations
2026-10-27 11:02:46 +05:00
Corfirean df1901ea90 Merge pull request #163 from Corfirean/fix/issue-153-skill-controls
Add profession and defense skill gain controls
2026-10-27 10:28:06 +05:00
Corfirean 569d5fffc4 Merge pull request #162 from Corfirean/fix/issue-158-persistent-lan
Restore LAN realm addresses in Internet sharing mode
2026-10-27 10:28:02 +05:00
Дмитрий 7888dbc763 feat(reports): add separate Content Scaling destination 2026-10-27 10:25:10 +05:00
Дмитрий f0e8a8c12f feat(reports): add Custom Races upstream destination 2026-10-27 09:13:34 +05:00
Дмитрий af5a9717d4 feat(config): expose profession and defense skill gains (#153) 2026-10-27 08:38:08 +05:00
26 changed files with 321 additions and 16 deletions

No files matched your search

@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Report Content Scaling problems directly to its repository
---
The report form now includes a separate Content Scaling destination.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Send custom race problem reports directly to their maintainer
---
The report form now includes Custom Races as a separate destination.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Configure profession and defense skill gains in server settings
---
Advanced rate settings now include prospecting and milling skill gains, plus the points gained from crafting, defense and gathering.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Control portable characters and keep Manager running in the system tray
---
Realm access settings can enable portable characters. Closing the window keeps Manager in the tray, with commands to reopen or exit. Offline realm messages explain why players cannot connect.
+25
View File
@@ -1034,6 +1034,31 @@ Spellbook.New = 5
assert!(v.drift_keys.is_empty());
}
#[test]
fn skill_controls_persist_and_reject_invalid_gains() {
let (_d, root, meta) = fixture();
let changes = BTreeMap::from([
("SkillChance.Prospecting".into(), json!(true)),
("SkillChance.Milling".into(), json!(true)),
("SkillGain.Crafting".into(), json!(3)),
("SkillGain.Defense".into(), json!(4)),
("SkillGain.Gathering".into(), json!(5)),
]);
let report = save(&root, &meta, Scope::Server, &changes).unwrap();
assert_eq!(report.changed.len(), 5);
assert_eq!(report.restart, Some(Restart::World));
for path in ["Settings/worldserver.conf.template", "Core/configs/worldserver.conf"] {
let conf = load_conf(&root.join(path)).unwrap();
for (key, expected) in [("SkillChance.Prospecting", "1"), ("SkillChance.Milling", "1"), ("SkillGain.Crafting", "3"), ("SkillGain.Defense", "4"), ("SkillGain.Gathering", "5")] {
assert_eq!(conf.get(key), Some(expected));
}
assert_eq!(conf.get("Unknown.Custom"), Some("\"keep me\""));
}
for value in [json!(-1), json!(1.5), json!(451)] {
assert!(save(&root, &meta, Scope::Server, &BTreeMap::from([("SkillGain.Crafting".into(), value)])).is_err());
}
}
#[test]
fn creature_rates_save_independently_in_template_and_active_config() {
let (_d, root, meta) = fixture();
+16 -5
View File
@@ -1,5 +1,4 @@
//! Where a problem report goes. A report about the bots goes to the repository of the bot system in question, anything
//! else to the Manager's own. The repositories come from the module catalog, so there is one list to keep right.
//! Problem-report destinations for the Manager, bot systems and upstream custom races.
use std::path::Path;
@@ -36,14 +35,14 @@ fn catalog_repo(id: &str) -> Option<String> {
.and_then(|e| repo_of(&e.repo))
}
/// The three places, in the order the page lists them. A bot system whose repository is unknown falls back to the Manager's.
/// Report destinations in display order. Custom-race reports go to the upstream asset maintainer.
pub fn targets() -> Vec<Target> {
let mut v = vec![Target {
id: "manager",
repo: MANAGER_REPO.into(),
ours: true,
}];
for (id, module) in [("companions", "companions"), ("squid", "playerbots")] {
for (id, module) in [("companions", "companions"), ("squid", "playerbots"), ("content-scaling", "content-scaling")] {
if let Some(repo) = catalog_repo(module) {
v.push(Target {
id,
@@ -52,6 +51,11 @@ pub fn targets() -> Vec<Target> {
});
}
}
v.push(Target {
id: "custom-races",
repo: "ilusixn/azerothcore-wotlk-coa".into(),
ours: false,
});
v
}
@@ -103,7 +107,7 @@ mod tests {
use super::*;
#[test]
fn the_three_targets_come_from_the_catalog() {
fn report_targets_route_to_their_maintainers() {
let t = targets();
let repo = |id: &str| t.iter().find(|x| x.id == id).map(|x| x.repo.clone());
assert_eq!(
@@ -116,6 +120,10 @@ mod tests {
);
assert_eq!(repo("squid").as_deref(), Some("Zyth45/mod-playerbots"));
assert!(t.iter().find(|x| x.id == "squid").is_some_and(|x| !x.ours));
assert_eq!(repo("custom-races").as_deref(), Some("ilusixn/azerothcore-wotlk-coa"));
assert!(t.iter().find(|x| x.id == "custom-races").is_some_and(|x| !x.ours));
assert_eq!(repo("content-scaling").as_deref(), Some("Corfirean/mod-coa-content-scaling"));
assert!(t.iter().find(|x| x.id == "content-scaling").is_some_and(|x| x.ours));
}
#[test]
@@ -135,6 +143,9 @@ mod tests {
#[test]
fn only_the_new_issue_pages_of_the_targets_are_allowed() {
assert!(is_new_issue_url("https://github.com/Corfirean/mod-coa-content-scaling/issues/new?title=a&body=b"));
assert!(is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/new?title=a&body=b"));
assert!(!is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/newer"));
assert!(is_new_issue_url(
"https://github.com/Zyth45/mod-playerbots/issues/new"
));
+72
View File
@@ -445,6 +445,17 @@
"max": 3600000,
"unit": "ms"
},
{
"key": "PortableSession.Enable",
"type": "bool",
"category": "characters",
"title": "Portable characters",
"description": "Allow players to play on this realm with portable characters saved in their Manager.",
"default": true,
"advanced": false,
"restartRequired": "world",
"dangerous": false
},
{
"key": "CharactersPerAccount",
"type": "int",
@@ -1025,6 +1036,67 @@
"advanced": false,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillChance.Prospecting",
"type": "bool",
"category": "rates",
"title": "Prospecting skill gains",
"description": "Allow prospecting to increase the profession skill.",
"default": false,
"advanced": true,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillChance.Milling",
"type": "bool",
"category": "rates",
"title": "Milling skill gains",
"description": "Allow milling to increase the profession skill.",
"default": false,
"advanced": true,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillGain.Crafting",
"type": "int",
"category": "rates",
"title": "Crafting skill gain",
"description": "Skill points awarded by a successful crafting skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
},
{
"key": "SkillGain.Defense",
"type": "int",
"category": "rates",
"title": "Defense skill gain",
"description": "Skill points awarded by a successful defense skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
},
{
"key": "SkillGain.Gathering",
"type": "int",
"category": "rates",
"title": "Gathering skill gain",
"description": "Skill points awarded by a successful gathering skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
}
]
}
+1 -1
View File
@@ -12,7 +12,7 @@ crate-type = ["staticlib", "cdylib", "rlib"]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri = { version = "2", features = ["tray-icon"] }
tauri-plugin-dialog = "2"
tauri-plugin-updater = "2"
tauri-plugin-process = "2"
+70 -3
View File
@@ -2729,6 +2729,8 @@ async fn console_command(
.await
}
static QUIT_REQUESTED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
pub fn run() {
let dir = data_dir();
let _ = coa_core::logging::init(&dir.join("logs").join("manager.log"));
@@ -2881,11 +2883,75 @@ pub fn run() {
control_cmds::join_characters,
control_cmds::join_claim
])
.on_window_event(|window, event| {
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
api.prevent_close();
let _ = window.hide();
}
})
.setup(|app| {
#[cfg(desktop)]
{
use tauri::menu::{Menu, MenuItem};
use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent};
use tauri::Manager;
let show = MenuItem::with_id(app, "show", "Open CoA Server Manager", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Exit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
let mut builder = TrayIconBuilder::new()
.tooltip("CoA Server Manager")
.menu(&menu)
.show_menu_on_left_click(false)
.on_menu_event(|app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"quit" => {
QUIT_REQUESTED.store(true, std::sync::atomic::Ordering::SeqCst);
app.exit(0);
}
_ => {}
})
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click {
button: MouseButton::Left,
button_state: MouseButtonState::Up,
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
});
if let Some(icon) = app.default_window_icon() {
builder = builder.icon(icon.clone());
}
builder.build(app)?;
}
Ok(())
})
.build(tauri::generate_context!())
.expect("error while building CoA Server Manager")
.run(|app, event| {
// the Host loop stops with the application: what it is doing is finished first, the stores keep every session
if let tauri::RunEvent::Exit = event {
.run(|app, event| match event {
tauri::RunEvent::ExitRequested { api, .. } => {
if !QUIT_REQUESTED.load(std::sync::atomic::Ordering::SeqCst) {
api.prevent_exit();
}
}
tauri::RunEvent::Exit => {
// the Host loop stops with the application: what it is doing is finished first, the stores keep every session
if let Some(rt) = app.state::<AppState>().portable.clone() {
rt.shutdown();
}
@@ -2896,6 +2962,7 @@ pub fn run() {
rt.shutdown();
}
}
_ => {}
});
}
+1 -1
View File
@@ -90,7 +90,7 @@ export {};
}
if(cmd==="module_save_settings") { moduleEdits[args.module] = {...moduleEdits[args.module], ...args.changes}; return Object.keys(args.changes); }
if(cmd==="report_context") return {manager_version:"0.3.1",windows:"Windows 11 (build 26200)",install_kind:"new",server_version:"0.261001.10",suggested_target:"companions",bots_version:"0.2.1 · 1a2b3c4d"};
if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false}];
if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false},{id:"custom-races",repo:"ilusixn/azerothcore-wotlk-coa",ours:false},{id:"content-scaling",repo:"Corfirean/mod-coa-content-scaling",ours:true}];
if(cmd==="open_link"){(window as any).__lastLink=args.url;return null;}
if(cmd==="export_diagnostics") return "C:\\Users\\you\\Desktop\\CoA-Diagnostics-20261001-140000.zip";
if(cmd==="list_crashes") return [];
+2
View File
@@ -721,6 +721,8 @@ const de: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, der Server oder andere Module",
"rep.target.companions": "CoA Companions (Bots und das CoABotUI-Addon)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (Schwierigkeits- und Stufenskalierung)",
"rep.target.custom-races": "Custom Races (Völker und Client-Patches)",
"rep.targetPublic": "Der Bericht wird öffentlich auf GitHub in {repo} veröffentlicht.",
"rep.botsVersion": "Bot-Version",
"rep.withDiag": "Diagnose für mich sammeln (empfohlen)",
+8 -1
View File
@@ -777,6 +777,8 @@ const en = {
"rep.target.manager": "CoA Server Manager, the server or other modules",
"rep.target.companions": "CoA Companions (bots and the CoABotUI addon)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (difficulty and level scaling)",
"rep.target.custom-races": "Custom Races (races and client patches)",
"rep.targetPublic": "The report will be public on GitHub in {repo}.",
"rep.botsVersion": "Bot release",
"rep.withDiag": "Collect the diagnostics for me (recommended)",
@@ -1004,7 +1006,7 @@ const en = {
"portable.note.blocked_ruleset": "This character is for another kind of realm.",
"portable.note.blocked_format": "This realm reads another version of the character format. Update the Manager or the realm.",
"portable.note.blocked_online_import": "This realm cannot take characters while it runs. Update the realm.",
"portable.note.blocked_sessions": "This realm cannot follow a game session. Ask its owner to enable portable play.",
"portable.note.blocked_sessions": "This realm cannot follow a game session. The server or host's Server Manager is offline, or portable play is not enabled.",
"portable.note.blocked_client_data": "The game data the Manager sees is not the data the realm loaded.",
"portable.note.blocked_progression": "The realm’s level cap is not known yet or cannot be handled. Start the realm and try again.",
"portable.note.realm_offline": "The realm cannot be reached.",
@@ -1099,6 +1101,8 @@ const en = {
"browse.noCharacter": "You have no portable character yet. Make one portable on the Characters page to see whether it can play here.",
"browse.canPlay": "Can play",
"browse.cannotPlay": "Cannot play here",
"browse.realmOffline": "Offline",
"browse.offlineWarning": "The server is currently offline. Joining with a portable character will become available once the host starts the server.",
"browse.play": "Play",
"browse.playSoon": "Joining arrives with the account support of the next step.",
"registry.title": "Public listing",
@@ -1119,6 +1123,7 @@ const en = {
"registry.state.starting": "Starting to publish…",
"registry.state.waiting_for_realm": "Waiting for the realm to be ready…",
"registry.state.realm_stopped": "The realm is not running; it is listed as offline.",
"registry.realmStoppedHint": "The realm is currently stopped. Start the server so players can join and track character sessions.",
"registry.state.online": "Published and online.",
"registry.state.retrying": "The Registry could not be reached; trying again. Your realm is not affected.",
"registry.state.rejected": "The Registry refused this realm. Publishing is stopped.",
@@ -1178,6 +1183,8 @@ const en = {
"join.err.unavailable": "The server could not do that right now.",
"access.title": "Joining players",
"access.text": "How players who find this realm in the list get in.",
"access.portableEnabled": "Allow portable characters (portable play)",
"access.portableEnabledHint": "Allows players with Manager-saved characters to play on this realm (PortableSession.Enable).",
"access.existingOnly": "Do not create accounts for new players",
"access.existingOnlyHint": "Players can only link an account they already have on this realm.",
"access.route": "Address players connect to",
+2
View File
@@ -721,6 +721,8 @@ const es: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, el servidor u otros módulos",
"rep.target.companions": "CoA Companions (bots y el addon CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (ajuste de dificultad y niveles)",
"rep.target.custom-races": "Custom Races (razas y parches del cliente)",
"rep.targetPublic": "El informe será público en GitHub, en {repo}.",
"rep.botsVersion": "Versión de los bots",
"rep.withDiag": "Reunir el diagnóstico por mí (recomendado)",
+2
View File
@@ -721,6 +721,8 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, le serveur ou d’autres modules",
"rep.target.companions": "CoA Companions (bots et addon CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (ajustement de la difficulté et des niveaux)",
"rep.target.custom-races": "Custom Races (races et correctifs client)",
"rep.targetPublic": "Le rapport sera public sur GitHub dans {repo}.",
"rep.botsVersion": "Version des bots",
"rep.withDiag": "Rassembler le diagnostic pour moi (recommandé)",
+8 -1
View File
@@ -760,6 +760,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, сервер или другие модули",
"rep.target.companions": "CoA Companions (боты и аддон CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (масштабирование сложности и уровней)",
"rep.target.custom-races": "Custom Races (расы и клиентские патчи)",
"rep.targetPublic": "Репорт будет публичным на GitHub в {repo}.",
"rep.botsVersion": "Версия ботов",
"rep.withDiag": "Собрать диагностику за меня (рекомендуется)",
@@ -986,7 +988,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"portable.note.blocked_ruleset": "Этот персонаж — для реалма другого типа.",
"portable.note.blocked_format": "Реалм читает другую версию формата персонажа. Обновите Менеджер или реалм.",
"portable.note.blocked_online_import": "Этот реалм не принимает персонажей, пока работает. Обновите реалм.",
"portable.note.blocked_sessions": "Этот реалм не может следить за игровой сессией. Попросите владельца включить переносимую игру.",
"portable.note.blocked_sessions": "Этот реалм не может следить за игровой сессией. Сервер или Server Manager хоста выключен, либо в ядре не включена переносимая игра.",
"portable.note.blocked_client_data": "Игровые данные, которые видит Менеджер, не те, что загрузил реалм.",
"portable.note.blocked_progression": "Предел уровня реалма пока неизвестен или не поддерживается. Запустите реалм и попробуйте снова.",
"portable.note.realm_offline": "Реалм недоступен.",
@@ -1081,6 +1083,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"browse.noCharacter": "У вас пока нет переносимого персонажа. Сделайте его переносимым на странице «Персонажи», чтобы увидеть, сможет ли он играть здесь.",
"browse.canPlay": "Можно играть",
"browse.cannotPlay": "Здесь играть нельзя",
"browse.realmOffline": "Оффлайн",
"browse.offlineWarning": "Сервер сейчас не запущен хостом. Игра переносимым персонажем станет доступна, когда владелец включит сервер.",
"browse.play": "Играть",
"browse.playSoon": "Вход на сервер появится вместе с поддержкой аккаунтов на следующем шаге.",
"registry.title": "Публичный список",
@@ -1101,6 +1105,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"registry.state.starting": "Начинаю публикацию…",
"registry.state.waiting_for_realm": "Жду, пока реалм будет готов…",
"registry.state.realm_stopped": "Реалм не запущен; в списке он отмечен как недоступный.",
"registry.realmStoppedHint": "Сервер сейчас выключен. Запустите реалм, чтобы игроки могли подключаться и отслеживать сессии персонажей.",
"registry.state.online": "Опубликован и доступен.",
"registry.state.retrying": "Реестр недоступен, пробую снова. На ваш реалм это не влияет.",
"registry.state.rejected": "Реестр отклонил этот реалм. Публикация остановлена.",
@@ -1160,6 +1165,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"join.err.unavailable": "Сервер сейчас не смог этого сделать.",
"access.title": "Вход игроков",
"access.text": "Как попадают на этот мир игроки, нашедшие его в списке.",
"access.portableEnabled": "Разрешить вход переносимым персонажам (переносимая игра)",
"access.portableEnabledHint": "Позволяет игрокам с сохранёнными в Менеджере персонажами играть на этом сервере (PortableSession.Enable).",
"access.existingOnly": "Не создавать аккаунты для новых игроков",
"access.existingOnlyHint": "Игроки смогут только привязать аккаунт, который у них уже есть на этом мире.",
"access.route": "Адрес для подключения игроков",
+2
View File
@@ -736,6 +736,8 @@ const zh = {
"rep.target.manager": "CoA Server Manager、服务器或其他模块",
"rep.target.companions": "CoA Companions(机器人与 CoABotUI 插件)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling(难度与等级缩放)",
"rep.target.custom-races": "Custom Races(种族与客户端补丁)",
"rep.targetPublic": "该报告将公开发布在 GitHub 的 {repo}。",
"rep.botsVersion": "机器人版本",
"rep.withDiag": "替我收集诊断信息(推荐)",
+9
View File
@@ -31,6 +31,11 @@
"copper": "Kupfer"
},
"settings": {
"SkillChance.Prospecting": {"t": "Fertigkeitszuwachs beim Sondieren", "d": "Sondieren darf die Berufsfertigkeit erhöhen."},
"SkillChance.Milling": {"t": "Fertigkeitszuwachs beim Mahlen", "d": "Mahlen darf die Berufsfertigkeit erhöhen."},
"SkillGain.Crafting": {"t": "Fertigkeitszuwachs beim Herstellen", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung beim Herstellen."},
"SkillGain.Defense": {"t": "Zuwachs der Verteidigungsfertigkeit", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung der Verteidigung."},
"SkillGain.Gathering": {"t": "Fertigkeitszuwachs beim Sammeln", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung beim Sammeln."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots pro Erstellungsbefehl",
"d": "Wie viele Bots der Erstellungsbefehl anlegt, wenn du keine Zahl angibst."
@@ -375,6 +380,10 @@
"t": "Autospeicher-Intervall",
"d": "Wie oft Spielercharaktere gespeichert werden, solange sie online sind."
},
"PortableSession.Enable": {
"t": "Portable Charaktere (portables Spiel)",
"d": "Erlaubt Spielern, mit ihren im Manager gespeicherten portablen Charakteren auf diesem Realm zu spielen."
},
"CharactersPerAccount": {
"t": "Charaktere pro Konto",
"d": "Maximale Zahl an Charakteren, die ein Konto über alle Realms hat."
+9
View File
@@ -31,6 +31,11 @@
"copper": "cobre"
},
"settings": {
"SkillChance.Prospecting": {"t": "Mejora de habilidad al prospectar", "d": "Permitir que prospectar aumente la habilidad de profesión."},
"SkillChance.Milling": {"t": "Mejora de habilidad al moler", "d": "Permitir que moler aumente la habilidad de profesión."},
"SkillGain.Crafting": {"t": "Puntos de habilidad al fabricar", "d": "Puntos otorgados por una mejora de habilidad al fabricar."},
"SkillGain.Defense": {"t": "Puntos de habilidad de defensa", "d": "Puntos otorgados por una mejora de habilidad de defensa."},
"SkillGain.Gathering": {"t": "Puntos de habilidad al recolectar", "d": "Puntos otorgados por una mejora de habilidad al recolectar."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots creados por comando",
"d": "Cuántos bots crea el comando de creación cuando no indicas un número."
@@ -375,6 +380,10 @@
"t": "Intervalo de autoguardado",
"d": "Con qué frecuencia se guardan los personajes de los jugadores mientras están conectados."
},
"PortableSession.Enable": {
"t": "Personajes portátiles (juego portátil)",
"d": "Permite a los jugadores jugar en este reino con personajes portátiles guardados en su Manager."
},
"CharactersPerAccount": {
"t": "Personajes por cuenta",
"d": "Máximo de personajes que puede tener una cuenta entre todos los reinos."
+9
View File
@@ -31,6 +31,11 @@
"copper": "cuivre"
},
"settings": {
"SkillChance.Prospecting": {"t": "Progression avec la prospection", "d": "Permettre à la prospection d’améliorer la compétence de métier."},
"SkillChance.Milling": {"t": "Progression avec la mouture", "d": "Permettre à la mouture d’améliorer la compétence de métier."},
"SkillGain.Crafting": {"t": "Gain de compétence en fabrication", "d": "Points accordés lors d’une progression réussie en fabrication."},
"SkillGain.Defense": {"t": "Gain de compétence en défense", "d": "Points accordés lors d’une progression réussie en défense."},
"SkillGain.Gathering": {"t": "Gain de compétence en récolte", "d": "Points accordés lors d’une progression réussie en récolte."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots créés par commande",
"d": "Nombre de bots que la commande de création crée quand vous n’indiquez pas de nombre."
@@ -375,6 +380,10 @@
"t": "Intervalle de sauvegarde automatique",
"d": "Fréquence de sauvegarde des personnages des joueurs pendant qu’ils sont en ligne."
},
"PortableSession.Enable": {
"t": "Personnages portables (jeu portable)",
"d": "Permet aux joueurs de jouer sur ce royaume avec des personnages portables enregistrés dans leur Manager."
},
"CharactersPerAccount": {
"t": "Personnages par compte",
"d": "Nombre maximal de personnages qu’un compte peut avoir sur tous les royaumes."
+9
View File
@@ -31,6 +31,11 @@
"copper": "меди"
},
"settings": {
"SkillChance.Prospecting": {"t": "Рост навыка при просеивании", "d": "Разрешить повышение навыка профессии при просеивании."},
"SkillChance.Milling": {"t": "Рост навыка при измельчении", "d": "Разрешить повышение навыка профессии при измельчении."},
"SkillGain.Crafting": {"t": "Прирост ремесленного навыка", "d": "Число очков за успешное повышение ремесленного навыка."},
"SkillGain.Defense": {"t": "Прирост навыка защиты", "d": "Число очков за успешное повышение навыка защиты."},
"SkillGain.Gathering": {"t": "Прирост навыка сбора", "d": "Число очков за успешное повышение навыка сбора."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Ботов за одну команду создания",
"d": "Сколько ботов создаёт команда создания, если вы не указали число."
@@ -375,6 +380,10 @@
"t": "Интервал автосохранения",
"d": "Как часто персонажи игроков сохраняются, пока они в сети."
},
"PortableSession.Enable": {
"t": "Переносимые персонажи (переносимая игра)",
"d": "Разрешает игрокам заходить на этот сервер переносимыми персонажами, сохранёнными в их Менеджере."
},
"CharactersPerAccount": {
"t": "Персонажей на учётную запись",
"d": "Наибольшее число персонажей на учётной записи во всех мирах."
+9
View File
@@ -31,6 +31,11 @@
"copper": "铜币"
},
"settings": {
"SkillChance.Prospecting": {"t": "选矿技能提升", "d": "允许通过选矿提升专业技能。"},
"SkillChance.Milling": {"t": "研磨技能提升", "d": "允许通过研磨提升专业技能。"},
"SkillGain.Crafting": {"t": "制造技能提升点数", "d": "制造成功触发技能提升时获得的点数。"},
"SkillGain.Defense": {"t": "防御技能提升点数", "d": "防御成功触发技能提升时获得的点数。"},
"SkillGain.Gathering": {"t": "采集技能提升点数", "d": "采集成功触发技能提升时获得的点数。"},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "单次生成命令创建数量",
"d": "当生成命令未指定数量时,默认创建的机器人数量。"
@@ -375,6 +380,10 @@
"t": "角色数据自动保存间隔",
"d": "在线玩家角色数据写入数据库的时间间隔。"
},
"PortableSession.Enable": {
"t": "便携式角色(跨服漫游)",
"d": "允许玩家使用保存在管理器中的便携式角色进入此服务器进行游玩。"
},
"CharactersPerAccount": {
"t": "每个账号最大角色数",
"d": "单个账号在所有服务器可创建的角色总数上限。"
+1 -1
View File
@@ -257,7 +257,7 @@ export interface ReportContext {
bots_version: string | null;
}
export type ReportTargetId = "manager" | "companions" | "squid";
export type ReportTargetId = "manager" | "companions" | "squid" | "custom-races" | "content-scaling";
/** A place a problem report can go: its GitHub repository as `owner/name`. */
export interface ReportTarget {
+3 -1
View File
@@ -31,7 +31,9 @@ export function reportBody(r: ReportInput): string {
`**Windows version:** ${r.windows || "unknown"} `,
`**Fresh install or imported server:** ${r.installKind === "new" ? "Fresh install" : "Imported server"} `,
...(r.serverVersion ? [`**Server version:** ${r.serverVersion} `] : []),
...(r.target !== "manager" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []),
...(r.target === "squid" || r.target === "companions" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []),
...(r.target === "custom-races" ? ["**Component:** Custom Races "] : []),
...(r.target === "content-scaling" ? ["**Component:** Content Scaling "] : []),
"",
"**What happened?** ",
text(r.what, "Describe the problem."),
+2
View File
@@ -117,6 +117,7 @@ function Drawer({ summary, catalog, onClose }: { summary: RealmSummary; catalog:
<h2 className="truncate text-lg font-semibold" data-testid="drawer-title">{summary.display_name}</h2>
<p className="mt-0.5 text-sm text-muted"><Mode ruleset={summary.ruleset} /> · {t("browse.cap")} {summary.level_cap ?? "—"}</p>
<p className="text-sm"><Online p={summary.population} />{summary.population.capacity !== null && <span className="text-muted"> · {t("browse.capacity", { n: summary.population.capacity })}</span>}</p>
{!summary.online && <span className="mt-1 inline-block rounded bg-bad/15 px-2 py-0.5 text-xs font-medium text-bad">{t("browse.realmOffline")}</span>}
</div>
<button onClick={onClose} aria-label={t("portable.close")} className="cursor-pointer text-muted hover:text-ink"><X className="h-5 w-5" /></button>
</div>
@@ -180,6 +181,7 @@ function Drawer({ summary, catalog, onClose }: { summary: RealmSummary; catalog:
<p className="font-medium">{blocked ? t("browse.cannotPlay") : t("browse.canPlay")}</p>
{pre.projection && <Projection from={pre.projection[0]} to={pre.projection[1]} cap={summary.level_cap} />}
<Notes notes={pre.notes} />
{!summary.online && <p className="mt-2 border-t border-line/40 pt-2 text-xs text-warn">{t("browse.offlineWarning")}</p>}
</div>}
</>}
</section>
+31 -2
View File
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { cn } from "@/lib/utils";
import { useT, type Key } from "@/i18n";
import { asUiError } from "@/lib/api";
import { asUiError, api } from "@/lib/api";
import { realmRegistry, useRegistryStatus } from "@/lib/registry";
import { asControlError, control, type ControlStatus } from "@/lib/control";
@@ -25,12 +25,25 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
const [error, setError] = useState<string | null>(null);
const [allowPortable, setAllowPortable] = useState(false);
const [existingOnly, setExistingOnly] = useState(false);
const [portableEnabled, setPortableEnabled] = useState(true);
const [route, setRoute] = useState("");
const [accessSaved, setAccessSaved] = useState(false);
const [ctl, setCtl] = useState<ControlStatus | null>(null);
const host = ctl?.hosting.find((h) => h.local_id === localId);
const link = host?.link;
useEffect(() => {
let active = true;
void api.allSettings(serverId).then((items) => {
if (!active) return;
const item = items.find((i) => i.key === "PortableSession.Enable");
if (item) {
setPortableEnabled(item.value === "1" || item.value.toLowerCase() === "true");
}
}).catch(() => {});
return () => { active = false; };
}, [serverId]);
useEffect(() => {
const load = () => void control.status().then(setCtl).catch(() => {});
load();
@@ -41,7 +54,21 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
async function saveAccess() {
setBusy(true); setError(null); setAccessSaved(false);
try { await control.setAccess(localId, existingOnly, allowPortable, route.trim() === "" ? null : route.trim()); await refresh(); setAccessSaved(true); } catch (e) { setError(asControlError(e).message); } finally { setBusy(false); }
try {
await Promise.all([
control.setAccess(localId, existingOnly, allowPortable, route.trim() === "" ? null : route.trim()),
api.allSettingsSave(serverId, {
"PortableSession.Enable": portableEnabled ? "1" : "0",
...(portableEnabled ? { "CharacterDatabase.WorkerThreads": "1" } : {}),
}),
]);
await refresh();
setAccessSaved(true);
} catch (e) {
setError(asControlError(e).message);
} finally {
setBusy(false);
}
}
useEffect(() => {
@@ -85,6 +112,7 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
{mine && (published || mine.state === "unpublishing") && <div className="mt-4 rounded-md border border-line p-3 text-sm" role="status">
<p className={cn("font-medium", tone)} data-state={mine.state}>{t(`registry.state.${mine.state}` as Key)}</p>
<p className="mt-1 text-xs text-muted">{mine.display_name}{mine.metadata_revision ? ` · ${t("registry.revision", { n: mine.metadata_revision })}` : ""}</p>
{mine.state === "realm_stopped" && <p className="mt-2 text-xs text-warn">{t("registry.realmStoppedHint")}</p>}
{mine.last_error && <p className="mt-1 text-xs text-warn">{mine.last_error}</p>}
{mine.state === "retrying" && mine.retry_in_secs !== null && <p className="mt-1 text-xs text-muted">{t("registry.retryIn", { s: mine.retry_in_secs })}</p>}
<div className="mt-3 flex gap-2">
@@ -95,6 +123,7 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
{mine && (published || mine.state === "unpublishing") && <div className="mt-4 rounded-md border border-line p-3 text-sm" data-testid="access-options">
<p className="font-medium">{t("access.title")}</p>
<p className="mt-1 text-xs text-muted">{t("access.text")}</p>
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={portableEnabled} onChange={(e) => setPortableEnabled(e.target.checked)} className="mt-1" data-testid="portable-enabled" /><span>{t("access.portableEnabled")}<span className="block text-xs text-muted">{t("access.portableEnabledHint")}</span></span></label>
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={existingOnly} onChange={(e) => setExistingOnly(e.target.checked)} className="mt-1" data-testid="existing-only" /><span>{t("access.existingOnly")}<span className="block text-xs text-muted">{t("access.existingOnlyHint")}</span></span></label>
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={allowPortable} onChange={(e) => setAllowPortable(e.target.checked)} className="mt-1" data-testid="allow-portable" /><span>{t("access.allowPortable")}<span className="block text-xs text-muted">{t("access.allowPortableHint")}</span></span></label>
<label htmlFor="access-route" className="mt-3 block font-medium">{t("access.route")}</label>
+2
View File
@@ -12,6 +12,8 @@ const TARGET_LABEL: Record<ReportTargetId, Key> = {
manager: "rep.target.manager",
companions: "rep.target.companions",
squid: "rep.target.squid",
"custom-races": "rep.target.custom-races",
"content-scaling": "rep.target.content-scaling",
};
const FALLBACK: ReportTarget = { id: "manager", repo: "Corfirean/coa-server-manager", ours: true };