screeps-clockwork 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -4,7 +4,45 @@
4
4
 
5
5
  ## Usage
6
6
 
7
- (TODO)
7
+ This guide will assume you're using Rollup along the lines of the Screeps Typescript starter kit.
8
+
9
+ Set up dependencies:
10
+
11
+ ```
12
+ npm install screeps-clockwork
13
+ npm install -D @rollup/plugin-wasm rollup-plugin-copy
14
+ ```
15
+
16
+ Update your Rollup build script to copy the WASM binary to your dist folder:
17
+
18
+ ```js
19
+ // add to existing dependencies
20
+ import wasm from '@rollup/plugin-wasm';
21
+ import copy from 'rollup-plugin-copy';
22
+
23
+ // ...
24
+
25
+ export default {
26
+ // ...
27
+ external: ['screeps_clockwork.wasm'],
28
+ plugins: [
29
+ clear({ targets: ['dist'] }),
30
+ wasm(),
31
+ copy({
32
+ targets: [
33
+ {
34
+ src: 'node_modules/screeps-clockwork/dist/screeps_clockwork.wasm',
35
+ dest: 'dist'
36
+ }
37
+ ]
38
+ }),
39
+ // ...
40
+ screeps({ config: cfg, dryRun: cfg == null })
41
+ ]
42
+ };
43
+ ```
44
+
45
+ `rollup-plugin-screeps` will automatically push the wasm file out when it deploys.
8
46
 
9
47
  ## Dev Setup
10
48
 
package/dist/index.js CHANGED
@@ -140,16 +140,16 @@ function _assertClass(instance, klass) {
140
140
  return instance.ptr;
141
141
  }
142
142
  /**
143
- * WASM wrapper for the BFS flow field function.
143
+ * WASM wrapper for the Dijkstra flow field function.
144
144
  * @param {Uint32Array} start_packed
145
145
  * @param {ClockworkCostMatrix} cost_matrix
146
146
  * @returns {FlowField}
147
147
  */
148
- function js_bfs_flow_field(start_packed, cost_matrix) {
148
+ function js_dijkstra_flow_field(start_packed, cost_matrix) {
149
149
  const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
150
150
  const len0 = WASM_VECTOR_LEN;
151
151
  _assertClass(cost_matrix, ClockworkCostMatrix);
152
- const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
152
+ const ret = wasm.js_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
153
153
  return FlowField.__wrap(ret);
154
154
  }
155
155
 
@@ -168,16 +168,16 @@ function js_dijkstra_mono_flow_field(start_packed, cost_matrix) {
168
168
  }
169
169
 
170
170
  /**
171
- * WASM wrapper for the Dijkstra flow field function.
171
+ * WASM wrapper for the BFS flow field function.
172
172
  * @param {Uint32Array} start_packed
173
173
  * @param {ClockworkCostMatrix} cost_matrix
174
174
  * @returns {FlowField}
175
175
  */
176
- function js_dijkstra_flow_field(start_packed, cost_matrix) {
176
+ function js_bfs_flow_field(start_packed, cost_matrix) {
177
177
  const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);
178
178
  const len0 = WASM_VECTOR_LEN;
179
179
  _assertClass(cost_matrix, ClockworkCostMatrix);
180
- const ret = wasm.js_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
180
+ const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);
181
181
  return FlowField.__wrap(ret);
182
182
  }
183
183
 
