@deafwave/osrs-botmaker-types 0.4.8 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,5 +4,3 @@ Created by [Chandler 'Deafwave' Ferry](https://github.com/ChandlerFerry) to ease
4
4
 
5
5
  ## Donate
6
6
  - https://ko-fi.com/deafwave
7
-
8
-
@@ -1 +1,7 @@
1
- export declare const placeholder: {};
1
+ export declare function _zRhinoRuneliteRollupBugFixes(): {
2
+ name: string;
3
+ renderChunk(code: string, _chunk: any, _options: any): {
4
+ code: string;
5
+ map: null;
6
+ };
7
+ };
@@ -1 +1,65 @@
1
- export const placeholder = {};
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import collisionDataFlagMap from '../rollup/CollisionDataFlag.js';
3
+ import componentIdMap from '../rollup/ComponentID.js';
4
+ import enumIdMap from '../rollup/EnumID.js';
5
+ import interfaceIdMap from '../rollup/InterfaceID.js';
6
+ import itemIdMap from '../rollup/ItemID.js';
7
+ import npcIdMap from '../rollup/NpcID.js';
8
+ import objectIdMap from '../rollup/ObjectID.js';
9
+ import parameterIdMap from '../rollup/ParamID.js';
10
+ import spriteIdMap from '../rollup/SpriteID.js';
11
+ export function _zRhinoRuneliteRollupBugFixes() {
12
+ return {
13
+ name: 'rhino-runelite-bug-fixes',
14
+ renderChunk(code, _chunk, _options) {
15
+ const replacements = [
16
+ {
17
+ regex: /net\.runelite\.api\.NpcID\.(.*?)([\n ),;\]])/g,
18
+ map: npcIdMap,
19
+ },
20
+ {
21
+ regex: /net\.runelite\.api\.EnumID\.(.*?)([\n ),;\]])/g,
22
+ map: enumIdMap,
23
+ },
24
+ {
25
+ regex: /net\.runelite\.api\.ItemID\.(.*?)([\n ),;\]])/g,
26
+ map: itemIdMap,
27
+ },
28
+ {
29
+ regex: /net\.runelite\.api\.SpriteID\.(.*?)([\n ),;\]])/g,
30
+ map: spriteIdMap,
31
+ },
32
+ {
33
+ regex: /net\.runelite\.api\.CollisionDataFlag\.(.*?)([\n ),;\]])/g,
34
+ map: collisionDataFlagMap,
35
+ },
36
+ {
37
+ regex: /net\.runelite\.api\.ParamID\.(.*?)([\n ),;\]])/g,
38
+ map: parameterIdMap,
39
+ },
40
+ {
41
+ regex: /net\.runelite\.api\.widgets\.ComponentID\.(.*?)([\n ),;\]])/g,
42
+ map: componentIdMap,
43
+ },
44
+ {
45
+ regex: /net\.runelite\.api\.widgets\.InterfaceID\.(.*?)([\n ),;\]])/g,
46
+ map: interfaceIdMap,
47
+ },
48
+ {
49
+ regex: /net\.runelite\.api\.ObjectID\.(.*?)([\n ),;\]])/g,
50
+ map: objectIdMap,
51
+ },
52
+ ];
53
+ let modifiedCode = code;
54
+ for (const { regex, map } of replacements) {
55
+ // @ts-expect-error can ignore the type failure on map[p1] because it's near-non-critical
56
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
57
+ modifiedCode = modifiedCode.replaceAll(regex, (_, p1, p2) => `${map[p1]}${p2}`);
58
+ }
59
+ return {
60
+ code: modifiedCode,
61
+ map: null,
62
+ };
63
+ },
64
+ };
65
+ }
@@ -0,0 +1,29 @@
1
+ declare const _default: {
2
+ /**
3
+ * Directional movement blocking flags.
4
+ */
5
+ BLOCK_MOVEMENT_NORTH_WEST: number;
6
+ BLOCK_MOVEMENT_NORTH: number;
7
+ BLOCK_MOVEMENT_NORTH_EAST: number;
8
+ BLOCK_MOVEMENT_EAST: number;
9
+ BLOCK_MOVEMENT_SOUTH_EAST: number;
10
+ BLOCK_MOVEMENT_SOUTH: number;
11
+ BLOCK_MOVEMENT_SOUTH_WEST: number;
12
+ BLOCK_MOVEMENT_WEST: number;
13
+ /**
14
+ * Movement blocking type flags.
15
+ */
16
+ BLOCK_MOVEMENT_OBJECT: number;
17
+ BLOCK_MOVEMENT_FLOOR_DECORATION: number;
18
+ BLOCK_MOVEMENT_FLOOR: number;
19
+ BLOCK_MOVEMENT_FULL: number;
20
+ /**
21
+ * Directional line of sight blocking flags.
22
+ */
23
+ BLOCK_LINE_OF_SIGHT_NORTH: number;
24
+ BLOCK_LINE_OF_SIGHT_EAST: number;
25
+ BLOCK_LINE_OF_SIGHT_SOUTH: number;
26
+ BLOCK_LINE_OF_SIGHT_WEST: number;
27
+ BLOCK_LINE_OF_SIGHT_FULL: number;
28
+ };
29
+ export default _default;
@@ -0,0 +1,28 @@
1
+ export default {
2
+ /**
3
+ * Directional movement blocking flags.
4
+ */
5
+ BLOCK_MOVEMENT_NORTH_WEST: 0x1,
6
+ BLOCK_MOVEMENT_NORTH: 0x2,
7
+ BLOCK_MOVEMENT_NORTH_EAST: 0x4,
8
+ BLOCK_MOVEMENT_EAST: 0x8,
9
+ BLOCK_MOVEMENT_SOUTH_EAST: 0x10,
10
+ BLOCK_MOVEMENT_SOUTH: 0x20,
11
+ BLOCK_MOVEMENT_SOUTH_WEST: 0x40,
12
+ BLOCK_MOVEMENT_WEST: 0x80,
13
+ /**
14
+ * Movement blocking type flags.
15
+ */
16
+ BLOCK_MOVEMENT_OBJECT: 0x100,
17
+ BLOCK_MOVEMENT_FLOOR_DECORATION: 0x40000,
18
+ BLOCK_MOVEMENT_FLOOR: 0x200000,
19
+ BLOCK_MOVEMENT_FULL: 0x100 | 0x40000 | 0x200000,
20
+ /**
21
+ * Directional line of sight blocking flags.
22
+ */
23
+ BLOCK_LINE_OF_SIGHT_NORTH: 0x2 << 9,
24
+ BLOCK_LINE_OF_SIGHT_EAST: 0x8 << 9,
25
+ BLOCK_LINE_OF_SIGHT_SOUTH: 0x20 << 9,
26
+ BLOCK_LINE_OF_SIGHT_WEST: 0x80 << 9,
27
+ BLOCK_LINE_OF_SIGHT_FULL: 0x20000,
28
+ };