New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

areaspawnr

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

areaspawnr - npm Package Compare versions

Comparing version

to
0.7.4

2

dist/AreaSpawnr.js

@@ -1,1 +0,1 @@

define(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){var n,o;n=[e,r,e(1)],void 0===(o=function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}(e)}.apply(r,n))||(t.exports=o)},function(t,r,e){var n;void 0===(n=function(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e={xDec:"right",xInc:"left",yDec:"bottom",yInc:"top"},n={xDec:"xInc",xInc:"xDec",yDec:"yInc",yInc:"yDec"},o=function(t,r,e,n,o){switch(t){case"top":return r;case"right":return e;case"bottom":return n;case"left":return o;default:throw new Error("Unknown directionKey: '"+t+"'.")}},a=function(t,r,n,a,i,s){for(var p=e[t],u=o(p,n,a,i,s),c=0;c<r.length;c+=1)if(r[c][p]>=u)return c;return r.length},i=function(t,r,a,i,s,p){for(var u=e[t],c=o(e[n[t]],a,i,s,p),h=r.length-1;h>=0;h-=1)if(r[h][u]<=c)return h;return-1},s=function(){function t(t){if(!t)throw new Error("No settings given to AreaSpawnr.");if(!t.mapsCreatr)throw new Error("No mapsCreatr provided to AreaSpawnr.");if(!t.mapScreenr)throw new Error("No mapsCreatr provided to AreaSpawnr.");this.mapsCreator=t.mapsCreatr,this.mapScreenr=t.mapScreenr,this.onSpawn=t.onSpawn,this.onUnspawn=t.onUnspawn,this.screenAttributes=t.screenAttributes||[],this.stretchAdd=t.stretchAdd,this.afterAdd=t.afterAdd}return t.prototype.getScreenAttributes=function(){return this.screenAttributes},t.prototype.getMapName=function(){return this.mapName},t.prototype.getMap=function(t){return void 0===t?this.mapCurrent:this.mapsCreator.getMap(t)},t.prototype.getMaps=function(){return this.mapsCreator.getMaps()},t.prototype.getArea=function(){return this.areaCurrent},t.prototype.getAreaName=function(){return this.areaCurrent.name},t.prototype.getLocation=function(t){return this.areaCurrent.map.locations[t]},t.prototype.getLocationEntered=function(){return this.locationEntered},t.prototype.getPreThings=function(){return this.prethings},t.prototype.setMap=function(t,r){if(this.mapCurrent=this.getMap(t),!this.mapCurrent)throw new Error("Unknown Map in setMap: '"+t+"'.");return this.mapName=t,void 0!==r&&this.setLocation(r),this.mapCurrent},t.prototype.setLocation=function(t){var r=this.mapCurrent.locations[t];if(!r)throw new Error("Unknown location in setLocation: '"+t+"'.");this.locationEntered=r,this.areaCurrent=r.area,this.areaCurrent.boundaries={bottom:0,left:0,right:0,top:0};for(var e=0,n=this.screenAttributes;e<n.length;e++){var o=n[e];this.mapScreenr.variables[o]=this.areaCurrent[o]}return this.prethings=this.mapsCreator.getPreThings(r.area),this.areaCurrent.stretches&&this.setStretches(this.areaCurrent.stretches),this.areaCurrent.afters&&this.setAfters(this.areaCurrent.afters),r},t.prototype.setStretches=function(t){if(!this.stretchAdd)throw new Error("Cannot call setStretches without a stretchAdd.");for(var r=0;r<t.length;r+=1)this.stretchAdd(t[r],r,t)},t.prototype.setAfters=function(t){if(!this.afterAdd)throw new Error("Cannot call setAfters without an afterAdd.");for(var r=0;r<t.length;r+=1)this.afterAdd(t[r],r,t)},t.prototype.spawnArea=function(t,r,e,n,o){this.onSpawn&&this.applySpawnAction(this.onSpawn,!0,t,r,e,n,o)},t.prototype.unspawnArea=function(t,r,e,n,o){this.onUnspawn&&this.applySpawnAction(this.onUnspawn,!1,t,r,e,n,o)},t.prototype.applySpawnAction=function(t,r,e,n,o,s,p){for(var u in this.prethings)if(this.prethings.hasOwnProperty(u)){var c=this.prethings[u][e];if(0!==c.length)for(var h=a(e,c,n,o,s,p),f=i(e,c,n,o,s,p),d=h;d<=f;d+=1){var l=c[d];l.spawned!==r&&(l.spawned=r,t(l))}}},t}();r.AreaSpawnr=s}.apply(r,[e,r]))||(t.exports=n)}])});
define((function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){var n,o;n=[e,r,e(1)],void 0===(o=function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}(e)}.apply(r,n))||(t.exports=o)},function(t,r,e){var n;void 0===(n=function(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e={xDec:"right",xInc:"left",yDec:"bottom",yInc:"top"},n={xDec:"xInc",xInc:"xDec",yDec:"yInc",yInc:"yDec"},o=function(t,r,e,n,o){switch(t){case"top":return r;case"right":return e;case"bottom":return n;case"left":return o;default:throw new Error("Unknown directionKey: '"+t+"'.")}},a=function(t,r,n,a,i,s){for(var p=e[t],u=o(p,n,a,i,s),c=0;c<r.length;c+=1)if(r[c][p]>=u)return c;return r.length},i=function(t,r,a,i,s,p){for(var u=e[t],c=o(e[n[t]],a,i,s,p),h=r.length-1;h>=0;h-=1)if(r[h][u]<=c)return h;return-1},s=function(){function t(t){if(!t)throw new Error("No settings given to AreaSpawnr.");if(!t.mapsCreatr)throw new Error("No mapsCreatr provided to AreaSpawnr.");if(!t.mapScreenr)throw new Error("No mapsCreatr provided to AreaSpawnr.");this.mapsCreator=t.mapsCreatr,this.mapScreenr=t.mapScreenr,this.onSpawn=t.onSpawn,this.onUnspawn=t.onUnspawn,this.screenAttributes=t.screenAttributes||[],this.stretchAdd=t.stretchAdd,this.afterAdd=t.afterAdd}return t.prototype.getScreenAttributes=function(){return this.screenAttributes},t.prototype.getMapName=function(){return this.mapName},t.prototype.getMap=function(t){return void 0===t?this.mapCurrent:this.mapsCreator.getMap(t)},t.prototype.getMaps=function(){return this.mapsCreator.getMaps()},t.prototype.getArea=function(){return this.areaCurrent},t.prototype.getAreaName=function(){return this.areaCurrent.name},t.prototype.getLocation=function(t){return this.areaCurrent.map.locations[t]},t.prototype.getLocationEntered=function(){return this.locationEntered},t.prototype.getPreThings=function(){return this.prethings},t.prototype.setMap=function(t,r){if(this.mapCurrent=this.getMap(t),!this.mapCurrent)throw new Error("Unknown Map in setMap: '"+t+"'.");return this.mapName=t,void 0!==r&&this.setLocation(r),this.mapCurrent},t.prototype.setLocation=function(t){var r=this.mapCurrent.locations[t];if(!r)throw new Error("Unknown location in setLocation: '"+t+"'.");this.locationEntered=r,this.areaCurrent=r.area,this.areaCurrent.boundaries={bottom:0,left:0,right:0,top:0};for(var e=0,n=this.screenAttributes;e<n.length;e++){var o=n[e];this.mapScreenr.variables[o]=this.areaCurrent[o]}return this.prethings=this.mapsCreator.getPreThings(r.area),this.areaCurrent.stretches&&this.setStretches(this.areaCurrent.stretches),this.areaCurrent.afters&&this.setAfters(this.areaCurrent.afters),r},t.prototype.setStretches=function(t){if(!this.stretchAdd)throw new Error("Cannot call setStretches without a stretchAdd.");for(var r=0;r<t.length;r+=1)this.stretchAdd(t[r],r,t)},t.prototype.setAfters=function(t){if(!this.afterAdd)throw new Error("Cannot call setAfters without an afterAdd.");for(var r=0;r<t.length;r+=1)this.afterAdd(t[r],r,t)},t.prototype.spawnArea=function(t,r,e,n,o){this.onSpawn&&this.applySpawnAction(this.onSpawn,!0,t,r,e,n,o)},t.prototype.unspawnArea=function(t,r,e,n,o){this.onUnspawn&&this.applySpawnAction(this.onUnspawn,!1,t,r,e,n,o)},t.prototype.applySpawnAction=function(t,r,e,n,o,s,p){for(var u in this.prethings)if(this.prethings.hasOwnProperty(u)){var c=this.prethings[u][e];if(0!==c.length)for(var h=a(e,c,n,o,s,p),f=i(e,c,n,o,s,p),d=h;d<=f;d+=1){var l=c[d];l.spawned!==r&&(l.spawned=r,t(l))}}},t}();r.AreaSpawnr=s}.apply(r,[e,r]))||(t.exports=n)}])}));

