diff --git a/module/actor-sheet.js b/module/actor-sheet.js index ba0c757..a5759fe 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -35,14 +35,6 @@ export class BladesActorSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); - // // Activate tabs - // let tabs = html.find('.tabs'); - // let initial = this._sheetTab; - // new Tabs(tabs, { - // initial: initial, - // callback: clicked => this._sheetTab = clicked.data("tab") - // }); - // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; @@ -65,27 +57,6 @@ export class BladesActorSheet extends ActorSheet { /** @override */ _updateObject(event, formData) { - - // Handle the free-form attributes list - // const formAttrs = expandObject(formData).data.attributes || {}; - // const attributes = Object.values(formAttrs).reduce((obj, v) => { - // let k = v["key"].trim(); - // if ( /[\s\.]/.test(k) ) return ui.notifications.error("Attribute keys may not contain spaces or periods"); - // delete v["key"]; - // obj[k] = v; - // return obj; - // }, {}); - - // // Remove attributes which are no longer used - // for ( let k of Object.keys(this.object.data.data.attributes) ) { - // if ( !attributes.hasOwnProperty(k) ) attributes[`-=${k}`] = null; - // } - - // // Re-combine formData - // formData = Object.entries(formData).filter(e => !e[0].startsWith("data.attributes")).reduce((obj, e) => { - // obj[e[0]] = e[1]; - // return obj; - // }, {_id: this.object._id, "data.attributes": attributes}); // Update the Actor return this.object.update(formData); diff --git a/module/blades-helpers.js b/module/blades-helpers.js index b8bb36b..4ff7f86 100644 --- a/module/blades-helpers.js +++ b/module/blades-helpers.js @@ -151,4 +151,21 @@ export class BladesHelpers { }, obj); } + + /** + * Add item functionality + */ + static _addOwnedItem(event, actor) { + + event.preventDefault(); + const a = event.currentTarget; + const item_type = a.dataset.itemType; + + let data = { + name: randomID(), + type: item_type + }; + return actor.createEmbeddedEntity("OwnedItem", data); + } + } diff --git a/module/crew-sheet.js b/module/crew-sheet.js index cff16a0..61694e1 100644 --- a/module/crew-sheet.js +++ b/module/crew-sheet.js @@ -50,7 +50,7 @@ export class BladesCrewSheet extends ActorSheet { if (!this.options.editable) return; // Update Inventory Item - html.find('.item-body').click(ev => { + html.find('.item-sheet-open').click(ev => { const element = $(ev.currentTarget).parents(".item"); const item = this.actor.getOwnedItem(element.data("itemId")); item.sheet.render(true); @@ -63,6 +63,11 @@ export class BladesCrewSheet extends ActorSheet { element.slideUp(200, () => this.render(false)); }); + // Add a new Cohort + html.find('.add-item').click(ev => { + BladesHelpers._addOwnedItem(ev, this.actor); + }); + // Toggle Turf html.find('.turf-select').click(ev => { const element = $(ev.currentTarget).parents(".item"); @@ -77,6 +82,19 @@ export class BladesCrewSheet extends ActorSheet { [turf_checkbox_name]: !turf_current_status}); this.render(false); }); + + // Cohort Block Harm handler + html.find('.cohort-block-harm input[type="radio"]').change(ev => { + const element = $(ev.currentTarget).parents(".item"); + + let item_id = element.data("itemId") + let harm_id = $(ev.currentTarget).val(); + + this.actor.updateEmbeddedEntity('OwnedItem', { + _id: item_id, + "data.harm": [harm_id]}); + this.render(false); + }); } /* -------------------------------------------- */ @@ -88,5 +106,19 @@ export class BladesCrewSheet extends ActorSheet { } /* -------------------------------------------- */ + /* Form Submission */ + /* -------------------------------------------- */ + + /** @override */ + _updateObject(event, formData) { + + // Update the Item + super._updateObject(event, formData); + + if (event.target.name === "data.tier") { + this.render(true); + } + } + /* -------------------------------------------- */ } diff --git a/module/item-sheet.js b/module/item-sheet.js index c0941ed..d186cdb 100644 --- a/module/item-sheet.js +++ b/module/item-sheet.js @@ -31,14 +31,6 @@ export class BladesItemSheet extends ItemSheet { /* -------------------------------------------- */ - /** @override */ - getData() { - const data = super.getData(); - return data; - } - - /* -------------------------------------------- */ - /** @override */ activateListeners(html) { super.activateListeners(html); diff --git a/module/item.js b/module/item.js index c361626..b723224 100644 --- a/module/item.js +++ b/module/item.js @@ -3,4 +3,50 @@ * @extends {Item} */ export class BladesItem extends Item { + + /* override */ + prepareData() { + + super.prepareData(); + + const item_data = this.data; + const data = item_data.data; + console.log("prepare item " + item_data.type); + + if (item_data.type === "cohort") { + + this._prepareCohort(data); + + } + } + + /** + * Prepares Cohort data + * + * @param {object} data + */ + _prepareCohort(data) { + + let quality = 0; + let scale = 0; + + // Adds Scale and Quality + if (this.actor) { + switch (data.cohort[0]) { + case "Gang": + scale = parseInt(this.actor.data.data.tier[0]); + quality = parseInt(this.actor.data.data.tier[0]); + break; + case "Expert": + scale = 1; + quality = parseInt(this.actor.data.data.tier[0]) + 1; + break; + } + } + + data.scale = scale; + data.quality = quality; + + this.data.data = data; + } } diff --git a/module/templates.js b/module/templates.js index 8c3c380..cbe5ff2 100644 --- a/module/templates.js +++ b/module/templates.js @@ -11,7 +11,8 @@ export const preloadHandlebarsTemplates = async function() { // Actor Sheet Partials "systems/blades-in-the-dark/templates/parts/coins.html", "systems/blades-in-the-dark/templates/parts/attributes.html", - "systems/blades-in-the-dark/templates/parts/turf-list.html" + "systems/blades-in-the-dark/templates/parts/turf-list.html", + "systems/blades-in-the-dark/templates/parts/cohort-block.html" ]; // Load the template parts diff --git a/scss/mixin.scss b/scss/mixin.scss index 2f8cdc8..dd8906e 100644 --- a/scss/mixin.scss +++ b/scss/mixin.scss @@ -71,7 +71,7 @@ width: 5px; border-radius: 24px; background-image: none !important; - background-color: red !important; + background-color: $red !important; margin-right: 0px; } } @@ -157,7 +157,7 @@ display: none; &:checked ~ .checkmark { - color: red; + color: $red; } } @@ -238,14 +238,14 @@ width: $turf_width; height: $turf_height; - background-color: lightgray; + background-color: $lightgray; position: relative; margin: $turf_margin; flex-grow: initial; &.turf-selected { .connector { - background-color: gray; + background-color: $gray; z-index: 1; } } @@ -254,7 +254,7 @@ position: absolute; display: block; - background-color: lightgray; + background-color: $lightgray; &.right, &.left { @@ -285,7 +285,7 @@ &.turf-selected { - background-color: gray; + background-color: $gray; } .turf-description { diff --git a/scss/style.scss b/scss/style.scss index f1faf5c..f099cb5 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -14,6 +14,10 @@ $almost_white: #EEEFFF; * { font-family: Georgia, "Bitstream Charter", "Times New Roman", serif; + header { + margin-bottom: 10px; + } + ul { list-style: none; } @@ -38,7 +42,7 @@ $almost_white: #EEEFFF; flex-direction: row; justify-content: space-between; - > * { + > *:not(.label-stripe) { margin-right: 10px; &:last-child { @@ -103,10 +107,26 @@ $almost_white: #EEEFFF; margin-bottom: 10px; position: relative; padding-left: 10px; + padding-right: 10px; display: flex; font-weight: bold; } + .label-stripe-gray { + text-transform: uppercase; + background-color: $gray; + margin-bottom: 10px; + position: relative; + padding-left: 10px; + padding-right: 10px; + display: flex; + font-weight: bold; + } + + .description { + font-style: italic; + } + // Stress and Trauma .big-teeth-section { @@ -440,11 +460,65 @@ $almost_white: #EEEFFF; } } - .window-app { - - .window-content { - // background: url("https://wallpapertag.com/wallpaper/middle/c/3/6/294219-old-paper-background-1920x1200-for-desktop.jpg") repeat; + // Cohorts styling + .edgeflaw { + + input { + display: none; + + &:checked { + + & + label { + color: $red; + } + + } + } + + } + + #gang-expert-type-selector { + + #gang-type-boxes { + flex-wrap: wrap; } } + .cohorts { + flex-wrap: wrap; + + .cohort-block-wrapper { + width: 400px; + } + .label-stripe { + margin-bottom: 0px; + } + + .cohort-body { + > div { + margin-bottom: 10px; + } + } + + .cohort-block-harm { + + justify-content: space-around; + + input[type="radio"] { + display: none; + + &:checked + label { + color: $almost_white; + font-weight: bold; + background-color: $almost_black; + } + } + + label { + border: 2px solid $almost_black; + border-top: none; + padding: 5px; + } + } + } } diff --git a/styles/blades.css b/styles/blades.css index 695ce56..d218f17 100644 --- a/styles/blades.css +++ b/styles/blades.css @@ -28,6 +28,9 @@ * { font-family: Georgia, "Bitstream Charter", "Times New Roman", serif; } +* header { + margin-bottom: 10px; +} * ul { list-style: none; } @@ -46,10 +49,10 @@ flex-direction: row; justify-content: space-between; } -* section > * { +* section > *:not(.label-stripe) { margin-right: 10px; } -* section > *:last-child { +* section > *:not(.label-stripe):last-child { margin-right: 0px; } * section .grow-one { @@ -100,9 +103,23 @@ margin-bottom: 10px; position: relative; padding-left: 10px; + padding-right: 10px; display: flex; font-weight: bold; } +* .label-stripe-gray { + text-transform: uppercase; + background-color: #999; + margin-bottom: 10px; + position: relative; + padding-left: 10px; + padding-right: 10px; + display: flex; + font-weight: bold; +} +* .description { + font-style: italic; +} * .big-teeth-section { border-top: 3px solid #191813; display: flex; @@ -557,19 +574,19 @@ * #turf-list.section-non-editable .turf-block { width: 130px; height: 100px; - background-color: lightgray; + background-color: #CCC; position: relative; margin: 20px; flex-grow: initial; } * #turf-list.section-non-editable .turf-block.turf-selected .connector { - background-color: gray; + background-color: #999; z-index: 1; } * #turf-list.section-non-editable .turf-block .connector { position: absolute; display: block; - background-color: lightgray; + background-color: #CCC; } * #turf-list.section-non-editable .turf-block .connector.right, * #turf-list.section-non-editable .turf-block .connector.left { width: 40px; @@ -594,7 +611,7 @@ top: 100px; } * #turf-list.section-non-editable .turf-block.turf-selected { - background-color: gray; + background-color: #999; } * #turf-list.section-non-editable .turf-block .turf-description { border: none; @@ -622,19 +639,19 @@ * #turf-list.section-editable .turf-block { width: 130px; height: 125px; - background-color: lightgray; + background-color: #CCC; position: relative; margin: 20px; flex-grow: initial; } * #turf-list.section-editable .turf-block.turf-selected .connector { - background-color: gray; + background-color: #999; z-index: 1; } * #turf-list.section-editable .turf-block .connector { position: absolute; display: block; - background-color: lightgray; + background-color: #CCC; } * #turf-list.section-editable .turf-block .connector.right, * #turf-list.section-editable .turf-block .connector.left { width: 40px; @@ -659,7 +676,7 @@ top: 125px; } * #turf-list.section-editable .turf-block.turf-selected { - background-color: gray; + background-color: #999; } * #turf-list.section-editable .turf-block .turf-description { border: none; @@ -769,5 +786,42 @@ font-size: 20px; color: #191813; } +* .edgeflaw input { + display: none; +} +* .edgeflaw input:checked + label { + color: red; +} +* #gang-expert-type-selector #gang-type-boxes { + flex-wrap: wrap; +} +* .cohorts { + flex-wrap: wrap; +} +* .cohorts .cohort-block-wrapper { + width: 400px; +} +* .cohorts .label-stripe { + margin-bottom: 0px; +} +* .cohorts .cohort-body > div { + margin-bottom: 10px; +} +* .cohorts .cohort-block-harm { + justify-content: space-around; +} +* .cohorts .cohort-block-harm input[type=radio] { + display: none; +} +* .cohorts .cohort-block-harm input[type=radio]:checked + label { + color: #EEEFFF; + font-weight: bold; + background-color: #191813; +} +* .cohorts .cohort-block-harm label { + border: 2px solid #191813; + border-top: none; + padding: 5px; +} -/*# sourceMappingURL=style.css.map */ +/*# sourceMappingURL=blades.css.map */ diff --git a/styles/blades.css.map b/styles/blades.css.map new file mode 100644 index 0000000..750656c --- /dev/null +++ b/styles/blades.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../scss/mixin.scss","../scss/style.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AA+CA;AAAA;AAAA;AAgDA;AAAA;AAAA;AA0CA;AAAA;AAAA;AAkCA;AAAA;AAAA;AA0DA;AAAA;AAAA;AA4FA;AAAA;AAAA;AAoCA;AAAA;AAAA;AC3VA;AAAA;AAAA;AAGA;EACE;;AAEA;EACE;;AAGF;EACE;;AAIA;EACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE,kBA/EW;EAgFX,OA/EW;EAgFX;EACA;EACA;EACA;EACA;;AAGF;EACE,kBA3FG;EA4FH,OA1FW;EA2FX;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA,kBApGW;EAqGX,OApGW;EAqGX;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA,kBAlHG;EAmHH;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EAEE;EACA;EACA;EACA;AAmBA;;AAjBA;EACE;;AAEA;EACE;;AAIJ;EACE;;AAIF;EDlJF;AAyBA;;AArBE;EACE,QC8I0B;ED7I1B,OC6IoB;ED5IpB;EACA;EACA;EACA;;AAEA;EACE;;AA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;AAggBT;EACE;EACA;EACA","file":"blades.css"} \ No newline at end of file diff --git a/styles/simple copy.css b/styles/simple copy.css deleted file mode 100644 index a2c0aba..0000000 --- a/styles/simple copy.css +++ /dev/null @@ -1,144 +0,0 @@ -.worldbuilding.sheet .window-content { - padding: 5px; - overflow-y: hidden; -} - -/* Sheet Header */ -.worldbuilding.sheet .sheet-header { - overflow: hidden; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-start; - flex: 0 0 100px; - margin-bottom: 10px; -} - -.worldbuilding.sheet .profile-img { - flex: 0 0 100px; - height: 100px; - margin-right: 10px; -} - -.worldbuilding.sheet .header-fields { - flex: 1; - height: 100px; -} - -.worldbuilding.sheet .charname { - height: 60px; - padding: 5px; - margin: 0; - border-bottom: 0; -} -.worldbuilding.sheet .charname input { - width: 100%; - height: 100%; - margin: 0; -} - -.worldbuilding.sheet .resource { - height: 40px; - width: 50%; - padding: 3px 10px; - float: left; -} -.worldbuilding.sheet .resource input { - width: 100px; - height: 28px; -} - -/* Navigation Tabs */ -.worldbuilding.sheet .tabs { - flex: 0 0 40px; - border-top: 1px solid #AAA; - border-bottom: 1px solid #AAA; -} - -.worldbuilding.sheet .tabs .item { - line-height: 40px; - font-weight: bold; -} - -.worldbuilding.sheet .tabs .item.active { - text-decoration: underline; - text-shadow: none; -} - -/* Content Tabs */ -.worldbuilding.sheet .sheet-body { - height: calc(100% - 160px); -} -.worldbuilding.sheet .sheet-body .tab { - height: 100%; -} -.worldbuilding.sheet .sheet-body .editor { - width: 100%; - height: 100%; -} - - -/* Items */ -.worldbuilding.sheet .items-list { - list-style: none; - margin: 7px 0; - padding: 0; - overflow-y: auto; -} -.worldbuilding.sheet .items-list .item { - height: 30px; - line-height: 24px; - padding: 3px 0; - border-bottom: 1px solid #BBB; -} -.worldbuilding.sheet .items-list .item img { - flex: 0 0 24px; - margin-right: 5px; -} -.worldbuilding.sheet .items-list .item-name { - margin: 0; -} -.worldbuilding.sheet .items-list .item-controls { - flex: 0 0 36px; -} - -/* Attributes */ -.worldbuilding.sheet .attributes-header { - padding: 5px; - margin: 5px 0; - background: rgba(0, 0, 0, 0.05); - border: 1px solid #AAA; - border-radius: 2px; - text-align: center; - font-weight: bold; -} -.worldbuilding.sheet .attribute-label { - flex: 1.5; -} -.worldbuilding.sheet .attribute-control { - flex: 0 0 20px; -} - -.worldbuilding.sheet .attributes-list { - list-style: none; - margin: 0; - padding: 0; -} - -.worldbuilding.sheet .attributes-list li > * { - margin: 0 3px; - height: 28px; - line-height: 24px; - background: transparent; - border: none; - border-radius: 0; - border-bottom: 1px solid #AAA; -} - -.worldbuilding.sheet .attribute-value.checkbox { - text-align: center; -} - -.worldbuilding.sheet .attributes-list li a.attribute-control { - border: none; -} \ No newline at end of file diff --git a/template.json b/template.json index 7ce532d..c0e2dd3 100644 --- a/template.json +++ b/template.json @@ -137,8 +137,111 @@ }, "cohort": { "templates": ["default"], - "type": [], - "cohort_types": ["gang", "expert"] + "cohort": ["Gang"], + "scale": 0, + "quality": 0, + "cohort_list": { + "Gang": { + "label": "Gang" + }, + "Expert": { + "label": "Expert" + } + }, + "gang_type": ["Adepts"], + "gang_type_list": { + + "Adepts": { + "label": "Adepts", + "description": "Scholars, tinkerers, occultists, and chemists." + }, + "Rooks": { + "label": "Rooks", + "description": "Con artists, spies, and socialites." + }, + "Rovers": { + "label": "Rovers", + "description": "Sailors, carriage drivers, and deathlands scavengers." + }, + "Skulks": { + "label": "Skulks", + "description": "Scouts, infiltrators, and thieves." + }, + "Thugs": { + "label": "Thugs", + "description": "Scouts, infiltrators, and thieves." + } + }, + "expert_type": "", + "status": [], + "statuses": [], + "edges": [], + "edges_list": { + "Fearsome": { + "label": "Fearsome", + "description": "The cohort is terrifying in aspect and reputation." + }, + "Independent": { + "label": "Independent", + "description": "The cohort can be trusted to make good decisions and act on their own initiative in the absence of direct orders." + }, + "Loyal": { + "label": "Loyal", + "description": "The cohort can’t be bribed or turned against you." + }, + "Tenacious": { + "label": "Tenacious", + "description": "The cohort won’t be deterred from a task." + } + }, + "flaws": [], + "flaws_list": { + "Principled": { + "label": "Principled", + "description": "The cohort has an ethic or values that it won’t betray." + }, + "Savage": { + "label": "Savage", + "description": "The cohort is excessively violent and cruel." + }, + "Unreliable": { + "label": "Unreliable", + "description": "The cohort isn’t always available, due to other obligations, stupefaction from their vices, etc." + }, + "Wild": { + "label": "Wild", + "description": "The cohort is drunken, debauched, and loud-mouthed." + } + }, + "harm": ["No"], + "harm_list": { + "No": { + "label": "No Harm", + "description": "The cohort is healthy.", + "value": 0 + }, + "Weakened": { + "label": "Weakened", + "description": "The cohort has reduced effect.", + "value": 1 + }, + "Impaired": { + "label": "Impaired", + "description": "The cohort operates with reduced quality (-1d).", + "value": 2 + }, + "Broken": { + "label": "Broken", + "description": "The cohort can’t do anything until they recover.", + "value": 3 + }, + "Dead": { + "label": "Dead", + "description": "The cohort is destroyed. You can spend coin equal to your Tier +2 to restore it, plus two downtime activities to recruit new gang members, or hire a new expert.", + "value": 4 + } + }, + "armor": false }, "crew_feature": { "templates": ["default"] diff --git a/templates/crew-sheet.html b/templates/crew-sheet.html index 50a0efe..e47132e 100644 --- a/templates/crew-sheet.html +++ b/templates/crew-sheet.html @@ -13,7 +13,7 @@ {{#each actor.items as |item id|}} {{#eq item.type "crew_feature"}}