diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-29 19:26:09 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-02 08:22:05 +0000 |
commit | aea07a9d0eff6bfc0b8c3fd366f6aef1c6710d22 (patch) | |
tree | 4f3f40264583983956abd90546148e374fde6587 /play.js | |
parent | da0546400fb89739aaccc83e182569dab67d5cb2 (diff) | |
download | 1989-dawn-of-freedom-aea07a9d0eff6bfc0b8c3fd366f6aef1c6710d22.tar.gz |
Fix spaces starting at 0 not 1
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -401,7 +401,7 @@ function create_ui() { ui.dem_inf = [] ui.com_inf = [] - for (let s = 1; s <= last_space; ++s) { + for (let s = 0; s <= last_space; ++s) { let info = spaces[s] let [ x, y, w, h ] = LAYOUT[info.ascii_name] let xc = Math.round(x + w / 2) @@ -454,7 +454,6 @@ function create_ui() { power_card_e.className = "card power_card power_" + c ui.power_cards[c] = power_card_e } - ui.events = [] for (let id of box_events) { ui.events[id] = document.createElement("div") @@ -613,7 +612,7 @@ function on_update() { // UPDATE INFLUENCE VALUES - for (let s = 1; s <= last_space; ++s) { + for (let s = 0; s <= last_space; ++s) { const demInfl = view.demInfl[s] const comInfl = view.comInfl[s] |