stable
This commit is contained in:
parent
fbdac9ebf1
commit
86226ccc94
97 changed files with 5790 additions and 2307 deletions
|
|
@ -96,14 +96,10 @@ function toolSizeFor(tool) {
|
|||
|
||||
function cycleToolSize(tool) {
|
||||
if (!SCALABLE_TOOLS.has(tool)) return false;
|
||||
if (!world.toolSizes) world.toolSizes = {};
|
||||
const current = toolSizeFor(tool);
|
||||
const idx = SIZE_ORDER.indexOf(current);
|
||||
const next = SIZE_ORDER[(idx + 1 + SIZE_ORDER.length) % SIZE_ORDER.length];
|
||||
world.toolSizes[tool] = next;
|
||||
world.toolSize = next;
|
||||
const result = window.TarinaiCommands?.dispatch?.(world, { type: "tool.size.cycle", toolId: tool, order: SIZE_ORDER });
|
||||
if (!result?.ok) return false;
|
||||
syncToolSizeBadges();
|
||||
showToast(`\u30b5\u30a4\u30ba: ${SIZE_LABELS[next] || next}`);
|
||||
showToast(`\u30b5\u30a4\u30ba: ${SIZE_LABELS[result.size] || result.size}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue