Update the brace format from 1tbs to stroustrup

This commit is contained in:
Eldritch-Oliver 2025-10-08 23:10:15 -06:00
parent 1c7308e188
commit 3dd3139281
13 changed files with 31 additions and 16 deletions

View file

@ -115,7 +115,8 @@ export class CraftCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(Acto
const length = crafts.length;
if (length >= limit) {
crafts = crafts.slice(0, limit);
} else {
}
else {
crafts = crafts
.concat(Array(limit - length).fill(null))
.slice(0, limit);

View file

@ -194,7 +194,8 @@ export class SkillsCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(Act
const length = ctx.skills[ability].length;
if (length >= limit) {
ctx.skills[ability] = ctx.skills[ability].slice(0, limit);
} else {
}
else {
ctx.skills[ability] = ctx.skills[ability]
.concat(Array(limit - length).fill(null))
.slice(0, limit);

View file

@ -88,7 +88,8 @@ export class DelveDiceHUD extends HandlebarsApplicationMixin(ApplicationV2) {
const existing = document.getElementById(element.id);
if (existing) {
existing.replaceWith(element);
} else {
}
else {
const parent = document.getElementById(`ui-top`);
parent.prepend(element);
};
@ -292,7 +293,8 @@ export class DelveDiceHUD extends HandlebarsApplicationMixin(ApplicationV2) {
if (delta === 0 || !shouldUpdateSands) { return };
if (game.user.isActiveGM) {
ui.delveDice.sandsOfFateDelta(delta);
} else {
}
else {
game.socket.emit(`system.ripcrypt`, {
event: `updateSands`,
payload: { delta },

View file

@ -51,7 +51,8 @@ export function StyledShadowElement(Base) {
const stylePath = this.constructor._stylePath;
if (this.constructor._styles.has(stylePath)) {
this._style.innerHTML = this.constructor._styles.get(stylePath);
} else {
}
else {
fetch(`./systems/${game.system.id}/templates/${stylePath}`)
.then(r => r.text())
.then(t => {

View file

@ -42,9 +42,11 @@ export function toBoolean(val) {
export function documentSorter(a, b) {
if (!a && !b) {
return 0;
} else if (!a) {
}
else if (!a) {
return 1;
} else if (!b) {
}
else if (!b) {
return -1;
};

View file

@ -199,7 +199,8 @@ export class WeaponData extends CommonItemData {
value: this.range.long,
},
});
} else {
}
else {
fields.push({
id: `short-range`,
type: `integer`,

View file

@ -38,7 +38,8 @@ export class CryptDie extends Die {
if (almostCrypted) {
this.ripCryptState = `crypted`;
break;
} else {
}
else {
almostCrypted = true;
}
}

View file

@ -16,7 +16,8 @@ export class RipCryptCombat extends Combat {
if (groups.has(groupKey)) {
groups.get(groupKey).push(combatant);
} else {
}
else {
groups.set(groupKey, [combatant]);
};
};
@ -129,7 +130,8 @@ export class RipCryptCombat extends Combat {
const currentToken = this.combatant?.token?._object;
if (!tokenGroup && currentToken) {
currentToken.renderFlags.set({refreshTurnMarker: true});
} else {
}
else {
const group = this.customGroups.get(tokenGroup) ?? [];
for (const combatant of group) {
combatant.token?._object?.renderFlags.set({ refreshTurnMarker: true });

View file

@ -28,7 +28,8 @@ export class RipCryptCombatant extends Combatant {
const disposition = this.disposition;
if (disposition === `unknown`) {
total += 0.25;
} else if (whoFirst !== disposition) {
}
else if (whoFirst !== disposition) {
total += 0.5;
};
};

View file

@ -26,7 +26,8 @@ export class RipCryptToken extends Token {
};
canvas.tokens.turnMarkers.add(this);
this.turnMarker.draw();
} else if (this.turnMarker) {
}
else if (this.turnMarker) {
canvas.tokens.turnMarkers.delete(this);
this.turnMarker.destroy();
this.turnMarker = null;

View file

@ -9,7 +9,8 @@ Hooks.once(`ready`, () => {
try {
Logger.debug(`Switching sidebar tab to:`, defaultTab);
ui.sidebar.changeTab(defaultTab, `primary`);
} catch {
}
catch {
Logger.error(`Failed to change to sidebar tab:`, defaultTab);
};
};

View file

@ -31,7 +31,8 @@ export function updateSands(payload) {
`sandsOfFate`,
sands,
);
} else if (delta != null) {
}
else if (delta != null) {
ui.delveDice.sandsOfFateDelta(delta);
};
};