Development

- Adds TabsV2 preparations (needs fixes)
- Adds Crew Ability Item and styles
- Adds Cult Crew Abilities to Compendium
- Coins are now Gold  :)
- Style tweaks
This commit is contained in:
Peter Varaksin 2020-04-29 14:12:55 +03:00
parent a2d69a86b3
commit 9e4adb8548
13 changed files with 122 additions and 47 deletions

3
TODO
View file

@ -1,4 +1,5 @@
- Add upgrade points count for Crew and Character!!!
- Add upgrade points count for Crew and Character
- Restrict adding improper Items to sheets (like character abilities added to crew) or add a list where they can be removed if added by mistake
- Add Custom Notes (item or field)
- Add values to classes default attributes
- Add friends-and-foes

View file

@ -114,8 +114,6 @@ Hooks.once("init", async function() {
// Enrich the HTML replace /n with <br>
Handlebars.registerHelper('html', (options) => {
let html = "";
console.log(options);
let text = options.hash['text'].replace(/\n/g, "<br />");
return new Handlebars.SafeString(text);;

View file

@ -45,6 +45,12 @@ export class BladesCrewSheet extends ActorSheet {
activateListeners(html) {
super.activateListeners(html);
// Activate tabs
const tabs = new TabsV2({navSelector: ".tabs", contentSelector: ".section", initial: "turfs"});
// @todo Fix the error in TabsV2
// tabs.bind(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;

7
packs/crew_abilities.db Normal file
View file

@ -0,0 +1,7 @@
{"_id":"7LimsX68eVz2ECaD","name":"Glory Incarnate","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Your deity sometimes manifests in the physical world. This can be a great boon, but the priorities and values of a god are not those of mortals. You have been warned.","class":"Cult","price":"1"},"folder":null,"sort":500001,"flags":{}}
{"_id":"95RrxTNgM9uYOY1i","name":"Conviction","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each PC gains an additional Vice: Worship. When you indulge this vice and bring a pleasing sacrifice, you don't overindulge if you clear excess stress. In addition, your deity will assist any one action roll you make - from now until you indulge this vice again.","class":"Cult","price":"1"},"folder":null,"sort":400001,"flags":{}}
{"_id":"9PJwujwKH1ZUXNVp","name":"Sealed in Blood","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each human sacrifice yields -3 stress cost for any ritual you perform.","class":"Cult","price":"1"},"folder":null,"sort":600001,"flags":{}}
{"_id":"NT9JPbws9bCYPXs7","name":"Zealotry","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Your cohorts have abandoned their reason to devote themselves to the cult. They will undertake any service, no matter how dangerous or strange. They gain +1d to rolls against enemies of the faith.","class":"Cult","price":"1"},"folder":null,"sort":700001,"flags":{}}
{"_id":"XDZdnr7aRd2o1Kwh","name":"Anointed","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"You get +1d to resistance rolls against supernatural threats. You get +1d to healing rolls when you have supernatural harm.","class":"Cult","price":"1"},"folder":null,"sort":200001,"flags":{}}
{"_id":"p6yH9EEOqX2IT9Nz","name":"Bound in Darkness","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"You may use teamwork with any cult member, regardless of the distance separating you. By taking 1 stress, your whispered message is heard by every cultist.","class":"Cult","price":"1"},"folder":null,"sort":300001,"flags":{}}
{"_id":"stEQMMWDe8jBxkZk","name":"Chosen","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each PC may add +1 action rating to Attune, Study, or Sway (up to a max rating of 3).","class":"Cult","price":"1"},"folder":null,"sort":100001,"flags":{}}

View file

@ -1,2 +1,2 @@
{"_id":"EhUz7EZZP0B5IOYn","name":"Vault 1","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Adds the Vault providing additional 4 Coin space","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":4,\"requirement\":\"\"}","crew_type":""},"folder":null,"sort":100001,"flags":{}}
{"_id":"RmjU5DHgecia43Cf","name":"Vault 2","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Extend the Vault to additional +8 coins","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":8,\"requirement\":\"Vault 1\"}","crew_type":""},"folder":null,"sort":200001,"flags":{}}
{"_id":"RmjU5DHgecia43Cf","name":"Vault 2","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Extend the Vault to additional +8 coins","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":8,\"requirement\":\"Vault 1\"}","crew_type":""},"folder":null,"sort":200001,"flags":{}}

