@workadventure/scripting-api-extra
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
export declare function initDoors(): Promise<void>; | ||
export declare function initDoors(assetsUrl?: string | undefined): Promise<void>; |
@@ -88,3 +88,3 @@ "use strict"; | ||
} | ||
function initDoorstep(layer, doorVariable, properties) { | ||
function initDoorstep(layer, doorVariable, properties, assetsUrl) { | ||
const name = layer.name; | ||
@@ -134,3 +134,3 @@ let actionMessage = undefined; | ||
name: "doorKeypad" + name, | ||
url: "../../keypad.html?layer=" + encodeURIComponent(name), | ||
url: assetsUrl + "/keypad.html?layer=" + encodeURIComponent(name), | ||
position: { | ||
@@ -249,3 +249,5 @@ x: boundaries.right * 32, | ||
} | ||
async function initDoors() { | ||
async function initDoors(assetsUrl) { | ||
var _a; | ||
assetsUrl = (_a = assetsUrl !== null && assetsUrl !== void 0 ? assetsUrl : process.env.ASSETS_URL) !== null && _a !== void 0 ? _a : ""; | ||
const variables = await VariablesExtra_1.getAllVariables(); | ||
@@ -265,3 +267,3 @@ layersMap = await LayersFlattener_1.getLayersMap(); | ||
if (doorVariable && layer.type === "tilelayer") { | ||
initDoorstep(layer, doorVariable, properties); | ||
initDoorstep(layer, doorVariable, properties, assetsUrl); | ||
} | ||
@@ -268,0 +270,0 @@ const bellVariable = properties.getString("bellVariable"); |
{ | ||
"name": "@workadventure/scripting-api-extra", | ||
"version": "1.0.0-alpha.4", | ||
"version": "1.0.0-alpha.5", | ||
"description": "A set of utility functions / features to improve WorkAdventure maps", | ||
@@ -17,2 +17,3 @@ "main": "dist/index.js", | ||
"semantic-release": "semantic-release", | ||
"semantic-release-dry-run": "semantic-release -d", | ||
"serve": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" webpack serve --open", | ||
@@ -19,0 +20,0 @@ "svelte-check-watch": "svelte-check --fail-on-warnings --fail-on-hints --compiler-warnings \"a11y-no-onchange:ignore,a11y-autofocus:ignore,a11y-media-has-caption:ignore\" --watch", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
809785
0.11%977
0.21%1
Infinity%