ENH: Slow icon
parent
78869bb702
commit
30f68727dc
|
@ -18,7 +18,7 @@ export class OseCombat {
|
|||
// Set init
|
||||
for (let i = 0; i < data.combatants.length; ++i) {
|
||||
if (data.combatants[i].actor.data.data.isSlow) {
|
||||
data.combatants[i].initiative = -1;
|
||||
data.combatants[i].initiative = -789;
|
||||
} else {
|
||||
data.combatants[i].initiative = groups[data.combatants[i].flags.ose.group].initiative;
|
||||
}
|
||||
|
|
|
@ -109,12 +109,15 @@ Hooks.on("preUpdateCombatant", (combat, combatant, data, diff, id) => {
|
|||
});
|
||||
} else if (data.initiative && init) {
|
||||
if (combatant.actor.data.data.isSlow) {
|
||||
data.initiative = -1;
|
||||
data.initiative = -789;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Hooks.on("renderCombatTracker", (object, html, data) => {
|
||||
html.find('.initiative').each((_, span) => {
|
||||
span.innerHTML = span.innerHTML == '-789.00' ? '<i class="fas fa-weight-hanging"></i>' : span.innerHTML;
|
||||
})
|
||||
let init = game.settings.get("ose", "individualInit");
|
||||
if (!init) {
|
||||
OseCombat.format(object, html, data);
|
||||
|
|
Loading…
Reference in New Issue