Skip to content

Commit eaf28e5

Browse files
authored
Add files via upload
1 parent 82a7fcf commit eaf28e5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scripts/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Hooks.on("getSceneControlButtons", (controls,b,c) => {
103103
name: "walledges",
104104
title: game.i18n.localize("betterroofs.scenecontrols.walledges"),
105105
onClick: async () => {
106-
if(await _betterRoofsHelpers.yesNoPrompt(game.i18n.localize("betterroofs.yesnodialog.title"),game.i18n.localize("betterroofs.yesnodialog.desc"))) buildEdgeWalls()
106+
if(await _betterRoofsHelpers.yesNoPrompt(game.i18n.localize("betterroofs.yesnodialog.title"),game.i18n.localize("betterroofs.yesnodialog.desc"))) _betterRoofsHelpers.buildEdgeWalls()
107107
},
108108
}
109109
)

scripts/helpers.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ class betterRoofsHelpers {
333333
[padX + width, padY + height, padX, padY + height],
334334
[padX, padY + height, padX, padY],
335335
];
336-
336+
let wallDataArray = []
337337
for (let c of wallsCoords) {
338-
await Wall.create({
338+
wallDataArray.push({
339339
c: c,
340340
move: 1,
341341
sense: 1,
@@ -345,6 +345,7 @@ class betterRoofsHelpers {
345345
ds: 0,
346346
});
347347
}
348+
await canvas.scene.createEmbeddedDocuments("Wall",wallDataArray)
348349
}
349350

350351
/************************

0 commit comments

Comments
 (0)