isaacscript-common 9.8.4 → 9.11.0
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/extraConsoleCommands/listCommands.d.ts +2 -0
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +6 -0
- package/dist/functions/entities.d.ts +6 -0
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +11 -0
- package/dist/functions/logEntities.d.ts +10 -0
- package/dist/functions/logEntities.d.ts.map +1 -1
- package/dist/functions/logEntities.lua +19 -0
- package/dist/functions/minimap.d.ts +3 -0
- package/dist/functions/minimap.d.ts.map +1 -1
- package/dist/functions/minimap.lua +3 -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 +29 -0
- package/dist/maps/cardMap.lua +2 -2
- package/package.json +1 -1
- package/src/features/extraConsoleCommands/listCommands.ts +6 -0
- package/src/functions/entities.ts +10 -0
- package/src/functions/logEntities.ts +25 -1
- package/src/functions/minimap.ts +3 -0
- package/src/functions/npcs.ts +19 -0
- package/src/maps/cardMap.ts +2 -2
|
@@ -281,6 +281,8 @@ export declare function poopMana(params: string): void;
|
|
|
281
281
|
export declare function position(): void;
|
|
282
282
|
/** Alias for the "hearts" command. */
|
|
283
283
|
export declare function redHearts(params: string): void;
|
|
284
|
+
/** Starts a room transition to the same room that you are already in. */
|
|
285
|
+
export declare function reloadRoom(): void;
|
|
284
286
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
285
287
|
export declare function right(params: string): void;
|
|
286
288
|
/** 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,2CAA2C;AAC3C,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wCAAwC;AACxC,wBAAgB,IAAI,IAAI,IAAI,CAE3B;AAED,kEAAkE;AAClE,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,4CAA4C;AAC5C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjD;AAED;;;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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
|
|
@@ -896,6 +898,10 @@ end
|
|
|
896
898
|
function ____exports.redHearts(self, params)
|
|
897
899
|
____exports.hearts(nil, params)
|
|
898
900
|
end
|
|
901
|
+
--- Starts a room transition to the same room that you are already in.
|
|
902
|
+
function ____exports.reloadRoom(self)
|
|
903
|
+
reloadRoomFunction(nil)
|
|
904
|
+
end
|
|
899
905
|
--- Moves the player 0.5 units right. Provide a number to move a custom amount of units.
|
|
900
906
|
function ____exports.right(self, params)
|
|
901
907
|
movePlayer(nil, params, Direction.RIGHT)
|
|
@@ -71,6 +71,12 @@ export declare function getEntities(entityType?: EntityType, variant?: number, s
|
|
|
71
71
|
* as comparing other types is non-trivial.
|
|
72
72
|
*/
|
|
73
73
|
export declare function getEntityFields(entity: Entity): LuaMap<string, boolean | number | string>;
|
|
74
|
+
/**
|
|
75
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
76
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
77
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
|
|
74
80
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
75
81
|
export declare function getEntityID(entity: Entity): string;
|
|
76
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/functions/entities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO/C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,GAAG,CAcL;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,OAAO,CAGT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EACpD,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,CAAC,EAAE,GACZ,CAAC,GAAG,SAAS,CAaf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CACzB,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,MAAM,EAAE,CAMV;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG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;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,UAAU,EACtB,aAAa,SAAK,EAClB,aAAa,SAAK,EAClB,GAAG,GAAE,GAAG,GAAG,SAAqB,GAC/B,MAAM,EAAE,CAGV;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAChD,QAAQ,EAAE,CAAC,EAAE,EACb,GAAG,CAAC,EAAE,GAAG,GACR,CAAC,EAAE,CAgBL;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgB9D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASzD;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CACnB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,GAC5C,MAAM,CAsCR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,MAAM,CAUR"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
2
3
|
local Set = ____lualib.Set
|
|
3
4
|
local __TS__New = ____lualib.__TS__New
|
|
4
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
@@ -208,6 +209,16 @@ function ____exports.getEntityFields(self, entity)
|
|
|
208
209
|
setPrimitiveEntityFields(nil, entity, parentTable, entityFields)
|
|
209
210
|
return entityFields
|
|
210
211
|
end
|
|
212
|
+
--- Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
213
|
+
-- should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
214
|
+
-- reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
215
|
+
function ____exports.getEntityFromPtrHash(self, ptrHash)
|
|
216
|
+
local entities = ____exports.getEntities(nil)
|
|
217
|
+
return __TS__ArrayFind(
|
|
218
|
+
entities,
|
|
219
|
+
function(____, entity) return GetPtrHash(entity) == ptrHash end
|
|
220
|
+
)
|
|
221
|
+
end
|
|
211
222
|
--- Helper function to return a string containing the entity's type, variant, and sub-type.
|
|
212
223
|
function ____exports.getEntityID(self, entity)
|
|
213
224
|
return (((tostring(entity.Type) .. ".") .. tostring(entity.Variant)) .. ".") .. tostring(entity.SubType)
|
|
@@ -13,4 +13,14 @@ export declare function logEntity(this: void, entity: Entity): void;
|
|
|
13
13
|
export declare function logGridEntities(this: void, gridEntities: GridEntity[]): void;
|
|
14
14
|
/** Helper function for log information about a specific grid entity. */
|
|
15
15
|
export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
18
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
19
|
+
*/
|
|
20
|
+
export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
|
|
21
|
+
/**
|
|
22
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
23
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
24
|
+
*/
|
|
25
|
+
export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
|
|
16
26
|
//# sourceMappingURL=logEntities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logEntities.d.ts","sourceRoot":"","sources":["../../src/functions/logEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACf,MAAM,8BAA8B,CAAC;AAiBtC,8FAA8F;AAC9F,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,wBAAwB,EAAE,OAAO,EACjC,gBAAgB,CAAC,EAAE,UAAU,GAC5B,IAAI,CAuCN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,EACrB,oBAAoB,CAAC,EAAE,cAAc,GACpC,IAAI,CA6CN;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAIhE;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG1D;AA2ED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAI5E;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAGtE"}
|
|
1
|
+
{"version":3,"file":"logEntities.d.ts","sourceRoot":"","sources":["../../src/functions/logEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACf,MAAM,8BAA8B,CAAC;AAiBtC,8FAA8F;AAC9F,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,wBAAwB,EAAE,OAAO,EACjC,gBAAgB,CAAC,EAAE,UAAU,GAC5B,IAAI,CAuCN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,EACrB,oBAAoB,CAAC,EAAE,cAAc,GACpC,IAAI,CA6CN;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAIhE;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG1D;AA2ED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAI5E;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAGtE;AA2DD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAQ7D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,CAInE"}
|
|
@@ -9,6 +9,7 @@ local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
|
9
9
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
10
10
|
local ____entities = require("functions.entities")
|
|
11
11
|
local getEntities = ____entities.getEntities
|
|
12
|
+
local getEntityFromPtrHash = ____entities.getEntityFromPtrHash
|
|
12
13
|
local getEntityID = ____entities.getEntityID
|
|
13
14
|
local ____gridEntities = require("functions.gridEntities")
|
|
14
15
|
local getGridEntities = ____gridEntities.getGridEntities
|
|
@@ -217,4 +218,22 @@ function ____exports.logGridEntities(gridEntities)
|
|
|
217
218
|
____exports.logGridEntity(gridEntity)
|
|
218
219
|
end
|
|
219
220
|
end
|
|
221
|
+
--- Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
222
|
+
-- use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
223
|
+
function ____exports.logPtrHash(ptrHash)
|
|
224
|
+
log("PtrHash: " .. tostring(ptrHash))
|
|
225
|
+
local entity = getEntityFromPtrHash(nil, ptrHash)
|
|
226
|
+
if entity == nil then
|
|
227
|
+
log("No corresponding entity found.")
|
|
228
|
+
else
|
|
229
|
+
____exports.logEntity(entity)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
--- Helper function to log information about the entity that corresponding to one or more pointer
|
|
233
|
+
-- hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
234
|
+
function ____exports.logPtrHashes(ptrHashes)
|
|
235
|
+
for ____, ptrHash in ipairs(ptrHashes) do
|
|
236
|
+
____exports.logPtrHash(ptrHash)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
220
239
|
return ____exports
|
|
@@ -33,6 +33,9 @@ export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<
|
|
|
33
33
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
34
34
|
* visible and so on).
|
|
35
35
|
*
|
|
36
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
37
|
+
* take effect.
|
|
38
|
+
*
|
|
36
39
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
37
40
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
38
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAK5E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAgBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED
|
|
1
|
+
{"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAK5E;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAGvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAgBN;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAEN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,GAClC,IAAI,CAGN"}
|
|
@@ -14,6 +14,9 @@ local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
|
14
14
|
--- Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
15
15
|
-- visible and so on).
|
|
16
16
|
--
|
|
17
|
+
-- You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
18
|
+
-- take effect.
|
|
19
|
+
--
|
|
17
20
|
-- @param roomGridIndex Set to undefined to use the current room index.
|
|
18
21
|
-- @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
19
22
|
function ____exports.setRoomDisplayFlags(self, roomGridIndex, displayFlags)
|
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
|
@@ -2983,6 +2983,13 @@ export declare function getEntities(entityType?: EntityType, variant?: number, s
|
|
|
2983
2983
|
*/
|
|
2984
2984
|
export declare function getEntityFields(entity: Entity): LuaMap<string, boolean | number | string>;
|
|
2985
2985
|
|
|
2986
|
+
/**
|
|
2987
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
2988
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
2989
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
2990
|
+
*/
|
|
2991
|
+
export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
|
|
2992
|
+
|
|
2986
2993
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
2987
2994
|
export declare function getEntityID(entity: Entity): string;
|
|
2988
2995
|
|
|
@@ -5778,6 +5785,13 @@ export declare function isDoorToMines(door: GridEntityDoor): boolean;
|
|
|
5778
5785
|
*/
|
|
5779
5786
|
export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
|
|
5780
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
|
+
|
|
5781
5795
|
/**
|
|
5782
5796
|
* Helper function to detect the custom death state of an Eggy. Eggies are never actually marked
|
|
5783
5797
|
* dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
@@ -6588,6 +6602,18 @@ export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
|
6588
6602
|
*/
|
|
6589
6603
|
export declare function logProjectileFlags(this: void, flags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
6590
6604
|
|
|
6605
|
+
/**
|
|
6606
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
6607
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
6608
|
+
*/
|
|
6609
|
+
export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
|
|
6610
|
+
|
|
6611
|
+
/**
|
|
6612
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
6613
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
6614
|
+
*/
|
|
6615
|
+
export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
|
|
6616
|
+
|
|
6591
6617
|
/** Helper function for logging information about the current room. */
|
|
6592
6618
|
export declare function logRoom(this: void): void;
|
|
6593
6619
|
|
|
@@ -10630,6 +10656,9 @@ export declare function setRoomData(roomGridIndex: int, roomData: Readonly<RoomC
|
|
|
10630
10656
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
10631
10657
|
* visible and so on).
|
|
10632
10658
|
*
|
|
10659
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
10660
|
+
* take effect.
|
|
10661
|
+
*
|
|
10633
10662
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
10634
10663
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
10635
10664
|
*/
|
package/dist/maps/cardMap.lua
CHANGED
|
@@ -73,8 +73,8 @@ ____exports.CARD_MAP = __TS__New(Map, {
|
|
|
73
73
|
{"algiz", CardType.RUNE_ALGIZ},
|
|
74
74
|
{"resistance", CardType.RUNE_ALGIZ},
|
|
75
75
|
{"shield", CardType.RUNE_ALGIZ},
|
|
76
|
-
{"
|
|
77
|
-
{"
|
|
76
|
+
{"blankRune", CardType.RUNE_BLANK},
|
|
77
|
+
{"blackRune", CardType.RUNE_BLACK},
|
|
78
78
|
{"chaos", CardType.CHAOS},
|
|
79
79
|
{"credit", CardType.CREDIT},
|
|
80
80
|
{"rules", CardType.RULES},
|
package/package.json
CHANGED
|
@@ -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";
|
|
@@ -1050,6 +1051,11 @@ export function redHearts(params: string): void {
|
|
|
1050
1051
|
hearts(params);
|
|
1051
1052
|
}
|
|
1052
1053
|
|
|
1054
|
+
/** Starts a room transition to the same room that you are already in. */
|
|
1055
|
+
export function reloadRoom(): void {
|
|
1056
|
+
reloadRoomFunction();
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1053
1059
|
/** Moves the player 0.5 units right. Provide a number to move a custom amount of units. */
|
|
1054
1060
|
export function right(params: string): void {
|
|
1055
1061
|
movePlayer(params, Direction.RIGHT);
|
|
@@ -194,6 +194,16 @@ function setPrimitiveEntityFields(
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Helper function to get an entity from a `PtrHash`. Note that doing this is very expensive, so you
|
|
199
|
+
* should only use this function when debugging. (Normally, if you need to work backwards from a
|
|
200
|
+
* reference, you would use an `EntityPtr` instead of a `PtrHash`.
|
|
201
|
+
*/
|
|
202
|
+
export function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined {
|
|
203
|
+
const entities = getEntities();
|
|
204
|
+
return entities.find((entity) => GetPtrHash(entity) === ptrHash);
|
|
205
|
+
}
|
|
206
|
+
|
|
197
207
|
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
198
208
|
export function getEntityID(entity: Entity): string {
|
|
199
209
|
return `${entity.Type}.${entity.Variant}.${entity.SubType}`;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EntityType,
|
|
4
4
|
GridEntityType,
|
|
5
5
|
} from "isaac-typescript-definitions";
|
|
6
|
-
import { getEntities, getEntityID } from "./entities";
|
|
6
|
+
import { getEntities, getEntityFromPtrHash, getEntityID } from "./entities";
|
|
7
7
|
import { getGridEntities, getGridEntityID } from "./gridEntities";
|
|
8
8
|
import { log } from "./log";
|
|
9
9
|
|
|
@@ -274,3 +274,27 @@ function getGridEntityLogLine(gridEntity: GridEntity, num?: int): string {
|
|
|
274
274
|
|
|
275
275
|
return msg;
|
|
276
276
|
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
280
|
+
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
281
|
+
*/
|
|
282
|
+
export function logPtrHash(this: void, ptrHash: PtrHash): void {
|
|
283
|
+
log(`PtrHash: ${ptrHash}`);
|
|
284
|
+
const entity = getEntityFromPtrHash(ptrHash);
|
|
285
|
+
if (entity === undefined) {
|
|
286
|
+
log("No corresponding entity found.");
|
|
287
|
+
} else {
|
|
288
|
+
logEntity(entity);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
294
|
+
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
295
|
+
*/
|
|
296
|
+
export function logPtrHashes(this: void, ptrHashes: PtrHash[]): void {
|
|
297
|
+
for (const ptrHash of ptrHashes) {
|
|
298
|
+
logPtrHash(ptrHash);
|
|
299
|
+
}
|
|
300
|
+
}
|
package/src/functions/minimap.ts
CHANGED
|
@@ -90,6 +90,9 @@ export function setFloorDisplayFlags(
|
|
|
90
90
|
* Helper function to set a particular room's minimap display flags (e.g. whether or not it is
|
|
91
91
|
* visible and so on).
|
|
92
92
|
*
|
|
93
|
+
* You must call the `Level.UpdateVisibility` method after using this function for the changes to
|
|
94
|
+
* take effect.
|
|
95
|
+
*
|
|
93
96
|
* @param roomGridIndex Set to undefined to use the current room index.
|
|
94
97
|
* @param displayFlags The bit flags value to set. (See the `DisplayFlag` enum.)
|
|
95
98
|
*/
|
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
|
package/src/maps/cardMap.ts
CHANGED
|
@@ -71,8 +71,8 @@ export const CARD_MAP: ReadonlyMap<string, CardType> = new Map([
|
|
|
71
71
|
["algiz", CardType.RUNE_ALGIZ], // 39
|
|
72
72
|
["resistance", CardType.RUNE_ALGIZ], // 39
|
|
73
73
|
["shield", CardType.RUNE_ALGIZ], // 39
|
|
74
|
-
["
|
|
75
|
-
["
|
|
74
|
+
["blankRune", CardType.RUNE_BLANK], // 40
|
|
75
|
+
["blackRune", CardType.RUNE_BLACK], // 41
|
|
76
76
|
["chaos", CardType.CHAOS], // 42
|
|
77
77
|
["credit", CardType.CREDIT], // 43
|
|
78
78
|
["rules", CardType.RULES], // 44
|