isaacscript-common 9.9.0 → 9.11.1
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/dist/features/customGridEntity.d.ts +36 -0
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +36 -0
- package/dist/features/extraConsoleCommands/listCommands.d.ts +2 -4
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +15 -17
- package/dist/features/saveDataManager/exports.d.ts +2 -2
- package/dist/features/saveDataManager/exports.lua +2 -2
- package/dist/functions/collectibles.d.ts +5 -0
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +5 -0
- package/dist/functions/npcs.d.ts +6 -0
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +10 -0
- package/dist/index.d.ts +50 -2
- package/package.json +2 -2
- package/src/features/customGridEntity.ts +36 -0
- package/src/features/extraConsoleCommands/listCommands.ts +6 -10
- package/src/features/saveDataManager/exports.ts +2 -2
- package/src/functions/collectibles.ts +5 -0
- package/src/functions/npcs.ts +19 -0
|
@@ -18,6 +18,42 @@ import { GridEntityCustomData } from "../interfaces/GridEntityCustomData";
|
|
|
18
18
|
* Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
19
19
|
* custom grid entities.
|
|
20
20
|
*
|
|
21
|
+
* For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
22
|
+
* dime when destroyed:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
26
|
+
* const GridEntityTypeCustom = {
|
|
27
|
+
* SILVER_ROCK: 0 as GridEntityType,
|
|
28
|
+
* } as const;
|
|
29
|
+
*
|
|
30
|
+
* // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
31
|
+
* const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
32
|
+
*
|
|
33
|
+
* export function silverRockInit(mod: ModUpgraded): void {
|
|
34
|
+
* mod.AddCallbackCustom(
|
|
35
|
+
* ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
36
|
+
* postGridEntityCustomBrokenSilverRock,
|
|
37
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
38
|
+
* );
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
42
|
+
* spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* export function spawnSilverRock(gridIndex: int): GridEntity {
|
|
46
|
+
* return spawnCustomGridEntity(
|
|
47
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
48
|
+
* gridIndex,
|
|
49
|
+
* undefined,
|
|
50
|
+
* SILVER_ROCK_ANM2_PATH,
|
|
51
|
+
* undefined,
|
|
52
|
+
* GridEntityType.ROCK,
|
|
53
|
+
* );
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
21
57
|
* @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are creating.
|
|
22
58
|
* It should correspond to a local enum value created in your mod. The
|
|
23
59
|
* integer can be any unique value and will not correspond to the actual
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAyH1E
|
|
1
|
+
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAyH1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU,CA8CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAuCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAqBA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,OAAO,CAOT"}
|
|
@@ -128,6 +128,42 @@ end
|
|
|
128
128
|
-- Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
129
129
|
-- custom grid entities.
|
|
130
130
|
--
|
|
131
|
+
-- For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
132
|
+
-- dime when destroyed:
|
|
133
|
+
--
|
|
134
|
+
-- ```ts
|
|
135
|
+
-- // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
136
|
+
-- const GridEntityTypeCustom = {
|
|
137
|
+
-- SILVER_ROCK: 0 as GridEntityType,
|
|
138
|
+
-- } as const;
|
|
139
|
+
--
|
|
140
|
+
-- // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
141
|
+
-- const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
142
|
+
--
|
|
143
|
+
-- export function silverRockInit(mod: ModUpgraded): void {
|
|
144
|
+
-- mod.AddCallbackCustom(
|
|
145
|
+
-- ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
146
|
+
-- postGridEntityCustomBrokenSilverRock,
|
|
147
|
+
-- GridEntityTypeCustom.SILVER_ROCK,
|
|
148
|
+
-- );
|
|
149
|
+
-- }
|
|
150
|
+
--
|
|
151
|
+
-- function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
152
|
+
-- spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
153
|
+
-- }
|
|
154
|
+
--
|
|
155
|
+
-- export function spawnSilverRock(gridIndex: int): GridEntity {
|
|
156
|
+
-- return spawnCustomGridEntity(
|
|
157
|
+
-- GridEntityTypeCustom.SILVER_ROCK,
|
|
158
|
+
-- gridIndex,
|
|
159
|
+
-- undefined,
|
|
160
|
+
-- SILVER_ROCK_ANM2_PATH,
|
|
161
|
+
-- undefined,
|
|
162
|
+
-- GridEntityType.ROCK,
|
|
163
|
+
-- );
|
|
164
|
+
-- }
|
|
165
|
+
-- ```
|
|
166
|
+
--
|
|
131
167
|
-- @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are creating.
|
|
132
168
|
-- It should correspond to a local enum value created in your mod. The
|
|
133
169
|
-- integer can be any unique value and will not correspond to the actual
|
|
@@ -13,8 +13,6 @@ export declare function angelRoom(): void;
|
|
|
13
13
|
export declare function ascent(): void;
|
|
14
14
|
/** Warps to the first Clean Bedroom or Dirty Bedroom on the floor. */
|
|
15
15
|
export declare function bedroom(): void;
|
|
16
|
-
/** Alias for the "blackhearts" command. */
|
|
17
|
-
export declare function bh(params: string): void;
|
|
18
16
|
/**
|
|
19
17
|
* Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
|
|
20
18
|
* negative numbers to remove hearts.)
|
|
@@ -130,8 +128,6 @@ export declare function down(params: string): void;
|
|
|
130
128
|
export declare function dungeon(): void;
|
|
131
129
|
/** Logs the player's current temporary effects to the "log.txt" file. */
|
|
132
130
|
export declare function effects(): void;
|
|
133
|
-
/** Alias for the "eternalHearts" command. */
|
|
134
|
-
export declare function eh(params: string): void;
|
|
135
131
|
/** Alias for the "iAmError" command. */
|
|
136
132
|
export declare function errorRoom(): void;
|
|
137
133
|
/**
|
|
@@ -281,6 +277,8 @@ export declare function poopMana(params: string): void;
|
|
|
281
277
|
export declare function position(): void;
|
|
282
278
|
/** Alias for the "hearts" command. */
|
|
283
279
|
export declare function redHearts(params: string): void;
|
|
280
|
+
/** Starts a room transition to the same room that you are already in. */
|
|
281
|
+
export declare function reloadRoom(): void;
|
|
284
282
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
285
283
|
export declare function right(params: string): void;
|
|
286
284
|
/** Logs information about the room to the "log.txt" file. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AA0HA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD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U,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQ1C;AAED,6EAA6E;AAC7E,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED;;;GAGG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAG3B;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkBvD;AAED,gEAAgE;AAChE,wBAAgB,KAAK,IAAI,IAAI,CAY5B;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAQ5B;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
|
|
@@ -81,6 +81,8 @@ local ____roomGrid = require("functions.roomGrid")
|
|
|
81
81
|
local gridCoordinatesToWorldPosition = ____roomGrid.gridCoordinatesToWorldPosition
|
|
82
82
|
local ____rooms = require("functions.rooms")
|
|
83
83
|
local changeRoom = ____rooms.changeRoom
|
|
84
|
+
local ____roomTransition = require("functions.roomTransition")
|
|
85
|
+
local reloadRoomFunction = ____roomTransition.reloadRoom
|
|
84
86
|
local ____run = require("functions.run")
|
|
85
87
|
local onSetSeed = ____run.onSetSeed
|
|
86
88
|
local restart = ____run.restart
|
|
@@ -117,11 +119,6 @@ local warpNextToRoomType = ____commandsSubroutines.warpNextToRoomType
|
|
|
117
119
|
local warpToRoomType = ____commandsSubroutines.warpToRoomType
|
|
118
120
|
local ____v = require("features.extraConsoleCommands.v")
|
|
119
121
|
local v = ____v.default
|
|
120
|
-
--- Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
|
|
121
|
-
-- negative numbers to remove hearts.)
|
|
122
|
-
function ____exports.blackHearts(self, params)
|
|
123
|
-
addHeart(nil, params, HealthType.BLACK)
|
|
124
|
-
end
|
|
125
122
|
--- Warps to the first Boss Room on the floor.
|
|
126
123
|
function ____exports.bossRoom(self)
|
|
127
124
|
warpToRoomType(nil, RoomType.BOSS)
|
|
@@ -137,11 +134,6 @@ end
|
|
|
137
134
|
function ____exports.devilRoom(self)
|
|
138
135
|
devilAngel(nil, true)
|
|
139
136
|
end
|
|
140
|
-
--- Gives an eternal heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
141
|
-
-- numbers to remove hearts.)
|
|
142
|
-
function ____exports.eternalHearts(self, params)
|
|
143
|
-
addHeart(nil, params, HealthType.ETERNAL)
|
|
144
|
-
end
|
|
145
137
|
--- Gives the player a golden bomb.
|
|
146
138
|
function ____exports.goldenBomb(self)
|
|
147
139
|
local player = Isaac.GetPlayer()
|
|
@@ -271,9 +263,10 @@ function ____exports.bedroom(self)
|
|
|
271
263
|
end
|
|
272
264
|
printConsole(nil, "There are no Clean Bedrooms or Dirty Bedrooms on this floor.")
|
|
273
265
|
end
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
|
|
266
|
+
--- Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
|
|
267
|
+
-- negative numbers to remove hearts.)
|
|
268
|
+
function ____exports.blackHearts(self, params)
|
|
269
|
+
addHeart(nil, params, HealthType.BLACK)
|
|
277
270
|
end
|
|
278
271
|
--- Warps to the Black Market for the floor.
|
|
279
272
|
function ____exports.blackMarket(self)
|
|
@@ -560,14 +553,15 @@ function ____exports.effects(self)
|
|
|
560
553
|
logPlayerEffects(player)
|
|
561
554
|
printConsole(nil, "Logged the player's effects to the \"log.txt\" file.")
|
|
562
555
|
end
|
|
563
|
-
--- Alias for the "eternalHearts" command.
|
|
564
|
-
function ____exports.eh(self, params)
|
|
565
|
-
____exports.eternalHearts(nil, params)
|
|
566
|
-
end
|
|
567
556
|
--- Alias for the "iAmError" command.
|
|
568
557
|
function ____exports.errorRoom(self)
|
|
569
558
|
____exports.iAmErrorRoom(nil)
|
|
570
559
|
end
|
|
560
|
+
--- Gives an eternal heart. Provide a number to give a custom amount of hearts. (You can use negative
|
|
561
|
+
-- numbers to remove hearts.)
|
|
562
|
+
function ____exports.eternalHearts(self, params)
|
|
563
|
+
addHeart(nil, params, HealthType.ETERNAL)
|
|
564
|
+
end
|
|
571
565
|
--- Toggles flight for the player.
|
|
572
566
|
function ____exports.flight(self, params)
|
|
573
567
|
local player = Isaac.GetPlayer()
|
|
@@ -896,6 +890,10 @@ end
|
|
|
896
890
|
function ____exports.redHearts(self, params)
|
|
897
891
|
____exports.hearts(nil, params)
|
|
898
892
|
end
|
|
893
|
+
--- Starts a room transition to the same room that you are already in.
|
|
894
|
+
function ____exports.reloadRoom(self)
|
|
895
|
+
reloadRoomFunction(nil)
|
|
896
|
+
end
|
|
899
897
|
--- Moves the player 0.5 units right. Provide a number to move a custom amount of units.
|
|
900
898
|
function ____exports.right(self, params)
|
|
901
899
|
movePlayer(nil, params, Direction.RIGHT)
|
|
@@ -6,8 +6,8 @@ import { SaveData } from "../../interfaces/SaveData";
|
|
|
6
6
|
* 1. automatic resetting of variables on a new run, on a new level, or on a new room (as desired)
|
|
7
7
|
* 2. automatic saving and loading of all tracked data to the "save#.dat" file
|
|
8
8
|
*
|
|
9
|
-
* You feed this function with an
|
|
10
|
-
*
|
|
9
|
+
* You feed this function with an object containing your variables, and then it will automatically
|
|
10
|
+
* manage them for you. (See below for an example.)
|
|
11
11
|
*
|
|
12
12
|
* The save data manager is meant to be called once for each feature of your mod. In other words,
|
|
13
13
|
* you should not put all of the data for your mod on the same object. Instead, scope your variables
|
|
@@ -25,8 +25,8 @@ local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MA
|
|
|
25
25
|
-- 1. automatic resetting of variables on a new run, on a new level, or on a new room (as desired)
|
|
26
26
|
-- 2. automatic saving and loading of all tracked data to the "save#.dat" file
|
|
27
27
|
--
|
|
28
|
-
-- You feed this function with an
|
|
29
|
-
--
|
|
28
|
+
-- You feed this function with an object containing your variables, and then it will automatically
|
|
29
|
+
-- manage them for you. (See below for an example.)
|
|
30
30
|
--
|
|
31
31
|
-- The save data manager is meant to be called once for each feature of your mod. In other words,
|
|
32
32
|
-- you should not put all of the data for your mod on the same object. Instead, scope your variables
|
|
@@ -173,6 +173,11 @@ export declare function newCollectibleSprite(collectibleType: CollectibleType):
|
|
|
173
173
|
*
|
|
174
174
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
175
175
|
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
176
|
+
*
|
|
177
|
+
* This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
178
|
+
* this function is not necessary when removing items from players. For example, when you remove a
|
|
179
|
+
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
180
|
+
* the item tracker will automatically remove it.
|
|
176
181
|
*/
|
|
177
182
|
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
|
|
178
183
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL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,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAeN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
|
|
@@ -402,6 +402,11 @@ end
|
|
|
402
402
|
--
|
|
403
403
|
-- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
404
404
|
-- Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
405
|
+
--
|
|
406
|
+
-- This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
407
|
+
-- this function is not necessary when removing items from players. For example, when you remove a
|
|
408
|
+
-- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
409
|
+
-- the item tracker will automatically remove it.
|
|
405
410
|
function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
|
|
406
411
|
local collectibleName = ____exports.getCollectibleName(nil, collectibleType)
|
|
407
412
|
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
package/dist/functions/npcs.d.ts
CHANGED
|
@@ -28,6 +28,12 @@ export declare function isAliveExceptionNPC(npc: EntityNPC): boolean;
|
|
|
28
28
|
* the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
33
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
34
|
+
* tears.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isDyingDump(npc: EntityNPC): boolean;
|
|
31
37
|
/**
|
|
32
38
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
33
39
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,UAAU,EASX,MAAM,8BAA8B,CAAC;AAgCtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAiC3D;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAMnD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAOpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAO3D"}
|
package/dist/functions/npcs.lua
CHANGED
|
@@ -11,6 +11,7 @@ local ChargerSubType = ____isaac_2Dtypescript_2Ddefinitions.ChargerSubType
|
|
|
11
11
|
local ChargerVariant = ____isaac_2Dtypescript_2Ddefinitions.ChargerVariant
|
|
12
12
|
local DarkEsauVariant = ____isaac_2Dtypescript_2Ddefinitions.DarkEsauVariant
|
|
13
13
|
local DeathVariant = ____isaac_2Dtypescript_2Ddefinitions.DeathVariant
|
|
14
|
+
local DumpVariant = ____isaac_2Dtypescript_2Ddefinitions.DumpVariant
|
|
14
15
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
15
16
|
local HopperVariant = ____isaac_2Dtypescript_2Ddefinitions.HopperVariant
|
|
16
17
|
local MamaGurdyVariant = ____isaac_2Dtypescript_2Ddefinitions.MamaGurdyVariant
|
|
@@ -46,6 +47,9 @@ function ____exports.isAliveExceptionNPC(self, npc)
|
|
|
46
47
|
if ____exports.isRaglingDeathPatch(nil, npc) then
|
|
47
48
|
return true
|
|
48
49
|
end
|
|
50
|
+
if ____exports.isDyingDump(nil, npc) then
|
|
51
|
+
return true
|
|
52
|
+
end
|
|
49
53
|
return false
|
|
50
54
|
end
|
|
51
55
|
--- Helper function to distinguish between a normal Daddy Long Legs / Triachnid and the child entity
|
|
@@ -57,6 +61,12 @@ end
|
|
|
57
61
|
function ____exports.isDaddyLongLegsChildStompEntity(self, npc)
|
|
58
62
|
return npc.Type == EntityType.DADDY_LONG_LEGS and npc.SpawnerEntity ~= nil
|
|
59
63
|
end
|
|
64
|
+
--- Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
65
|
+
-- `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
66
|
+
-- tears.
|
|
67
|
+
function ____exports.isDyingDump(self, npc)
|
|
68
|
+
return npc.Type == EntityType.DUMP and npc.Variant == asNumber(nil, DumpVariant.DUMP) and npc.State == NpcState.SPECIAL
|
|
69
|
+
end
|
|
60
70
|
--- Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
61
71
|
-- dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
62
72
|
-- spawn 14 Swarm Spiders while their StateFrame ticks upwards.
|
package/dist/index.d.ts
CHANGED
|
@@ -5785,6 +5785,13 @@ export declare function isDoorToMines(door: GridEntityDoor): boolean;
|
|
|
5785
5785
|
*/
|
|
5786
5786
|
export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
|
|
5787
5787
|
|
|
5788
|
+
/**
|
|
5789
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
5790
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
5791
|
+
* tears.
|
|
5792
|
+
*/
|
|
5793
|
+
export declare function isDyingDump(npc: EntityNPC): boolean;
|
|
5794
|
+
|
|
5788
5795
|
/**
|
|
5789
5796
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
5790
5797
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
@@ -9580,6 +9587,11 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
|
|
|
9580
9587
|
*
|
|
9581
9588
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
9582
9589
|
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
9590
|
+
*
|
|
9591
|
+
* This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
9592
|
+
* this function is not necessary when removing items from players. For example, when you remove a
|
|
9593
|
+
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
9594
|
+
* the item tracker will automatically remove it.
|
|
9583
9595
|
*/
|
|
9584
9596
|
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
|
|
9585
9597
|
|
|
@@ -10002,8 +10014,8 @@ export declare enum SaveDataKey {
|
|
|
10002
10014
|
* 1. automatic resetting of variables on a new run, on a new level, or on a new room (as desired)
|
|
10003
10015
|
* 2. automatic saving and loading of all tracked data to the "save#.dat" file
|
|
10004
10016
|
*
|
|
10005
|
-
* You feed this function with an
|
|
10006
|
-
*
|
|
10017
|
+
* You feed this function with an object containing your variables, and then it will automatically
|
|
10018
|
+
* manage them for you. (See below for an example.)
|
|
10007
10019
|
*
|
|
10008
10020
|
* The save data manager is meant to be called once for each feature of your mod. In other words,
|
|
10009
10021
|
* you should not put all of the data for your mod on the same object. Instead, scope your variables
|
|
@@ -10951,6 +10963,42 @@ export declare function spawnCustomDoor(effectVariant: EffectVariant, doorSlot:
|
|
|
10951
10963
|
* Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
10952
10964
|
* custom grid entities.
|
|
10953
10965
|
*
|
|
10966
|
+
* For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
10967
|
+
* dime when destroyed:
|
|
10968
|
+
*
|
|
10969
|
+
* ```ts
|
|
10970
|
+
* // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
10971
|
+
* const GridEntityTypeCustom = {
|
|
10972
|
+
* SILVER_ROCK: 0 as GridEntityType,
|
|
10973
|
+
* } as const;
|
|
10974
|
+
*
|
|
10975
|
+
* // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
10976
|
+
* const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
10977
|
+
*
|
|
10978
|
+
* export function silverRockInit(mod: ModUpgraded): void {
|
|
10979
|
+
* mod.AddCallbackCustom(
|
|
10980
|
+
* ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
10981
|
+
* postGridEntityCustomBrokenSilverRock,
|
|
10982
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
10983
|
+
* );
|
|
10984
|
+
* }
|
|
10985
|
+
*
|
|
10986
|
+
* function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
10987
|
+
* spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
10988
|
+
* }
|
|
10989
|
+
*
|
|
10990
|
+
* export function spawnSilverRock(gridIndex: int): GridEntity {
|
|
10991
|
+
* return spawnCustomGridEntity(
|
|
10992
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
10993
|
+
* gridIndex,
|
|
10994
|
+
* undefined,
|
|
10995
|
+
* SILVER_ROCK_ANM2_PATH,
|
|
10996
|
+
* undefined,
|
|
10997
|
+
* GridEntityType.ROCK,
|
|
10998
|
+
* );
|
|
10999
|
+
* }
|
|
11000
|
+
* ```
|
|
11001
|
+
*
|
|
10954
11002
|
* @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are creating.
|
|
10955
11003
|
* It should correspond to a local enum value created in your mod. The
|
|
10956
11004
|
* integer can be any unique value and will not correspond to the actual
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.11.1",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"main": "dist/index",
|
|
23
23
|
"types": "dist/index.d.ts",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"isaac-typescript-definitions": "^4.0.
|
|
25
|
+
"isaac-typescript-definitions": "^4.0.4"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -160,6 +160,42 @@ function postNewRoomReordered() {
|
|
|
160
160
|
* Custom grid entities are an IsaacScript feature because the vanilla game does not support any
|
|
161
161
|
* custom grid entities.
|
|
162
162
|
*
|
|
163
|
+
* For example, this would be code to create a custom rock called a "Silver Rock" that produces a
|
|
164
|
+
* dime when destroyed:
|
|
165
|
+
*
|
|
166
|
+
* ```ts
|
|
167
|
+
* // This is local to the mod and can safely overlap with the values of `GridEntityType`.
|
|
168
|
+
* const GridEntityTypeCustom = {
|
|
169
|
+
* SILVER_ROCK: 0 as GridEntityType,
|
|
170
|
+
* } as const;
|
|
171
|
+
*
|
|
172
|
+
* // This is copied from "gfx/grid/grid_rock.anm2" with some tweaks to make it look special.
|
|
173
|
+
* const SILVER_ROCK_ANM2_PATH = "gfx/grid/grid_rock_silver.anm2";
|
|
174
|
+
*
|
|
175
|
+
* export function silverRockInit(mod: ModUpgraded): void {
|
|
176
|
+
* mod.AddCallbackCustom(
|
|
177
|
+
* ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_BROKEN,
|
|
178
|
+
* postGridEntityCustomBrokenSilverRock,
|
|
179
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
180
|
+
* );
|
|
181
|
+
* }
|
|
182
|
+
*
|
|
183
|
+
* function postGridEntityCustomBrokenSilverRock(gridEntity: GridEntity) {
|
|
184
|
+
* spawnCoin(CoinSubType.DIME, gridEntity.Position);
|
|
185
|
+
* }
|
|
186
|
+
*
|
|
187
|
+
* export function spawnSilverRock(gridIndex: int): GridEntity {
|
|
188
|
+
* return spawnCustomGridEntity(
|
|
189
|
+
* GridEntityTypeCustom.SILVER_ROCK,
|
|
190
|
+
* gridIndex,
|
|
191
|
+
* undefined,
|
|
192
|
+
* SILVER_ROCK_ANM2_PATH,
|
|
193
|
+
* undefined,
|
|
194
|
+
* GridEntityType.ROCK,
|
|
195
|
+
* );
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
163
199
|
* @param gridEntityTypeCustom An integer that identifies what kind of grid entity you are creating.
|
|
164
200
|
* It should correspond to a local enum value created in your mod. The
|
|
165
201
|
* integer can be any unique value and will not correspond to the actual
|
|
@@ -97,6 +97,7 @@ import {
|
|
|
97
97
|
} from "../../functions/players";
|
|
98
98
|
import { gridCoordinatesToWorldPosition } from "../../functions/roomGrid";
|
|
99
99
|
import { changeRoom } from "../../functions/rooms";
|
|
100
|
+
import { reloadRoom as reloadRoomFunction } from "../../functions/roomTransition";
|
|
100
101
|
import { onSetSeed, restart, setUnseeded } from "../../functions/run";
|
|
101
102
|
import { setStage } from "../../functions/stage";
|
|
102
103
|
import { getGoldenTrinketType } from "../../functions/trinkets";
|
|
@@ -206,11 +207,6 @@ export function bedroom(): void {
|
|
|
206
207
|
printConsole("There are no Clean Bedrooms or Dirty Bedrooms on this floor.");
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
/** Alias for the "blackhearts" command. */
|
|
210
|
-
export function bh(params: string): void {
|
|
211
|
-
blackHearts(params);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
210
|
/**
|
|
215
211
|
* Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
|
|
216
212
|
* negative numbers to remove hearts.)
|
|
@@ -572,11 +568,6 @@ export function effects(): void {
|
|
|
572
568
|
printConsole('Logged the player\'s effects to the "log.txt" file.');
|
|
573
569
|
}
|
|
574
570
|
|
|
575
|
-
/** Alias for the "eternalHearts" command. */
|
|
576
|
-
export function eh(params: string): void {
|
|
577
|
-
eternalHearts(params);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
571
|
/** Alias for the "iAmError" command. */
|
|
581
572
|
export function errorRoom(): void {
|
|
582
573
|
iAmErrorRoom();
|
|
@@ -1050,6 +1041,11 @@ export function redHearts(params: string): void {
|
|
|
1050
1041
|
hearts(params);
|
|
1051
1042
|
}
|
|
1052
1043
|
|
|
1044
|
+
/** Starts a room transition to the same room that you are already in. */
|
|
1045
|
+
export function reloadRoom(): void {
|
|
1046
|
+
reloadRoomFunction();
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1053
1049
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
1054
1050
|
export function right(params: string): void {
|
|
1055
1051
|
movePlayer(params, Direction.RIGHT);
|
|
@@ -22,8 +22,8 @@ import { SAVE_DATA_MANAGER_FEATURE_NAME } from "./saveDataManagerConstants";
|
|
|
22
22
|
* 1. automatic resetting of variables on a new run, on a new level, or on a new room (as desired)
|
|
23
23
|
* 2. automatic saving and loading of all tracked data to the "save#.dat" file
|
|
24
24
|
*
|
|
25
|
-
* You feed this function with an
|
|
26
|
-
*
|
|
25
|
+
* You feed this function with an object containing your variables, and then it will automatically
|
|
26
|
+
* manage them for you. (See below for an example.)
|
|
27
27
|
*
|
|
28
28
|
* The save data manager is meant to be called once for each feature of your mod. In other words,
|
|
29
29
|
* you should not put all of the data for your mod on the same object. Instead, scope your variables
|
|
@@ -494,6 +494,11 @@ export function newCollectibleSprite(collectibleType: CollectibleType): Sprite {
|
|
|
494
494
|
*
|
|
495
495
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
496
496
|
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
497
|
+
*
|
|
498
|
+
* This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
499
|
+
* this function is not necessary when removing items from players. For example, when you remove a
|
|
500
|
+
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
501
|
+
* the item tracker will automatically remove it.
|
|
497
502
|
*/
|
|
498
503
|
export function removeCollectibleFromItemTracker(
|
|
499
504
|
collectibleType: CollectibleType,
|
package/src/functions/npcs.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ChargerVariant,
|
|
6
6
|
DarkEsauVariant,
|
|
7
7
|
DeathVariant,
|
|
8
|
+
DumpVariant,
|
|
8
9
|
EntityType,
|
|
9
10
|
HopperVariant,
|
|
10
11
|
MamaGurdyVariant,
|
|
@@ -101,6 +102,11 @@ export function isAliveExceptionNPC(npc: EntityNPC): boolean {
|
|
|
101
102
|
return true;
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
// EntityType.DUMP (876)
|
|
106
|
+
if (isDyingDump(npc)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
return false;
|
|
105
111
|
}
|
|
106
112
|
|
|
@@ -118,6 +124,19 @@ export function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean {
|
|
|
118
124
|
);
|
|
119
125
|
}
|
|
120
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Helper function to detect the custom death state of a Dump. When Dumps die, they go to
|
|
129
|
+
* `NpcState.SPECIAL`, spit out their head, and then slowly fade away while shooting a burst of
|
|
130
|
+
* tears.
|
|
131
|
+
*/
|
|
132
|
+
export function isDyingDump(npc: EntityNPC): boolean {
|
|
133
|
+
return (
|
|
134
|
+
npc.Type === EntityType.DUMP &&
|
|
135
|
+
npc.Variant === asNumber(DumpVariant.DUMP) &&
|
|
136
|
+
npc.State === NpcState.SPECIAL
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
121
140
|
/**
|
|
122
141
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
123
142
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|