@@ -11,34 +11,34 @@ {

"dependencies": {
"mapscreatr": "^0.7.5",
"mapscreenr": "^0.7.2"
"mapscreatr": "^0.7.6",
"mapscreenr": "^0.7.3"
},
"description": "Loads GameStartr maps to spawn and unspawn areas on demand.",
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/lodash": "^4.14.123",
"@types/chai": "^4.2.2",
"@types/lodash": "^4.14.138",
"@types/lolex": "^3.1.1",
"@types/mocha": "^5.2.6",
"@types/sinon": "^7.0.11",
"@types/sinon-chai": "^3.2.2",
"@types/mocha": "^5.2.7",
"@types/sinon": "^7.0.13",
"@types/sinon-chai": "^3.2.3",
"chai": "^4.2.0",
"concurrently": "^4.1.0",
"glob": "^7.1.3",
"concurrently": "^4.1.2",
"glob": "^7.1.4",
"istanbul": "^0.4.5",
"lolex": "^3.1.0",
"lolex": "^4.2.0",
"mkdirp": "^0.5.1",
"mocha": "^6.1.3",
"mocha-headless-chrome": "^2.0.2",
"npm-check-updates": "^3.1.7",
"mocha": "^6.2.0",
"mocha-headless-chrome": "^2.0.3",
"npm-check-updates": "^3.1.23",
"requirejs": "^2.3.6",
"run-for-every-file": "^1.1.0",
"shenanigans-manager": "^0.2.36",
"sinon": "^7.3.1",
"shenanigans-manager": "^0.2.42",
"sinon": "^7.4.2",
"sinon-chai": "^3.3.0",
"tslint": "5.15.0",
"tsutils": "^3.10.0",
"typedoc": "^0.14.2",
"typescript": "^3.4.3",
"tslint": "5.20.0",
"tsutils": "^3.17.1",
"typedoc": "^0.15.0",
"typescript": "^3.6.3",
"watch": "^1.0.2",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.0"
"webpack": "^4.40.0",
"webpack-cli": "^3.3.8"
},

@@ -89,3 +89,3 @@ "license": "MIT",

"types": "./src/index.d.ts",
"version": "0.7.3"
"version": "0.7.4"
}