Create counters with assigned weapons
This commit is contained in:
@@ -152,6 +152,18 @@ function endMove() {
|
||||
deselect();
|
||||
}
|
||||
|
||||
export function extractWeaponFromRecord(recordEl) {
|
||||
return recordEl
|
||||
.querySelector('[slot="primary-weapon-type"] use')
|
||||
.getAttributeNS(null, 'href')
|
||||
.split('#')
|
||||
.pop();
|
||||
}
|
||||
|
||||
export function isRecord(el) {
|
||||
return el.classList && el.classList.contains('soldier-record');
|
||||
}
|
||||
|
||||
export function getSelected() {
|
||||
return document.querySelector('.soldier-record.selected');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user