Add additional UI for choosing a Crew Type

This commit is contained in:
agaringer 2023-07-18 22:29:52 -04:00 committed by megastruktur
parent d6a060f67e
commit 1fb7886f9c
4 changed files with 8 additions and 3 deletions

View file

@ -57,6 +57,7 @@
"BITD.Loadout": "Loadout", "BITD.Loadout": "Loadout",
"BITD.Load": "Load", "BITD.Load": "Load",
"BITD.CrewType": "Crew Type", "BITD.CrewType": "Crew Type",
"BITD.CrewTypeBox": "Click to choose a Crew Type",
"BITD.FactionType": "Faction Type", "BITD.FactionType": "Faction Type",
"BITD.Price": "Price", "BITD.Price": "Price",
"BITD.Logic": "Logic", "BITD.Logic": "Logic",
@ -251,7 +252,7 @@
"BITD.RollFortuneSuccess": "The result is <strong>good</strong>. You have <strong>standard</strong> or <strong>full effect</strong>.", "BITD.RollFortuneSuccess": "The result is <strong>good</strong>. You have <strong>standard</strong> or <strong>full effect</strong>.",
"BITD.RollFortunePartialSuccess": "The result is <strong>mixed</strong>. You have <strong>limited</strong> or <strong>partial effect</strong>.", "BITD.RollFortunePartialSuccess": "The result is <strong>mixed</strong>. You have <strong>limited</strong> or <strong>partial effect</strong>.",
"BITD.RollFortuneFailure": "The result is <strong>bad</strong>. You have <strong>poor</strong> or <strong>little effect</strong>.", "BITD.RollFortuneFailure": "The result is <strong>bad</strong>. You have <strong>poor</strong> or <strong>little effect</strong>.",
"BITD.RollGatherInformationSuccess": "<strong>Great</strong>: You get exceptional details. The information is complete and follow-up questions may expand into related areas or reveal more than you hoped for.", "BITD.RollGatherInformationSuccess": "<strong>Great</strong>: You get exceptional details. The information is complete and follow-up questions may expand into related areas or reveal more than you hoped for.",
"BITD.RollGatherInformationPartialSuccess": "<strong>Standard</strong>: You get good details. Clarifying and follow-up questions are possible.", "BITD.RollGatherInformationPartialSuccess": "<strong>Standard</strong>: You get good details. Clarifying and follow-up questions are possible.",
"BITD.RollGatherInformationFailure": "<strong>Limited</strong>: You get incomplete or partial information. More information gathering will be needed to get all the answers.", "BITD.RollGatherInformationFailure": "<strong>Limited</strong>: You get incomplete or partial information. More information gathering will be needed to get all the answers.",

View file

@ -57,6 +57,9 @@ export class BladesCrewSheet extends BladesSheet {
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
// Add Crew Type
html.find(".crew-class").click(this._onItemAddClick.bind(this));
// Update Inventory Item // Update Inventory Item
html.find('.item-sheet-open').click(ev => { html.find('.item-sheet-open').click(ev => {
const element = $(ev.currentTarget).parents(".item"); const element = $(ev.currentTarget).parents(".item");
@ -105,6 +108,7 @@ export class BladesCrewSheet extends BladesSheet {
}); });
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Form Submission */ /* Form Submission */
/* -------------------------------------------- */ /* -------------------------------------------- */

View file

@ -10,7 +10,7 @@ export class BladesHelpers {
*/ */
static removeDuplicatedItemType(item_data, actor) { static removeDuplicatedItemType(item_data, actor) {
let dupe_list = []; let dupe_list = [];
let distinct_types = ["crew_reputation", "class", "vice", "background", "heritage"]; let distinct_types = ["crew_type", "crew_reputation", "class", "vice", "background", "heritage"];
let allowed_types = ["item"]; let allowed_types = ["item"];
let should_be_distinct = distinct_types.includes(item_data.type); let should_be_distinct = distinct_types.includes(item_data.type);
// If the Item has the exact same name - remove it from list. // If the Item has the exact same name - remove it from list.

View file

@ -201,7 +201,7 @@
<div class="flex-vertical"> <div class="flex-vertical">
<div id="crew-{{_id}}-class" class="class-name crew-class"> <div id="crew-{{_id}}-class" class="class-name crew-class" data-tooltip="{{localize "BITD.CrewTypeBox"}}" data-distinct="true" data-item-type="crew_type">
{{#each items as |item id|}} {{#each items as |item id|}}
{{#if (eq item.type "crew_type")}} {{#if (eq item.type "crew_type")}}
<div class="big-name">{{item.name}}</div> <div class="big-name">{{item.name}}</div>