forked from GitHub-Mirrors/foundry-sw5e
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:
parent
c793949b37
commit
f393670528
6 changed files with 25 additions and 8 deletions
|
@ -19,7 +19,10 @@
|
||||||
"ITEM.TypeLoot": "Loot",
|
"ITEM.TypeLoot": "Loot",
|
||||||
"ITEM.TypePower": "Power",
|
"ITEM.TypePower": "Power",
|
||||||
"ITEM.TypeSpecies": "Species",
|
"ITEM.TypeSpecies": "Species",
|
||||||
|
"ITEM.TypeStarshipfeature": "Starship Feature",
|
||||||
|
"ITEM.TypeStarshipfeaturePl": "Starship Features",
|
||||||
"ITEM.TypeStarshipmod": "Starship Modification",
|
"ITEM.TypeStarshipmod": "Starship Modification",
|
||||||
|
"ITEM.TypeStarshipmodPl": "Starship Modifications",
|
||||||
"ITEM.TypeTool": "Tool",
|
"ITEM.TypeTool": "Tool",
|
||||||
"ITEM.TypeVenture": "Venture",
|
"ITEM.TypeVenture": "Venture",
|
||||||
"ITEM.TypeWeapon": "Weapon",
|
"ITEM.TypeWeapon": "Weapon",
|
||||||
|
@ -830,6 +833,7 @@
|
||||||
"SW5E.Reaction": "Reaction",
|
"SW5E.Reaction": "Reaction",
|
||||||
"SW5E.ReactionPl": "Reactions",
|
"SW5E.ReactionPl": "Reactions",
|
||||||
"SW5E.Recharge": "Recharge",
|
"SW5E.Recharge": "Recharge",
|
||||||
|
"SW5E.Refitting": "Refitting",
|
||||||
"SW5E.RegenerationRateCoefficient": "Regeneration Rate Coefficient",
|
"SW5E.RegenerationRateCoefficient": "Regeneration Rate Coefficient",
|
||||||
"SW5E.RequiredMaterials": "Required Materials",
|
"SW5E.RequiredMaterials": "Required Materials",
|
||||||
"SW5E.Requirements": "Requirements",
|
"SW5E.Requirements": "Requirements",
|
||||||
|
@ -927,6 +931,8 @@
|
||||||
"SW5E.StarshipArmorandShieldProps": "Starship Armor & Shield Properties",
|
"SW5E.StarshipArmorandShieldProps": "Starship Armor & Shield Properties",
|
||||||
"SW5E.StarshipEquipment": "Starship Equipment",
|
"SW5E.StarshipEquipment": "Starship Equipment",
|
||||||
"SW5E.StarshipEquipmentProps": "Starship Equipment Properties",
|
"SW5E.StarshipEquipmentProps": "Starship Equipment Properties",
|
||||||
|
"SW5E.StarshipfeaturePl": "Starship Features",
|
||||||
|
"SW5E.StarshipmodPl": "Starship Modifications",
|
||||||
"SW5E.StarshipSkillAst": "Astrogation",
|
"SW5E.StarshipSkillAst": "Astrogation",
|
||||||
"SW5E.StarshipSkillBst": "Boost",
|
"SW5E.StarshipSkillBst": "Boost",
|
||||||
"SW5E.StarshipSkillDat": "Data",
|
"SW5E.StarshipSkillDat": "Data",
|
||||||
|
|
|
@ -317,7 +317,7 @@ export default class Actor5e extends Actor {
|
||||||
const data = actorData.data;
|
const data = actorData.data;
|
||||||
|
|
||||||
// Proficiency
|
// Proficiency
|
||||||
data.attributes.prof = Math.floor((Math.max(data.details.cr, 1) + 7) / 4);
|
data.attributes.prof = Math.floor((Math.max(data.details.tier, 1) + 7) / 4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ export default class Actor5e extends Actor {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_computePowercastingProgression (actorData) {
|
_computePowercastingProgression (actorData) {
|
||||||
if (actorData.type === 'vehicle') return;
|
if (actorData.type === 'vehicle' || actorData.type === 'starship') return;
|
||||||
const powers = actorData.data.powers;
|
const powers = actorData.data.powers;
|
||||||
const isNPC = actorData.type === 'npc';
|
const isNPC = actorData.type === 'npc';
|
||||||
|
|
||||||
|
|
|
@ -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"} },
|
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"} },
|
passive: { label: game.i18n.localize("SW5E.Features"), items: [], dataset: {type: "feat"} },
|
||||||
equipment: { label: game.i18n.localize("SW5E.StarshipEquipment"), items: [], dataset: {type: "equipment"}},
|
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
|
// Start by classifying items into groups for rendering
|
||||||
|
@ -70,10 +71,13 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
|
||||||
else if ( item.type === "feat" ) {
|
else if ( item.type === "feat" ) {
|
||||||
if ( item.data.activation.type ) features.actions.items.push(item);
|
if ( item.data.activation.type ) features.actions.items.push(item);
|
||||||
else features.passive.items.push(item);
|
else features.passive.items.push(item);
|
||||||
}
|
}
|
||||||
|
else if ( item.type === "starshipfeature" ) {
|
||||||
|
features.starshipfeatures.items.push(item);
|
||||||
|
}
|
||||||
else if ( item.type === "starshipmod" ) {
|
else if ( item.type === "starshipmod" ) {
|
||||||
features.starshipmods.items.push(item);
|
features.starshipmods.items.push(item);
|
||||||
}
|
}
|
||||||
else features.equipment.items.push(item);
|
else features.equipment.items.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,9 @@ SW5E.limitedUsePeriods = {
|
||||||
"sr": "SW5E.ShortRest",
|
"sr": "SW5E.ShortRest",
|
||||||
"lr": "SW5E.LongRest",
|
"lr": "SW5E.LongRest",
|
||||||
"day": "SW5E.Day",
|
"day": "SW5E.Day",
|
||||||
"charges": "SW5E.Charges"
|
"charges": "SW5E.Charges",
|
||||||
|
"recharge": "SW5E.Recharge",
|
||||||
|
"refitting": "SW5E.Refitting"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
2
sw5e.js
2
sw5e.js
|
@ -136,7 +136,7 @@ Hooks.once("init", function() {
|
||||||
});
|
});
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("sw5e", ItemSheet5e, {
|
Items.registerSheet("sw5e", ItemSheet5e, {
|
||||||
types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starshipmod', 'venture'],
|
types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starshipfeature', 'starshipmod', 'venture'],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
label: "SW5E.SheetClassItem"
|
label: "SW5E.SheetClassItem"
|
||||||
});
|
});
|
||||||
|
|
|
@ -541,7 +541,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["archetype", "background", "backpack", "class", "classfeature", "consumable", "deployment", "deploymentfeature", "equipment", "feat", "fightingmastery", "fightingstyle", "lightsaberform", "loot", "power", "species", "starshipmod", "tool", "venture", "weapon"],
|
"types": ["archetype", "background", "backpack", "class", "classfeature", "consumable", "deployment", "deploymentfeature", "equipment", "feat", "fightingmastery", "fightingstyle", "lightsaberform", "loot", "power", "species", "starshipfeature", "starshipmod", "tool", "venture", "weapon"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"archetypeDescription": {
|
"archetypeDescription": {
|
||||||
"className": "",
|
"className": "",
|
||||||
|
@ -846,6 +846,11 @@
|
||||||
"mode": "none",
|
"mode": "none",
|
||||||
"formula": null
|
"formula": null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"starshipfeature": {
|
||||||
|
"templates": ["itemDescription", "activatedEffect", "action"],
|
||||||
|
"size": "med",
|
||||||
|
"tier": 0
|
||||||
},
|
},
|
||||||
"starshipmod": {
|
"starshipmod": {
|
||||||
"templates": ["itemDescription"]
|
"templates": ["itemDescription"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue