fix: Item/NPC Exporter allows non alphabet or number chars in ID

This commit is contained in:
Jacob
2025-07-14 19:28:22 +08:00
committed by Linnea Gräf
parent 649aac85c3
commit 4cd6602805

View File

@@ -185,7 +185,7 @@ object ExportRecipe {
}
fun generateName(name: String): SkyblockId {
return SkyblockId(name.uppercase().replace(" ", "_").replace("(", "").replace(")", ""))
return SkyblockId(name.uppercase().replace(" ", "_").replace(Regex("[^A-Z_]+"), ""))
}
fun findStackableItemByName(name: String, fallbackToGenerated: Boolean = false): Pair<SkyblockId, Double>? {