UNPKG

@kurohyou/k-scaffold

Version:

This framework simplifies the task of writing code for Roll20 character sheets. It aims to provide an easier interface between the html and sheetworkers with some minor css templates.

54 lines (53 loc) 1.82 kB
/** * The K-scaffold provides several variables to allow your scripts to tap into its information flow. * @namespace Sheetworkers.Variables */ /** * This stores the name of your sheet for use in the logging functions {@link log} and {@link debug}. Accessible by `k.sheetName` * @memberof Variables * @var * @type {string} */ let sheetName = 'kScaffold Powered Sheet'; kFuncs.sheetName = sheetName; /** * This stores the version of your sheet for use in the logging functions{@link log} and {@link debug}. It is also stored in the sheet_version attribute on your character sheet. Accessible via `k.version` * @memberof Variables * @var * @type {number} */ let version = 0; kFuncs.version = version; /** * A boolean flag that tells the script whether to enable or disable {@link debug} calls. If the version of the sheet is `0`, or an attribute named `debug_mode` is found on opening this is set to true for your entire session. Otherwise, it remains false. * @memberof Variables * @var * @type {boolean} */ let debugMode = false; kFuncs.debugMode = debugMode; /** * A boolean flag that tells the script whether to output verbose logs of what is being done or not when {@link debugMode} is enabled. * @memberof Variables * @var * @type {boolean} */ let verboseMode = false; kFuncs.verboseMode = verboseMode; const funcs = {}; kFuncs.funcs = funcs; const updateHandlers = {}; const openHandlers = {}; const initialSetups = {}; const allHandlers = {}; const addFuncs = {}; const kscaffoldJSVersion = '2.7.2'; const kscaffoldPUGVersion = '2.7.0'; /** * Defines the rollstring that rolls made using k.startRoll begin with. Defaults to "&{template:default}". * @memberof Variables * @var * @type {string} */ let defaultRollStart = '&{template:default}'; kFuncs.defaultRollStart = defaultRollStart;