Skip to content

Commit

Permalink
fix: Fixed differences between versions
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraKev authored and xdy committed Aug 21, 2020
1 parent c524756 commit fbd2c96
Show file tree
Hide file tree
Showing 13 changed files with 224 additions and 127 deletions.
1 change: 1 addition & 0 deletions src/module/entities/TwodsixActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default class TwodsixActor extends Actor {

for (const skill of Object.values(data.skills as Record<any, any>)) {
const characteristic = skill.characteristic;
console.log(skill)
skill.mod = calcModFor(data.characteristics[characteristic].value);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/module/handlebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function registerHandlebarsHelpers():void {
});

Handlebars.registerHelper('shouldShowSkill', function(skill, hideUntrainedSkills) {
// console.log('shouldShowSkill', skill, hideUntrainedSkills)
return skill.trained || hideUntrainedSkills
});

Expand Down
5 changes: 5 additions & 0 deletions src/scripts/2-Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
D:
cd\GitHub\twodsix-foundryvtt
call npm install
call npm run build:dev
pause
11 changes: 11 additions & 0 deletions src/scripts/Rebase-upstream.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
D:
cd\GitHub\twodsix-foundryvtt

git fetch upstream
pause
git checkout master
pause
git rebase upstream/master
pause
git push origin master --force
pause
5 changes: 5 additions & 0 deletions src/scripts/X-New_Branch.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

cd\GitHub\twodsix-foundryvtt
git checkout -b UltraKevs_Bundle_of_Sticks
git push --set-upstream origin UltraKevs_Bundle_of_Sticks
pause
5 changes: 5 additions & 0 deletions src/scripts/X-Update_Branch.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
git checkout master
call 1-Update.bat
git checkout UltraKevs_Bundle_of_Sticks
git rebase upstream/master
pause
2 changes: 1 addition & 1 deletion static/styles/twodsix.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions static/system.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"url": "https://github.com/xdy/twodsix-foundryvtt/",
"manifest": "https://github.com/xdy/twodsix-foundryvtt/releases/latest/download/system.json",
"download": "https://github.com/xdy/twodsix-foundryvtt/releases/latest/download/twodsix.zip",
"version": "0.3.8",
"author": "Jonas Karlsson (xdy#3735), Kevin Maree (Ultra Kev#9816), Rob (RobCubed #9180)",
"version": "0.3.4",
"author": "Jonas Karlsson (xdy#3735), Kevin Maree (Ultra Kev#9816)",
"bugs": "",
"changelog": "",
"minimumCoreVersion": "0.6.2",
Expand Down
39 changes: 15 additions & 24 deletions static/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"Actor": {
"types": [
"traveller"
],
"types": ["traveller"],
"traveller": {
"name": "",
"homeworld": "",
Expand Down Expand Up @@ -465,6 +463,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"language": {
"label": "Languages",
Expand All @@ -482,6 +481,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"language-2": {
"label": "Language 2",
Expand All @@ -491,6 +491,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"language-3": {
"label": "Language 3",
Expand All @@ -500,6 +501,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"language-4": {
"label": "Language 4",
Expand All @@ -509,6 +511,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"language-5": {
"label": "Language 5",
Expand All @@ -518,6 +521,7 @@
"max": 9,
"mod": 0,
"characteristic": "strength"

},
"leadership": {
"label": "Leadership",
Expand Down Expand Up @@ -903,18 +907,11 @@
"mod": 0,
"characteristic": "strength"
}
},
"contacts": "",
"allies": "",
"enemies": ""
}
}
},
"Item": {
"types": [
"equipment",
"weapon",
"armor"
],
"types": ["equipment", "weapon", "armor"],
"templates": {
"carried": {
"name": "",
Expand All @@ -937,21 +934,15 @@
}
},
"equipment": {
"templates": [
"carried"
]
"templates": ["carried"]
},
"weapon": {
"templates": [
"carried",
"weapon"
]
"templates": ["carried", "weapon"]
},
"armor": {
"templates": [
"carried",
"armor"
]
"templates": ["carried", "armor"]
}
}
},
"Contacts": {}

}
170 changes: 166 additions & 4 deletions static/templates/actors/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

{{!-- Sheet Body --}}
<div class="character-tabs-info sheet-body">

{{!-- Sheet Tab Navigation --}}
<div class="character-tabs">
<nav class="sheet-tabs tabs" data-group="primary">
Expand All @@ -71,14 +71,176 @@
</nav>
</div>


{{!-- Skills Tab --}}
{{> "systems/twodsix/templates/actors/parts/actor-skills.html"}}
<div class="tab skills" data-group="primary" data-tab="skills">
{{!-- The grid classes are defined in scss/global/_grid.scss. To use,
use both the "grid" and "grid-Ncol" class where "N" can be any number
from 1 to 12 and will create that number of columns. --}}

<div class="skills grid grid-2col">
<button class="flexrow flex-group-center toggle-skills">
{{#if @root.options.hideUntrainedSkills}}
Hide Untrained
{{else}}
Show Untrained
{{/if}}
</button>


<div class="skills-joat"></div>
<label for="joat" class="flex3 resource-label">Jack of All Trades</label>
<span class="flex4">
<i class="fa fa-arrow-circle-down downgrade-joat downgrade-joat-{{data.jackofalltrades.value}}"></i>
<i class="fa fa-arrow-circle-up upgrade-joat upgrade-joat-{{data.jackofalltrades.value}}"></i>
{{data.jackofalltrades.value}}
</span></div>



<div class="skills grid grid-4col">
<span class="skill-container">
<div class="skill-title">Skill Name</div>
<div class="skill-level">Level</div>
<div class="skill-mod">Modifier</div>
<div class="skill-total">Total</div>
<div class="roll-dice">Roll</div>
</span>
{{#each data.skills as |skill key|}}

{{#if (shouldShowSkill skill @root.options.hideUntrainedSkills)}}

<div class="skill skill-container trained-{{skill.trained}}">

<label for="data.skills.{{key}}.value" class="flex2 resource-label skill-{{skill.trained}}">{{skill.label}}</label>

<span class="skill-arrows flex1">
<i data-label="{{key}}" class="fa fa-arrow-circle-down downgrade-skill-{{skill.trained}} downgrade-skill"></i>

<span class="skill-output" class="flex1 skill-mod" data-label="{{skill.label}}">{{numberFormat (getSkillValueWithJoat skill @root.data.jackofalltrades) decimals=0 sign=true}}</span>

<i data-label="{{key}}" class="fa fa-arrow-circle-up upgrade-skill{{skill.value}} upgrade-skill"></i>
{{data.jackofalltrades.value}}
</span>


<select class="select-mod" name="data.skills.{{key}}.characteristic" value={{skill.characteristic}} >
{{#select skill.characteristic}}
<option value="strength" for="skill-modifier">STR</option>
<option value="dexterity" for="skill-modifier">DEX</option>
<option value="endurance" for="skill-modifier">END</option>
<option value="intellect" for="skill-modifier">INT</option>
<option value="education" for="skill-modifier">EDU</option>
<option value="social" for="skill-modifier">SOC</option>
<option value="psionics" for="skill-modifier">PSI</option>
{{/select}}
</select>

<span class="total-output" class="flex1 skill-mod" data-label="skill.total">{{numberFormat (getTotalSkillValue skill @root.data.jackofalltrades) decimals=0 sign=true}}</span>

<span class="mini-dice"><img class="rollable" data-roll="2d6+{{getSkillValueWithJoat skill @root.data.jackofalltrades}}+{{skill.mod}}" src="./systems/twodsix/assets/d6-icon.svg"/></span>
</span>


</div>
{{/if}}
{{/each}}
</div>
</div>

{{!-- Owned Items Tab --}}
{{> "systems/twodsix/templates/actors/parts/actor-items.html"}}

<div class="tab items" data-group="primary" data-tab="items">
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">Name</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add
item</a>
</div>
</li>
{{#each actor.gear as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24" /></div>
<h4 class="item-name">{{item.name}}</h4>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</div>

{{!-- Biography Tab --}}
{{> "systems/twodsix/templates/actors/parts/actor-info.html"}}

<div class="tab info" data-group="primary" data-tab="info">
<div class="grid-container">
<div class="contacts"></div>
<div class="allies"></div>
<div class="enemies"></div>
<div class="biography">
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
</div>
</div>

</div>

<!--
{{!-- Owned Features Tab --}}
<div class="tab features" data-group="primary" data-tab="features">
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">Name</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="feature"><i class="fas fa-plus"></i> Add
item</a>
</div>
</li>
{{#each actor.features as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24" /></div>
<h4 class="item-name">{{item.name}}</h4>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</div>
{{!-- Owned Spells Tab --}}
<div class="tab spells" data-group="primary" data-tab="spells">
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">Name</div>
<div class="item-controls"></div>
</li>
{{#each actor.spells as |spells spellLevel|}}
<li class="item flexrow item-header">
<div class="item-name">Level {{spellLevel}} Spells</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="spell"
data-spell-level="{{spellLevel}}"><i class="fas fa-plus"></i> Add LVL {{spellLevel}}</a>
</div>
</li>
{{#each spells as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24" /></div>
<h4 class="item-name">{{item.name}}</h4>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
{{/each}}
</ol>
</div>-->

</div>
</div>
Expand Down
25 changes: 3 additions & 22 deletions static/templates/actors/parts/actor-info.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<div class="tab info" data-group="primary" data-tab="info">
<div class="grid-container">
<div class="contacts">
contacts:
{{{editor content=data.contacts target="data.contacts" button=true owner=owner editable=editable}}}

</div>
<div class="allies">
allies:
{{{editor content=data.allies target="data.allies" button=true owner=owner editable=editable}}}

</div>
<div class="enemies">
enemies:
{{{editor content=data.enemies target="data.enemies" button=true owner=owner editable=editable}}}

</div>
<div class="description">
Description:
{{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}}
</div>
</div>
{{!-- Biography Tab --}}
<div class="tab biography" data-group="primary" data-tab="description">
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
</div>
Loading

0 comments on commit fbd2c96

Please sign in to comment.