stuff and things

This commit is contained in:
Kim Ravn Hansen
2025-09-05 17:47:28 +02:00
parent 3835ad1de3
commit 8bcbdbfe35
6 changed files with 306 additions and 221 deletions

View File

@@ -1,4 +1,4 @@
import { cleanIdentifier } from "../utils/helpers";
import { cleanName } from "../utils/id.js";
/**
* Item templates are the built-in basic items of the game.
@@ -56,7 +56,7 @@ export class ItemTemplate {
throw new Error("itemSlots must be a finite number!");
}
if (typeof id === "undefined") {
id = cleanIdentifier(name);
id = cleanName(name);
}
if (typeof id !== "string") {
throw new Error("id must be a string!");