@@ -648,6 +648,9 @@ function initSync(module) {
648
648
  * This might be useful for creeps with only MOVE parts and/or empty
649
649
  * CARRY parts, which don't generate fatigue.
650
650
  *
651
+ * Note that the `roomName` on start positions is ignored - all positions
652
+ * are assumed to be in the same room as the cost matrix.
653
+ *
651
654
  * @param start - The starting positions.
652
655
  * @param costMatrix - The cost matrix to use for the flow field.
653
656
  * @returns The flow field.
@@ -689,6 +692,9 @@ function bfsFlowField(start, costMatrix) {
689
692
  * This might be useful for creeps with only MOVE parts and/or empty
690
693
  * CARRY parts, which don't generate fatigue.
691
694
  *
695
+ * Note that the `roomName` on start positions is ignored - all positions
696
+ * are assumed to be in the same room as the cost matrix.
697
+ *
692
698
  * @param start - The starting positions.
693
699
  * @param costMatrix - The cost matrix to use for the flow field.
694
700
  * @returns The flow field.
@@ -708,6 +714,9 @@ function bfsMonoFlowField(start, costMatrix) {
708
714
  * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
709
715
  * a cost matrix with a default value of at least 1.
710
716
  *
717
+ * Note that the `roomName` on start positions is ignored - all positions
718
+ * are assumed to be in the same room as the cost matrix.
719
+ *
711
720
  * @param start - The starting positions.
712
721
  * @param costMatrix - The cost matrix to use for the flow field.
713
722
  * @returns The flow field.
@@ -745,6 +754,9 @@ function dijkstraFlowField(start, costMatrix) {
745
754
  * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
746
755
  * a cost matrix with a default value of at least 1.
747
756
  *
757
+ * Note that the `roomName` on start positions is ignored - all positions
758
+ * are assumed to be in the same room as the cost matrix.
759
+ *
748
760
  * @param start - The starting positions.
749
761
  * @param costMatrix - The cost matrix to use for the flow field.
750
762
  * @returns The flow field.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js","../wasm/screeps_clockwork.js","../../src/wrappers/bfsDistanceMap.ts","../../src/wrappers/bfsFlowField.ts","../../src/wrappers/dijkstraDistanceMap.ts","../../src/wrappers/dijkstraFlowField.ts","../../src/wrappers/getRange.ts","../../src/index.ts"],"sourcesContent":["'use strict';(function(q){function y(){}function C(b){var c=b.charCodeAt(0)|0;if(55296<=c)if(56319>=c)if(b=b.charCodeAt(1)|0,56320<=b&&57343>=b){if(c=(c<<10)+b-56613888|0,65535<c)return v(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63)}else c=65533;else 57343>=c&&(c=65533);return 2047>=c?v(192|c>>6,128|c&63):v(224|c>>12,128|c>>6&63,128|c&63)}function z(){}function A(b,c){var g=void 0===b?\"\":(\"\"+b).replace(D,C),d=g.length|0,a=0,k=0,f=c.length|0,h=b.length|0;f<d&&(d=f);a:for(;a<d;a=a+1|0){b=g.charCodeAt(a)|\n0;switch(b>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k=k+1|0;case 8:case 9:case 10:case 11:break;case 12:case 13:if((a+1|0)<f){k=k+1|0;break}case 14:if((a+2|0)<f){k=k+1|0;break}case 15:if((a+3|0)<f){k=k+1|0;break}default:break a}c[a]=b}return{written:a,read:h<k?h:k}}var v=String.fromCharCode,x={}.toString,E=x.call(q.SharedArrayBuffer),F=x(),t=q.Uint8Array,w=t||Array,u=t?ArrayBuffer:w,G=u.isView||function(b){return b&&\"length\"in b},H=x.call(u.prototype),B=z.prototype;u=q.TextEncoder;\nvar D=/[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,e=new (t?Uint16Array:w)(32);y.prototype.decode=function(b){if(!G(b)){var c=x.call(b);if(c!==H&&c!==E&&c!==F)throw TypeError(\"Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'\");b=t?new w(b):b||[]}for(var g=c=\"\",d=0,a=b.length|0,k=a-32|0,f,h,l=0,r=0,n,m=0,p=-1;d<a;){for(f=d<=k?32:a-d|0;m<f;d=d+1|0,m=m+1|0){h=b[d]&255;switch(h>>4){case 15:n=b[d=d+1|0]&255;if(2!==n>>6||\n247<h){d=d-1|0;break}l=(h&7)<<6|n&63;r=5;h=256;case 14:n=b[d=d+1|0]&255,l<<=6,l|=(h&15)<<6|n&63,r=2===n>>6?r+4|0:24,h=h+256&768;case 13:case 12:n=b[d=d+1|0]&255,l<<=6,l|=(h&31)<<6|n&63,r=r+7|0,d<a&&2===n>>6&&l>>r&&1114112>l?(h=l,l=l-65536|0,0<=l&&(p=(l>>10)+55296|0,h=(l&1023)+56320|0,31>m?(e[m]=p,m=m+1|0,p=-1):(n=p,p=h,h=n))):(h>>=8,d=d-h-1|0,h=65533),l=r=0,f=d<=k?32:a-d|0;default:e[m]=h;continue;case 11:case 10:case 9:case 8:}e[m]=65533}g+=v(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],\ne[11],e[12],e[13],e[14],e[15],e[16],e[17],e[18],e[19],e[20],e[21],e[22],e[23],e[24],e[25],e[26],e[27],e[28],e[29],e[30],e[31]);32>m&&(g=g.slice(0,m-32|0));if(d<a){if(e[0]=p,m=~p>>>31,p=-1,g.length<c.length)continue}else-1!==p&&(g+=v(p));c+=g;g=\"\"}return c};B.encode=function(b){b=void 0===b?\"\":\"\"+b;var c=b.length|0,g=new w((c<<1)+8|0),d,a=0,k=!t;for(d=0;d<c;d=d+1|0,a=a+1|0){var f=b.charCodeAt(d)|0;if(127>=f)g[a]=f;else{if(2047>=f)g[a]=192|f>>6;else{a:{if(55296<=f)if(56319>=f){var h=b.charCodeAt(d=\nd+1|0)|0;if(56320<=h&&57343>=h){f=(f<<10)+h-56613888|0;if(65535<f){g[a]=240|f>>18;g[a=a+1|0]=128|f>>12&63;g[a=a+1|0]=128|f>>6&63;g[a=a+1|0]=128|f&63;continue}break a}f=65533}else 57343>=f&&(f=65533);!k&&d<<1<a&&d<<1<(a-7|0)&&(k=!0,h=new w(3*c),h.set(g),g=h)}g[a]=224|f>>12;g[a=a+1|0]=128|f>>6&63}g[a=a+1|0]=128|f&63}}return t?g.subarray(0,a):g.slice(0,a)};B.encodeInto=A;if(!u)q.TextDecoder=y,q.TextEncoder=z;else if(!(q=u.prototype).encodeInto){var I=new u;q.encodeInto=function(b,c){var g=b.length|0,\nd=c.length|0;if(g<d>>1){var a=I.encode(b);if((a.length|0)<d)return c.set(a),{read:g,written:a.length|0}}return A(b,c)}}})(\"undefined\"==typeof global?\"undefined\"==typeof self?this:self:global);//AnonyCo\n//# sourceMappingURL=https://cdn.jsdelivr.net/gh/AnonyCo/FastestSmallestTextEncoderDecoder/encodeInto/EncoderDecoderTogether.min.js.map\n","let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n/**\n * @returns {string}\n */\nexport function version() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.version(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n}\n\n/**\n * Exports the global range calculation between two positions.\n * @param {number} packed_pos_1\n * @param {number} packed_pos_2\n * @returns {number}\n */\nexport function get_range(packed_pos_1, packed_pos_2) {\n const ret = wasm.get_range(packed_pos_1, packed_pos_2);\n return ret >>> 0;\n}\n\nlet cachedUint32ArrayMemory0 = null;\n\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n * WASM wrapper for the BFS flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_bfs_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the Dijkstra mono flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_dijkstra_mono_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the Dijkstra flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_dijkstra_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n/**\n * WASM wrapper for the Dijkstra distance map function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_dijkstra_distance_map(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\n}\n\nfunction getArrayJsValueFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n const mem = getDataViewMemory0();\n const result = [];\n for (let i = ptr; i < ptr + 4 * len; i += 4) {\n result.push(takeObject(mem.getUint32(i, true)));\n }\n return result;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n const mem = getDataViewMemory0();\n for (let i = 0; i < array.length; i++) {\n mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n/**\n * WASM wrapper for the BFS distance map function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_bfs_distance_map(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the BFS mono flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_bfs_mono_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * Translates `COLOR_*` and `COLORS_ALL` constants.\n */\nexport const Color = Object.freeze({ Red:1,\"1\":\"Red\",Purple:2,\"2\":\"Purple\",Blue:3,\"3\":\"Blue\",Cyan:4,\"4\":\"Cyan\",Green:5,\"5\":\"Green\",Yellow:6,\"6\":\"Yellow\",Orange:7,\"7\":\"Orange\",Brown:8,\"8\":\"Brown\",Grey:9,\"9\":\"Grey\",White:10,\"10\":\"White\", });\n/**\n * Translates the `DENSITY_*` constants.\n */\nexport const Density = Object.freeze({ Low:1,\"1\":\"Low\",Moderate:2,\"2\":\"Moderate\",High:3,\"3\":\"High\",Ultra:4,\"4\":\"Ultra\", });\n/**\n * Translates direction constants.\n */\nexport const Direction = Object.freeze({ Top:1,\"1\":\"Top\",TopRight:2,\"2\":\"TopRight\",Right:3,\"3\":\"Right\",BottomRight:4,\"4\":\"BottomRight\",Bottom:5,\"5\":\"Bottom\",BottomLeft:6,\"6\":\"BottomLeft\",Left:7,\"7\":\"Left\",TopLeft:8,\"8\":\"TopLeft\", });\n/**\n * Type used for when the game returns a direction to an exit.\n *\n * Restricted more than `Direction` in that it can't be diagonal. Used as the\n * result of [`Room::find_exit_to`].\n *\n * Can be converted to [`Find`] for immediate use of [`Room::find`]\n * and [`Direction`].\n *\n * [`Room::find`]: crate::objects::Room::find\n * [`Room::find_exit_to`]: crate::objects::Room::find_exit_to\n */\nexport const ExitDirection = Object.freeze({ Top:1,\"1\":\"Top\",Right:3,\"3\":\"Right\",Bottom:5,\"5\":\"Bottom\",Left:7,\"7\":\"Left\", });\n/**\n * Translates `FIND_*` constants for interal API calls\n *\n * Unless you're storing the type of find constant to be used for a call, you\n * likely want the constants which implement the `FindConstant` trait to make\n * calls to find methods.\n *\n * This is hidden from the documentation to avoid confusion due to its narrow\n * use case, but wasm_bindgen requires it remain public.\n */\nexport const Find = Object.freeze({\n/**\n * Find all exit positions at the top of the room\n */\nExitTop:1,\"1\":\"ExitTop\",ExitRight:3,\"3\":\"ExitRight\",ExitBottom:5,\"5\":\"ExitBottom\",ExitLeft:7,\"7\":\"ExitLeft\",Exit:10,\"10\":\"Exit\",Creeps:101,\"101\":\"Creeps\",MyCreeps:102,\"102\":\"MyCreeps\",HostileCreeps:103,\"103\":\"HostileCreeps\",SourcesActive:104,\"104\":\"SourcesActive\",Sources:105,\"105\":\"Sources\",DroppedResources:106,\"106\":\"DroppedResources\",Structures:107,\"107\":\"Structures\",MyStructures:108,\"108\":\"MyStructures\",HostileStructures:109,\"109\":\"HostileStructures\",Flags:110,\"110\":\"Flags\",ConstructionSites:111,\"111\":\"ConstructionSites\",MySpawns:112,\"112\":\"MySpawns\",HostileSpawns:113,\"113\":\"HostileSpawns\",MyConstructionSites:114,\"114\":\"MyConstructionSites\",HostileConstructionSites:115,\"115\":\"HostileConstructionSites\",Minerals:116,\"116\":\"Minerals\",Nukes:117,\"117\":\"Nukes\",Tombstones:118,\"118\":\"Tombstones\",PowerCreeps:119,\"119\":\"PowerCreeps\",MyPowerCreeps:120,\"120\":\"MyPowerCreeps\",HostilePowerCreeps:121,\"121\":\"HostilePowerCreeps\",Deposits:122,\"122\":\"Deposits\",Ruins:123,\"123\":\"Ruins\",ScoreContainers:10011,\"10011\":\"ScoreContainers\",ScoreCollectors:10012,\"10012\":\"ScoreCollectors\",SymbolContainers:10021,\"10021\":\"SymbolContainers\",SymbolDecoders:10022,\"10022\":\"SymbolDecoders\",Reactors:10051,\"10051\":\"Reactors\", });\n/**\n * Translates the `EFFECT_*` constants, which are natural effect types\n */\nexport const NaturalEffectType = Object.freeze({ Invulnerability:1001,\"1001\":\"Invulnerability\",CollapseTimer:1002,\"1002\":\"CollapseTimer\", });\n/**\n * Translates the `PWR_*` constants, which are types of powers used by power\n * creeps\n */\nexport const PowerType = Object.freeze({ GenerateOps:1,\"1\":\"GenerateOps\",OperateSpawn:2,\"2\":\"OperateSpawn\",OperateTower:3,\"3\":\"OperateTower\",OperateStorage:4,\"4\":\"OperateStorage\",OperateLab:5,\"5\":\"OperateLab\",OperateExtension:6,\"6\":\"OperateExtension\",OperateObserver:7,\"7\":\"OperateObserver\",OperateTerminal:8,\"8\":\"OperateTerminal\",DisruptSpawn:9,\"9\":\"DisruptSpawn\",DisruptTower:10,\"10\":\"DisruptTower\",Shield:12,\"12\":\"Shield\",RegenSource:13,\"13\":\"RegenSource\",RegenMineral:14,\"14\":\"RegenMineral\",DisruptTerminal:15,\"15\":\"DisruptTerminal\",OperatePower:16,\"16\":\"OperatePower\",Fortify:17,\"17\":\"Fortify\",OperateController:18,\"18\":\"OperateController\",OperateFactory:19,\"19\":\"OperateFactory\", });\n/**\n * Translates `TERRAIN_*` constants.\n */\nexport const Terrain = Object.freeze({ Plain:0,\"0\":\"Plain\",Wall:1,\"1\":\"Wall\",Swamp:2,\"2\":\"Swamp\", });\n\nconst __wbindgen_enum_IntershardResourceType = [\"cpuUnlock\", \"pixel\", \"accessKey\"];\n\nconst __wbindgen_enum_Look = [\"creep\", \"energy\", \"resource\", \"source\", \"mineral\", \"structure\", \"flag\", \"constructionSite\", \"nuke\", \"terrain\", \"tombstone\", \"powerCreep\", \"deposit\", \"ruin\", \"scoreContainer\", \"scoreCollector\", \"symbolContainer\", \"symbolDecoder\", \"reactor\"];\n\nconst __wbindgen_enum_OrderType = [\"sell\", \"buy\"];\n\nconst __wbindgen_enum_Part = [\"move\", \"work\", \"carry\", \"attack\", \"ranged_attack\", \"tough\", \"heal\", \"claim\"];\n\nconst __wbindgen_enum_PowerCreepClass = [\"operator\"];\n\nconst __wbindgen_enum_ResourceType = [\"energy\", \"power\", \"H\", \"O\", \"U\", \"L\", \"K\", \"Z\", \"X\", \"G\", \"silicon\", \"metal\", \"biomass\", \"mist\", \"OH\", \"ZK\", \"UL\", \"UH\", \"UO\", \"KH\", \"KO\", \"LH\", \"LO\", \"ZH\", \"ZO\", \"GH\", \"GO\", \"UH2O\", \"UHO2\", \"KH2O\", \"KHO2\", \"LH2O\", \"LHO2\", \"ZH2O\", \"ZHO2\", \"GH2O\", \"GHO2\", \"XUH2O\", \"XUHO2\", \"XKH2O\", \"XKHO2\", \"XLH2O\", \"XLHO2\", \"XZH2O\", \"XZHO2\", \"XGH2O\", \"XGHO2\", \"ops\", \"utrium_bar\", \"lemergium_bar\", \"zynthium_bar\", \"keanium_bar\", \"ghodium_melt\", \"oxidant\", \"reductant\", \"purifier\", \"battery\", \"composite\", \"crystal\", \"liquid\", \"wire\", \"switch\", \"transistor\", \"microchip\", \"circuit\", \"device\", \"cell\", \"phlegm\", \"tissue\", \"muscle\", \"organoid\", \"organism\", \"alloy\", \"tube\", \"fixtures\", \"frame\", \"hydraulics\", \"machine\", \"condensate\", \"concentrate\", \"extract\", \"spirit\", \"emanation\", \"essence\", \"score\", \"symbol_aleph\", \"symbol_beth\", \"symbol_gimmel\", \"symbol_daleth\", \"symbol_he\", \"symbol_waw\", \"symbol_zayin\", \"symbol_heth\", \"symbol_teth\", \"symbol_yodh\", \"symbol_kaph\", \"symbol_lamedh\", \"symbol_mem\", \"symbol_nun\", \"symbol_samekh\", \"symbol_ayin\", \"symbol_pe\", \"symbol_tsade\", \"symbol_qoph\", \"symbol_res\", \"symbol_sim\", \"symbol_taw\", \"T\"];\n\nconst __wbindgen_enum_RoomStatus = [\"normal\", \"closed\", \"novice\", \"respawn\"];\n\nconst __wbindgen_enum_StructureType = [\"spawn\", \"extension\", \"road\", \"constructedWall\", \"rampart\", \"keeperLair\", \"portal\", \"controller\", \"link\", \"storage\", \"tower\", \"observer\", \"powerBank\", \"powerSpawn\", \"extractor\", \"lab\", \"terminal\", \"container\", \"nuker\", \"factory\", \"invaderCore\"];\n\nconst ClockworkCostMatrixFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_clockworkcostmatrix_free(ptr >>> 0, 1));\n/**\n * A wrapper around the `LocalCostMatrix` type from the Screeps API.\n * Instances can be passed between WASM and JS as a pointer, using the\n * methods to get and set values, rather than copying the entire matrix.\n */\nexport class ClockworkCostMatrix {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ClockworkCostMatrixFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_clockworkcostmatrix_free(ptr, 0);\n }\n /**\n * Creates a new cost matrix within the WASM module. Optionally, a default value\n * can be provided to initialize all cells in the matrix to that value.\n * @param {number | undefined} [_default]\n */\n constructor(_default) {\n const ret = wasm.clockworkcostmatrix_new(isLikeNone(_default) ? 0xFFFFFF : _default);\n this.__wbg_ptr = ret >>> 0;\n ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Gets the cost of a given position in the cost matrix.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.clockworkcostmatrix_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n * Sets the cost of a given position in the cost matrix.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.clockworkcostmatrix_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst DistanceMapFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_distancemap_free(ptr >>> 0, 1));\n/**\n * Maps a distance value onto individual room tile positions.\n */\nexport class DistanceMap {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(DistanceMap.prototype);\n obj.__wbg_ptr = ptr;\n DistanceMapFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n DistanceMapFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_distancemap_free(ptr, 0);\n }\n /**\n * Converts the distance map into a flat array of distances.\n * @returns {Uint32Array}\n */\n toArray() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.distancemap_toArray(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Gets the distance value at a given position.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.distancemap_get(this.__wbg_ptr, x, y);\n return ret >>> 0;\n }\n /**\n * Sets the distance value at a given position.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.distancemap_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst FlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_flowfield_free(ptr >>> 0, 1));\n/**\n * A flow field is a 50x50 grid (representing a room), representing viable directions\n * to travel to reach a particular target (or targets). A given tile may have multiple\n * equally valid directions, so we represent this as a bitfield (where each bit in an\n * 8-bit unsigned integer represents a direction that is either viable or not).\n */\nexport class FlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(FlowField.prototype);\n obj.__wbg_ptr = ptr;\n FlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_flowfield_free(ptr, 0);\n }\n /**\n * Get the internal value for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.flowfield_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n * Set the internal value for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.flowfield_set(this.__wbg_ptr, x, y, value);\n }\n /**\n * Get the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {any[]}\n */\n getDirections(x, y) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.flowfield_getDirections(retptr, this.__wbg_ptr, x, y);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayJsValueFromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Set the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {any[]} directions\n */\n setDirections(x, y, directions) {\n const ptr0 = passArrayJsValueToWasm0(directions, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.flowfield_setDirections(this.__wbg_ptr, x, y, ptr0, len0);\n }\n /**\n * Add a direction to the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {Direction} direction\n */\n addDirection(x, y, direction) {\n wasm.flowfield_addDirection(this.__wbg_ptr, x, y, direction);\n }\n}\n\nconst MonoFlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_monoflowfield_free(ptr >>> 0, 1));\n/**\n * A flow field is a 50x50 grid (representing a room), representing viable directions\n * to travel to reach a particular target (or targets). A mono flow field only stores\n * a single direction for each tile, so we represent this as 4 bits of an unsigned\n * integer (0 for no direction, 1 for TOP, etc.).\n */\nexport class MonoFlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(MonoFlowField.prototype);\n obj.__wbg_ptr = ptr;\n MonoFlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MonoFlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_monoflowfield_free(ptr, 0);\n }\n /**\n * Get the direction for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {Direction | undefined}\n */\n get(x, y) {\n const ret = wasm.monoflowfield_get(this.__wbg_ptr, x, y);\n return ret === 0 ? undefined : ret;\n }\n /**\n * Set the direction for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {Direction | undefined} [value]\n */\n set(x, y, value) {\n wasm.monoflowfield_set(this.__wbg_ptr, x, y, isLikeNone(value) ? 0 : value);\n }\n}\n\nconst SearchGoalFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_searchgoal_free(ptr >>> 0, 1));\n\nexport class SearchGoal {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SearchGoalFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_searchgoal_free(ptr, 0);\n }\n /**\n * @returns {any}\n */\n get pos() {\n const ret = wasm.searchgoal_pos(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * @returns {number}\n */\n get range() {\n const ret = wasm.searchgoal_range(this.__wbg_ptr);\n return ret >>> 0;\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_number_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbindgen_try_into_number = function(arg0) {\n let result;\n try { result = +getObject(arg0) } catch (e) { result = e }\n const ret = result;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_static_accessor_ROOM_POSITION_PROTOTYPE_359d8a1531b99b4c = function() {\n const ret = RoomPosition.prototype;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_setpacked_e36387710a3ff5bb = function(arg0, arg1) {\n getObject(arg0).__packedPos = arg1 >>> 0;\n};\nimports.wbg.__wbg_create_70ef5302cb22a5c4 = function(arg0) {\n const ret = Object.create(getObject(arg0));\n return addHeapObject(ret);\n};\nimports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nreturn imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('screeps_clockwork_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n","import { ClockworkCostMatrix, js_bfs_distance_map } from '../../wasm';\n\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_bfs_flow_field, js_bfs_mono_flow_field } from '../../wasm';\n\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_flow_field(startPacked, costMatrix);\n return result;\n}\n\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_dijkstra_distance_map } from '../../wasm/screeps_clockwork';\n\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_dijkstra_flow_field, js_dijkstra_mono_flow_field } from '../../wasm/screeps_clockwork';\n\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_flow_field(startPacked, costMatrix);\n return result;\n}\n\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { get_range } from '../../wasm';\n\n/**\n * Get the global range between two positions. This is different\n * from the `getRange` method on `RoomPosition`, which gets the\n * range only within the same room.\n *\n * @param pos1 - The first position.\n * @param pos2 - The second position.\n * @returns The range between the two positions.\n */\nexport function getRange(pos1: RoomPosition, pos2: RoomPosition) {\n return get_range(pos1.__packedPos, pos2.__packedPos);\n}\n","import 'fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js';\n\nimport {\n type InitOutput,\n ClockworkCostMatrix,\n DistanceMap,\n FlowField,\n MonoFlowField,\n initSync,\n version\n} from '../wasm';\nexport { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };\n\nexport * from './wrappers/bfsDistanceMap';\nexport * from './wrappers/bfsFlowField';\nexport * from './wrappers/dijkstraDistanceMap';\nexport * from './wrappers/dijkstraFlowField';\nexport * from './wrappers/getRange';\n\ndeclare namespace WebAssembly {\n class Module {\n constructor(bytes: Uint8Array);\n }\n}\n\nlet wasm_bytes: Uint8Array;\nlet wasm_module: WebAssembly.Module;\nlet wasm_instance: InitOutput;\nlet initialized = false;\n/**\n * The `initialize` function should be called in your main loop before\n * using any other screeps-clockwork functions. Depending on available\n * CPU, it may not load the WASM module completely in the first tick,\n * but it will pick back up where it left off if the script times out.\n *\n * @param verbose - If true, will log the state of the WASM module as it loads.\n */\nexport function initialize(verbose = false) {\n if (!wasm_bytes) wasm_bytes = require('screeps_clockwork.wasm');\n if (verbose && !initialized) console.log('[clockwork] wasm_bytes loaded');\n if (!wasm_module) wasm_module = new WebAssembly.Module(wasm_bytes);\n if (verbose && !initialized) console.log('[clockwork] wasm_module loaded');\n if (!wasm_instance) wasm_instance = initSync({ module: wasm_module });\n if (verbose && !initialized) {\n console.log('[clockwork] wasm_instance loaded');\n console.log(`[clockwork] version ${version()} initialized`);\n }\n initialized = true;\n}\n"],"names":["global","this"],"mappings":";;;;;;;;;;;;;AAAa,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE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;;;;AAOG;AACa,SAAA,UAAU,CAAC,OAAO,GAAG,KAAK,EAAA;AACxC,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAChE,IAAI,OAAO,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAC1E,IAAA,IAAI,CAAC,WAAW;QAAE,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACnE,IAAI,OAAO,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAC3E,IAAA,IAAI,CAAC,aAAa;QAAE,aAAa,GAAG,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,IAAA,IAAI,OAAO,IAAI,CAAC,WAAW,EAAE;AAC3B,QAAA,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,CAAA,oBAAA,EAAuB,OAAO,EAAE,CAAA,YAAA,CAAc,CAAC,CAAC;KAC7D;IACD,WAAW,GAAG,IAAI,CAAC;AACrB;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js","../src/wasm/screeps_clockwork.js","../../src/wrappers/bfsDistanceMap.ts","../../src/wrappers/bfsFlowField.ts","../../src/wrappers/dijkstraDistanceMap.ts","../../src/wrappers/dijkstraFlowField.ts","../../src/wrappers/getRange.ts","../../src/index.ts"],"sourcesContent":["'use strict';(function(q){function y(){}function C(b){var c=b.charCodeAt(0)|0;if(55296<=c)if(56319>=c)if(b=b.charCodeAt(1)|0,56320<=b&&57343>=b){if(c=(c<<10)+b-56613888|0,65535<c)return v(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63)}else c=65533;else 57343>=c&&(c=65533);return 2047>=c?v(192|c>>6,128|c&63):v(224|c>>12,128|c>>6&63,128|c&63)}function z(){}function A(b,c){var g=void 0===b?\"\":(\"\"+b).replace(D,C),d=g.length|0,a=0,k=0,f=c.length|0,h=b.length|0;f<d&&(d=f);a:for(;a<d;a=a+1|0){b=g.charCodeAt(a)|\n0;switch(b>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k=k+1|0;case 8:case 9:case 10:case 11:break;case 12:case 13:if((a+1|0)<f){k=k+1|0;break}case 14:if((a+2|0)<f){k=k+1|0;break}case 15:if((a+3|0)<f){k=k+1|0;break}default:break a}c[a]=b}return{written:a,read:h<k?h:k}}var v=String.fromCharCode,x={}.toString,E=x.call(q.SharedArrayBuffer),F=x(),t=q.Uint8Array,w=t||Array,u=t?ArrayBuffer:w,G=u.isView||function(b){return b&&\"length\"in b},H=x.call(u.prototype),B=z.prototype;u=q.TextEncoder;\nvar D=/[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,e=new (t?Uint16Array:w)(32);y.prototype.decode=function(b){if(!G(b)){var c=x.call(b);if(c!==H&&c!==E&&c!==F)throw TypeError(\"Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'\");b=t?new w(b):b||[]}for(var g=c=\"\",d=0,a=b.length|0,k=a-32|0,f,h,l=0,r=0,n,m=0,p=-1;d<a;){for(f=d<=k?32:a-d|0;m<f;d=d+1|0,m=m+1|0){h=b[d]&255;switch(h>>4){case 15:n=b[d=d+1|0]&255;if(2!==n>>6||\n247<h){d=d-1|0;break}l=(h&7)<<6|n&63;r=5;h=256;case 14:n=b[d=d+1|0]&255,l<<=6,l|=(h&15)<<6|n&63,r=2===n>>6?r+4|0:24,h=h+256&768;case 13:case 12:n=b[d=d+1|0]&255,l<<=6,l|=(h&31)<<6|n&63,r=r+7|0,d<a&&2===n>>6&&l>>r&&1114112>l?(h=l,l=l-65536|0,0<=l&&(p=(l>>10)+55296|0,h=(l&1023)+56320|0,31>m?(e[m]=p,m=m+1|0,p=-1):(n=p,p=h,h=n))):(h>>=8,d=d-h-1|0,h=65533),l=r=0,f=d<=k?32:a-d|0;default:e[m]=h;continue;case 11:case 10:case 9:case 8:}e[m]=65533}g+=v(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],\ne[11],e[12],e[13],e[14],e[15],e[16],e[17],e[18],e[19],e[20],e[21],e[22],e[23],e[24],e[25],e[26],e[27],e[28],e[29],e[30],e[31]);32>m&&(g=g.slice(0,m-32|0));if(d<a){if(e[0]=p,m=~p>>>31,p=-1,g.length<c.length)continue}else-1!==p&&(g+=v(p));c+=g;g=\"\"}return c};B.encode=function(b){b=void 0===b?\"\":\"\"+b;var c=b.length|0,g=new w((c<<1)+8|0),d,a=0,k=!t;for(d=0;d<c;d=d+1|0,a=a+1|0){var f=b.charCodeAt(d)|0;if(127>=f)g[a]=f;else{if(2047>=f)g[a]=192|f>>6;else{a:{if(55296<=f)if(56319>=f){var h=b.charCodeAt(d=\nd+1|0)|0;if(56320<=h&&57343>=h){f=(f<<10)+h-56613888|0;if(65535<f){g[a]=240|f>>18;g[a=a+1|0]=128|f>>12&63;g[a=a+1|0]=128|f>>6&63;g[a=a+1|0]=128|f&63;continue}break a}f=65533}else 57343>=f&&(f=65533);!k&&d<<1<a&&d<<1<(a-7|0)&&(k=!0,h=new w(3*c),h.set(g),g=h)}g[a]=224|f>>12;g[a=a+1|0]=128|f>>6&63}g[a=a+1|0]=128|f&63}}return t?g.subarray(0,a):g.slice(0,a)};B.encodeInto=A;if(!u)q.TextDecoder=y,q.TextEncoder=z;else if(!(q=u.prototype).encodeInto){var I=new u;q.encodeInto=function(b,c){var g=b.length|0,\nd=c.length|0;if(g<d>>1){var a=I.encode(b);if((a.length|0)<d)return c.set(a),{read:g,written:a.length|0}}return A(b,c)}}})(\"undefined\"==typeof global?\"undefined\"==typeof self?this:self:global);//AnonyCo\n//# sourceMappingURL=https://cdn.jsdelivr.net/gh/AnonyCo/FastestSmallestTextEncoderDecoder/encodeInto/EncoderDecoderTogether.min.js.map\n","let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n/**\n * @returns {string}\n */\nexport function version() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.version(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n}\n\n/**\n * Exports the global range calculation between two positions.\n * @param {number} packed_pos_1\n * @param {number} packed_pos_2\n * @returns {number}\n */\nexport function get_range(packed_pos_1, packed_pos_2) {\n const ret = wasm.get_range(packed_pos_1, packed_pos_2);\n return ret >>> 0;\n}\n\nlet cachedUint32ArrayMemory0 = null;\n\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32ArrayMemory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n * WASM wrapper for the Dijkstra flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_dijkstra_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the Dijkstra mono flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_dijkstra_mono_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the BFS flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {FlowField}\n */\nexport function js_bfs_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return FlowField.__wrap(ret);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n/**\n * WASM wrapper for the Dijkstra distance map function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_dijkstra_distance_map(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_dijkstra_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\n}\n\nfunction getArrayJsValueFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n const mem = getDataViewMemory0();\n const result = [];\n for (let i = ptr; i < ptr + 4 * len; i += 4) {\n result.push(takeObject(mem.getUint32(i, true)));\n }\n return result;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n const mem = getDataViewMemory0();\n for (let i = 0; i < array.length; i++) {\n mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n/**\n * WASM wrapper for the BFS distance map function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {DistanceMap}\n */\nexport function js_bfs_distance_map(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_distance_map(ptr0, len0, cost_matrix.__wbg_ptr);\n return DistanceMap.__wrap(ret);\n}\n\n/**\n * WASM wrapper for the BFS mono flow field function.\n * @param {Uint32Array} start_packed\n * @param {ClockworkCostMatrix} cost_matrix\n * @returns {MonoFlowField}\n */\nexport function js_bfs_mono_flow_field(start_packed, cost_matrix) {\n const ptr0 = passArray32ToWasm0(start_packed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(cost_matrix, ClockworkCostMatrix);\n const ret = wasm.js_bfs_mono_flow_field(ptr0, len0, cost_matrix.__wbg_ptr);\n return MonoFlowField.__wrap(ret);\n}\n\n/**\n * Translates `COLOR_*` and `COLORS_ALL` constants.\n */\nexport const Color = Object.freeze({ Red:1,\"1\":\"Red\",Purple:2,\"2\":\"Purple\",Blue:3,\"3\":\"Blue\",Cyan:4,\"4\":\"Cyan\",Green:5,\"5\":\"Green\",Yellow:6,\"6\":\"Yellow\",Orange:7,\"7\":\"Orange\",Brown:8,\"8\":\"Brown\",Grey:9,\"9\":\"Grey\",White:10,\"10\":\"White\", });\n/**\n * Translates the `DENSITY_*` constants.\n */\nexport const Density = Object.freeze({ Low:1,\"1\":\"Low\",Moderate:2,\"2\":\"Moderate\",High:3,\"3\":\"High\",Ultra:4,\"4\":\"Ultra\", });\n/**\n * Translates direction constants.\n */\nexport const Direction = Object.freeze({ Top:1,\"1\":\"Top\",TopRight:2,\"2\":\"TopRight\",Right:3,\"3\":\"Right\",BottomRight:4,\"4\":\"BottomRight\",Bottom:5,\"5\":\"Bottom\",BottomLeft:6,\"6\":\"BottomLeft\",Left:7,\"7\":\"Left\",TopLeft:8,\"8\":\"TopLeft\", });\n/**\n * Type used for when the game returns a direction to an exit.\n *\n * Restricted more than `Direction` in that it can't be diagonal. Used as the\n * result of [`Room::find_exit_to`].\n *\n * Can be converted to [`Find`] for immediate use of [`Room::find`]\n * and [`Direction`].\n *\n * [`Room::find`]: crate::objects::Room::find\n * [`Room::find_exit_to`]: crate::objects::Room::find_exit_to\n */\nexport const ExitDirection = Object.freeze({ Top:1,\"1\":\"Top\",Right:3,\"3\":\"Right\",Bottom:5,\"5\":\"Bottom\",Left:7,\"7\":\"Left\", });\n/**\n * Translates `FIND_*` constants for interal API calls\n *\n * Unless you're storing the type of find constant to be used for a call, you\n * likely want the constants which implement the `FindConstant` trait to make\n * calls to find methods.\n *\n * This is hidden from the documentation to avoid confusion due to its narrow\n * use case, but wasm_bindgen requires it remain public.\n */\nexport const Find = Object.freeze({\n/**\n * Find all exit positions at the top of the room\n */\nExitTop:1,\"1\":\"ExitTop\",ExitRight:3,\"3\":\"ExitRight\",ExitBottom:5,\"5\":\"ExitBottom\",ExitLeft:7,\"7\":\"ExitLeft\",Exit:10,\"10\":\"Exit\",Creeps:101,\"101\":\"Creeps\",MyCreeps:102,\"102\":\"MyCreeps\",HostileCreeps:103,\"103\":\"HostileCreeps\",SourcesActive:104,\"104\":\"SourcesActive\",Sources:105,\"105\":\"Sources\",DroppedResources:106,\"106\":\"DroppedResources\",Structures:107,\"107\":\"Structures\",MyStructures:108,\"108\":\"MyStructures\",HostileStructures:109,\"109\":\"HostileStructures\",Flags:110,\"110\":\"Flags\",ConstructionSites:111,\"111\":\"ConstructionSites\",MySpawns:112,\"112\":\"MySpawns\",HostileSpawns:113,\"113\":\"HostileSpawns\",MyConstructionSites:114,\"114\":\"MyConstructionSites\",HostileConstructionSites:115,\"115\":\"HostileConstructionSites\",Minerals:116,\"116\":\"Minerals\",Nukes:117,\"117\":\"Nukes\",Tombstones:118,\"118\":\"Tombstones\",PowerCreeps:119,\"119\":\"PowerCreeps\",MyPowerCreeps:120,\"120\":\"MyPowerCreeps\",HostilePowerCreeps:121,\"121\":\"HostilePowerCreeps\",Deposits:122,\"122\":\"Deposits\",Ruins:123,\"123\":\"Ruins\",ScoreContainers:10011,\"10011\":\"ScoreContainers\",ScoreCollectors:10012,\"10012\":\"ScoreCollectors\",SymbolContainers:10021,\"10021\":\"SymbolContainers\",SymbolDecoders:10022,\"10022\":\"SymbolDecoders\",Reactors:10051,\"10051\":\"Reactors\", });\n/**\n * Translates the `EFFECT_*` constants, which are natural effect types\n */\nexport const NaturalEffectType = Object.freeze({ Invulnerability:1001,\"1001\":\"Invulnerability\",CollapseTimer:1002,\"1002\":\"CollapseTimer\", });\n/**\n * Translates the `PWR_*` constants, which are types of powers used by power\n * creeps\n */\nexport const PowerType = Object.freeze({ GenerateOps:1,\"1\":\"GenerateOps\",OperateSpawn:2,\"2\":\"OperateSpawn\",OperateTower:3,\"3\":\"OperateTower\",OperateStorage:4,\"4\":\"OperateStorage\",OperateLab:5,\"5\":\"OperateLab\",OperateExtension:6,\"6\":\"OperateExtension\",OperateObserver:7,\"7\":\"OperateObserver\",OperateTerminal:8,\"8\":\"OperateTerminal\",DisruptSpawn:9,\"9\":\"DisruptSpawn\",DisruptTower:10,\"10\":\"DisruptTower\",Shield:12,\"12\":\"Shield\",RegenSource:13,\"13\":\"RegenSource\",RegenMineral:14,\"14\":\"RegenMineral\",DisruptTerminal:15,\"15\":\"DisruptTerminal\",OperatePower:16,\"16\":\"OperatePower\",Fortify:17,\"17\":\"Fortify\",OperateController:18,\"18\":\"OperateController\",OperateFactory:19,\"19\":\"OperateFactory\", });\n/**\n * Translates `TERRAIN_*` constants.\n */\nexport const Terrain = Object.freeze({ Plain:0,\"0\":\"Plain\",Wall:1,\"1\":\"Wall\",Swamp:2,\"2\":\"Swamp\", });\n\nconst __wbindgen_enum_IntershardResourceType = [\"cpuUnlock\", \"pixel\", \"accessKey\"];\n\nconst __wbindgen_enum_Look = [\"creep\", \"energy\", \"resource\", \"source\", \"mineral\", \"structure\", \"flag\", \"constructionSite\", \"nuke\", \"terrain\", \"tombstone\", \"powerCreep\", \"deposit\", \"ruin\", \"scoreContainer\", \"scoreCollector\", \"symbolContainer\", \"symbolDecoder\", \"reactor\"];\n\nconst __wbindgen_enum_OrderType = [\"sell\", \"buy\"];\n\nconst __wbindgen_enum_Part = [\"move\", \"work\", \"carry\", \"attack\", \"ranged_attack\", \"tough\", \"heal\", \"claim\"];\n\nconst __wbindgen_enum_PowerCreepClass = [\"operator\"];\n\nconst __wbindgen_enum_ResourceType = [\"energy\", \"power\", \"H\", \"O\", \"U\", \"L\", \"K\", \"Z\", \"X\", \"G\", \"silicon\", \"metal\", \"biomass\", \"mist\", \"OH\", \"ZK\", \"UL\", \"UH\", \"UO\", \"KH\", \"KO\", \"LH\", \"LO\", \"ZH\", \"ZO\", \"GH\", \"GO\", \"UH2O\", \"UHO2\", \"KH2O\", \"KHO2\", \"LH2O\", \"LHO2\", \"ZH2O\", \"ZHO2\", \"GH2O\", \"GHO2\", \"XUH2O\", \"XUHO2\", \"XKH2O\", \"XKHO2\", \"XLH2O\", \"XLHO2\", \"XZH2O\", \"XZHO2\", \"XGH2O\", \"XGHO2\", \"ops\", \"utrium_bar\", \"lemergium_bar\", \"zynthium_bar\", \"keanium_bar\", \"ghodium_melt\", \"oxidant\", \"reductant\", \"purifier\", \"battery\", \"composite\", \"crystal\", \"liquid\", \"wire\", \"switch\", \"transistor\", \"microchip\", \"circuit\", \"device\", \"cell\", \"phlegm\", \"tissue\", \"muscle\", \"organoid\", \"organism\", \"alloy\", \"tube\", \"fixtures\", \"frame\", \"hydraulics\", \"machine\", \"condensate\", \"concentrate\", \"extract\", \"spirit\", \"emanation\", \"essence\", \"score\", \"symbol_aleph\", \"symbol_beth\", \"symbol_gimmel\", \"symbol_daleth\", \"symbol_he\", \"symbol_waw\", \"symbol_zayin\", \"symbol_heth\", \"symbol_teth\", \"symbol_yodh\", \"symbol_kaph\", \"symbol_lamedh\", \"symbol_mem\", \"symbol_nun\", \"symbol_samekh\", \"symbol_ayin\", \"symbol_pe\", \"symbol_tsade\", \"symbol_qoph\", \"symbol_res\", \"symbol_sim\", \"symbol_taw\", \"T\"];\n\nconst __wbindgen_enum_RoomStatus = [\"normal\", \"closed\", \"novice\", \"respawn\"];\n\nconst __wbindgen_enum_StructureType = [\"spawn\", \"extension\", \"road\", \"constructedWall\", \"rampart\", \"keeperLair\", \"portal\", \"controller\", \"link\", \"storage\", \"tower\", \"observer\", \"powerBank\", \"powerSpawn\", \"extractor\", \"lab\", \"terminal\", \"container\", \"nuker\", \"factory\", \"invaderCore\"];\n\nconst ClockworkCostMatrixFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_clockworkcostmatrix_free(ptr >>> 0, 1));\n/**\n * A wrapper around the `LocalCostMatrix` type from the Screeps API.\n * Instances can be passed between WASM and JS as a pointer, using the\n * methods to get and set values, rather than copying the entire matrix.\n */\nexport class ClockworkCostMatrix {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ClockworkCostMatrixFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_clockworkcostmatrix_free(ptr, 0);\n }\n /**\n * Creates a new cost matrix within the WASM module. Optionally, a default value\n * can be provided to initialize all cells in the matrix to that value.\n * @param {number | undefined} [_default]\n */\n constructor(_default) {\n const ret = wasm.clockworkcostmatrix_new(isLikeNone(_default) ? 0xFFFFFF : _default);\n this.__wbg_ptr = ret >>> 0;\n ClockworkCostMatrixFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * Gets the cost of a given position in the cost matrix.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.clockworkcostmatrix_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n * Sets the cost of a given position in the cost matrix.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.clockworkcostmatrix_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst DistanceMapFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_distancemap_free(ptr >>> 0, 1));\n/**\n * Maps a distance value onto individual room tile positions.\n */\nexport class DistanceMap {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(DistanceMap.prototype);\n obj.__wbg_ptr = ptr;\n DistanceMapFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n DistanceMapFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_distancemap_free(ptr, 0);\n }\n /**\n * Converts the distance map into a flat array of distances.\n * @returns {Uint32Array}\n */\n toArray() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.distancemap_toArray(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Gets the distance value at a given position.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.distancemap_get(this.__wbg_ptr, x, y);\n return ret >>> 0;\n }\n /**\n * Sets the distance value at a given position.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.distancemap_set(this.__wbg_ptr, x, y, value);\n }\n}\n\nconst FlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_flowfield_free(ptr >>> 0, 1));\n/**\n * A flow field is a 50x50 grid (representing a room), representing viable directions\n * to travel to reach a particular target (or targets). A given tile may have multiple\n * equally valid directions, so we represent this as a bitfield (where each bit in an\n * 8-bit unsigned integer represents a direction that is either viable or not).\n */\nexport class FlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(FlowField.prototype);\n obj.__wbg_ptr = ptr;\n FlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_flowfield_free(ptr, 0);\n }\n /**\n * Get the internal value for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n get(x, y) {\n const ret = wasm.flowfield_get(this.__wbg_ptr, x, y);\n return ret;\n }\n /**\n * Set the internal value for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {number} value\n */\n set(x, y, value) {\n wasm.flowfield_set(this.__wbg_ptr, x, y, value);\n }\n /**\n * Get the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {any[]}\n */\n getDirections(x, y) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.flowfield_getDirections(retptr, this.__wbg_ptr, x, y);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var v1 = getArrayJsValueFromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Set the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {any[]} directions\n */\n setDirections(x, y, directions) {\n const ptr0 = passArrayJsValueToWasm0(directions, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.flowfield_setDirections(this.__wbg_ptr, x, y, ptr0, len0);\n }\n /**\n * Add a direction to the list of valid directions for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {Direction} direction\n */\n addDirection(x, y, direction) {\n wasm.flowfield_addDirection(this.__wbg_ptr, x, y, direction);\n }\n}\n\nconst MonoFlowFieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_monoflowfield_free(ptr >>> 0, 1));\n/**\n * A flow field is a 50x50 grid (representing a room), representing viable directions\n * to travel to reach a particular target (or targets). A mono flow field only stores\n * a single direction for each tile, so we represent this as 4 bits of an unsigned\n * integer (0 for no direction, 1 for TOP, etc.).\n */\nexport class MonoFlowField {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(MonoFlowField.prototype);\n obj.__wbg_ptr = ptr;\n MonoFlowFieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MonoFlowFieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_monoflowfield_free(ptr, 0);\n }\n /**\n * Get the direction for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @returns {Direction | undefined}\n */\n get(x, y) {\n const ret = wasm.monoflowfield_get(this.__wbg_ptr, x, y);\n return ret === 0 ? undefined : ret;\n }\n /**\n * Set the direction for a given coordinate.\n * @param {number} x\n * @param {number} y\n * @param {Direction | undefined} [value]\n */\n set(x, y, value) {\n wasm.monoflowfield_set(this.__wbg_ptr, x, y, isLikeNone(value) ? 0 : value);\n }\n}\n\nconst SearchGoalFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_searchgoal_free(ptr >>> 0, 1));\n\nexport class SearchGoal {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SearchGoalFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_searchgoal_free(ptr, 0);\n }\n /**\n * @returns {any}\n */\n get pos() {\n const ret = wasm.searchgoal_pos(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * @returns {number}\n */\n get range() {\n const ret = wasm.searchgoal_range(this.__wbg_ptr);\n return ret >>> 0;\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_number_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbindgen_try_into_number = function(arg0) {\n let result;\n try { result = +getObject(arg0) } catch (e) { result = e }\n const ret = result;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_static_accessor_ROOM_POSITION_PROTOTYPE_359d8a1531b99b4c = function() {\n const ret = RoomPosition.prototype;\n return addHeapObject(ret);\n};\nimports.wbg.__wbg_setpacked_e36387710a3ff5bb = function(arg0, arg1) {\n getObject(arg0).__packedPos = arg1 >>> 0;\n};\nimports.wbg.__wbg_create_70ef5302cb22a5c4 = function(arg0) {\n const ret = Object.create(getObject(arg0));\n return addHeapObject(ret);\n};\nimports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nreturn imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('screeps_clockwork_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n","import { ClockworkCostMatrix, js_bfs_distance_map } from '../wasm/screeps_clockwork';\n\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * Note that the `roomName` on start positions is ignored - all positions\n * are assumed to be in the same room as the cost matrix.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_bfs_flow_field, js_bfs_mono_flow_field } from '../wasm/screeps_clockwork';\n\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_flow_field(startPacked, costMatrix);\n return result;\n}\n\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using a breadth-first search algorithm.\n *\n * The BFS algorithm doesn't include variable costs, and only considers\n * values of 255 (impassible) in the provided cost matrix. Any other\n * values are ignored.\n *\n * This might be useful for creeps with only MOVE parts and/or empty\n * CARRY parts, which don't generate fatigue.\n *\n * Note that the `roomName` on start positions is ignored - all positions\n * are assumed to be in the same room as the cost matrix.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_bfs_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_dijkstra_distance_map } from '../wasm/screeps_clockwork';\n\n/**\n * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * Note that the `roomName` on start positions is ignored - all positions\n * are assumed to be in the same room as the cost matrix.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_distance_map(startPacked, costMatrix);\n return result;\n}\n","import { ClockworkCostMatrix, js_dijkstra_flow_field, js_dijkstra_mono_flow_field } from '../wasm/screeps_clockwork';\n\n/**\n * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions\n * using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_flow_field(startPacked, costMatrix);\n return result;\n}\n\n/**\n * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)\n * for a set of positions using Dijkstra's algorithm.\n *\n * Dijkstra's algorithm includes variable costs to account for terrain or other cost functions.\n *\n * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want\n * a cost matrix with a default value of at least 1.\n *\n * Note that the `roomName` on start positions is ignored - all positions\n * are assumed to be in the same room as the cost matrix.\n *\n * @param start - The starting positions.\n * @param costMatrix - The cost matrix to use for the flow field.\n * @returns The flow field.\n */\nexport function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix) {\n const startPacked = new Uint32Array(start.map(pos => pos.__packedPos));\n const result = js_dijkstra_mono_flow_field(startPacked, costMatrix);\n return result;\n}\n","import { get_range } from '../wasm/screeps_clockwork';\n\n/**\n * Get the global range between two positions. This is different\n * from the `getRange` method on `RoomPosition`, which gets the\n * range only within the same room.\n *\n * @param pos1 - The first position.\n * @param pos2 - The second position.\n * @returns The range between the two positions.\n */\nexport function getRange(pos1: RoomPosition, pos2: RoomPosition) {\n return get_range(pos1.__packedPos, pos2.__packedPos);\n}\n","import 'fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js';\n\nimport {\n type InitOutput,\n ClockworkCostMatrix,\n DistanceMap,\n FlowField,\n MonoFlowField,\n initSync,\n version\n} from './wasm/screeps_clockwork';\nexport { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };\n\nexport * from './wrappers/bfsDistanceMap';\nexport * from './wrappers/bfsFlowField';\nexport * from './wrappers/dijkstraDistanceMap';\nexport * from './wrappers/dijkstraFlowField';\nexport * from './wrappers/getRange';\n\ndeclare namespace WebAssembly {\n class Module {\n constructor(bytes: Uint8Array);\n }\n}\n\nlet wasm_bytes: Uint8Array;\nlet wasm_module: WebAssembly.Module;\nlet wasm_instance: InitOutput;\nlet initialized = false;\n/**\n * The `initialize` function should be called in your main loop before\n * using any other screeps-clockwork functions. Depending on available\n * CPU, it may not load the WASM module completely in the first tick,\n * but it will pick back up where it left off if the script times out.\n *\n * @param verbose - If true, will log the state of the WASM module as it loads.\n */\nexport function initialize(verbose = false) {\n if (!wasm_bytes) wasm_bytes = require('screeps_clockwork.wasm');\n if (verbose && !initialized) console.log('[clockwork] wasm_bytes loaded');\n if (!wasm_module) wasm_module = new WebAssembly.Module(wasm_bytes);\n if (verbose && !initialized) console.log('[clockwork] wasm_module loaded');\n if (!wasm_instance) wasm_instance = initSync({ module: wasm_module });\n if (verbose && !initialized) {\n console.log('[clockwork] wasm_instance loaded');\n console.log(`[clockwork] version ${version()} initialized`);\n }\n initialized = true;\n}\n"],"names":["global","this"],"mappings":";;;;;;;;;;;;;AAAa,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC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B,OAAO,EAAE,CAAA,YAAA,CAAc,CAAC,CAAC;KAC7D;IACD,WAAW,GAAG,IAAI,CAAC;AACrB;;;;;;;;;;;;;;;"}
Binary file
@@ -1,5 +1,5 @@
1
1
  import 'fastestsmallesttextencoderdecoder-encodeinto/EncoderDecoderTogether.min.js';
2
- import { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField } from '../wasm';
2
+ import { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField } from './wasm/screeps_clockwork';
3
3
  export { ClockworkCostMatrix, DistanceMap, FlowField, MonoFlowField };
4
4
  export * from './wrappers/bfsDistanceMap';
5
5
  export * from './wrappers/bfsFlowField';
@@ -0,0 +1,380 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @returns {string}
5
+ */
6
+ export function version(): string;
7
+ /**
8
+ * Exports the global range calculation between two positions.
9
+ * @param {number} packed_pos_1
10
+ * @param {number} packed_pos_2
11
+ * @returns {number}
12
+ */
13
+ export function get_range(packed_pos_1: number, packed_pos_2: number): number;
14
+ /**
15
+ * WASM wrapper for the Dijkstra flow field function.
16
+ * @param {Uint32Array} start_packed
17
+ * @param {ClockworkCostMatrix} cost_matrix
18
+ * @returns {FlowField}
19
+ */
20
+ export function js_dijkstra_flow_field(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): FlowField;
21
+ /**
22
+ * WASM wrapper for the Dijkstra mono flow field function.
23
+ * @param {Uint32Array} start_packed
24
+ * @param {ClockworkCostMatrix} cost_matrix
25
+ * @returns {MonoFlowField}
26
+ */
27
+ export function js_dijkstra_mono_flow_field(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): MonoFlowField;
28
+ /**
29
+ * WASM wrapper for the BFS flow field function.
30
+ * @param {Uint32Array} start_packed
31
+ * @param {ClockworkCostMatrix} cost_matrix
32
+ * @returns {FlowField}
33
+ */
34
+ export function js_bfs_flow_field(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): FlowField;
35
+ /**
36
+ * WASM wrapper for the Dijkstra distance map function.
37
+ * @param {Uint32Array} start_packed
38
+ * @param {ClockworkCostMatrix} cost_matrix
39
+ * @returns {DistanceMap}
40
+ */
41
+ export function js_dijkstra_distance_map(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): DistanceMap;
42
+ /**
43
+ * WASM wrapper for the BFS distance map function.
44
+ * @param {Uint32Array} start_packed
45
+ * @param {ClockworkCostMatrix} cost_matrix
46
+ * @returns {DistanceMap}
47
+ */
48
+ export function js_bfs_distance_map(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): DistanceMap;
49
+ /**
50
+ * WASM wrapper for the BFS mono flow field function.
51
+ * @param {Uint32Array} start_packed
52
+ * @param {ClockworkCostMatrix} cost_matrix
53
+ * @returns {MonoFlowField}
54
+ */
55
+ export function js_bfs_mono_flow_field(start_packed: Uint32Array, cost_matrix: ClockworkCostMatrix): MonoFlowField;
56
+ /**
57
+ * Translates `COLOR_*` and `COLORS_ALL` constants.
58
+ */
59
+ export enum Color {
60
+ Red = 1,
61
+ Purple = 2,
62
+ Blue = 3,
63
+ Cyan = 4,
64
+ Green = 5,
65
+ Yellow = 6,
66
+ Orange = 7,
67
+ Brown = 8,
68
+ Grey = 9,
69
+ White = 10,
70
+ }
71
+ /**
72
+ * Translates the `DENSITY_*` constants.
73
+ */
74
+ export enum Density {
75
+ Low = 1,
76
+ Moderate = 2,
77
+ High = 3,
78
+ Ultra = 4,
79
+ }
80
+ /**
81
+ * Translates direction constants.
82
+ */
83
+ export enum Direction {
84
+ Top = 1,
85
+ TopRight = 2,
86
+ Right = 3,
87
+ BottomRight = 4,
88
+ Bottom = 5,
89
+ BottomLeft = 6,
90
+ Left = 7,
91
+ TopLeft = 8,
92
+ }
93
+ /**
94
+ * Type used for when the game returns a direction to an exit.
95
+ *
96
+ * Restricted more than `Direction` in that it can't be diagonal. Used as the
97
+ * result of [`Room::find_exit_to`].
98
+ *
99
+ * Can be converted to [`Find`] for immediate use of [`Room::find`]
100
+ * and [`Direction`].
101
+ *
102
+ * [`Room::find`]: crate::objects::Room::find
103
+ * [`Room::find_exit_to`]: crate::objects::Room::find_exit_to
104
+ */
105
+ export enum ExitDirection {
106
+ Top = 1,
107
+ Right = 3,
108
+ Bottom = 5,
109
+ Left = 7,
110
+ }
111
+ /**
112
+ * Translates `FIND_*` constants for interal API calls
113
+ *
114
+ * Unless you're storing the type of find constant to be used for a call, you
115
+ * likely want the constants which implement the `FindConstant` trait to make
116
+ * calls to find methods.
117
+ *
118
+ * This is hidden from the documentation to avoid confusion due to its narrow
119
+ * use case, but wasm_bindgen requires it remain public.
120
+ */
121
+ export enum Find {
122
+ /**
123
+ * Find all exit positions at the top of the room
124
+ */
125
+ ExitTop = 1,
126
+ ExitRight = 3,
127
+ ExitBottom = 5,
128
+ ExitLeft = 7,
129
+ Exit = 10,
130
+ Creeps = 101,
131
+ MyCreeps = 102,
132
+ HostileCreeps = 103,
133
+ SourcesActive = 104,
134
+ Sources = 105,
135
+ DroppedResources = 106,
136
+ Structures = 107,
137
+ MyStructures = 108,
138
+ HostileStructures = 109,
139
+ Flags = 110,
140
+ ConstructionSites = 111,
141
+ MySpawns = 112,
142
+ HostileSpawns = 113,
143
+ MyConstructionSites = 114,
144
+ HostileConstructionSites = 115,
145
+ Minerals = 116,
146
+ Nukes = 117,
147
+ Tombstones = 118,
148
+ PowerCreeps = 119,
149
+ MyPowerCreeps = 120,
150
+ HostilePowerCreeps = 121,
151
+ Deposits = 122,
152
+ Ruins = 123,
153
+ ScoreContainers = 10011,
154
+ ScoreCollectors = 10012,
155
+ SymbolContainers = 10021,
156
+ SymbolDecoders = 10022,
157
+ Reactors = 10051,
158
+ }
159
+ /**
160
+ * Translates the `EFFECT_*` constants, which are natural effect types
161
+ */
162
+ export enum NaturalEffectType {
163
+ Invulnerability = 1001,
164
+ CollapseTimer = 1002,
165
+ }
166
+ /**
167
+ * Translates the `PWR_*` constants, which are types of powers used by power
168
+ * creeps
169
+ */
170
+ export enum PowerType {
171
+ GenerateOps = 1,
172
+ OperateSpawn = 2,
173
+ OperateTower = 3,
174
+ OperateStorage = 4,
175
+ OperateLab = 5,
176
+ OperateExtension = 6,
177
+ OperateObserver = 7,
178
+ OperateTerminal = 8,
179
+ DisruptSpawn = 9,
180
+ DisruptTower = 10,
181
+ Shield = 12,
182
+ RegenSource = 13,
183
+ RegenMineral = 14,
184
+ DisruptTerminal = 15,
185
+ OperatePower = 16,
186
+ Fortify = 17,
187
+ OperateController = 18,
188
+ OperateFactory = 19,
189
+ }
190
+ /**
191
+ * Translates `TERRAIN_*` constants.
192
+ */
193
+ export enum Terrain {
194
+ Plain = 0,
195
+ Wall = 1,
196
+ Swamp = 2,
197
+ }
198
+ /**
199
+ * A wrapper around the `LocalCostMatrix` type from the Screeps API.
200
+ * Instances can be passed between WASM and JS as a pointer, using the
201
+ * methods to get and set values, rather than copying the entire matrix.
202
+ */
203
+ export class ClockworkCostMatrix {
204
+ free(): void;
205
+ /**
206
+ * Creates a new cost matrix within the WASM module. Optionally, a default value
207
+ * can be provided to initialize all cells in the matrix to that value.
208
+ * @param {number | undefined} [_default]
209
+ */
210
+ constructor(_default?: number);
211
+ /**
212
+ * Gets the cost of a given position in the cost matrix.
213
+ * @param {number} x
214
+ * @param {number} y
215
+ * @returns {number}
216
+ */
217
+ get(x: number, y: number): number;
218
+ /**
219
+ * Sets the cost of a given position in the cost matrix.
220
+ * @param {number} x
221
+ * @param {number} y
222
+ * @param {number} value
223
+ */
224
+ set(x: number, y: number, value: number): void;
225
+ }
226
+ /**
227
+ * Maps a distance value onto individual room tile positions.
228
+ */
229
+ export class DistanceMap {
230
+ free(): void;
231
+ /**
232
+ * Converts the distance map into a flat array of distances.
233
+ * @returns {Uint32Array}
234
+ */
235
+ toArray(): Uint32Array;
236
+ /**
237
+ * Gets the distance value at a given position.
238
+ * @param {number} x
239
+ * @param {number} y
240
+ * @returns {number}
241
+ */
242
+ get(x: number, y: number): number;
243
+ /**
244
+ * Sets the distance value at a given position.
245
+ * @param {number} x
246
+ * @param {number} y
247
+ * @param {number} value
248
+ */
249
+ set(x: number, y: number, value: number): void;
250
+ }
251
+ /**
252
+ * A flow field is a 50x50 grid (representing a room), representing viable directions
253
+ * to travel to reach a particular target (or targets). A given tile may have multiple
254
+ * equally valid directions, so we represent this as a bitfield (where each bit in an
255
+ * 8-bit unsigned integer represents a direction that is either viable or not).
256
+ */
257
+ export class FlowField {
258
+ free(): void;
259
+ /**
260
+ * Get the internal value for a given coordinate.
261
+ * @param {number} x
262
+ * @param {number} y
263
+ * @returns {number}
264
+ */
265
+ get(x: number, y: number): number;
266
+ /**
267
+ * Set the internal value for a given coordinate.
268
+ * @param {number} x
269
+ * @param {number} y
270
+ * @param {number} value
271
+ */
272
+ set(x: number, y: number, value: number): void;
273
+ /**
274
+ * Get the list of valid directions for a given coordinate.
275
+ * @param {number} x
276
+ * @param {number} y
277
+ * @returns {any[]}
278
+ */
279
+ getDirections(x: number, y: number): any[];
280
+ /**
281
+ * Set the list of valid directions for a given coordinate.
282
+ * @param {number} x
283
+ * @param {number} y
284
+ * @param {any[]} directions
285
+ */
286
+ setDirections(x: number, y: number, directions: any[]): void;
287
+ /**
288
+ * Add a direction to the list of valid directions for a given coordinate.
289
+ * @param {number} x
290
+ * @param {number} y
291
+ * @param {Direction} direction
292
+ */
293
+ addDirection(x: number, y: number, direction: Direction): void;
294
+ }
295
+ /**
296
+ * A flow field is a 50x50 grid (representing a room), representing viable directions
297
+ * to travel to reach a particular target (or targets). A mono flow field only stores
298
+ * a single direction for each tile, so we represent this as 4 bits of an unsigned
299
+ * integer (0 for no direction, 1 for TOP, etc.).
300
+ */
301
+ export class MonoFlowField {
302
+ free(): void;
303
+ /**
304
+ * Get the direction for a given coordinate.
305
+ * @param {number} x
306
+ * @param {number} y
307
+ * @returns {Direction | undefined}
308
+ */
309
+ get(x: number, y: number): Direction | undefined;
310
+ /**
311
+ * Set the direction for a given coordinate.
312
+ * @param {number} x
313
+ * @param {number} y
314
+ * @param {Direction | undefined} [value]
315
+ */
316
+ set(x: number, y: number, value?: Direction): void;
317
+ }
318
+ export class SearchGoal {
319
+ free(): void;
320
+ readonly pos: any;
321
+ readonly range: number;
322
+ }
323
+
324
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
325
+
326
+ export interface InitOutput {
327
+ readonly memory: WebAssembly.Memory;
328
+ readonly version: (a: number) => void;
329
+ readonly get_range: (a: number, b: number) => number;
330
+ readonly js_dijkstra_flow_field: (a: number, b: number, c: number) => number;
331
+ readonly js_dijkstra_mono_flow_field: (a: number, b: number, c: number) => number;
332
+ readonly js_bfs_flow_field: (a: number, b: number, c: number) => number;
333
+ readonly __wbg_monoflowfield_free: (a: number, b: number) => void;
334
+ readonly monoflowfield_get: (a: number, b: number, c: number) => number;
335
+ readonly monoflowfield_set: (a: number, b: number, c: number, d: number) => void;
336
+ readonly __wbg_clockworkcostmatrix_free: (a: number, b: number) => void;
337
+ readonly clockworkcostmatrix_new: (a: number) => number;
338
+ readonly clockworkcostmatrix_get: (a: number, b: number, c: number) => number;
339
+ readonly clockworkcostmatrix_set: (a: number, b: number, c: number, d: number) => void;
340
+ readonly __wbg_distancemap_free: (a: number, b: number) => void;
341
+ readonly distancemap_toArray: (a: number, b: number) => void;
342
+ readonly distancemap_get: (a: number, b: number, c: number) => number;
343
+ readonly distancemap_set: (a: number, b: number, c: number, d: number) => void;
344
+ readonly js_dijkstra_distance_map: (a: number, b: number, c: number) => number;
345
+ readonly __wbg_flowfield_free: (a: number, b: number) => void;
346
+ readonly flowfield_get: (a: number, b: number, c: number) => number;
347
+ readonly flowfield_set: (a: number, b: number, c: number, d: number) => void;
348
+ readonly flowfield_getDirections: (a: number, b: number, c: number, d: number) => void;
349
+ readonly flowfield_setDirections: (a: number, b: number, c: number, d: number, e: number) => void;
350
+ readonly flowfield_addDirection: (a: number, b: number, c: number, d: number) => void;
351
+ readonly js_bfs_distance_map: (a: number, b: number, c: number) => number;
352
+ readonly js_bfs_mono_flow_field: (a: number, b: number, c: number) => number;
353
+ readonly __wbg_searchgoal_free: (a: number, b: number) => void;
354
+ readonly searchgoal_pos: (a: number) => number;
355
+ readonly searchgoal_range: (a: number) => number;
356
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
357
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
358
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
359
+ }
360
+
361
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
362
+ /**
363
+ * Instantiates the given `module`, which can either be bytes or
364
+ * a precompiled `WebAssembly.Module`.
365
+ *
366
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
367
+ *
368
+ * @returns {InitOutput}
369
+ */
370
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
371
+
372
+ /**
373
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
374
+ * for everything else, calls `WebAssembly.instantiate` directly.
375
+ *
376
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
377
+ *
378
+ * @returns {Promise<InitOutput>}
379
+ */
380
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
@@ -1,4 +1,4 @@
1
- import { ClockworkCostMatrix } from '../../wasm';
1
+ import { ClockworkCostMatrix } from '../wasm/screeps_clockwork';
2
2
  /**
3
3
  * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
4
4
  * using a breadth-first search algorithm.
@@ -10,8 +10,11 @@ import { ClockworkCostMatrix } from '../../wasm';
10
10
  * This might be useful for creeps with only MOVE parts and/or empty
11
11
  * CARRY parts, which don't generate fatigue.
12
12
  *
13
+ * Note that the `roomName` on start positions is ignored - all positions
14
+ * are assumed to be in the same room as the cost matrix.
15
+ *
13
16
  * @param start - The starting positions.
14
17
  * @param costMatrix - The cost matrix to use for the flow field.
15
18
  * @returns The flow field.
16
19
  */
17
- export declare function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").DistanceMap;
20
+ export declare function bfsDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").DistanceMap;
@@ -1,4 +1,4 @@
1
- import { ClockworkCostMatrix } from '../../wasm';
1
+ import { ClockworkCostMatrix } from '../wasm/screeps_clockwork';
2
2
  /**
3
3
  * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
4
4
  * using a breadth-first search algorithm.
@@ -14,7 +14,7 @@ import { ClockworkCostMatrix } from '../../wasm';
14
14
  * @param costMatrix - The cost matrix to use for the flow field.
15
15
  * @returns The flow field.
16
16
  */
17
- export declare function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").FlowField;
17
+ export declare function bfsFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").FlowField;
18
18
  /**
19
19
  * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
20
20
  * for a set of positions using a breadth-first search algorithm.
@@ -26,8 +26,11 @@ export declare function bfsFlowField(start: RoomPosition[], costMatrix: Clockwor
26
26
  * This might be useful for creeps with only MOVE parts and/or empty
27
27
  * CARRY parts, which don't generate fatigue.
28
28
  *
29
+ * Note that the `roomName` on start positions is ignored - all positions
30
+ * are assumed to be in the same room as the cost matrix.
31
+ *
29
32
  * @param start - The starting positions.
30
33
  * @param costMatrix - The cost matrix to use for the flow field.
31
34
  * @returns The flow field.
32
35
  */
33
- export declare function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm").MonoFlowField;
36
+ export declare function bfsMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").MonoFlowField;
@@ -1,4 +1,4 @@
1
- import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
1
+ import { ClockworkCostMatrix } from '../wasm/screeps_clockwork';
2
2
  /**
3
3
  * Generate a [distance map](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
4
4
  * using Dijkstra's algorithm.
@@ -8,8 +8,11 @@ import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
8
8
  * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
9
9
  * a cost matrix with a default value of at least 1.
10
10
  *
11
+ * Note that the `roomName` on start positions is ignored - all positions
12
+ * are assumed to be in the same room as the cost matrix.
13
+ *
11
14
  * @param start - The starting positions.
12
15
  * @param costMatrix - The cost matrix to use for the flow field.
13
16
  * @returns The flow field.
14
17
  */
15
- export declare function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").DistanceMap;
18
+ export declare function dijkstraDistanceMap(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").DistanceMap;
@@ -1,4 +1,4 @@
1
- import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
1
+ import { ClockworkCostMatrix } from '../wasm/screeps_clockwork';
2
2
  /**
3
3
  * Generate a [flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html) for a set of positions
4
4
  * using Dijkstra's algorithm.
@@ -12,7 +12,7 @@ import { ClockworkCostMatrix } from '../../wasm/screeps_clockwork';
12
12
  * @param costMatrix - The cost matrix to use for the flow field.
13
13
  * @returns The flow field.
14
14
  */
15
- export declare function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").FlowField;
15
+ export declare function dijkstraFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").FlowField;
16
16
  /**
17
17
  * Generate a [mono-directional flow field](https://glitchassassin.github.io/screeps-clockwork/primitives/flowfield.html)
18
18
  * for a set of positions using Dijkstra's algorithm.
@@ -22,8 +22,11 @@ export declare function dijkstraFlowField(start: RoomPosition[], costMatrix: Clo
22
22
  * Note that values of 0 in the cost matrix may have unexpected behavior. You probably want
23
23
  * a cost matrix with a default value of at least 1.
24
24
  *
25
+ * Note that the `roomName` on start positions is ignored - all positions
26
+ * are assumed to be in the same room as the cost matrix.
27
+ *
25
28
  * @param start - The starting positions.
26
29
  * @param costMatrix - The cost matrix to use for the flow field.
27
30
  * @returns The flow field.
28
31
  */
29
- export declare function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../../wasm/screeps_clockwork").MonoFlowField;
32
+ export declare function dijkstraMonoFlowField(start: RoomPosition[], costMatrix: ClockworkCostMatrix): import("../wasm/screeps_clockwork").MonoFlowField;
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "screeps-clockwork",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A WASM movement library for Screeps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "run-s build:lib build:src",
9
- "build:lib": "wasm-pack build --target web --out-dir wasm --config build.rustflags=[\\'-Ctarget-feature=-reference-types\\',\\'-Ctarget-feature=-multivalue\\',\\'-Ctarget-feature=-sign-ext\\'] -Z build-std=std,panic_abort",
9
+ "build:lib": "wasm-pack build --target web --out-dir src/wasm --config build.rustflags=[\\'-Ctarget-feature=-reference-types\\',\\'-Ctarget-feature=-multivalue\\',\\'-Ctarget-feature=-sign-ext\\'] -Z build-std=std,panic_abort",
10
10
  "build:src": "rollup -c",
11
11
  "build:docs": "typedoc",
12
12
  "watch": "run-s build watch:both",
13
13
  "watch:lib": "cargo-watch -w lib -s \"npm run build:lib\"",
14
- "watch:src": "wait-on wasm/screeps_clockwork_bg.wasm && rollup -cw",
14
+ "watch:src": "wait-on src/wasm/screeps_clockwork_bg.wasm && rollup -cw",
15
15
  "watch:pserver": "rollup -cw --environment DEST:pserver",
16
16
  "watch:both": "run-p watch:lib watch:pserver"
17
17
  },