areaspawnr
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -1,1 +0,1 @@ | ||
var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","32":"Variable","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","2097152":"Object literal"},"rows":[{"id":0,"kind":1,"name":"\"IAreaSpawnr\"","url":"modules/_iareaspawnr_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":256,"name":"ICommandAdder","url":"interfaces/_iareaspawnr_.icommandadder.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":2,"kind":256,"name":"IAreaSpawnrSettings","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":3,"kind":1024,"name":"mapsCreatr","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#mapscreatr","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":4,"kind":1024,"name":"mapScreenr","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#mapscreenr","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":5,"kind":1024,"name":"onSpawn","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onspawn","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":6,"kind":65536,"name":"__type","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onspawn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings.onSpawn"},{"id":7,"kind":1024,"name":"onUnspawn","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onunspawn","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":8,"kind":65536,"name":"__type","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onunspawn.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings.onUnspawn"},{"id":9,"kind":1024,"name":"screenAttributes","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#screenattributes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":10,"kind":1024,"name":"stretchAdd","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#stretchadd","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":11,"kind":1024,"name":"afterAdd","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#afteradd","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":12,"kind":1024,"name":"commandScope","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#commandscope","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":13,"kind":256,"name":"IAreaSpawnr","url":"interfaces/_iareaspawnr_.iareaspawnr.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":14,"kind":2048,"name":"getScreenAttributes","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getscreenattributes","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":15,"kind":2048,"name":"getMapName","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmapname","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":16,"kind":2048,"name":"getMap","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmap","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":17,"kind":2048,"name":"getMaps","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmaps","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":18,"kind":2048,"name":"getArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":19,"kind":2048,"name":"getAreaName","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getareaname","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":20,"kind":2048,"name":"getLocation","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getlocation","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":21,"kind":2048,"name":"getLocationEntered","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getlocationentered","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":22,"kind":2048,"name":"getPreThings","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getprethings","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":23,"kind":2048,"name":"setCommandScope","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setcommandscope","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":24,"kind":2048,"name":"setMap","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setmap","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":25,"kind":2048,"name":"setLocation","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setlocation","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":26,"kind":2048,"name":"setStretches","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setstretches","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":27,"kind":2048,"name":"setAfters","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setafters","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":28,"kind":2048,"name":"spawnArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#spawnarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":29,"kind":2048,"name":"unspawnArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#unspawnarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":30,"kind":1,"name":"\"AreaSpawnr\"","url":"modules/_areaspawnr_.html","classes":"tsd-kind-external-module"},{"id":31,"kind":128,"name":"AreaSpawnr","url":"classes/_areaspawnr_.areaspawnr.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"AreaSpawnr\""},{"id":32,"kind":2097152,"name":"directionKeys","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys","classes":"tsd-kind-object-literal tsd-parent-kind-class tsd-is-static","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":33,"kind":32,"name":"xInc","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.xinc","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":34,"kind":32,"name":"xDec","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.xdec","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":35,"kind":32,"name":"yInc","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.yinc","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":36,"kind":32,"name":"yDec","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.ydec","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":37,"kind":2097152,"name":"directionOpposites","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites","classes":"tsd-kind-object-literal tsd-parent-kind-class tsd-is-static","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":38,"kind":32,"name":"xInc","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.xinc-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":39,"kind":32,"name":"xDec","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.xdec-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":40,"kind":32,"name":"yInc","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.yinc-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":41,"kind":32,"name":"yDec","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.ydec-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":42,"kind":1024,"name":"mapsCreator","url":"classes/_areaspawnr_.areaspawnr.html#mapscreator","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":43,"kind":1024,"name":"mapScreenr","url":"classes/_areaspawnr_.areaspawnr.html#mapscreenr","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":44,"kind":1024,"name":"screenAttributes","url":"classes/_areaspawnr_.areaspawnr.html#screenattributes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":45,"kind":1024,"name":"mapCurrent","url":"classes/_areaspawnr_.areaspawnr.html#mapcurrent","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":46,"kind":1024,"name":"areaCurrent","url":"classes/_areaspawnr_.areaspawnr.html#areacurrent","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":47,"kind":1024,"name":"locationEntered","url":"classes/_areaspawnr_.areaspawnr.html#locationentered","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":48,"kind":1024,"name":"mapName","url":"classes/_areaspawnr_.areaspawnr.html#mapname","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":49,"kind":1024,"name":"prethings","url":"classes/_areaspawnr_.areaspawnr.html#prethings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":50,"kind":1024,"name":"onSpawn","url":"classes/_areaspawnr_.areaspawnr.html#onspawn","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":51,"kind":65536,"name":"__type","url":"classes/_areaspawnr_.areaspawnr.html#onspawn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"AreaSpawnr\".AreaSpawnr.onSpawn"},{"id":52,"kind":1024,"name":"onUnspawn","url":"classes/_areaspawnr_.areaspawnr.html#onunspawn","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":53,"kind":65536,"name":"__type","url":"classes/_areaspawnr_.areaspawnr.html#onunspawn.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"AreaSpawnr\".AreaSpawnr.onUnspawn"},{"id":54,"kind":1024,"name":"stretches","url":"classes/_areaspawnr_.areaspawnr.html#stretches","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":55,"kind":1024,"name":"stretchAdd","url":"classes/_areaspawnr_.areaspawnr.html#stretchadd","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":56,"kind":1024,"name":"afters","url":"classes/_areaspawnr_.areaspawnr.html#afters","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":57,"kind":1024,"name":"afterAdd","url":"classes/_areaspawnr_.areaspawnr.html#afteradd","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":58,"kind":1024,"name":"commandScope","url":"classes/_areaspawnr_.areaspawnr.html#commandscope","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":59,"kind":512,"name":"constructor","url":"classes/_areaspawnr_.areaspawnr.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":60,"kind":2048,"name":"getScreenAttributes","url":"classes/_areaspawnr_.areaspawnr.html#getscreenattributes","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":61,"kind":2048,"name":"getMapName","url":"classes/_areaspawnr_.areaspawnr.html#getmapname","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":62,"kind":2048,"name":"getMap","url":"classes/_areaspawnr_.areaspawnr.html#getmap","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":63,"kind":2048,"name":"getMaps","url":"classes/_areaspawnr_.areaspawnr.html#getmaps","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":64,"kind":2048,"name":"getArea","url":"classes/_areaspawnr_.areaspawnr.html#getarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":65,"kind":2048,"name":"getAreaName","url":"classes/_areaspawnr_.areaspawnr.html#getareaname","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":66,"kind":2048,"name":"getLocation","url":"classes/_areaspawnr_.areaspawnr.html#getlocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":67,"kind":2048,"name":"getLocationEntered","url":"classes/_areaspawnr_.areaspawnr.html#getlocationentered","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":68,"kind":2048,"name":"getPreThings","url":"classes/_areaspawnr_.areaspawnr.html#getprethings","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":69,"kind":2048,"name":"setCommandScope","url":"classes/_areaspawnr_.areaspawnr.html#setcommandscope","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":70,"kind":2048,"name":"setMap","url":"classes/_areaspawnr_.areaspawnr.html#setmap","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":71,"kind":2048,"name":"setLocation","url":"classes/_areaspawnr_.areaspawnr.html#setlocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":72,"kind":2048,"name":"setStretches","url":"classes/_areaspawnr_.areaspawnr.html#setstretches","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":73,"kind":2048,"name":"setAfters","url":"classes/_areaspawnr_.areaspawnr.html#setafters","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":74,"kind":2048,"name":"spawnArea","url":"classes/_areaspawnr_.areaspawnr.html#spawnarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":75,"kind":2048,"name":"unspawnArea","url":"classes/_areaspawnr_.areaspawnr.html#unspawnarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":76,"kind":2048,"name":"applySpawnAction","url":"classes/_areaspawnr_.areaspawnr.html#applyspawnaction","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":77,"kind":2048,"name":"findPreThingsSpawnStart","url":"classes/_areaspawnr_.areaspawnr.html#findprethingsspawnstart","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":78,"kind":2048,"name":"findPreThingsSpawnEnd","url":"classes/_areaspawnr_.areaspawnr.html#findprethingsspawnend","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":79,"kind":2048,"name":"getDirectionEnd","url":"classes/_areaspawnr_.areaspawnr.html#getdirectionend","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"}]}; | ||
var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","32":"Variable","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","2097152":"Object literal"},"rows":[{"id":0,"kind":1,"name":"\"IAreaSpawnr\"","url":"modules/_iareaspawnr_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":256,"name":"ICommandAdder","url":"interfaces/_iareaspawnr_.icommandadder.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":2,"kind":256,"name":"IAreaSpawnrSettings","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":3,"kind":1024,"name":"mapsCreatr","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#mapscreatr","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":4,"kind":1024,"name":"mapScreenr","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#mapscreenr","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":5,"kind":1024,"name":"onSpawn","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onspawn","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":6,"kind":65536,"name":"__type","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onspawn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings.onSpawn"},{"id":7,"kind":1024,"name":"onUnspawn","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onunspawn","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":8,"kind":65536,"name":"__type","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#onunspawn.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings.onUnspawn"},{"id":9,"kind":1024,"name":"screenAttributes","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#screenattributes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":10,"kind":1024,"name":"stretchAdd","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#stretchadd","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":11,"kind":1024,"name":"afterAdd","url":"interfaces/_iareaspawnr_.iareaspawnrsettings.html#afteradd","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnrSettings"},{"id":12,"kind":256,"name":"IAreaSpawnr","url":"interfaces/_iareaspawnr_.iareaspawnr.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"IAreaSpawnr\""},{"id":13,"kind":2048,"name":"getScreenAttributes","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getscreenattributes","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":14,"kind":2048,"name":"getMapName","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmapname","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":15,"kind":2048,"name":"getMap","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmap","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":16,"kind":2048,"name":"getMaps","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getmaps","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":17,"kind":2048,"name":"getArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":18,"kind":2048,"name":"getAreaName","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getareaname","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":19,"kind":2048,"name":"getLocation","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getlocation","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":20,"kind":2048,"name":"getLocationEntered","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getlocationentered","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":21,"kind":2048,"name":"getPreThings","url":"interfaces/_iareaspawnr_.iareaspawnr.html#getprethings","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":22,"kind":2048,"name":"setMap","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setmap","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":23,"kind":2048,"name":"setLocation","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setlocation","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":24,"kind":2048,"name":"setStretches","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setstretches","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":25,"kind":2048,"name":"setAfters","url":"interfaces/_iareaspawnr_.iareaspawnr.html#setafters","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":26,"kind":2048,"name":"spawnArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#spawnarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":27,"kind":2048,"name":"unspawnArea","url":"interfaces/_iareaspawnr_.iareaspawnr.html#unspawnarea","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"IAreaSpawnr\".IAreaSpawnr"},{"id":28,"kind":1,"name":"\"AreaSpawnr\"","url":"modules/_areaspawnr_.html","classes":"tsd-kind-external-module"},{"id":29,"kind":128,"name":"AreaSpawnr","url":"classes/_areaspawnr_.areaspawnr.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"AreaSpawnr\""},{"id":30,"kind":2097152,"name":"directionKeys","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys","classes":"tsd-kind-object-literal tsd-parent-kind-class tsd-is-static","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":31,"kind":32,"name":"xInc","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.xinc","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":32,"kind":32,"name":"xDec","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.xdec","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":33,"kind":32,"name":"yInc","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.yinc","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":34,"kind":32,"name":"yDec","url":"classes/_areaspawnr_.areaspawnr.html#directionkeys.ydec","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionKeys"},{"id":35,"kind":2097152,"name":"directionOpposites","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites","classes":"tsd-kind-object-literal tsd-parent-kind-class tsd-is-static","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":36,"kind":32,"name":"xInc","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.xinc-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":37,"kind":32,"name":"xDec","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.xdec-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":38,"kind":32,"name":"yInc","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.yinc-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":39,"kind":32,"name":"yDec","url":"classes/_areaspawnr_.areaspawnr.html#directionopposites.ydec-1","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"\"AreaSpawnr\".AreaSpawnr.directionOpposites"},{"id":40,"kind":1024,"name":"mapsCreator","url":"classes/_areaspawnr_.areaspawnr.html#mapscreator","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":41,"kind":1024,"name":"mapScreenr","url":"classes/_areaspawnr_.areaspawnr.html#mapscreenr","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":42,"kind":1024,"name":"screenAttributes","url":"classes/_areaspawnr_.areaspawnr.html#screenattributes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":43,"kind":1024,"name":"mapCurrent","url":"classes/_areaspawnr_.areaspawnr.html#mapcurrent","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":44,"kind":1024,"name":"areaCurrent","url":"classes/_areaspawnr_.areaspawnr.html#areacurrent","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":45,"kind":1024,"name":"locationEntered","url":"classes/_areaspawnr_.areaspawnr.html#locationentered","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":46,"kind":1024,"name":"mapName","url":"classes/_areaspawnr_.areaspawnr.html#mapname","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":47,"kind":1024,"name":"prethings","url":"classes/_areaspawnr_.areaspawnr.html#prethings","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":48,"kind":1024,"name":"onSpawn","url":"classes/_areaspawnr_.areaspawnr.html#onspawn","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":49,"kind":65536,"name":"__type","url":"classes/_areaspawnr_.areaspawnr.html#onspawn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"AreaSpawnr\".AreaSpawnr.onSpawn"},{"id":50,"kind":1024,"name":"onUnspawn","url":"classes/_areaspawnr_.areaspawnr.html#onunspawn","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":51,"kind":65536,"name":"__type","url":"classes/_areaspawnr_.areaspawnr.html#onunspawn.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported","parent":"\"AreaSpawnr\".AreaSpawnr.onUnspawn"},{"id":52,"kind":1024,"name":"stretches","url":"classes/_areaspawnr_.areaspawnr.html#stretches","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":53,"kind":1024,"name":"stretchAdd","url":"classes/_areaspawnr_.areaspawnr.html#stretchadd","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":54,"kind":1024,"name":"afters","url":"classes/_areaspawnr_.areaspawnr.html#afters","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":55,"kind":1024,"name":"afterAdd","url":"classes/_areaspawnr_.areaspawnr.html#afteradd","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":56,"kind":512,"name":"constructor","url":"classes/_areaspawnr_.areaspawnr.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":57,"kind":2048,"name":"getScreenAttributes","url":"classes/_areaspawnr_.areaspawnr.html#getscreenattributes","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":58,"kind":2048,"name":"getMapName","url":"classes/_areaspawnr_.areaspawnr.html#getmapname","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":59,"kind":2048,"name":"getMap","url":"classes/_areaspawnr_.areaspawnr.html#getmap","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":60,"kind":2048,"name":"getMaps","url":"classes/_areaspawnr_.areaspawnr.html#getmaps","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":61,"kind":2048,"name":"getArea","url":"classes/_areaspawnr_.areaspawnr.html#getarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":62,"kind":2048,"name":"getAreaName","url":"classes/_areaspawnr_.areaspawnr.html#getareaname","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":63,"kind":2048,"name":"getLocation","url":"classes/_areaspawnr_.areaspawnr.html#getlocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":64,"kind":2048,"name":"getLocationEntered","url":"classes/_areaspawnr_.areaspawnr.html#getlocationentered","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":65,"kind":2048,"name":"getPreThings","url":"classes/_areaspawnr_.areaspawnr.html#getprethings","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":66,"kind":2048,"name":"setMap","url":"classes/_areaspawnr_.areaspawnr.html#setmap","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":67,"kind":2048,"name":"setLocation","url":"classes/_areaspawnr_.areaspawnr.html#setlocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":68,"kind":2048,"name":"setStretches","url":"classes/_areaspawnr_.areaspawnr.html#setstretches","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":69,"kind":2048,"name":"setAfters","url":"classes/_areaspawnr_.areaspawnr.html#setafters","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":70,"kind":2048,"name":"spawnArea","url":"classes/_areaspawnr_.areaspawnr.html#spawnarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":71,"kind":2048,"name":"unspawnArea","url":"classes/_areaspawnr_.areaspawnr.html#unspawnarea","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":72,"kind":2048,"name":"applySpawnAction","url":"classes/_areaspawnr_.areaspawnr.html#applyspawnaction","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":73,"kind":2048,"name":"findPreThingsSpawnStart","url":"classes/_areaspawnr_.areaspawnr.html#findprethingsspawnstart","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":74,"kind":2048,"name":"findPreThingsSpawnEnd","url":"classes/_areaspawnr_.areaspawnr.html#findprethingsspawnend","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"},{"id":75,"kind":2048,"name":"getDirectionEnd","url":"classes/_areaspawnr_.areaspawnr.html#getdirectionend","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"\"AreaSpawnr\".AreaSpawnr"}]}; |
@@ -77,6 +77,2 @@ import { IArea, ILocation, IMap, IPreThingsContainers } from "mapscreatr/lib/IMapsCreatr"; | ||
/** | ||
* An optional scope to call Prething commands in, if not this. | ||
*/ | ||
private commandScope; | ||
/** | ||
* Initializes a new instance of the AreaSpawnr class. | ||
@@ -136,8 +132,2 @@ * | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
setCommandScope(commandScope: any): any; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -144,0 +134,0 @@ * given name. Note that this will do very little unless a location is |
@@ -1,2 +0,2 @@ | ||
define(["require","exports"],function(t,r){"use strict";var e=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,this.commandScope=t.commandScope}return t.prototype.getScreenAttributes=function(){return this.screenAttributes},t.prototype.getMapName=function(){return this.mapName},t.prototype.getMap=function(t){return"undefined"==typeof 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.setCommandScope=function(t){this.commandScope=t},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,arguments.length>1&&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={top:0,right:0,bottom:0,left: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.");this.stretches=t;for(var r=0;r<t.length;r+=1)this.stretchAdd.call(this.commandScope||this,t[r],r,t)},t.prototype.setAfters=function(t){if(!this.afterAdd)throw new Error("Cannot call setAfters without an afterAdd.");this.afters=t;for(var r=0;r<t.length;r+=1)this.afterAdd.call(this.commandScope||this,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,i,a){for(var s in this.prethings)if(this.prethings.hasOwnProperty(s)){var p=this.prethings[s][e];if(0!==p.length)for(var h=p.length/2|0,c=this.findPreThingsSpawnStart(e,p,h,n,o,i,a),u=this.findPreThingsSpawnEnd(e,p,h,n,o,i,a),f=c;f<=u;f+=1){var d=p[f];d.spawned!==r&&(d.spawned=r,t.call(this.commandScope,d))}}},t.prototype.findPreThingsSpawnStart=function(r,e,n,o,i,a,s){for(var p=t.directionKeys[r],h=this.getDirectionEnd(p,o,i,a,s),c=0;c<e.length;c+=1)if(e[c][p]>=h)return c;return e.length},t.prototype.findPreThingsSpawnEnd=function(r,e,n,o,i,a,s){for(var p=t.directionKeys[r],h=t.directionKeys[t.directionOpposites[r]],c=this.getDirectionEnd(h,o,i,a,s),u=e.length-1;u>=0;u-=1)if(e[u][p]<=c)return u;return-1},t.prototype.getDirectionEnd=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+"'.")}},t.directionKeys={xInc:"left",xDec:"right",yInc:"top",yDec:"bottom"},t.directionOpposites={xInc:"xDec",xDec:"xInc",yInc:"yDec",yDec:"yInc"},t}();r.AreaSpawnr=e}); | ||
define(["require","exports"],function(t,r){"use strict";var e=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"undefined"==typeof 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,arguments.length>1&&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={top:0,right:0,bottom:0,left:0};for(var e=0,n=this.screenAttributes;e<n.length;e++){var i=n[e];this.mapScreenr.variables[i]=this.areaCurrent[i]}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.");this.stretches=t;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.");this.afters=t;for(var r=0;r<t.length;r+=1)this.afterAdd(t[r],r,t)},t.prototype.spawnArea=function(t,r,e,n,i){this.onSpawn&&this.applySpawnAction(this.onSpawn,!0,t,r,e,n,i)},t.prototype.unspawnArea=function(t,r,e,n,i){this.onUnspawn&&this.applySpawnAction(this.onUnspawn,!1,t,r,e,n,i)},t.prototype.applySpawnAction=function(t,r,e,n,i,o,s){for(var a in this.prethings)if(this.prethings.hasOwnProperty(a)){var p=this.prethings[a][e];if(0!==p.length)for(var h=p.length/2|0,c=this.findPreThingsSpawnStart(e,p,h,n,i,o,s),u=this.findPreThingsSpawnEnd(e,p,h,n,i,o,s),f=c;f<=u;f+=1){var d=p[f];d.spawned!==r&&(d.spawned=r,t(d))}}},t.prototype.findPreThingsSpawnStart=function(r,e,n,i,o,s,a){for(var p=t.directionKeys[r],h=this.getDirectionEnd(p,i,o,s,a),c=0;c<e.length;c+=1)if(e[c][p]>=h)return c;return e.length},t.prototype.findPreThingsSpawnEnd=function(r,e,n,i,o,s,a){for(var p=t.directionKeys[r],h=t.directionKeys[t.directionOpposites[r]],c=this.getDirectionEnd(h,i,o,s,a),u=e.length-1;u>=0;u-=1)if(e[u][p]<=c)return u;return-1},t.prototype.getDirectionEnd=function(t,r,e,n,i){switch(t){case"top":return r;case"right":return e;case"bottom":return n;case"left":return i;default:throw new Error("Unknown directionKey: '"+t+"'.")}},t.directionKeys={xInc:"left",xDec:"right",yInc:"top",yDec:"bottom"},t.directionOpposites={xInc:"xDec",xDec:"xInc",yInc:"yDec",yDec:"yInc"},t}();r.AreaSpawnr=e}); | ||
//# sourceMappingURL=AreaSpawnr.js.map |
@@ -10,5 +10,6 @@ import { IArea, ILocation, IMap, IMapsCreatr, IPreThingsContainers } from "mapscreatr/lib/IMapsCreatr"; | ||
* @param index Which command this is, as per Array.forEach. | ||
* @param commands All commands in the group. | ||
*/ | ||
export interface ICommandAdder { | ||
(thing: string | IPreThingSettings, index: number): void; | ||
(thing: string | IPreThingSettings, index: number, commands: any[]): void; | ||
} | ||
@@ -49,6 +50,2 @@ /** | ||
afterAdd?: ICommandAdder; | ||
/** | ||
* An optional scope to call stretchAdd and afterAdd on, if not this. | ||
*/ | ||
commandScope?: any; | ||
} | ||
@@ -108,8 +105,2 @@ /** | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
setCommandScope(commandScope: any): any; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -116,0 +107,0 @@ * given name. Note that this will do very little unless a location is |
{ | ||
"name": "areaspawnr", | ||
"description": "Loads GameStartr maps to spawn and unspawn areas on demand.", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Josh Goldberg", |
@@ -11,4 +11,4 @@ { | ||
"name": "AreaSpawnr", | ||
"version": "0.6.1" | ||
"version": "0.6.2" | ||
} | ||
} |
@@ -77,6 +77,2 @@ import { IArea, ILocation, IMap, IPreThingsContainers } from "mapscreatr/lib/IMapsCreatr"; | ||
/** | ||
* An optional scope to call Prething commands in, if not this. | ||
*/ | ||
private commandScope; | ||
/** | ||
* Initializes a new instance of the AreaSpawnr class. | ||
@@ -136,8 +132,2 @@ * | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
setCommandScope(commandScope: any): any; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -144,0 +134,0 @@ * given name. Note that this will do very little unless a location is |
@@ -29,3 +29,2 @@ define(["require", "exports"], function (require, exports) { | ||
this.afterAdd = settings.afterAdd; | ||
this.commandScope = settings.commandScope; | ||
} | ||
@@ -99,10 +98,2 @@ /** | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
AreaSpawnr.prototype.setCommandScope = function (commandScope) { | ||
this.commandScope = commandScope; | ||
}; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -181,3 +172,3 @@ * given name. Note that this will do very little unless a location is | ||
for (var i = 0; i < stretchesRaw.length; i += 1) { | ||
this.stretchAdd.call(this.commandScope || this, stretchesRaw[i], i, stretchesRaw); | ||
this.stretchAdd(stretchesRaw[i], i, stretchesRaw); | ||
} | ||
@@ -197,3 +188,3 @@ }; | ||
for (var i = 0; i < aftersRaw.length; i += 1) { | ||
this.afterAdd.call(this.commandScope || this, aftersRaw[i], i, aftersRaw); | ||
this.afterAdd(aftersRaw[i], i, aftersRaw); | ||
} | ||
@@ -277,3 +268,3 @@ }; | ||
prething.spawned = status; | ||
callback.call(this.commandScope, prething); | ||
callback(prething); | ||
} | ||
@@ -384,2 +375,2 @@ } | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFyZWFTcGF3bnIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7SUFRQTs7T0FFRztJQUNIO1FBZ0dJOzs7O1dBSUc7UUFDSCxvQkFBWSxRQUE2QjtZQUNyQyxFQUFFLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7Z0JBQ1osTUFBTSxJQUFJLEtBQUssQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFDO1lBQ3hELENBQUM7WUFDRCxFQUFFLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUN2QixNQUFNLElBQUksS0FBSyxDQUFDLHVDQUF1QyxDQUFDLENBQUM7WUFDN0QsQ0FBQztZQUNELEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLFVBQVU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wcGx5IHdpdGhpbi5cclxuICAgICAqL1xyXG4gICAgcHJpdmF0ZSBhcHBseVNwYXduQWN0aW9uKFxyXG4gICAgICAgIGNhbGxiYWNrOiAocHJldGhpbmc6IElQcmVUaGluZykgPT4gdm9pZCxcclxuICAgICAgICBzdGF0dXM6IGJvb2xlYW4sXHJcbiAgICAgICAgZGlyZWN0aW9uOiBzdHJpbmcsXHJcbiAgICAgICAgdG9wOiBudW1iZXIsXHJcbiAgICAgICAgcmlnaHQ6IG51bWJlcixcclxuICAgICAgICBib3R0b206IG51bWJlcixcclxuICAgICAgICBsZWZ0OiBudW1iZXIpOiB2b2lkIHtcclxuICAgICAgICAvLyBGb3IgZWFjaCBncm91cCBvZiBQcmVUaGluZ3MgY3VycmVudGx5IGFibGUgdG8gc3Bhd24uLi5cclxuICAgICAgICBmb3IgKGxldCBuYW1lIGluIHRoaXMucHJldGhpbmdzKSB7XHJcbiAgICAgICAgICAgIGlmICghdGhpcy5wcmV0aGluZ3MuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcclxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBEb24ndCBib3RoZXIgdHJ5aW5nIHRvIHNwYXduIHRoZSBncm91cCBpZiBpdCBoYXMgbm8gbWVtYmVyc1xyXG4gICAgICAgICAgICBjb25zdCBncm91cDogSVByZVRoaW5nW10gPSAodGhpcy5wcmV0aGluZ3MgYXMgYW55KVtuYW1lXVtkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICBpZiAoZ3JvdXAubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRmluZCB0aGUgc3RhcnQgYW5kIGVuZCBwb2ludHMgd2l0aGluIHRoZSBQcmVUaGluZ3MgQXJyYXlcclxuICAgICAgICAgICAgLy8gRXguIGlmIGRpcmVjdGl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lciB7XHJcbiAgICAgICAgc3dpdGNoIChkaXJlY3Rpb25LZXkpIHtcclxuICAgICAgICAgICAgY2FzZSBcInRvcFwiOlxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRvcDtcclxuICAgICAgICAgICAgY2FzZSBcInJpZ2h0XCI6XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcmlnaHQ7XHJcbiAgICAgICAgICAgIGNhc2UgXCJib3R0b21cIjpcclxuICAgICAgICAgICAgICAgIHJldHVybiBib3R0b207XHJcbiAgICAgICAgICAgIGNhc2UgXCJsZWZ0XCI6XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbGVmdDtcclxuICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5rbm93biBkaXJlY3Rpb25LZXk6ICcke2RpcmVjdGlvbktleX0nLmApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFyZWFTcGF3bnIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7SUFRQTs7T0FFRztJQUNIO1FBMkZJOzs7O1dBSUc7UUFDSCxvQkFBWSxRQUE2QjtZQUNyQyxFQUFFLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7Z0JBQ1osTUFBTSxJQUFJLEtBQUssQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFDO1lBQ3hELENBQUM7WUFDRCxFQUFFLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUN2QixNQUFNLElBQUksS0FBSyxDQUFDLHVDQUF1QyxDQUFDLENBQUM7WUFDN0QsQ0FBQztZQUNELEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQyxDQUFDLEN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VmdCAgICBUaGUgbGVmdC1tb3N0IGJvdW5kIHRvIGFwcGx5IHdpdGhpbi5cclxuICAgICAqL1xyXG4gICAgcHJpdmF0ZSBhcHBseVNwYXduQWN0aW9uKFxyXG4gICAgICAgIGNhbGxiYWNrOiAocHJldGhpbmc6IElQcmVUaGluZykgPT4gdm9pZCxcclxuICAgICAgICBzdGF0dXM6IGJvb2xlYW4sXHJcbiAgICAgICAgZGlyZWN0aW9uOiBzdHJpbmcsXHJcbiAgICAgICAgdG9wOiBudW1iZXIsXHJcbiAgICAgICAgcmlnaHQ6IG51bWJlcixcclxuICAgICAgICBib3R0b206IG51bWJlcixcclxuICAgICAgICBsZWZ0OiBudW1iZXIpOiB2b2lkIHtcclxuICAgICAgICAvLyBGb3IgZWFjaCBncm91cCBvZiBQcmVUaGluZ3MgY3VycmVudGx5IGFibGUgdG8gc3Bhd24uLi5cclxuICAgICAgICBmb3IgKGxldCBuYW1lIGluIHRoaXMucHJldGhpbmdzKSB7XHJcbiAgICAgICAgICAgIGlmICghdGhpcy5wcmV0aGluZ3MuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcclxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBEb24ndCBib3RoZXIgdHJ5aW5nIHRvIHNwYXduIHRoZSBncm91cCBpZiBpdCBoYXMgbm8gbWVtYmVyc1xyXG4gICAgICAgICAgICBjb25zdCBncm91cDogSVByZVRoaW5nW10gPSAodGhpcy5wcmV0aGluZ3MgYXMgYW55KVtuYW1lXVtkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICBpZiAoZ3JvdXAubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRmluZCB0aGUgc3RhcnQgYW5kIGVuZCBwb2ludHMgd2l0aGluIHRoZSBQcmVUaGluZ3MgQXJyY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cik6IG51bWJlciB7XHJcbiAgICAgICAgc3dpdGNoIChkaXJlY3Rpb25LZXkpIHtcclxuICAgICAgICAgICAgY2FzZSBcInRvcFwiOlxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRvcDtcclxuICAgICAgICAgICAgY2FzZSBcInJpZ2h0XCI6XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcmlnaHQ7XHJcbiAgICAgICAgICAgIGNhc2UgXCJib3R0b21cIjpcclxuICAgICAgICAgICAgICAgIHJldHVybiBib3R0b207XHJcbiAgICAgICAgICAgIGNhc2UgXCJsZWZ0XCI6XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbGVmdDtcclxuICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5rbm93biBkaXJlY3Rpb25LZXk6ICcke2RpcmVjdGlvbktleX0nLmApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iXX0= |
@@ -103,7 +103,2 @@ import { | ||
/** | ||
* An optional scope to call Prething commands in, if not this. | ||
*/ | ||
private commandScope: any; | ||
/** | ||
@@ -135,3 +130,2 @@ * Initializes a new instance of the AreaSpawnr class. | ||
this.afterAdd = settings.afterAdd; | ||
this.commandScope = settings.commandScope; | ||
} | ||
@@ -215,11 +209,2 @@ | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
public setCommandScope(commandScope: any): any { | ||
this.commandScope = commandScope; | ||
} | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -310,3 +295,3 @@ * given name. Note that this will do very little unless a location is | ||
for (let i: number = 0; i < stretchesRaw.length; i += 1) { | ||
this.stretchAdd.call(this.commandScope || this, stretchesRaw[i], i, stretchesRaw); | ||
this.stretchAdd(stretchesRaw[i], i, stretchesRaw); | ||
} | ||
@@ -328,3 +313,3 @@ } | ||
for (let i: number = 0; i < aftersRaw.length; i += 1) { | ||
this.afterAdd.call(this.commandScope || this, aftersRaw[i], i, aftersRaw); | ||
this.afterAdd(aftersRaw[i], i, aftersRaw); | ||
} | ||
@@ -422,3 +407,3 @@ } | ||
prething.spawned = status; | ||
callback.call(this.commandScope, prething); | ||
callback(prething); | ||
} | ||
@@ -425,0 +410,0 @@ } |
@@ -10,5 +10,6 @@ import { IArea, ILocation, IMap, IMapsCreatr, IPreThingsContainers } from "mapscreatr/lib/IMapsCreatr"; | ||
* @param index Which command this is, as per Array.forEach. | ||
* @param commands All commands in the group. | ||
*/ | ||
export interface ICommandAdder { | ||
(thing: string | IPreThingSettings, index: number): void; | ||
(thing: string | IPreThingSettings, index: number, commands: any[]): void; | ||
} | ||
@@ -49,6 +50,2 @@ /** | ||
afterAdd?: ICommandAdder; | ||
/** | ||
* An optional scope to call stretchAdd and afterAdd on, if not this. | ||
*/ | ||
commandScope?: any; | ||
} | ||
@@ -108,8 +105,2 @@ /** | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
setCommandScope(commandScope: any): any; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -116,0 +107,0 @@ * given name. Note that this will do very little unless a location is |
@@ -13,5 +13,6 @@ import { | ||
* @param index Which command this is, as per Array.forEach. | ||
* @param commands All commands in the group. | ||
*/ | ||
export interface ICommandAdder { | ||
(thing: string | IPreThingSettings, index: number): void; | ||
(thing: string | IPreThingSettings, index: number, commands: any[]): void; | ||
} | ||
@@ -59,7 +60,2 @@ | ||
afterAdd?: ICommandAdder; | ||
/** | ||
* An optional scope to call stretchAdd and afterAdd on, if not this. | ||
*/ | ||
commandScope?: any; | ||
} | ||
@@ -127,9 +123,2 @@ | ||
/** | ||
* Sets the scope to run PreThing commands in. | ||
* | ||
* @param commandScope A scope to run PreThing commands in. | ||
*/ | ||
setCommandScope(commandScope: any): any; | ||
/** | ||
* Sets the currently manipulated Map in the handler to be the one under a | ||
@@ -136,0 +125,0 @@ * given name. Note that this will do very little unless a location is |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
657545
3627