forked from GitHub-Mirrors/foundry-sw5e
Add Skills to Starships
Added skills to the starship sheets and made them rollable. Sorry about the direct commit to Develop, but I forgot to branch it off...
This commit is contained in:
parent
a28cbc5a8a
commit
fa7b03109f
7 changed files with 95 additions and 90 deletions
|
@ -860,7 +860,7 @@ export default class Actor5e extends Actor {
|
|||
const rollData = mergeObject(options, {
|
||||
parts: parts,
|
||||
data: data,
|
||||
title: game.i18n.format("SW5E.SkillPromptTitle", {skill: CONFIG.SW5E.skills[skillId]}),
|
||||
title: game.i18n.format("SW5E.SkillPromptTitle", {skill: CONFIG.SW5E.skills[skillId] || CONFIG.SW5E.starshipSkills[skillId]}),
|
||||
halflingLucky: this.getFlag("sw5e", "halflingLucky"),
|
||||
reliableTalent: reliableTalent,
|
||||
messageData: {"flags.sw5e.roll": {type: "skill", skillId }}
|
||||
|
|
|
@ -96,9 +96,13 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
skl.ability = CONFIG.SW5E.abilityAbbreviations[skl.ability];
|
||||
skl.icon = this._getProficiencyIcon(skl.value);
|
||||
skl.hover = CONFIG.SW5E.proficiencyLevels[skl.value];
|
||||
if (data.actor.type === "starship") {
|
||||
skl.label = CONFIG.SW5E.starshipSkills[s];
|
||||
}else{
|
||||
skl.label = CONFIG.SW5E.skills[s];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Movement speeds
|
||||
data.movement = this._getMovementSpeed(data.actor);
|
||||
|
|
|
@ -65,6 +65,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
cssClass: isOwner ? "editable" : "locked",
|
||||
isCharacter: this.entity.data.type === "character",
|
||||
isNPC: this.entity.data.type === "npc",
|
||||
isStarship: this.entity.data.type === "starship",
|
||||
isVehicle: this.entity.data.type === 'vehicle',
|
||||
config: CONFIG.SW5E,
|
||||
};
|
||||
|
|
4
sw5e.js
4
sw5e.js
|
@ -161,8 +161,8 @@ Hooks.once("setup", function() {
|
|||
"armorProficiencies", "armorPropertiesTypes", "conditionTypes", "consumableTypes", "cover", "currencies", "damageResistanceTypes",
|
||||
"damageTypes", "distanceUnits", "equipmentTypes", "healingTypes", "itemActionTypes", "languages",
|
||||
"limitedUsePeriods", "movementTypes", "movementUnits", "polymorphSettings", "proficiencyLevels", "senses", "skills",
|
||||
"powerComponents", "powerLevels", "powerPreparationModes", "powerScalingModes", "powerSchools", "targetTypes",
|
||||
"timePeriods", "toolProficiencies", "weaponProficiencies", "weaponProperties", "weaponTypes"
|
||||
"starshipSkills", "powerComponents", "powerLevels", "powerPreparationModes", "powerScalingModes", "powerSchools", "targetTypes",
|
||||
"timePeriods", "toolProficiencies", "weaponProficiencies", "weaponProperties", "weaponTypes", "weaponSizes"
|
||||
];
|
||||
|
||||
// Exclude some from sorting where the default order matters
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<section class="skills">
|
||||
<h1>{{localize "SW5E.Skills"}}</h1>
|
||||
<ol>
|
||||
{{#each CONFIG.starshipSkills as |skill s|}}
|
||||
{{#each data.skills as |skill s|}}
|
||||
<li class="skill {{#if skill.value}}proficient{{/if}}" data-skill="{{s}}">
|
||||
<input type="hidden" name="data.skills.{{s}}.value" value="{{skill.value}}"
|
||||
data-dtype="Number" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue