Skip to content

Commit

Permalink
prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
rinickolous committed Sep 9, 2022
1 parent 9373e10 commit 8d0075e
Show file tree
Hide file tree
Showing 114 changed files with 40,260 additions and 35,700 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"http.proxyStrictSSL": false
}
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# [Users Guide](https://bit.ly/2JaSlQd) for GURPS 4e Game Aid for Foundry VTT

If you can't access the Google doc, here is a [PDF](https://github.com/crnormand/gurps/raw/main/docs/Guide%20for%20GURPS%204e%20on%20Foundry%20VTT.pdf) of the latest version.

# Current Release Version 0.14.10 (compatible with Foundry 0.9.x)

With support for the [Nordlondr Ovinabokin: Bestiary and Enemies module](https://foundryvtt.com/packages/nordlond-bestiary)!

### [Change Log](changelog.md)
The list was getting just too long, so it has been moved to a separate file. Click above to see what has changed.

The list was getting just too long, so it has been moved to a separate file. Click above to see what has changed.

If you like our work [Sponsor our development](https://github.com/sponsors/crnormand) or <a href="https://ko-fi.com/crnormand"><img height="36" src="https://cdn.ko-fi.com/cdn/kofi2.png?v=2"></a>

Join us on Discord: [GURPS Foundry-VTT Discord](https://discord.gg/6xJBcYWyED)

[Current GCA4 Export version: 'GCA-11' 12/23/2021 / Current GCA5 Export version: 'GCA5-13' 4/26/2022 / Current GCS Export version: 'GCS-5' 3/8/2021](https://drive.google.com/file/d/1vbDb9WtYQiZI78Pwa_TlEvYpJnR_S67B/view?usp=sharing)



#### Legal

The material presented here is my original creation, intended for use with the [GURPS](http://www.sjgames.com/gurps) system from [Steve Jackson Games](ttp://www.sjgames.com). This material is not official and is not endorsed by Steve Jackson Games.

[GURPS](http://www.sjgames.com/gurps) is a trademark of Steve Jackson Games, and its rules and art are copyrighted by Steve Jackson Games. All rights are reserved by Steve Jackson Games. This game aid is the original creation of Chris Normand/Nose66 and is released for free distribution, and not for resale, under the permissions granted in the [Steve Jackson Games Online Policy](http://www.sjgames.com/general/online_policy.html)
Expand Down
8 changes: 4 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Release 0.14.10 - 9/07/2022
- Fixed, reinstalled individual dice results on targetted rolls.
- Enhanced /show to accept -a (sort alphabetically), -pc and -npc flags
- Fixed import of usage notes for melee and ranged weapons
- Fixed /anim file selection algorithm (to determine best fit). NOTE: You may need to adjust your current targeted /anim commands to get the right "look".
- Fixed /anim file selection algorithm (to determine best fit). NOTE: You may need to adjust your current targeted /anim commands to get the right "look".
- Added 'Show?' button to tooltip
- Holding CTRL/CMD and clicking a "send to" will add, not replace player's bucket
- Update to JB2A 0.4.9
Expand All @@ -39,7 +39,7 @@ Release 0.14.7 - 7/28/2022

- Added 'disarmed' status effect icon
- Fixed /pr (private roll), and /psr (private selected roll)
- Update JB2A to 0.4.6
- Update JB2A to 0.4.6

Release 0.14.6 - 7/24/2022

Expand All @@ -56,14 +56,14 @@ Release 0.14.5 - 7/24/2022
- Holding CTRL shows changes in roll mode (GM roll for GMs, Blind roll for Players), w/system setting
- Fix /hp +1 @target for good?
- Damage column can now execute OTFs (ex: PDF:B405)
- OTF now handles HTTP URLs. [http://google.com], as well as labeled ["Google!"http://google.com]
- OTF now handles HTTP URLs. [http://google.com], as well as labeled ["Google!"http://google.com]
- Drag and drop PDF Journal links now open PDFoundry, and not the placeholder Journal
- Show "flavor" text below roll (issue #1426)
- Add ability to roll dice or damage multiple times from chat "/r [3d] 5" or "/r [3d cut] 5"
- Add ability to roll dice or damage multiple times from chat (using compact syntax) "/3d 5" or "/3d cut 5"
- Fixed initial vtt-notes import from GCS
- Added warning for /repeat X /anim ... when actor not linked
- Added "selected roll", /sr [otf], /psr [otf] . "rolls" (executes) OTF against the selected actors. /sr [per], /sr [/hp -1d-3!], /sr [/hp reset]
- Added "selected roll", /sr [otf], /psr [otf] . "rolls" (executes) OTF against the selected actors. /sr [per], /sr [/hp -1d-3!], /sr [/hp reset]

Release 0.14.4 7/7/2022

Expand Down
58 changes: 29 additions & 29 deletions lib/change-log.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
import "./markdown-it.js";
import { SemanticVersion } from "./semver.js";
import './markdown-it.js'
import { SemanticVersion } from './semver.js'

export class ChangeLogWindow extends FormApplication {
constructor(lastVersion) {
super({}, {});
this.lastVersion = lastVersion;
super({}, {})

this.lastVersion = lastVersion
}

static get defaultOptions() {
const options = super.defaultOptions;
const options = super.defaultOptions
return mergeObject(options, {
id: "changelog",
classes: ["gurps", "changelog"],
template: "systems/gurps/templates/changelog.html",
id: 'changelog',
classes: ['gurps', 'changelog'],
template: 'systems/gurps/templates/changelog.html',
width: 700,
submitOnChange: true,
closeOnSubmit: false,
});
})
}

get title() {
return `${game.i18n.localize("GURPS.title")} ~ ${game.i18n.localize("GURPS.changelog")}`;
return `${game.i18n.localize('GURPS.title')} ~ ${game.i18n.localize('GURPS.changelog')}`
}

async getData() {
let data = await super.getData();
let data = await super.getData()

let xhr = new XMLHttpRequest();
xhr.open("GET", "systems/gurps/changelog.md");
let xhr = new XMLHttpRequest()
xhr.open('GET', 'systems/gurps/changelog.md')

let promise = new Promise(resolve => {
xhr.onload = () => {
if (xhr.status === 200) {
data.changelog = this._processChangelog(xhr.response);
resolve(data);
data.changelog = this._processChangelog(xhr.response)
resolve(data)
}
};
});
xhr.send(null);
}
})
xhr.send(null)

return promise;
return promise
}

_processChangelog(md) {
const MD = window.markdownit();
md = md.replace(/<a href=.*<\/a>/g,""); // Remove HTML link from internal changelog display
const MD = window.markdownit()
md = md.replace(/<a href=.*<\/a>/g, '') // Remove HTML link from internal changelog display

// Cut off irrelevant changelog entries
let lines = md.split(/[\n\r]/);
let count = 0 // Max at 5
let lines = md.split(/[\n\r]/)
let count = 0 // Max at 5
if (this.lastVersion) {
for (let a = 0; a < lines.length; a++) {
let line = lines[a];
let line = lines[a]
if (line.match(/([0-9]+\.[0-9]+\.[0-9]+)/)) {
count++
const version = SemanticVersion.fromString(RegExp.$1);
const version = SemanticVersion.fromString(RegExp.$1)
if (count > 5 || !version.isHigherThan(this.lastVersion)) {
lines = lines.slice(0, a);
break;
lines = lines.slice(0, a)
break
}
}
}
}

return MD.render(lines.join("\n"));
return MD.render(lines.join('\n'))
}
}
6 changes: 3 additions & 3 deletions lib/hitpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const hpConditions = {
style: 'normal',
},
REELING: {
breakpoint: HP => Math.ceil(HP.max / 3)-1,
breakpoint: HP => Math.ceil(HP.max / 3) - 1,
label: 'GURPS.STATUSReeling',
style: 'reeling',
},
Expand Down Expand Up @@ -66,14 +66,14 @@ const fpConditions = {
style: 'normal',
},
REELING: {
breakpoint: FP => Math.ceil(FP.max / 3)-1,
breakpoint: FP => Math.ceil(FP.max / 3) - 1,
label: 'GURPS.tired',
style: 'tired',
},
COLLAPSE: {
breakpoint: _ => 0,
label: 'GURPS.collapse',

style: 'collapse',
},
UNCONSCIOUS: {
Expand Down
8 changes: 4 additions & 4 deletions lib/initiative.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ export default class Initiative {
constructor() {
this.setup()
}

static defaultFormula() {
return "((@basicspeed.value*100) + (@attributes.DX.value / 100) + (1d6 / 1000)) / 100"
return '((@basicspeed.value*100) + (@attributes.DX.value / 100) + (1d6 / 1000)) / 100'
}

setup() {
Hooks.once("init", () => {
Hooks.once('init', () => {
CONFIG.Combat.initiative = {
formula: Initiative.defaultFormula(),
decimals: 5 // Important to be able to maintain resolution
decimals: 5, // Important to be able to maintain resolution
}
})
}
Expand Down
Loading

0 comments on commit 8d0075e

Please sign in to comment.