View file

@ -100,7 +100,7 @@
display: flex;
$default_color: white;
$accent_color: grey;
$accent_color: gold;
$circle_border_color: black;
label {

View file

@ -389,16 +389,17 @@ $red: red;
#crew-hold {
border-top: 3px solid black;
@include toothradio_single(17px, 50px, "assets/teeth/stresstooth-halfgrey.png", "assets/teeth/stresstooth-red.png");
width: 220px;
width: 221px;
}
#crew-tier {
background-color: $gray;
height: 30px;
height: 33px;
width: 145px;
display: flex;
align-items: center;
border-top: 3px solid black;
@include custom_radio_round(18px, gray, $lightgray, black);

View file

@ -443,7 +443,7 @@
* .coins label {
height: 15px;
width: 15px;
background-color: grey;
background-color: gold;
vertical-align: middle;
border: 1px solid black;
}
@ -457,7 +457,7 @@
background-color: white;
}
* .coins input:checked + label {
background-color: grey;
background-color: gold;
}
* .coins label {
margin-right: 3px;
@ -481,7 +481,7 @@
* .crew-coins label {
height: 15px;
width: 15px;
background-color: grey;
background-color: gold;
vertical-align: middle;
border: 1px solid black;
}
@ -495,7 +495,7 @@
background-color: white;
}
* .crew-coins input:checked + label {
background-color: grey;
background-color: gold;
}
* .crew-coins label {
margin-right: 3px;
@ -685,7 +685,7 @@
border-top: 3px solid black;
display: flex;
/* Hide the browser's default checkbox */
width: 220px;
width: 221px;
}
* #crew-hold label {
height: 50px;
@ -706,10 +706,11 @@
}
* #crew-tier {
background-color: #999;
height: 30px;
height: 33px;
width: 145px;
display: flex;
align-items: center;
border-top: 3px solid black;
display: flex;
/* Hide the browser's default checkbox */
}

View file

@ -77,6 +77,13 @@
"system": "blades-in-the-dark",
"path": "./packs/crew_upgrades.db",
"entity": "Item"
},
{
"name": "Crew Abilities",
"label": "Crew Abilities",
"system": "blades-in-the-dark",
"path": "./packs/crew_abilities.db",
"entity": "Item"
}
]
}

View file

