mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Refactor makeEdit so it returns the result node
This commit is contained in:
@@ -117,8 +117,11 @@ function shuffle<T>(array: T[], ctx: LootContext) {
|
||||
}
|
||||
|
||||
function generateTable(table: any, consumer: ItemConsumer, ctx: LootContext) {
|
||||
if (!Array.isArray(table.pools)) {
|
||||
return
|
||||
}
|
||||
const tableConsumer = decorateFunctions(table.functions ?? [], consumer, ctx)
|
||||
for (const pool of table.pools ?? []) {
|
||||
for (const pool of table.pools) {
|
||||
generatePool(pool, tableConsumer, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user