mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v1.3.17a
This commit is contained in:
parent
74ea22fc87
commit
498ab097f9
4 changed files with 76 additions and 31 deletions
|
|
@ -293,15 +293,26 @@ function editReligions() {
|
|||
function religionRemove() {
|
||||
if (customization) return;
|
||||
const religion = +this.parentNode.dataset.id;
|
||||
relig.select("#religion"+religion).remove();
|
||||
debug.select("#religionsCenter"+religion).remove();
|
||||
|
||||
pack.cells.religion.forEach((r, i) => {if(r === religion) pack.cells.religion[i] = 0;});
|
||||
pack.religions[religion].removed = true;
|
||||
const origin = pack.religions[religion].origin;
|
||||
pack.religions.forEach(r => {if(r.origin === religion) r.origin = origin;});
|
||||
alertMessage.innerHTML = "Are you sure you want to remove the religion? <br>This action cannot be reverted";
|
||||
$("#alert").dialog({resizable: false, title: "Remove religion",
|
||||
buttons: {
|
||||
Remove: function() {
|
||||
relig.select("#religion"+religion).remove();
|
||||
relig.select("#religion-gap"+religion).remove();
|
||||
debug.select("#religionsCenter"+religion).remove();
|
||||
|
||||
refreshReligionsEditor();
|
||||
pack.cells.religion.forEach((r, i) => {if(r === religion) pack.cells.religion[i] = 0;});
|
||||
pack.religions[religion].removed = true;
|
||||
const origin = pack.religions[religion].origin;
|
||||
pack.religions.forEach(r => {if(r.origin === religion) r.origin = origin;});
|
||||
|
||||
refreshReligionsEditor();
|
||||
$(this).dialog("close");
|
||||
},
|
||||
Cancel: function() {$(this).dialog("close");}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function drawReligionCenters() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue