plugin-backend #1
@ -930,12 +930,12 @@ async function update_breakdown(scene, checks, entrances) {
|
|||||||
|
|
||||||
// Check for changes, and if so, update
|
// Check for changes, and if so, update
|
||||||
if (
|
if (
|
||||||
breakdown_checks.dataset.checksCollected !=
|
parseInt(breakdown_checks.dataset.checksCollected) !=
|
||||||
checks.collected + checks.found
|
checks.collected + checks.found
|
||||||
) {
|
) {
|
||||||
update_breakdown_checks(scene, checks);
|
update_breakdown_checks(scene, checks);
|
||||||
}
|
}
|
||||||
if (breakdown_entrances.dataset.entrancesFound != entrances.found) {
|
if (parseInt(breakdown_entrances.dataset.entrancesFound) != entrances.found) {
|
||||||
update_breakdown_entrances(scene, entrances);
|
update_breakdown_entrances(scene, entrances);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -945,9 +945,11 @@ async function update_breakdown_list(data, changed) {
|
|||||||
if (changed.checks) {
|
if (changed.checks) {
|
||||||
Object.keys(data.scenes).forEach((scene) =>
|
Object.keys(data.scenes).forEach((scene) =>
|
||||||
update_breakdown(scene, data.scenes[scene], {
|
update_breakdown(scene, data.scenes[scene], {
|
||||||
found: document.querySelector(
|
found: parseInt(
|
||||||
|
document.querySelector(
|
||||||
`.breakdown[data-scene="${scene}"] .breakdown-block-entrances-title`
|
`.breakdown[data-scene="${scene}"] .breakdown-block-entrances-title`
|
||||||
).dataset.entrancesFound,
|
).dataset.entrancesFound
|
||||||
|
),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else if (changed.entrances) {
|
} else if (changed.entrances) {
|
||||||
|
Loading…
Reference in New Issue
Block a user