Skip to content

Commit

Permalink
feat: Squashed, rebased, merged in changes from Kevin, tested that no…
Browse files Browse the repository at this point in the history
…thing seems to have broken.

Also made sure we comply with the various licenses.

Changes from Kevin below:
Fixes: New Skill page, New Font, Many CSS/HTML adjustments
Fixes: Tabs need fixing, added inventory, storage and finances.
Fixes: Sub-tabs, initial tab still blank and broken
Fixes: Finished all the pages, ready for first release
Fixes: Macro text visibility
fix: Removed read only, attempts to fix drop-down
fix: Skill modifiers and option default jumps fixed *so happy!*
fix: Added total (skill+mod) near dice, added CSS styling to finish skill list
Updated Skill list modifiers and resetting modifier option window. All good, very happy! (#43)
  • Loading branch information
UltraKev authored and xdy committed Aug 29, 2020
1 parent b6319d8 commit b437cdf
Show file tree
Hide file tree
Showing 42 changed files with 2,026 additions and 1,680 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@

* Switched to Kevin's/Rob's way of doing things. ([047859b](https://github.com/UltraKev/twodsix-foundryvtt/commit/047859b8a0d1beba7045e55fd08525d4acafda96))

## [0.3.2](https://github.com/xdy/twodsix-foundryvtt/compare/v0.3.1...v0.3.2) (2020-08-16)
# [0.3.2](https://github.com/xdy/twodsix-foundryvtt/compare/v0.3.1...v0.3.2) (2020-08-16)


### Bug Fixes
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 2d6 system
A system for running games using various 2d6-based role-playing games.
A system for running games using various 2d6-based role-playing games, specifically with the Cepheus Engine Core Rules.

Note that this system is *very* early in its development.

Expand Down Expand Up @@ -29,5 +29,8 @@ Content Usage and Licensing:
Virtual Table Top Platform Licenses:
* Foundry VTT support is covered by the following license: [Limited License Agreement for module development 09/02/2020](https://foundryvtt.com/article/license/).

Font licenses:
* Perfect DOS VGA 437 (quote from https://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 "zeh author of Perfect DOS VGA 437 Sep 16, 2014 The license is this: this font is free to use in whatever you want.")

### Contributing
See CONTRIBUTING.md
121 changes: 60 additions & 61 deletions package-lock.json

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

1 change: 1 addition & 0 deletions src/module/TwodsixSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export class TwodsixSystem {
//Nothing to do yet

//TODO

}
9 changes: 4 additions & 5 deletions src/module/entities/TwodsixActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ export default class TwodsixActor extends Actor {
cha.current = cha.value - cha.damage;
cha.mod = calcModFor(cha.current);
}

for (const skill of Object.values(data.skills as Record<any, any>)) {
const characteristic = skill.defaultCharacteristic;
skill.mod = calcModFor(data.characteristics[characteristic].value);
//for (const skill of Object.values(data.skills as Record<any, any>)) {
// const characteristic = skill.characteristic;
// skill.mod = calcModFor(data.characteristics[characteristic].value);
//}
}
}
}
26 changes: 26 additions & 0 deletions src/module/entities/TwodsixItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,35 @@ export default class TwodsixItem extends Item {
prepareData():void {
super.prepareData();

const itemData: ItemData = this.data;

switch (itemData.type) {
case 'skills':
this._prepareSkillData(itemData);
break;
default:

}
// Get the Item's data
// const itemData = this.data;
// const actorData = this.actor ? this.actor.data : {};
// const {data} = itemData;
}

private _prepareSkillData(itemData: ItemData) {
if(this.isOwned) {
const itemCharacteristic = itemData.data.characteristic;
const actorCharacteristics = Object.values(this.actor.data.data.characteristics);
const activeCharacteristic: any = actorCharacteristics.filter((c: any) => c.shortLabel === itemCharacteristic);

let mod = 0;
if(activeCharacteristic.length) {
mod = activeCharacteristic[0].mod;
}

itemData.data.total = itemData.data.value + mod;
itemData.data.mod = mod;

}
}
}
10 changes: 8 additions & 2 deletions src/module/handlebars.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { SIGKILL } from "constants";

export default function registerHandlebarsHelpers():void {

// If you need to add Handlebars helpers, here are a few useful examples:
Expand All @@ -22,8 +24,8 @@ export default function registerHandlebarsHelpers():void {
return true;
});

Handlebars.registerHelper('checkTrainedSkill', function (skill) {
return skill.value >= 0
Handlebars.registerHelper('checkTrainedSkill', function (skills) {
return skills.value >= 0
});

Handlebars.registerHelper('shouldShowSkill', function (skill, hideUntrainedSkills) {
Expand All @@ -41,6 +43,10 @@ export default function registerHandlebarsHelpers():void {
return getSkillValueWithJoat(skill, joat) + mod
});

Handlebars.registerHelper('getTotalSkillValue', function(skill, joat, mod){
return skill.value + joat.value + skill.mod
});


Handlebars.registerHelper({
add: (v1, v2) => v1 + v2,
Expand Down
Loading

0 comments on commit b437cdf

Please sign in to comment.