mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 03:25:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7888dbc763 | ||
|
|
f0e8a8c12f |
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.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
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.
|
||||
@@ -1034,31 +1034,6 @@ 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();
|
||||
|
||||
@@ -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"
|
||||
));
|
||||
|
||||
@@ -1025,67 +1025,6 @@
|
||||
"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
@@ -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 [];
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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é)",
|
||||
|
||||
@@ -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": "Собрать диагностику за меня (рекомендуется)",
|
||||
|
||||
@@ -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": "替我收集诊断信息(推荐)",
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"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."
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"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."
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"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."
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"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": "Сколько ботов создаёт команда создания, если вы не указали число."
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"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": "当生成命令未指定数量时,默认创建的机器人数量。"
|
||||
|
||||
+1
-1
@@ -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
@@ -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."),
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in new issue
Block a user