Removed traces of old TagTeamRoll

This commit is contained in:
WBHarry 2026-03-15 14:44:28 +01:00
parent 56b9ee2b14
commit cd6cd1c952
18 changed files with 6 additions and 153 deletions

View file

@ -189,21 +189,6 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
return true;
}
async _preDelete() {
/* Clear all partyMembers from tagTeam setting.*/
/* Revisit this when tagTeam is improved for many parties */
if (this.parent.parties.size > 0) {
const tagTeam = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll);
await tagTeam.updateSource({
initiator: this.parent.id === tagTeam.initiator ? null : tagTeam.initiator,
members: Object.keys(tagTeam.members).find(x => x === this.parent.id)
? { [`-=${this.parent.id}`]: null }
: {}
});
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.TagTeamRoll, tagTeam);
}
}
async _preUpdate(changes, options, userId) {
const allowed = await super._preUpdate(changes, options, userId);
if (allowed === false) return;