This commit is contained in:
33333-33333 2026-06-22 02:03:19 +09:00
commit e8f1d1db1e
60 changed files with 2417 additions and 612 deletions

View file

@ -2,9 +2,9 @@
const SCALABLE_TOOLS = new Set(scalableToolIds());
const SIZE_ORDER = ["small", "medium", "large"];
const SIZE_ORDER = typeof TOOL_SIZE_ORDER !== "undefined" ? TOOL_SIZE_ORDER : ["small", "medium", "large"];
const SIZE_LABELS = { small: "\u5c0f", medium: "\u4e2d", large: "\u5927" };
const SIZE_LABELS = typeof TOOL_SIZE_LABELS !== "undefined" ? TOOL_SIZE_LABELS : { small: "小", medium: "中", large: "大" };
function renderToolPalette() {
if (!ui?.toolPalette || typeof toolCategories !== "function") return;
@ -39,7 +39,7 @@ function renderToolPalette() {
function toolSizeFor(tool) {
if (!SCALABLE_TOOLS.has(tool)) return "";
return (world.toolSizes && world.toolSizes[tool]) || world.toolSize || "medium";
return typeof normalizedToolSizeFor === "function" ? normalizedToolSizeFor(world, tool) : ((world.toolSizes && world.toolSizes[tool]) || world.toolSize || "medium");
}
function cycleToolSize(tool) {