Skip to content

Commit

Permalink
Merge pull request #1438 from crnormand/bugfix/nullobject
Browse files Browse the repository at this point in the history
pull gurpslink function code out of gurps.js
  • Loading branch information
mjeffw authored May 29, 2022
2 parents cba49b4 + cdd6051 commit 1cf9e6b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/moustachewax.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { parseDecimalNumber } from './parse-decimal-number/parse-decimal-number.
import { MoveModes } from '../module/actor/actor.js'
import { DamageTables } from '../module/damage/damage-tables.js'
import { multiplyDice } from '../module/utilities/damage-utils.js'
import { gurpslink } from '../../../../develop/gurps/module/utilities/gurpslink.js'
import { gurpslink } from '../module/utilities/gurpslink.js'

/*
Called Moustache Wax because it helps Handlebars. Get it?
Expand Down
2 changes: 1 addition & 1 deletion module/actor/effect-modifier-popout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import GurpsWiring from '../gurps-wiring.js'
import { i18n, i18n_f } from '../../lib/utilities.js'
import { gurpslink } from '../../../../../develop/gurps/module/utilities/gurpslink.js'
import { gurpslink } from '../../module/utilities/gurpslink.js'

export class EffectModifierPopout extends Application {
constructor(token, callback, options = {}) {
Expand Down
2 changes: 1 addition & 1 deletion module/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as Settings from '../lib/miscellaneous-settings.js'
import { i18n } from '../lib/utilities.js'
import ChatProcessor from './chat/chat-processor.js'
import GurpsWiring from './gurps-wiring.js'
import { gurpslink } from '../../../../develop/gurps/module/utilities/gurpslink.js'
import { gurpslink } from '../module/utilities/gurpslink.js'

/**
* This holds functions for all things chat related
Expand Down
6 changes: 6 additions & 0 deletions module/gurps.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ import GurpsActiveEffectConfig from './effects/active-effect-config.js'
import * as GURPSSpeedProvider from './speed-provider.js'
import { multiplyDice } from './utilities/damage-utils.js'
import GurpsWiring from './gurps-wiring.js'
import { gurpslink } from './utilities/gurpslink.js'

let GURPS = undefined

if (!window.GURPS) {
GURPS = {}
Expand Down Expand Up @@ -371,6 +374,9 @@ if (!window.GURPS) {
}
GURPS.trim = trim

// Needed for external modules like Token Action HUD and Nordlond Bestiary
GURPS.gurpslink = gurpslink

/**
* @param {string} string
* @param {boolean} priv
Expand Down
2 changes: 1 addition & 1 deletion module/journal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import GurpsWiring from './gurps-wiring.js'
import { atou } from '../lib/utilities.js'
import { gurpslink } from '../../../../develop/gurps/module/utilities/gurpslink.js'
import { gurpslink } from '../module/utilities/gurpslink.js'

export default class GurpsJournalEntry {
static ready() {
Expand Down
1 change: 1 addition & 0 deletions module/utilities/contextmenu.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Context Menu
export default class GgaContextMenu extends ContextMenu {
constructor(container, element, selector, title, menuItems, events = { eventName: 'contextmenu' }) {
super(element, selector, menuItems, events)
Expand Down
2 changes: 2 additions & 0 deletions module/utilities/gurpslink.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { parselink } from '../../lib/parselink.js'

/**
* Return html for text, parsing GURPS "links" into <span class="gurplink">XXX</span>.
* @param {string | null | undefined} str
Expand Down

0 comments on commit 1cf9e6b

Please sign in to comment.