Add additional UI for choosing a Crew Type
This commit is contained in:
parent
d6a060f67e
commit
1fb7886f9c
4 changed files with 8 additions and 3 deletions
|
@ -57,6 +57,7 @@
|
|||
"BITD.Loadout": "Loadout",
|
||||
"BITD.Load": "Load",
|
||||
"BITD.CrewType": "Crew Type",
|
||||
"BITD.CrewTypeBox": "Click to choose a Crew Type",
|
||||
"BITD.FactionType": "Faction Type",
|
||||
"BITD.Price": "Price",
|
||||
"BITD.Logic": "Logic",
|
||||
|
|
|
@ -57,6 +57,9 @@ export class BladesCrewSheet extends BladesSheet {
|
|||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
// Add Crew Type
|
||||
html.find(".crew-class").click(this._onItemAddClick.bind(this));
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-sheet-open').click(ev => {
|
||||
const element = $(ev.currentTarget).parents(".item");
|
||||
|
@ -105,6 +108,7 @@ export class BladesCrewSheet extends BladesSheet {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Form Submission */
|
||||
/* -------------------------------------------- */
|
||||
|
|
|
@ -10,7 +10,7 @@ export class BladesHelpers {
|
|||
*/
|
||||
static removeDuplicatedItemType(item_data, actor) {
|
||||
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 should_be_distinct = distinct_types.includes(item_data.type);
|
||||
// If the Item has the exact same name - remove it from list.
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
|
||||
<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|}}
|
||||
{{#if (eq item.type "crew_type")}}
|
||||
<div class="big-name">{{item.name}}</div>
|
||||
|
|
Reference in a new issue