@ -86,7 +86,7 @@
}
},
"Item": {
"types": ["item", "class", "ability", "heritage", "background", "vice", "crew_upgrade", "cohort", "crew_type", "crew_feature", "crew_upgrade"],
"types": ["item", "class", "ability", "heritage", "background", "vice", "crew_upgrade", "cohort", "crew_type", "crew_feature", "crew_upgrade", "crew_ability"],
"templates": {
"default": {
"description": ""
@ -147,6 +147,9 @@
"templates": ["ability", "logic"],
"crew_type": ""
},
"crew_ability": {
"templates": ["ability"]
},
"crew_type": {
"description": "",
"experience_clues": "",

View file

@ -32,20 +32,41 @@
<input type="text" id="crew-lair" name="data.lair" value="{{data.lair}}">
</div>
<div id="crew-tier">
{{#multiboxes data.tier}}
<input id="crew-tier-0" type="radio" name="data.tier" value="0">
<label for="crew-tier-0" class="black-label">Tier</label>
<input id="crew-tier-1" type="radio" name="data.tier" value="1">
<label for="crew-tier-1"></label>
<input id="crew-tier-2" type="radio" name="data.tier" value="2">
<label for="crew-tier-2"></label>
<input id="crew-tier-3" type="radio" name="data.tier" value="3">
<label for="crew-tier-3"></label>
<input id="crew-tier-4" type="radio" name="data.tier" value="4">
<label for="crew-tier-4"></label>
{{/multiboxes}}
<div class="flex-horizontal">
<div id="crew-hold" class="flex-horizontal">
<div class="black-label">Hold</div>
{{#multiboxes data.hold}}
<div class="flex-horizontal">
<div class="gray-label">Weak</div>
<input id="crew-hold-weak" type="radio" name="data.hold" value="weak">
<label for="crew-hold-weak"></label>
</div>
<div class="flex-horizontal">
<div class="gray-label">Strong</div>
<input id="crew-hold-strong" type="radio" name="data.hold" value="strong">
<label for="crew-hold-strong"></label>
</div>
{{/multiboxes}}
</div>
<div id="crew-tier">
{{#multiboxes data.tier}}
<input id="crew-tier-0" type="radio" name="data.tier" value="0">
<label for="crew-tier-0" class="black-label">Tier</label>
<input id="crew-tier-1" type="radio" name="data.tier" value="1">
<label for="crew-tier-1"></label>
<input id="crew-tier-2" type="radio" name="data.tier" value="2">
<label for="crew-tier-2"></label>
<input id="crew-tier-3" type="radio" name="data.tier" value="3">
<label for="crew-tier-3"></label>
<input id="crew-tier-4" type="radio" name="data.tier" value="4">
<label for="crew-tier-4"></label>
{{/multiboxes}}
</div>
</div>
</div>
</div>
@ -179,22 +200,6 @@
<div class="flex-vertical">
<div id="crew-hold" class="flex-horizontal">
<div class="black-label">Hold</div>
{{#multiboxes data.hold}}
<div class="flex-horizontal">
<div class="gray-label">Weak</div>
<input id="crew-hold-weak" type="radio" name="data.hold" value="weak">
<label for="crew-hold-weak"></label>
</div>
<div class="flex-horizontal">
<div class="gray-label">Strong</div>
<input id="crew-hold-strong" type="radio" name="data.hold" value="strong">
<label for="crew-hold-strong"></label>
</div>
{{/multiboxes}}
</div>
<div id="crew-class" class="class-name">
{{#each actor.items as |item id|}}
{{#eq item.type "crew_type"}}
@ -202,6 +207,11 @@
{{/eq}}
{{/each}}
</div>
<nav class="tabs flex-horizontal">
<a class="item" data-tab="turfs">Turfs</a>
<a class="item" data-tab="upgrades">Upgrades</a>
<a class="item" data-tab="abilities">Abilities</a>
</nav>
</div>
@ -231,7 +241,7 @@
</div>
{{!-- Crew Type --}}
<div class="section">
<div class="section tab-content" data-tab="turfs">
{{#each actor.items as |item id|}}
{{#eq item.type "crew_type"}}
<div class="item" data-item-id="{{item._id}}">
@ -241,7 +251,7 @@
{{/each}}
</div>
<div class="section">
<div class="section tab-content" data-tab="upgrades">
{{!-- Crew Upgrades --}}
<div id="crew-upgrades" class="grow-two flex-vertical">
@ -252,8 +262,30 @@
{{#eq item.type "crew_upgrade"}}
<div class="item flex-horizontal" data-item-id="{{item._id}}">
<div class="item-body flex-horizontal">
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
<div class="item-name">{{item.name}}</div>
<b><div class="item-name">{{item.name}}</div></b>
<div class="item-description">{{item.data.description}}</div>
</div>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
{{/eq}}
{{/each}}
</div>
</div>
<div class="section tab-content" data-tab="abilities">
{{!-- Crew Upgrades --}}
<div id="crew-abilities" class="grow-two flex-vertical">
<div class="label-stripe">
<p><label>Special Abilities</label></p>
</div>
{{#each actor.items as |item id|}}
{{#eq item.type "crew_ability"}}
<div class="item flex-horizontal" data-item-id="{{item._id}}">
<div class="item-body flex-horizontal">
<b><div class="item-name">{{item.name}}</div></b>
<div class="item-description">{{item.data.description}}</div>
</div>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>

View file

@ -10,6 +10,8 @@
<section class="sheet-body">
<textarea name="data.description">{{data.description}}</textarea>
</section>
<label>Ability Price</label>
<input id="ability-price" type="text" name="data.price" value="{{data.price}}" placeholder="Ability Price">
<label>Ability Class</label>
<input id="ability-class" type="text" name="data.class" value="{{data.class}}" placeholder="Ability Class">
</form>

View file

@ -0,0 +1,17 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<textarea name="data.description">{{data.description}}</textarea>
</section>
<label>Ability Price</label>
<input id="ability-price" type="text" name="data.price" value="{{data.price}}" placeholder="Ability Price">
<label>Ability Class</label>
<input id="ability-class" type="text" name="data.class" value="{{data.class}}" placeholder="Ability Class">
</form>