SotG Update #1.1 (Quick Fixes)

^ Updates entity.js and starship.js to fix drag-and-drop and NaN errors and prepare for Starship Features.
^ Updates en.json, config.js, sw5e.js, and template.json to prepare for Starship Features.
This commit is contained in:
Professor Bunbury 2021-04-07 14:10:56 -04:00
parent c793949b37
commit f393670528
6 changed files with 25 additions and 8 deletions

View file

@ -38,7 +38,8 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
weapons: { label: game.i18n.localize("SW5E.ItemTypeWeaponPl"), items: [], hasActions: true, dataset: {type: "weapon", "weapon-type": "natural"} },
passive: { label: game.i18n.localize("SW5E.Features"), items: [], dataset: {type: "feat"} },
equipment: { label: game.i18n.localize("SW5E.StarshipEquipment"), items: [], dataset: {type: "equipment"}},
starshipmods: { label: game.i18n.localize("SW5E.ItemTypeStarshipModPl"), items: [], hasActions: false, dataset: {type: "starshipmod"} }
starshipfeatures: { label: game.i18n.localize("SW5E.StarshipfeaturePl"), items: [], hasActions: true, dataset: {type: "starshipfeature"} },
starshipmods: { label: game.i18n.localize("SW5E.StarshipmodPl"), items: [], hasActions: false, dataset: {type: "starshipmod"} }
};
// Start by classifying items into groups for rendering
@ -70,10 +71,13 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
else if ( item.type === "feat" ) {
if ( item.data.activation.type ) features.actions.items.push(item);
else features.passive.items.push(item);
}
}
else if ( item.type === "starshipfeature" ) {
features.starshipfeatures.items.push(item);
}
else if ( item.type === "starshipmod" ) {
features.starshipmods.items.push(item);
}
}
else features.equipment.items.push(item);
}