Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
theripper93 committed May 8, 2023
1 parent 0fbded3 commit 6638fea
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,21 @@ Hooks.on("combatRound", () => {
})

Hooks.on("getSwadeCombatTrackerEntryContext", function () {
if (game.settings.get("combatbooster", "enableMarker")) {
if (!canvas.tokens.CBTurnMarker) {
new TurnMarker();
if (game.settings.get("combatbooster", "enableNextMarker")) {
new NextTurnMarker();
}
if (game.settings.get("combatbooster", "enableStartMarker")) {
new StartTurnMarker();
try {
if (game.settings.get("combatbooster", "enableMarker")) {
if (!canvas.tokens.CBTurnMarker) {
new TurnMarker();
if (game.settings.get("combatbooster", "enableNextMarker")) {
new NextTurnMarker();
}
if (game.settings.get("combatbooster", "enableStartMarker")) {
new StartTurnMarker();
}
} else {
canvas.tokens.CBTurnMarker.MoveToCombatant();
canvas.tokens.CBNextTurnMarker?.MoveToCombatant()
}
} else {
canvas.tokens.CBTurnMarker.MoveToCombatant();
canvas.tokens.CBNextTurnMarker?.MoveToCombatant()
}
}catch (error) {
}
});

0 comments on commit 6638fea

Please sign in to comment.