summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/play.js b/play.js
index beb62e1..5073ee0 100644
--- a/play.js
+++ b/play.js
@@ -290,13 +290,20 @@ function hide_move_path() {
/* PANEL ORDER */
-const panel_order = [ P_FRANCE, P_BAVARIA, P_PRUSSIA, P_SAXONY, P_PRAGMATIC, P_AUSTRIA, 6 ]
-const panel_start = {
+const panel_order_p = [ P_FRANCE, P_BAVARIA, P_PRUSSIA, P_SAXONY, P_PRAGMATIC, P_AUSTRIA, 6 ]
+const panel_order_a = [ P_FRANCE, P_BAVARIA, P_PRUSSIA, P_PRAGMATIC, P_AUSTRIA, P_SAXONY, 6 ]
+const panel_start_p = {
"Observer": 0,
"Louis XV": 0,
"Frederick": 2,
"Maria Theresa": 5,
}
+const panel_start_a = {
+ "Observer": 0,
+ "Louis XV": 0,
+ "Frederick": 2,
+ "Maria Theresa": 4,
+}
function remember_position(e) {
if (e.parentElement) {
@@ -331,6 +338,9 @@ function animate_position(e) {
}
function sort_power_panel(animate) {
+ let panel_order = (!view || view.saxony < 3) ? panel_order_p : panel_order_a
+ let panel_start = (!view || view.saxony < 3) ? panel_start_p : panel_start_a
+
let start = panel_start[params.role] | 0
if (animate)
@@ -346,6 +356,9 @@ function sort_power_panel(animate) {
if (view && view.actions)
ui.power_panel_list.prepend(ui.power_panel[view.power])
+ if (view && (view.political || (view.actions && view.actions.shift)))
+ ui.power_panel_list.prepend(ui.power_panel[6])
+
if (animate)
for (let i = 0; i < 7; ++i)
animate_position(ui.power_panel[i])
@@ -927,7 +940,7 @@ function layout_victory_box(pow, col, row) {
function layout_political_marker(e, col, row) {
let x = 190 + (col-1) * 69
- let y = 72 + row * 86 + 16
+ let y = 72 + row * 86
e.style.left = (x - 16) + "px"
e.style.top = (y - 16) + "px"
ui.pol_tracks.appendChild(e)