This commit is contained in:
Azgaar 2020-04-01 23:01:56 +03:00
parent 557d916301
commit e85650a10b

View file

@ -173,7 +173,7 @@ function overviewMilitary() {
} }
function militaryCustomize() { function militaryCustomize() {
const types = ["default", "melee", "ranged", "mounted", "machinery", "naval"]; const types = ["melee", "ranged", "mounted", "machinery", "naval"];
const table = document.getElementById("militaryOptions").querySelector("tbody"); const table = document.getElementById("militaryOptions").querySelector("tbody");
removeUnitLines(); removeUnitLines();
options.military.map(u => addUnitLine(u)); options.military.map(u => addUnitLine(u));
@ -183,7 +183,7 @@ function overviewMilitary() {
position: {my: "center", at: "center", of: "svg"}, position: {my: "center", at: "center", of: "svg"},
buttons: { buttons: {
Apply: function() {applyMilitaryOptions(); $(this).dialog("close");}, Apply: function() {applyMilitaryOptions(); $(this).dialog("close");},
Add: () => addUnitLine({name: "custom"+rand(1000), rural: .2, urban: .5, crew: 1, type: "default"}), Add: () => addUnitLine({name: "custom"+rand(1000), rural: .2, urban: .5, crew: 1, type: "melee"}),
Restore: restoreDefaultUnits, Restore: restoreDefaultUnits,
Cancel: function() {$(this).dialog("close");} Cancel: function() {$(this).dialog("close");}
}, open: function() { }, open: function() {