index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/index.js b/src/index.js index a951084..fa90d13 100644 --- a/src/index.js +++ b/src/index.js @@ -16,7 +16,6 @@ if (window.IS_DEV) { const mapPlaceholder = document.querySelector('.map-placeholder'), distanceOutput = document.getElementById('status'), - proneToggle = document.getElementById('toggle-prone-counter'), contentVisToggleEl = document.querySelector('#edge-inputs input[type="checkbox"].visible'), fileName = localStorage.getItem('map') || 'scenario-side_show', map = scenarios[fileName]?.hashed || `assets/images/${fileName}.svg`, @@ -85,10 +84,10 @@ async function buildScenario(req) { // recordSheet.start(svg.querySelector('.start-locations'), gameboard.getUnits()); recordSheet.start(null, scenarioUnits); - //const [trooper] = gameboard.getUnits(); - //Observable.notify('select', trooper); - //gameboard.setCounter('prone'); - //gameboard.setCounter('1st-floor'); + const [trooper] = gameboard.getUnits(); + Observable.notify('select', trooper); + gameboard.setCounter('prone'); + gameboard.setCounter('1st-floor'); } function updateTurnCounter() { @@ -173,11 +172,6 @@ document.querySelectorAll('#toggle-firing-arc-vis input').forEach(el => el.addEventListener('input', gameboard.toggleFiringArcVisibility) ); -document.getElementById('toggle-prone-counter').addEventListener('input', function () { - const selected = recordSheet.getSelected(); - selected && gameboard.toggleProne(); -}); - document.querySelectorAll('.end-move').forEach(el => el.addEventListener('click', () => Observable.notify('endmove')) ); @@ -313,4 +307,3 @@ dice.forEach(el => { }); Observable.subscribe('distance', distance); -Observable.subscribe('proneflag', checked => proneToggle.checked = checked); |