isaacscript-common 6.11.0 → 6.12.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/callbacks/postFlip.lua +2 -2
- package/dist/callbacks/postGridEntityCustomRender.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomRender.lua +36 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomUpdate.lua +36 -0
- package/dist/callbacks/postNewRoomEarly.lua +2 -2
- package/dist/callbacks/postPickupInitFirst.lua +1 -20
- package/dist/callbacks/postPlayerFatalDamage.lua +1 -1
- package/dist/callbacks/postPlayerInitFirst.d.ts +2 -0
- package/dist/callbacks/postPlayerInitFirst.d.ts.map +1 -0
- package/dist/callbacks/postPlayerInitFirst.lua +42 -0
- package/dist/callbacks/postPlayerInitLate.lua +5 -5
- package/dist/callbacks/postPlayerReorderedCallbacks.d.ts +2 -0
- package/dist/callbacks/postPlayerReorderedCallbacks.d.ts.map +1 -0
- package/dist/callbacks/{postPlayerReordered.lua → postPlayerReorderedCallbacks.lua} +11 -37
- package/dist/callbacks/reorderedCallbacks.d.ts +5 -5
- package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -1
- package/dist/callbacks/reorderedCallbacks.lua +5 -5
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +1 -1
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -2
- package/dist/callbacks/subscriptions/postFlip.d.ts +1 -1
- package/dist/callbacks/subscriptions/postFlip.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postFlip.lua +2 -2
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.lua +29 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.lua +29 -0
- package/dist/callbacks/subscriptions/{postPlayerInitReordered.d.ts → postPlayerInitFirst.d.ts} +2 -2
- package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/{postPlayerInitReordered.lua → postPlayerInitFirst.lua} +3 -3
- package/dist/constants.d.ts +1 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.lua +0 -7
- package/dist/constantsFirstLast.d.ts +5 -1
- package/dist/constantsFirstLast.d.ts.map +1 -1
- package/dist/constantsFirstLast.lua +6 -0
- package/dist/enums/ModCallbackCustom.d.ts +106 -81
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +63 -59
- package/dist/enums/private/StageTravelState.d.ts +9 -0
- package/dist/enums/private/StageTravelState.d.ts.map +1 -0
- package/dist/enums/private/StageTravelState.lua +15 -0
- package/dist/enums/private/TrapdoorAnimation.d.ts +6 -0
- package/dist/enums/private/TrapdoorAnimation.d.ts.map +1 -0
- package/dist/enums/private/TrapdoorAnimation.lua +6 -0
- package/dist/features/customGridEntity.d.ts +17 -5
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +86 -17
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +0 -13
- package/dist/features/customStage/init.d.ts.map +1 -1
- package/dist/features/customStage/init.lua +24 -2
- package/dist/features/customStage/streakText.d.ts +6 -0
- package/dist/features/customStage/streakText.d.ts.map +1 -1
- package/dist/features/customStage/streakText.lua +16 -12
- package/dist/features/customStage/versusScreen.d.ts +6 -0
- package/dist/features/customStage/versusScreen.d.ts.map +1 -1
- package/dist/features/customStage/versusScreen.lua +10 -5
- package/dist/features/customTrapdoor/blackSprite.d.ts +2 -0
- package/dist/features/customTrapdoor/blackSprite.d.ts.map +1 -0
- package/dist/features/customTrapdoor/blackSprite.lua +19 -0
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +15 -0
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -0
- package/dist/features/customTrapdoor/customTrapdoorConstants.lua +16 -0
- package/dist/features/customTrapdoor/exports.d.ts +29 -0
- package/dist/features/customTrapdoor/exports.d.ts.map +1 -0
- package/dist/features/customTrapdoor/exports.lua +93 -0
- package/dist/features/customTrapdoor/init.d.ts +3 -0
- package/dist/features/customTrapdoor/init.d.ts.map +1 -0
- package/dist/features/customTrapdoor/init.lua +174 -0
- package/dist/features/customTrapdoor/openClose.d.ts +5 -0
- package/dist/features/customTrapdoor/openClose.d.ts.map +1 -0
- package/dist/features/customTrapdoor/openClose.lua +60 -0
- package/dist/features/customTrapdoor/touched.d.ts +4 -0
- package/dist/features/customTrapdoor/touched.d.ts.map +1 -0
- package/dist/features/customTrapdoor/touched.lua +159 -0
- package/dist/features/customTrapdoor/v.d.ts +18 -0
- package/dist/features/customTrapdoor/v.d.ts.map +1 -0
- package/dist/features/customTrapdoor/v.lua +17 -0
- package/dist/features/deployJSONRoom.d.ts +2 -2
- package/dist/features/deployJSONRoom.d.ts.map +1 -1
- package/dist/features/deployJSONRoom.lua +3 -3
- package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/init.lua +3 -1
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +6 -6
- package/dist/features/pause.d.ts +1 -1
- package/dist/features/pause.d.ts.map +1 -1
- package/dist/features/pause.lua +87 -8
- package/dist/features/persistentEntities.d.ts.map +1 -1
- package/dist/features/persistentEntities.lua +7 -7
- package/dist/features/pickupIndex.d.ts +19 -0
- package/dist/features/pickupIndex.d.ts.map +1 -0
- package/dist/features/pickupIndex.lua +197 -0
- package/dist/features/roomHistory.d.ts +24 -0
- package/dist/features/roomHistory.d.ts.map +1 -0
- package/dist/features/roomHistory.lua +89 -0
- package/dist/features/taintedLazarusPlayers.d.ts.map +1 -1
- package/dist/features/taintedLazarusPlayers.lua +13 -21
- package/dist/functions/{character.d.ts → characters.d.ts} +3 -1
- package/dist/functions/characters.d.ts.map +1 -0
- package/dist/functions/{character.lua → characters.lua} +12 -0
- package/dist/functions/collectibles.d.ts +26 -13
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +26 -13
- package/dist/functions/entities.d.ts +3 -3
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +8 -3
- package/dist/functions/gridEntities.d.ts +2 -2
- package/dist/functions/gridEntities.lua +2 -2
- package/dist/functions/isaacAPIClass.d.ts +64 -0
- package/dist/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/functions/isaacAPIClass.lua +84 -1
- package/dist/functions/log.lua +3 -3
- package/dist/functions/pickupVariants.d.ts +2 -2
- package/dist/functions/pickupVariants.d.ts.map +1 -1
- package/dist/functions/pickupVariants.lua +2 -2
- package/dist/functions/playerCenter.lua +2 -2
- package/dist/functions/playerIndex.d.ts +11 -5
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +19 -26
- package/dist/functions/players.lua +4 -4
- package/dist/functions/revive.lua +2 -2
- package/dist/functions/roomData.d.ts +3 -2
- package/dist/functions/roomData.d.ts.map +1 -1
- package/dist/functions/roomData.lua +3 -2
- package/dist/functions/rooms.d.ts +6 -6
- package/dist/functions/rooms.lua +6 -6
- package/dist/functions/stage.d.ts +1 -0
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +4 -0
- package/dist/functions/table.d.ts +1 -1
- package/dist/functions/table.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +33 -2
- package/dist/initCustomCallbacks.d.ts.map +1 -1
- package/dist/initCustomCallbacks.lua +11 -2
- package/dist/initFeatures.d.ts +1 -2
- package/dist/initFeatures.d.ts.map +1 -1
- package/dist/initFeatures.lua +16 -2
- package/dist/interfaces/AddCallbackParameterCustom.d.ts +6 -2
- package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
- package/dist/interfaces/CustomGridEntityData.d.ts +6 -2
- package/dist/interfaces/CustomGridEntityData.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +14 -0
- package/dist/interfaces/RoomDescription.d.ts.map +1 -0
- package/dist/interfaces/RoomDescription.lua +2 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +7 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.lua +2 -0
- package/dist/lib/jsonLua.lua +2 -0
- package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +9 -3
- package/dist/objects/characterDamageMultipliers.d.ts +6 -0
- package/dist/objects/characterDamageMultipliers.d.ts.map +1 -0
- package/dist/objects/characterDamageMultipliers.lua +49 -0
- package/dist/types/CollectibleIndex.d.ts +1 -1
- package/dist/types/PickupIndex.d.ts +17 -0
- package/dist/types/PickupIndex.d.ts.map +1 -0
- package/dist/types/PickupIndex.lua +2 -0
- package/dist/types/PlayerIndex.d.ts +1 -1
- package/dist/upgradeMod.lua +2 -4
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +3 -3
- package/src/callbacks/itemPickup.ts +3 -3
- package/src/callbacks/postAmbush.ts +3 -3
- package/src/callbacks/postEsauJr.ts +3 -3
- package/src/callbacks/postFlip.ts +6 -5
- package/src/callbacks/postGridEntity.ts +5 -5
- package/src/callbacks/postGridEntityCustomRender.ts +44 -0
- package/src/callbacks/postGridEntityCustomUpdate.ts +44 -0
- package/src/callbacks/postNewRoomEarly.ts +2 -2
- package/src/callbacks/postPickupInitFirst.ts +1 -32
- package/src/callbacks/postPlayerCollectible.ts +2 -2
- package/src/callbacks/postPlayerFatalDamage.ts +5 -0
- package/src/callbacks/postPlayerInitFirst.ts +57 -0
- package/src/callbacks/postPlayerInitLate.ts +9 -5
- package/src/callbacks/{postPlayerReordered.ts → postPlayerReorderedCallbacks.ts} +12 -32
- package/src/callbacks/postSlotInitUpdate.ts +5 -2
- package/src/callbacks/postSlotRender.ts +2 -2
- package/src/callbacks/reorderedCallbacks.ts +10 -9
- package/src/callbacks/subscriptions/postFirstFlip.ts +6 -3
- package/src/callbacks/subscriptions/postFlip.ts +6 -3
- package/src/callbacks/subscriptions/postGridEntityCustomRender.ts +41 -0
- package/src/callbacks/subscriptions/postGridEntityCustomUpdate.ts +41 -0
- package/src/callbacks/subscriptions/{postPlayerInitReordered.ts → postPlayerInitFirst.ts} +6 -6
- package/src/constants.ts +1 -9
- package/src/constantsFirstLast.ts +16 -0
- package/src/enums/ModCallbackCustom.ts +52 -25
- package/src/enums/private/StageTravelState.ts +8 -0
- package/src/enums/private/TrapdoorAnimation.ts +5 -0
- package/src/features/customGridEntity.ts +118 -12
- package/src/features/customStage/exports.ts +3 -22
- package/src/features/customStage/init.ts +30 -1
- package/src/features/customStage/streakText.ts +13 -5
- package/src/features/customStage/versusScreen.ts +20 -12
- package/src/features/customTrapdoor/blackSprite.ts +16 -0
- package/src/features/customTrapdoor/customTrapdoorConstants.ts +23 -0
- package/src/features/customTrapdoor/exports.ts +99 -0
- package/src/features/customTrapdoor/init.ts +217 -0
- package/src/features/customTrapdoor/openClose.ts +103 -0
- package/src/features/customTrapdoor/touched.ts +195 -0
- package/src/features/customTrapdoor/v.ts +26 -0
- package/src/features/deployJSONRoom.ts +10 -5
- package/src/features/extraConsoleCommands/init.ts +5 -2
- package/src/features/extraConsoleCommands/listCommands.ts +6 -8
- package/src/features/pause.ts +97 -7
- package/src/features/persistentEntities.ts +9 -8
- package/src/features/pickupIndex.ts +257 -0
- package/src/features/playerInventory.ts +2 -2
- package/src/features/roomHistory.ts +113 -0
- package/src/features/saveDataManager/main.ts +3 -3
- package/src/features/taintedLazarusPlayers.ts +37 -36
- package/src/functions/{character.ts → characters.ts} +13 -0
- package/src/functions/collectibles.ts +26 -13
- package/src/functions/deepCopy.ts +2 -2
- package/src/functions/entities.ts +7 -4
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/isaacAPIClass.ts +106 -1
- package/src/functions/pickupVariants.ts +2 -2
- package/src/functions/playerCenter.ts +2 -2
- package/src/functions/playerIndex.ts +26 -23
- package/src/functions/players.ts +1 -1
- package/src/functions/revive.ts +1 -1
- package/src/functions/rng.ts +1 -1
- package/src/functions/roomData.ts +3 -2
- package/src/functions/rooms.ts +6 -6
- package/src/functions/stage.ts +10 -1
- package/src/functions/table.ts +2 -2
- package/src/index.ts +9 -2
- package/src/initCustomCallbacks.ts +7 -1
- package/src/initFeatures.ts +13 -2
- package/src/interfaces/AddCallbackParameterCustom.ts +6 -2
- package/src/interfaces/CustomGridEntityData.ts +7 -2
- package/src/interfaces/RoomDescription.ts +19 -0
- package/src/interfaces/private/CustomTrapdoorDescription.ts +7 -0
- package/src/lib/jsonLua.lua +2 -0
- package/src/objects/callbackRegisterFunctions.ts +8 -3
- package/src/objects/characterDamageMultipliers.ts +49 -0
- package/src/types/CollectibleIndex.ts +1 -1
- package/src/types/PickupIndex.ts +15 -0
- package/src/types/PlayerIndex.ts +1 -1
- package/src/upgradeMod.ts +4 -4
- package/dist/callbacks/postPlayerReordered.d.ts +0 -2
- package/dist/callbacks/postPlayerReordered.d.ts.map +0 -1
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts.map +0 -1
- package/dist/functions/character.d.ts.map +0 -1
|
@@ -17,8 +17,8 @@ export declare function getAllGridIndexes(): int[];
|
|
|
17
17
|
* Gets the entities that have a hitbox that overlaps with any part of the square that the grid
|
|
18
18
|
* entity is on.
|
|
19
19
|
*
|
|
20
|
-
* Note that this function will not work properly in the
|
|
21
|
-
* have collision yet in that callback.
|
|
20
|
+
* Note that this function will not work properly in the `POST_NEW_ROOM` callback, since entities do
|
|
21
|
+
* not have collision yet in that callback.
|
|
22
22
|
*/
|
|
23
23
|
export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntity): Entity[];
|
|
24
24
|
/**
|
|
@@ -200,8 +200,8 @@ end
|
|
|
200
200
|
--- Gets the entities that have a hitbox that overlaps with any part of the square that the grid
|
|
201
201
|
-- entity is on.
|
|
202
202
|
--
|
|
203
|
-
-- Note that this function will not work properly in the
|
|
204
|
-
-- have collision yet in that callback.
|
|
203
|
+
-- Note that this function will not work properly in the `POST_NEW_ROOM` callback, since entities do
|
|
204
|
+
-- not have collision yet in that callback.
|
|
205
205
|
function ____exports.getCollidingEntitiesWithGridEntity(self, gridEntity)
|
|
206
206
|
local gridEntityCollisionTopLeft = Vector(gridEntity.Position.X - DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y - DISTANCE_OF_GRID_TILE / 2)
|
|
207
207
|
local gridEntityCollisionBottomRight = Vector(gridEntity.Position.X + DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y + DISTANCE_OF_GRID_TILE / 2)
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
5
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
6
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
7
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
8
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
9
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
10
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
11
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
12
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
13
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
14
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
15
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
16
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
17
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
18
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
19
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
1
20
|
import { IsaacAPIClass } from "../types/private/IsaacAPIClass";
|
|
2
21
|
/**
|
|
3
22
|
* Helper function to get the name of a class from the Isaac API. This is contained within the
|
|
@@ -7,8 +26,27 @@ import { IsaacAPIClass } from "../types/private/IsaacAPIClass";
|
|
|
7
26
|
*
|
|
8
27
|
* Returns undefined if the object is not of type `userdata` or if the "__type" metatable key does
|
|
9
28
|
* not exist.
|
|
29
|
+
*
|
|
30
|
+
* In some cases, Isaac classes can be a read-only. If this is the case, the "__type" field will be
|
|
31
|
+
* prepended with "const ". This function will always strip this prefix, if it exists. For example,
|
|
32
|
+
* the class name returned for "const Vector" will be "Vector".
|
|
10
33
|
*/
|
|
11
34
|
export declare function getIsaacAPIClassName(object: unknown): string | undefined;
|
|
35
|
+
/** Helper function to detect if a variable is of type `EntityBomb`. */
|
|
36
|
+
export declare function isBomb(variable: unknown): variable is EntityBomb;
|
|
37
|
+
/** Helper function to detect if a variable is of type `GridEntityDoor`. */
|
|
38
|
+
export declare function isDoor(variable: unknown): variable is GridEntityDoor;
|
|
39
|
+
/** Helper function to detect if a variable is of type `EntityEffect`. */
|
|
40
|
+
export declare function isEffect(variable: unknown): variable is EntityEffect;
|
|
41
|
+
/**
|
|
42
|
+
* Helper function to detect if a variable is of type `Entity`. This will return false for child
|
|
43
|
+
* classes such as `EntityPlayer` or `EntityTear`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isEntity(variable: unknown): variable is Entity;
|
|
46
|
+
/** Helper function to detect if a variable is of type `EntityEffect`. */
|
|
47
|
+
export declare function isFamiliar(variable: unknown): variable is EntityFamiliar;
|
|
48
|
+
/** Helper function to detect if a variable is of type `GridEntity`. */
|
|
49
|
+
export declare function isGridEntity(variable: unknown): variable is GridEntity;
|
|
12
50
|
/**
|
|
13
51
|
* Helper function to check if something is an instantiated class from the Isaac API. (All classes
|
|
14
52
|
* from the Isaac API have a type of "userdata" in Lua with a metatable key of "__type" equal to the
|
|
@@ -16,6 +54,32 @@ export declare function getIsaacAPIClassName(object: unknown): string | undefine
|
|
|
16
54
|
*/
|
|
17
55
|
export declare function isIsaacAPIClass(object: unknown): object is IsaacAPIClass;
|
|
18
56
|
export declare function isIsaacAPIClassOfType(object: unknown, classType: string): boolean;
|
|
57
|
+
/** Helper function to detect if a variable is of type `EntityKnife`. */
|
|
58
|
+
export declare function isKnife(variable: unknown): variable is EntityKnife;
|
|
59
|
+
/** Helper function to detect if a variable is of type `EntityLaser`. */
|
|
60
|
+
export declare function isLaser(variable: unknown): variable is EntityLaser;
|
|
61
|
+
/** Helper function to detect if a variable is of type `EntityNPC`. */
|
|
62
|
+
export declare function isNPC(variable: unknown): variable is EntityNPC;
|
|
63
|
+
/** Helper function to detect if a variable is of type `EntityPickup`. */
|
|
64
|
+
export declare function isPickup(variable: unknown): variable is EntityPickup;
|
|
65
|
+
/** Helper function to detect if a variable is of type `GridEntityPit`. */
|
|
66
|
+
export declare function isPit(variable: unknown): variable is GridEntityPit;
|
|
67
|
+
/** Helper function to detect if a variable is of type `EntityPlayer`. */
|
|
68
|
+
export declare function isPlayer(variable: unknown): variable is EntityPlayer;
|
|
69
|
+
/** Helper function to detect if a variable is of type `GridEntityPoop`. */
|
|
70
|
+
export declare function isPoop(variable: unknown): variable is GridEntityPoop;
|
|
71
|
+
/** Helper function to detect if a variable is of type `GridEntityPressurePlate`. */
|
|
72
|
+
export declare function isPressurePlate(variable: unknown): variable is GridEntityPressurePlate;
|
|
73
|
+
/** Helper function to detect if a variable is of type `EntityProjectile`. */
|
|
74
|
+
export declare function isProjectile(variable: unknown): variable is EntityProjectile;
|
|
75
|
+
/** Helper function to detect if a variable is of type `GridEntityRock`. */
|
|
76
|
+
export declare function isRock(variable: unknown): variable is GridEntityRock;
|
|
77
|
+
/** Helper function to detect if a variable is of type `GridEntitySpikes`. */
|
|
78
|
+
export declare function isSpikes(variable: unknown): variable is GridEntitySpikes;
|
|
79
|
+
/** Helper function to detect if a variable is of type `GridEntityTNT`. */
|
|
80
|
+
export declare function isTNT(variable: unknown): variable is GridEntityTNT;
|
|
81
|
+
/** Helper function to detect if a variable is of type `EntityTear`. */
|
|
82
|
+
export declare function isTear(variable: unknown): variable is EntityTear;
|
|
19
83
|
/**
|
|
20
84
|
* Helper function to check if an instantiated Isaac API class is equal to another one of the same
|
|
21
85
|
* type. You must provide the list of keys to check for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isaacAPIClass.d.ts","sourceRoot":"","sources":["../../src/functions/isaacAPIClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"isaacAPIClass.d.ts","sourceRoot":"","sources":["../../src/functions/isaacAPIClass.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAkBxE;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEhE;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAEpE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAExE;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAGxE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAMT;AAED,wEAAwE;AACxE,wBAAgB,OAAO,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAElE;AAED,wEAAwE;AACxE,wBAAgB,OAAO,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAElE;AAED,sEAAsE;AACtE,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,SAAS,CAE9D;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAEpE;AAED,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,aAAa,CAElE;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAEpE;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,uBAAuB,CAErC;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,gBAAgB,CAE5E;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,gBAAgB,CAExE;AAED,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,aAAa,CAElE;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAKT"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
3
3
|
local ____exports = {}
|
|
4
|
+
local ____string = require("functions.string")
|
|
5
|
+
local trimPrefix = ____string.trimPrefix
|
|
4
6
|
local ____types = require("functions.types")
|
|
5
7
|
local isString = ____types.isString
|
|
6
8
|
local isUserdata = ____types.isUserdata
|
|
@@ -11,6 +13,10 @@ local isUserdata = ____types.isUserdata
|
|
|
11
13
|
--
|
|
12
14
|
-- Returns undefined if the object is not of type `userdata` or if the "__type" metatable key does
|
|
13
15
|
-- not exist.
|
|
16
|
+
--
|
|
17
|
+
-- In some cases, Isaac classes can be a read-only. If this is the case, the "__type" field will be
|
|
18
|
+
-- prepended with "const ". This function will always strip this prefix, if it exists. For example,
|
|
19
|
+
-- the class name returned for "const Vector" will be "Vector".
|
|
14
20
|
function ____exports.getIsaacAPIClassName(self, object)
|
|
15
21
|
if not isUserdata(nil, object) then
|
|
16
22
|
return nil
|
|
@@ -23,7 +29,32 @@ function ____exports.getIsaacAPIClassName(self, object)
|
|
|
23
29
|
if not isString(nil, classType) then
|
|
24
30
|
return nil
|
|
25
31
|
end
|
|
26
|
-
return classType
|
|
32
|
+
return trimPrefix(nil, classType, "const ")
|
|
33
|
+
end
|
|
34
|
+
--- Helper function to detect if a variable is of type `EntityBomb`.
|
|
35
|
+
function ____exports.isBomb(self, variable)
|
|
36
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityBomb"
|
|
37
|
+
end
|
|
38
|
+
--- Helper function to detect if a variable is of type `GridEntityDoor`.
|
|
39
|
+
function ____exports.isDoor(self, variable)
|
|
40
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityDoor"
|
|
41
|
+
end
|
|
42
|
+
--- Helper function to detect if a variable is of type `EntityEffect`.
|
|
43
|
+
function ____exports.isEffect(self, variable)
|
|
44
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityEffect"
|
|
45
|
+
end
|
|
46
|
+
--- Helper function to detect if a variable is of type `Entity`. This will return false for child
|
|
47
|
+
-- classes such as `EntityPlayer` or `EntityTear`.
|
|
48
|
+
function ____exports.isEntity(self, variable)
|
|
49
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "Entity"
|
|
50
|
+
end
|
|
51
|
+
--- Helper function to detect if a variable is of type `EntityEffect`.
|
|
52
|
+
function ____exports.isFamiliar(self, variable)
|
|
53
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityEffect"
|
|
54
|
+
end
|
|
55
|
+
--- Helper function to detect if a variable is of type `GridEntity`.
|
|
56
|
+
function ____exports.isGridEntity(self, variable)
|
|
57
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntity"
|
|
27
58
|
end
|
|
28
59
|
--- Helper function to check if something is an instantiated class from the Isaac API. (All classes
|
|
29
60
|
-- from the Isaac API have a type of "userdata" in Lua with a metatable key of "__type" equal to the
|
|
@@ -36,6 +67,58 @@ function ____exports.isIsaacAPIClassOfType(self, object, classType)
|
|
|
36
67
|
local isaacAPIClassType = ____exports.getIsaacAPIClassName(nil, object)
|
|
37
68
|
return isaacAPIClassType == classType or isaacAPIClassType == "const " .. classType
|
|
38
69
|
end
|
|
70
|
+
--- Helper function to detect if a variable is of type `EntityKnife`.
|
|
71
|
+
function ____exports.isKnife(self, variable)
|
|
72
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityKnife"
|
|
73
|
+
end
|
|
74
|
+
--- Helper function to detect if a variable is of type `EntityLaser`.
|
|
75
|
+
function ____exports.isLaser(self, variable)
|
|
76
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityLaser"
|
|
77
|
+
end
|
|
78
|
+
--- Helper function to detect if a variable is of type `EntityNPC`.
|
|
79
|
+
function ____exports.isNPC(self, variable)
|
|
80
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityNPC"
|
|
81
|
+
end
|
|
82
|
+
--- Helper function to detect if a variable is of type `EntityPickup`.
|
|
83
|
+
function ____exports.isPickup(self, variable)
|
|
84
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityPickup"
|
|
85
|
+
end
|
|
86
|
+
--- Helper function to detect if a variable is of type `GridEntityPit`.
|
|
87
|
+
function ____exports.isPit(self, variable)
|
|
88
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPit"
|
|
89
|
+
end
|
|
90
|
+
--- Helper function to detect if a variable is of type `EntityPlayer`.
|
|
91
|
+
function ____exports.isPlayer(self, variable)
|
|
92
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityPlayer"
|
|
93
|
+
end
|
|
94
|
+
--- Helper function to detect if a variable is of type `GridEntityPoop`.
|
|
95
|
+
function ____exports.isPoop(self, variable)
|
|
96
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPoop"
|
|
97
|
+
end
|
|
98
|
+
--- Helper function to detect if a variable is of type `GridEntityPressurePlate`.
|
|
99
|
+
function ____exports.isPressurePlate(self, variable)
|
|
100
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityPressurePlate"
|
|
101
|
+
end
|
|
102
|
+
--- Helper function to detect if a variable is of type `EntityProjectile`.
|
|
103
|
+
function ____exports.isProjectile(self, variable)
|
|
104
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityProjectile"
|
|
105
|
+
end
|
|
106
|
+
--- Helper function to detect if a variable is of type `GridEntityRock`.
|
|
107
|
+
function ____exports.isRock(self, variable)
|
|
108
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityRock"
|
|
109
|
+
end
|
|
110
|
+
--- Helper function to detect if a variable is of type `GridEntitySpikes`.
|
|
111
|
+
function ____exports.isSpikes(self, variable)
|
|
112
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntitySpikes"
|
|
113
|
+
end
|
|
114
|
+
--- Helper function to detect if a variable is of type `GridEntityTNT`.
|
|
115
|
+
function ____exports.isTNT(self, variable)
|
|
116
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "GridEntityTNT"
|
|
117
|
+
end
|
|
118
|
+
--- Helper function to detect if a variable is of type `EntityTear`.
|
|
119
|
+
function ____exports.isTear(self, variable)
|
|
120
|
+
return ____exports.getIsaacAPIClassName(nil, variable) == "EntityTear"
|
|
121
|
+
end
|
|
39
122
|
--- Helper function to check if an instantiated Isaac API class is equal to another one of the same
|
|
40
123
|
-- type. You must provide the list of keys to check for.
|
|
41
124
|
function ____exports.isaacAPIClassEquals(self, object1, object2, keys)
|
package/dist/functions/log.lua
CHANGED
|
@@ -550,14 +550,14 @@ function ____exports.logTableDifferences(table1, table2)
|
|
|
550
550
|
__TS__ArraySort(keys)
|
|
551
551
|
for ____, key in ipairs(keys) do
|
|
552
552
|
if not table1KeysSet:has(key) then
|
|
553
|
-
____exports.log(" Table 1 is missing key: " .. key)
|
|
553
|
+
____exports.log(" Table 1 is missing key: " .. tostring(key))
|
|
554
554
|
elseif not table2KeysSet:has(key) then
|
|
555
|
-
____exports.log(" Table 2 is missing key: " .. key)
|
|
555
|
+
____exports.log(" Table 2 is missing key: " .. tostring(key))
|
|
556
556
|
else
|
|
557
557
|
local value1 = table1[key]
|
|
558
558
|
local value2 = table2[key]
|
|
559
559
|
if value1 ~= value2 then
|
|
560
|
-
____exports.log((((((" " .. key) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\"")
|
|
560
|
+
____exports.log((((((" " .. tostring(key)) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\"")
|
|
561
561
|
end
|
|
562
562
|
end
|
|
563
563
|
end
|
|
@@ -6,9 +6,9 @@ export declare function isCoin(pickup: EntityPickup): pickup is EntityPickupCoin
|
|
|
6
6
|
/** For `PickupVariant.KEY` (30) */
|
|
7
7
|
export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
|
|
8
8
|
/** For `PickupVariant.BOMB` (40) */
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function isBombPickup(pickup: EntityPickup): pickup is EntityPickupBomb;
|
|
10
10
|
/** For `PickupVariant.POOP` (42) */
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function isPoopPickup(pickup: EntityPickup): pickup is EntityPickupPoop;
|
|
12
12
|
/** For `PickupVariant.SACK` (69) */
|
|
13
13
|
export declare function isSack(pickup: EntityPickup): pickup is EntityPickupSack;
|
|
14
14
|
/** For `PickupVariant.PILL` (70) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickupVariants.d.ts","sourceRoot":"","sources":["../../src/functions/pickupVariants.ts"],"names":[],"mappings":";AAIA,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEzE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,eAAe,CAErE;AAED,oCAAoC;AACpC,wBAAgB,
|
|
1
|
+
{"version":3,"file":"pickupVariants.d.ts","sourceRoot":"","sources":["../../src/functions/pickupVariants.ts"],"names":[],"mappings":";AAIA,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,iBAAiB,CAEzE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,eAAe,CAErE;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAEvE;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,GACnB,MAAM,IAAI,uBAAuB,CAEnC;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB,CAE7E;AAED,wCAAwC;AACxC,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,mBAAmB,CAE7E"}
|
|
@@ -14,11 +14,11 @@ function ____exports.isKey(self, pickup)
|
|
|
14
14
|
return pickup.Variant == PickupVariant.KEY
|
|
15
15
|
end
|
|
16
16
|
--- For `PickupVariant.BOMB` (40)
|
|
17
|
-
function ____exports.
|
|
17
|
+
function ____exports.isBombPickup(self, pickup)
|
|
18
18
|
return pickup.Variant == PickupVariant.BOMB
|
|
19
19
|
end
|
|
20
20
|
--- For `PickupVariant.POOP` (42)
|
|
21
|
-
function ____exports.
|
|
21
|
+
function ____exports.isPoopPickup(self, pickup)
|
|
22
22
|
return pickup.Variant == PickupVariant.POOP
|
|
23
23
|
end
|
|
24
24
|
--- For `PickupVariant.SACK` (69)
|
|
@@ -12,7 +12,7 @@ local getPlayerFamiliars = ____familiars.getPlayerFamiliars
|
|
|
12
12
|
local ____math = require("functions.math")
|
|
13
13
|
local getCircleDiscretizedPoints = ____math.getCircleDiscretizedPoints
|
|
14
14
|
local ____playerIndex = require("functions.playerIndex")
|
|
15
|
-
local
|
|
15
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
16
16
|
function movePlayerAndTheirFamiliars(self, player, position)
|
|
17
17
|
player.Position = position
|
|
18
18
|
local familiars = getPlayerFamiliars(nil, player)
|
|
@@ -31,7 +31,7 @@ local CIRCLE_RADIUS_BETWEEN_PLAYERS = 50
|
|
|
31
31
|
function ____exports.movePlayersToCenter(self)
|
|
32
32
|
local isGreedMode = game:IsGreedMode()
|
|
33
33
|
local startingPosition = isGreedMode and NEW_FLOOR_STARTING_POSITION_GREED_MODE or NEW_FLOOR_STARTING_POSITION_NORMAL_MODE
|
|
34
|
-
local players =
|
|
34
|
+
local players = getAllPlayers(nil)
|
|
35
35
|
local firstPlayer = players[1]
|
|
36
36
|
if firstPlayer == nil then
|
|
37
37
|
return
|
|
@@ -10,6 +10,15 @@ import { PlayerIndex } from "../types/PlayerIndex";
|
|
|
10
10
|
* helper function instead to get a filtered list of players.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getAllPlayers(): EntityPlayer[];
|
|
13
|
+
/**
|
|
14
|
+
* Helper function to get all of the other players in the room besides the one provided. (This
|
|
15
|
+
* includes "child" players.)
|
|
16
|
+
*/
|
|
17
|
+
export declare function getOtherPlayers(player: EntityPlayer): EntityPlayer[];
|
|
18
|
+
/**
|
|
19
|
+
* Helper function to get the corresponding `EntityPlayer` object that corresponds to a
|
|
20
|
+
* `PlayerIndex`.
|
|
21
|
+
*/
|
|
13
22
|
export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlayer | undefined;
|
|
14
23
|
/**
|
|
15
24
|
* Mods often have to track variables relating to the player. In naive mods, information will only
|
|
@@ -32,9 +41,6 @@ export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlay
|
|
|
32
41
|
* Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
|
|
33
42
|
* (1). This works even if the player does not have any Sad Onions.
|
|
34
43
|
*
|
|
35
|
-
* Since the RNG value is the same for both Tainted Lazarus and Dead Tainted Lazarus, we revert to
|
|
36
|
-
* using the RNG of The Inner Eye (2) for Dead Tainted Lazarus.
|
|
37
|
-
*
|
|
38
44
|
* Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
|
|
39
45
|
* though they are technically different characters, they share the same inventory and InitSeed.) If
|
|
40
46
|
* this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
|
|
@@ -71,8 +77,8 @@ export declare function getPlayers(performCharacterExclusions?: boolean): Entity
|
|
|
71
77
|
*/
|
|
72
78
|
export declare function getSubPlayerParent(subPlayer: EntitySubPlayer): EntityPlayer | undefined;
|
|
73
79
|
/**
|
|
74
|
-
*
|
|
75
|
-
* example, the Strawman Keeper.)
|
|
80
|
+
* Helper function to detect if a particular player is a "child" player, meaning that they have a
|
|
81
|
+
* non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
|
|
76
82
|
*/
|
|
77
83
|
export declare function isChildPlayer(player: EntityPlayer): boolean;
|
|
78
84
|
//# sourceMappingURL=playerIndex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playerIndex.d.ts","sourceRoot":"","sources":["../../src/functions/playerIndex.ts"],"names":[],"mappings":";;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAU9C;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,GACvB,YAAY,GAAG,SAAS,CAG1B;AAED
|
|
1
|
+
{"version":3,"file":"playerIndex.d.ts","sourceRoot":"","sources":["../../src/functions/playerIndex.ts"],"names":[],"mappings":";;;AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAU9C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,EAAE,CAMpE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,GACvB,YAAY,GAAG,SAAS,CAG1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,6BAA6B,UAAQ,GACpC,WAAW,CA4Bb;AAiBD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,GACzB,GAAG,GAAG,SAAS,CAajB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,0BAA0B,UAAQ,GAAG,YAAY,EAAE,CAS7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,GACzB,YAAY,GAAG,SAAS,CAa1B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE3D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
5
4
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
5
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local getPlayerIndexCollectibleType, DEFAULT_COLLECTIBLE_TYPE, EXCLUDED_CHARACTERS
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
@@ -48,9 +48,6 @@ end
|
|
|
48
48
|
-- Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
|
|
49
49
|
-- (1). This works even if the player does not have any Sad Onions.
|
|
50
50
|
--
|
|
51
|
-
-- Since the RNG value is the same for both Tainted Lazarus and Dead Tainted Lazarus, we revert to
|
|
52
|
-
-- using the RNG of The Inner Eye (2) for Dead Tainted Lazarus.
|
|
53
|
-
--
|
|
54
51
|
-- Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
|
|
55
52
|
-- though they are technically different characters, they share the same inventory and InitSeed.) If
|
|
56
53
|
-- this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
|
|
@@ -78,26 +75,10 @@ function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
|
|
|
78
75
|
end
|
|
79
76
|
function getPlayerIndexCollectibleType(self, player, differentiateForgottenAndSoul)
|
|
80
77
|
local character = player:GetPlayerType()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
do
|
|
86
|
-
return differentiateForgottenAndSoul and CollectibleType.SPOON_BENDER or DEFAULT_COLLECTIBLE_TYPE
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
____cond10 = ____cond10 or ____switch10 == PlayerType.LAZARUS_2_B
|
|
90
|
-
if ____cond10 then
|
|
91
|
-
do
|
|
92
|
-
return CollectibleType.INNER_EYE
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
do
|
|
96
|
-
do
|
|
97
|
-
return DEFAULT_COLLECTIBLE_TYPE
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
until true
|
|
78
|
+
if character == PlayerType.THE_SOUL then
|
|
79
|
+
return differentiateForgottenAndSoul and CollectibleType.INNER_EYE or DEFAULT_COLLECTIBLE_TYPE
|
|
80
|
+
end
|
|
81
|
+
return DEFAULT_COLLECTIBLE_TYPE
|
|
101
82
|
end
|
|
102
83
|
--- This function always excludes players with a non-undefined parent, since they are not real
|
|
103
84
|
-- players (e.g. the Strawman Keeper).
|
|
@@ -143,13 +124,25 @@ function ____exports.getSubPlayerParent(self, subPlayer)
|
|
|
143
124
|
end
|
|
144
125
|
)
|
|
145
126
|
end
|
|
146
|
-
---
|
|
147
|
-
-- example, the Strawman Keeper.)
|
|
127
|
+
--- Helper function to detect if a particular player is a "child" player, meaning that they have a
|
|
128
|
+
-- non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
|
|
148
129
|
function ____exports.isChildPlayer(self, player)
|
|
149
130
|
return player.Parent ~= nil
|
|
150
131
|
end
|
|
151
132
|
DEFAULT_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
152
133
|
EXCLUDED_CHARACTERS = __TS__New(Set, {PlayerType.ESAU, PlayerType.THE_SOUL_B})
|
|
134
|
+
--- Helper function to get all of the other players in the room besides the one provided. (This
|
|
135
|
+
-- includes "child" players.)
|
|
136
|
+
function ____exports.getOtherPlayers(self, player)
|
|
137
|
+
local playerPtrHash = GetPtrHash(player)
|
|
138
|
+
local players = ____exports.getAllPlayers(nil)
|
|
139
|
+
return __TS__ArrayFilter(
|
|
140
|
+
players,
|
|
141
|
+
function(____, otherPlayer) return GetPtrHash(otherPlayer) ~= playerPtrHash end
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
--- Helper function to get the corresponding `EntityPlayer` object that corresponds to a
|
|
145
|
+
-- `PlayerIndex`.
|
|
153
146
|
function ____exports.getPlayerFromIndex(self, playerIndex)
|
|
154
147
|
local players = ____exports.getPlayers(nil)
|
|
155
148
|
return __TS__ArrayFind(
|
|
@@ -31,10 +31,10 @@ local ____bitwise = require("functions.bitwise")
|
|
|
31
31
|
local countSetBits = ____bitwise.countSetBits
|
|
32
32
|
local getKBitOfN = ____bitwise.getKBitOfN
|
|
33
33
|
local getNumBitsOfN = ____bitwise.getNumBitsOfN
|
|
34
|
-
local
|
|
35
|
-
local getCharacterMaxHeartContainers =
|
|
36
|
-
local getCharacterName =
|
|
37
|
-
local isVanillaCharacter =
|
|
34
|
+
local ____characters = require("functions.characters")
|
|
35
|
+
local getCharacterMaxHeartContainers = ____characters.getCharacterMaxHeartContainers
|
|
36
|
+
local getCharacterName = ____characters.getCharacterName
|
|
37
|
+
local isVanillaCharacter = ____characters.isVanillaCharacter
|
|
38
38
|
local ____collectibles = require("functions.collectibles")
|
|
39
39
|
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
40
40
|
local ____collectibleSet = require("functions.collectibleSet")
|
|
@@ -10,8 +10,8 @@ local game = ____cachedClasses.game
|
|
|
10
10
|
local ____constants = require("constants")
|
|
11
11
|
local MAX_TAINTED_SAMSON_BERSERK_CHARGE = ____constants.MAX_TAINTED_SAMSON_BERSERK_CHARGE
|
|
12
12
|
local TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = ____constants.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
|
|
13
|
-
local
|
|
14
|
-
local getCharacterDeathAnimationName =
|
|
13
|
+
local ____characters = require("functions.characters")
|
|
14
|
+
local getCharacterDeathAnimationName = ____characters.getCharacterDeathAnimationName
|
|
15
15
|
local ____players = require("functions.players")
|
|
16
16
|
local getPlayerMaxHeartContainers = ____players.getPlayerMaxHeartContainers
|
|
17
17
|
local getPlayerNumHitsRemaining = ____players.getPlayerNumHitsRemaining
|
|
@@ -99,9 +99,10 @@ export declare function getRoomType(roomGridIndex?: int): RoomType;
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function getRoomVariant(roomGridIndex?: int): int;
|
|
101
101
|
/**
|
|
102
|
-
* Note that the room visited count will be inaccurate during the period before the
|
|
102
|
+
* Note that the room visited count will be inaccurate during the period before the `POST_NEW_ROOM`
|
|
103
103
|
* callback has fired (i.e. when entities are initializing and performing their first update). This
|
|
104
|
-
* is because the variable is only incremented immediately before the
|
|
104
|
+
* is because the variable is only incremented immediately before the `POST_NEW_ROOM` callback
|
|
105
|
+
* fires.
|
|
105
106
|
*
|
|
106
107
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
107
108
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAiBtE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAGvE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,cAAc,CAQrE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,CAGlE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAatC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGzD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,MAAM,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,SAAS,GAAG,SAAS,CAGvE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAG3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,QAAQ,CAGzD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED
|
|
1
|
+
{"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAiBtE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAGvE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,cAAc,CAQrE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,CAGlE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAatC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGzD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,MAAM,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,SAAS,GAAG,SAAS,CAGvE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAG3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,QAAQ,CAGzD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAGvD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAG5D"}
|
|
@@ -148,9 +148,10 @@ function ____exports.getRoomVariant(self, roomGridIndex)
|
|
|
148
148
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
149
149
|
return roomData == nil and -1 or roomData.Variant
|
|
150
150
|
end
|
|
151
|
-
--- Note that the room visited count will be inaccurate during the period before the
|
|
151
|
+
--- Note that the room visited count will be inaccurate during the period before the `POST_NEW_ROOM`
|
|
152
152
|
-- callback has fired (i.e. when entities are initializing and performing their first update). This
|
|
153
|
-
-- is because the variable is only incremented immediately before the
|
|
153
|
+
-- is because the variable is only incremented immediately before the `POST_NEW_ROOM` callback
|
|
154
|
+
-- fires.
|
|
154
155
|
--
|
|
155
156
|
-- @param roomGridIndex Optional. Default is the current room index.
|
|
156
157
|
function ____exports.getRoomVisitedCount(self, roomGridIndex)
|
|
@@ -171,16 +171,16 @@ export declare function roomExists(roomGridIndex: int): boolean;
|
|
|
171
171
|
*/
|
|
172
172
|
export declare function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int];
|
|
173
173
|
/**
|
|
174
|
-
* If the `Room.Update` method is called in a
|
|
175
|
-
* around (such as the player). Since those entity velocities are already at zero, setting
|
|
176
|
-
* zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
174
|
+
* If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
|
|
175
|
+
* slide around (such as the player). Since those entity velocities are already at zero, setting
|
|
176
|
+
* them to zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
177
177
|
* positions/velocities before updating the room, and then restore those positions/velocities.
|
|
178
178
|
*/
|
|
179
179
|
export declare function roomUpdateSafe(): void;
|
|
180
180
|
/**
|
|
181
|
-
* Helper function to convert an uncleared room to a cleared room in the
|
|
182
|
-
* is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
183
|
-
* doors will start closed and then open.
|
|
181
|
+
* Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
|
|
182
|
+
* This is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
183
|
+
* the doors will start closed and then open.
|
|
184
184
|
*/
|
|
185
185
|
export declare function setRoomCleared(): void;
|
|
186
186
|
/**
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -422,9 +422,9 @@ function ____exports.roomGridIndexToXY(self, roomGridIndex)
|
|
|
422
422
|
local y = math.floor(roomGridIndex / LEVEL_GRID_ROW_WIDTH)
|
|
423
423
|
return {x, y}
|
|
424
424
|
end
|
|
425
|
-
--- If the `Room.Update` method is called in a
|
|
426
|
-
-- around (such as the player). Since those entity velocities are already at zero, setting
|
|
427
|
-
-- zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
425
|
+
--- If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
|
|
426
|
+
-- slide around (such as the player). Since those entity velocities are already at zero, setting
|
|
427
|
+
-- them to zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
428
428
|
-- positions/velocities before updating the room, and then restore those positions/velocities.
|
|
429
429
|
function ____exports.roomUpdateSafe(self)
|
|
430
430
|
local room = game:GetRoom()
|
|
@@ -435,9 +435,9 @@ function ____exports.roomUpdateSafe(self)
|
|
|
435
435
|
setEntityPositions(nil, entityPositions, entities)
|
|
436
436
|
setEntityVelocities(nil, entityVelocities, entities)
|
|
437
437
|
end
|
|
438
|
-
--- Helper function to convert an uncleared room to a cleared room in the
|
|
439
|
-
-- is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
440
|
-
-- doors will start closed and then open.
|
|
438
|
+
--- Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
|
|
439
|
+
-- This is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
440
|
+
-- the doors will start closed and then open.
|
|
441
441
|
function ____exports.setRoomCleared(self)
|
|
442
442
|
local room = game:GetRoom()
|
|
443
443
|
local roomClear = room:IsClear()
|
|
@@ -27,6 +27,7 @@ export declare function getStageType(): StageType;
|
|
|
27
27
|
/** Helper function to directly warp to a specific stage using the "stage" console command. */
|
|
28
28
|
export declare function goToStage(stage: LevelStage, stageType: StageType): void;
|
|
29
29
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
30
|
+
export declare function onAscent(): boolean;
|
|
30
31
|
export declare function onCathedral(): boolean;
|
|
31
32
|
export declare function onChest(): boolean;
|
|
32
33
|
export declare function onDarkRoom(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CASvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAG3E;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAIvE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAI/D;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED,wBAAgB,OAAO,IAAI,OAAO,CASjC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
|
package/dist/functions/stage.lua
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
3
4
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
4
5
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
5
6
|
local ____cachedClasses = require("cachedClasses")
|
|
@@ -86,6 +87,9 @@ function ____exports.goToStage(self, stage, stageType)
|
|
|
86
87
|
local command = ("stage " .. tostring(stage)) .. stageTypeLetterSuffix
|
|
87
88
|
Isaac.ExecuteCommand(command)
|
|
88
89
|
end
|
|
90
|
+
function ____exports.onAscent(self)
|
|
91
|
+
return game:GetStateFlag(GameStateFlag.BACKWARDS_PATH)
|
|
92
|
+
end
|
|
89
93
|
function ____exports.onCathedral(self)
|
|
90
94
|
local level = game:GetLevel()
|
|
91
95
|
local stage = level:GetStage()
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* In a `Map`, you can use the `clear` method to delete every element. However, in a `LuaMap`, the
|
|
4
4
|
* `clear` method does not exist. Use this helper function as a drop-in replacement for this.
|
|
5
5
|
*/
|
|
6
|
-
export declare function clearTable(luaMap: LuaMap): void;
|
|
6
|
+
export declare function clearTable(luaMap: LuaMap<AnyNotNil, unknown>): void;
|
|
7
7
|
/** Helper function to copy specific values from a object to a table. */
|
|
8
8
|
export declare function copyValuesToTable(object: unknown, keys: string[], luaMap: LuaMap<string, unknown>): void;
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,CAInE;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CAmBV;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAChC,OAAO,UAAO,GACb,IAAI,CA6BN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAClC,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,CAET"}
|