import { mkdirSync, writeFileSync } from "node:fs"; import { ALL_SKILL_IDS } from "../../shared/definitions/skills.js"; const labels = { clubfighting: "CL", swordfighting: "SW", axefighting: "AX", archery: "AR", unarmed: "UN", magic: "MG", strength: "ST", dexterity: "DX", agility: "AG", mind: "MN", defence: "DF", health: "HP", stamina: "SM", woodcutting: "WC", mining: "MI", fishing: "FS", smithing: "SI", crafting: "CR", leatherworking: "LW", tailoring: "TL", cooking: "CK", herbalism: "HB", alchemy: "AL" }; const colors = { clubfighting: "#8b6914", swordfighting: "#7a8a9a", axefighting: "#9a5030", archery: "#4a7a40", unarmed: "#6a6050", magic: "#6050a0", strength: "#a04040", dexterity: "#4080a0", agility: "#50a080", mind: "#8060a0", defence: "#506080", health: "#a03030", stamina: "#408060", woodcutting: "#5a7040", mining: "#606060", fishing: "#3070a0", smithing: "#806040", crafting: "#806080", leatherworking: "#8a6040", tailoring: "#7070a0", cooking: "#a06030", herbalism: "#3a8a48", alchemy: "#6a40a0" }; mkdirSync(new URL("../assets/skills/", import.meta.url), { recursive: true }); const dir = new URL("../assets/skills/", import.meta.url); for (const id of ALL_SKILL_IDS) { const svg = [ "", ``, `${labels[id] ?? "?"}`, "" ].join(""); writeFileSync(new URL(`${id}.svg`, dir), svg); }