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:
supervj 2021-04-13 23:01:03 -04:00
parent a28cbc5a8a
commit fa7b03109f
7 changed files with 95 additions and 90 deletions

View file

@ -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 }}

View file

@ -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);

View file

@ -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,
};

View file

@ -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

View file

@ -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" />