isaacscript-common 1.2.174 → 1.2.177
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/itemPickup.lua +0 -1
- package/dist/callbacks/postBombInitLate.lua +0 -1
- package/dist/callbacks/postBoneSwing.lua +0 -1
- package/dist/callbacks/postCursedTeleport.lua +0 -1
- package/dist/callbacks/postCustomDoorEnter.lua +0 -1
- package/dist/callbacks/postEffectInitLate.lua +0 -1
- package/dist/callbacks/postEsauJr.lua +0 -1
- package/dist/callbacks/postFamiliarInitLate.lua +0 -1
- package/dist/callbacks/postFlip.lua +0 -1
- package/dist/callbacks/postGridEntity.lua +0 -1
- package/dist/callbacks/postGridEntityCollision.lua +0 -1
- package/dist/callbacks/postKnifeInitLate.lua +0 -1
- package/dist/callbacks/postLaserInitLate.lua +0 -1
- package/dist/callbacks/postNPCInitLate.lua +0 -1
- package/dist/callbacks/postPickupCollect.lua +0 -1
- package/dist/callbacks/postPickupInitLate.lua +0 -1
- package/dist/callbacks/postPlayerChangeHealth.lua +0 -1
- package/dist/callbacks/postPlayerChangeType.lua +0 -1
- package/dist/callbacks/postPlayerFatalDamage.lua +0 -1
- package/dist/callbacks/postPlayerInitLate.lua +0 -1
- package/dist/callbacks/postPlayerReordered.lua +0 -1
- package/dist/callbacks/postProjectileInitLate.lua +0 -1
- package/dist/callbacks/postPurchase.lua +0 -1
- package/dist/callbacks/postSlotInitUpdate.lua +0 -1
- package/dist/callbacks/postSlotRender.lua +0 -1
- package/dist/callbacks/postTearInitLate.lua +0 -1
- package/dist/callbacks/postTearInitVeryLate.lua +0 -1
- package/dist/callbacks/postTransformation.lua +0 -1
- package/dist/callbacks/postTrinketBreak.lua +0 -1
- package/dist/callbacks/preNewLevel.lua +0 -1
- package/dist/callbacks/subscriptions/postBombInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postBoneSwing.lua +0 -1
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +0 -1
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +0 -1
- package/dist/callbacks/subscriptions/postCustomRevive.lua +0 -1
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postEsauJr.lua +0 -1
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +0 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +0 -1
- package/dist/callbacks/subscriptions/postFlip.lua +0 -1
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityStateChange.lua +0 -1
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +0 -1
- package/dist/callbacks/subscriptions/postItemPickup.lua +0 -1
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +0 -1
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postPickupCollect.lua +0 -1
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +0 -1
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postPurchase.lua +0 -1
- package/dist/callbacks/subscriptions/postSacrifice.lua +0 -1
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +0 -1
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +0 -1
- package/dist/callbacks/subscriptions/postSlotInit.lua +0 -1
- package/dist/callbacks/subscriptions/postSlotRender.lua +0 -1
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +0 -1
- package/dist/callbacks/subscriptions/postTearInitLate.lua +0 -1
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +0 -1
- package/dist/callbacks/subscriptions/postTransformation.lua +0 -1
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +0 -1
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +0 -1
- package/dist/callbacks/subscriptions/preCustomRevive.lua +0 -1
- package/dist/callbacks/subscriptions/preItemPickup.lua +0 -1
- package/dist/callbacks/subscriptions/preNewLevel.lua +0 -1
- package/dist/callbacks/subscriptions/roomClearChange.lua +0 -1
- package/dist/classes/DefaultMap.lua +0 -1
- package/dist/classes/ModUpgraded.lua +0 -1
- package/dist/classes/null.d.ts +6 -7
- package/dist/classes/null.lua +5 -6
- package/dist/constants.d.ts +10 -10
- package/dist/constants.lua +3 -4
- package/dist/enums/private/SerializationBrand.lua +0 -1
- package/dist/features/collectiblesSeen.d.ts +6 -0
- package/dist/features/collectiblesSeen.lua +42 -0
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/features/disableInputs.lua +0 -1
- package/dist/features/disableSound.lua +0 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +11 -11
- package/dist/features/extraConsoleCommands/commands.lua +23 -23
- package/dist/features/extraConsoleCommands/init.lua +6 -7
- package/dist/features/getCollectibleItemPoolType.lua +0 -1
- package/dist/features/isPonyActive.lua +0 -1
- package/dist/features/playerInventory.d.ts +10 -2
- package/dist/features/playerInventory.lua +51 -16
- package/dist/features/preventCollectibleRotate.lua +0 -1
- package/dist/features/runInNFrames.lua +0 -1
- package/dist/features/saveDataManager/constants.d.ts +1 -1
- package/dist/features/saveDataManager/constants.lua +1 -1
- package/dist/features/saveDataManager/exports.d.ts +6 -6
- package/dist/features/saveDataManager/exports.lua +4 -5
- package/dist/features/saveDataManager/load.lua +0 -1
- package/dist/features/saveDataManager/main.lua +0 -1
- package/dist/features/saveDataManager/maps.lua +0 -1
- package/dist/features/saveDataManager/merge.lua +5 -4
- package/dist/features/saveDataManager/save.lua +0 -1
- package/dist/features/sirenHelpers.lua +0 -1
- package/dist/features/taintedLazarusPlayers.lua +0 -1
- package/dist/featuresInitialized.d.ts +1 -1
- package/dist/featuresInitialized.lua +3 -3
- package/dist/functions/array.d.ts +39 -39
- package/dist/functions/array.lua +79 -80
- package/dist/functions/cards.d.ts +3 -3
- package/dist/functions/cards.lua +7 -8
- package/dist/functions/charge.d.ts +11 -11
- package/dist/functions/charge.lua +13 -13
- package/dist/functions/collectibleCacheFlag.lua +0 -1
- package/dist/functions/collectibleSet.lua +0 -1
- package/dist/functions/collectibles.d.ts +53 -15
- package/dist/functions/collectibles.lua +44 -21
- package/dist/functions/color.d.ts +2 -2
- package/dist/functions/color.lua +6 -6
- package/dist/functions/deepCopy.d.ts +0 -3
- package/dist/functions/deepCopy.lua +5 -23
- package/dist/functions/deepCopyTests.lua +0 -1
- package/dist/functions/doors.d.ts +8 -8
- package/dist/functions/doors.lua +16 -17
- package/dist/functions/entity.d.ts +13 -14
- package/dist/functions/entity.lua +27 -35
- package/dist/functions/entitySpecific.lua +0 -1
- package/dist/functions/familiars.lua +0 -1
- package/dist/functions/flying.lua +1 -2
- package/dist/functions/globals.lua +0 -1
- package/dist/functions/gridEntity.d.ts +1 -1
- package/dist/functions/gridEntity.lua +5 -6
- package/dist/functions/input.lua +0 -1
- package/dist/functions/jsonHelpers.d.ts +7 -7
- package/dist/functions/jsonHelpers.lua +10 -11
- package/dist/functions/jsonRoom.lua +0 -1
- package/dist/functions/log.d.ts +21 -21
- package/dist/functions/log.lua +75 -75
- package/dist/functions/map.lua +0 -1
- package/dist/functions/math.d.ts +1 -1
- package/dist/functions/math.lua +3 -4
- package/dist/functions/npc.lua +0 -1
- package/dist/functions/pickups.lua +0 -1
- package/dist/functions/player.d.ts +6 -8
- package/dist/functions/player.lua +22 -30
- package/dist/functions/playerDataStructures.lua +0 -1
- package/dist/functions/playerHealth.d.ts +1 -1
- package/dist/functions/playerHealth.lua +20 -21
- package/dist/functions/pocketItems.lua +0 -1
- package/dist/functions/positionVelocity.d.ts +3 -0
- package/dist/functions/positionVelocity.lua +19 -6
- package/dist/functions/random.d.ts +7 -7
- package/dist/functions/revive.d.ts +5 -5
- package/dist/functions/revive.lua +8 -8
- package/dist/functions/roomData.d.ts +96 -0
- package/dist/functions/roomData.lua +57 -0
- package/dist/functions/rooms.d.ts +1 -96
- package/dist/functions/rooms.lua +30 -76
- package/dist/functions/set.d.ts +2 -2
- package/dist/functions/set.lua +7 -8
- package/dist/functions/string.lua +0 -1
- package/dist/functions/transformations.lua +0 -1
- package/dist/functions/trinketCacheFlag.d.ts +4 -4
- package/dist/functions/trinketCacheFlag.lua +3 -3
- package/dist/functions/trinketGive.d.ts +7 -7
- package/dist/functions/trinketGive.lua +27 -27
- package/dist/functions/trinketSet.lua +0 -1
- package/dist/functions/trinkets.d.ts +2 -2
- package/dist/functions/trinkets.lua +6 -6
- package/dist/functions/ui.d.ts +13 -13
- package/dist/functions/ui.lua +28 -28
- package/dist/functions/utils.d.ts +6 -0
- package/dist/functions/utils.lua +7 -1
- package/dist/functions/vector.d.ts +2 -0
- package/dist/functions/vector.lua +13 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.lua +13 -0
- package/dist/lualib_bundle.lua +83 -49
- package/dist/maps/cardMap.lua +0 -1
- package/dist/maps/characterMap.lua +0 -1
- package/dist/maps/collectibleDescriptionMap.lua +0 -1
- package/dist/maps/collectibleNameMap.lua +0 -1
- package/dist/maps/gridEntityTypeToBrokenStateMap.lua +0 -1
- package/dist/maps/gridEntityXMLMap.lua +0 -1
- package/dist/maps/pillEffectMap.lua +0 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +1 -2
- package/dist/maps/roomTypeMap.lua +0 -1
- package/dist/maps/trinketDescriptionMap.lua +0 -1
- package/dist/maps/trinketNameMap.lua +0 -1
- package/dist/patchErrorFunctions.lua +0 -1
- package/dist/types/CollectibleIndex.d.ts +15 -0
- package/dist/types/CollectibleIndex.lua +3 -0
- package/dist/upgradeMod.lua +3 -1
- package/package.json +3 -3
|
@@ -44,13 +44,13 @@ export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): G
|
|
|
44
44
|
* arguments to match specific grid entity types.
|
|
45
45
|
*/
|
|
46
46
|
export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[]): Map<int, GridEntity>;
|
|
47
|
+
export declare function getSurroundingGridEntities(gridEntity: GridEntity): GridEntity[];
|
|
47
48
|
export declare function getTopLeftWall(): GridEntity | undefined;
|
|
48
49
|
/**
|
|
49
50
|
* Helper function to get the grid index of the top left wall.
|
|
50
51
|
* (This will depend on what the current room shape is.)
|
|
51
52
|
*/
|
|
52
53
|
export declare function getTopLeftWallGridIndex(): int;
|
|
53
|
-
export declare function getSurroundingGridEntities(gridEntity: GridEntity): GridEntity[];
|
|
54
54
|
/**
|
|
55
55
|
* Helper function to determine if all of the pressure plates in the current room are pushed.
|
|
56
56
|
* Returns true if there are no pressure plates in the room.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____lualib = require("lualib_bundle")
|
|
3
2
|
local Set = ____lualib.Set
|
|
4
3
|
local __TS__New = ____lualib.__TS__New
|
|
@@ -147,11 +146,6 @@ function ____exports.getGridEntitiesMap(self, ...)
|
|
|
147
146
|
end
|
|
148
147
|
return gridEntityMap
|
|
149
148
|
end
|
|
150
|
-
function ____exports.getTopLeftWall(self)
|
|
151
|
-
local room = game:GetRoom()
|
|
152
|
-
local topLeftWallGridIndex = ____exports.getTopLeftWallGridIndex(nil)
|
|
153
|
-
return room:GetGridEntity(topLeftWallGridIndex)
|
|
154
|
-
end
|
|
155
149
|
function ____exports.getSurroundingGridEntities(self, gridEntity)
|
|
156
150
|
local room = game:GetRoom()
|
|
157
151
|
local gridWidth = room:GetGridWidth()
|
|
@@ -175,6 +169,11 @@ function ____exports.getSurroundingGridEntities(self, gridEntity)
|
|
|
175
169
|
end
|
|
176
170
|
return surroundingGridEntities
|
|
177
171
|
end
|
|
172
|
+
function ____exports.getTopLeftWall(self)
|
|
173
|
+
local room = game:GetRoom()
|
|
174
|
+
local topLeftWallGridIndex = ____exports.getTopLeftWallGridIndex(nil)
|
|
175
|
+
return room:GetGridEntity(topLeftWallGridIndex)
|
|
176
|
+
end
|
|
178
177
|
function ____exports.isAllPressurePlatesPushed(self)
|
|
179
178
|
local room = game:GetRoom()
|
|
180
179
|
local hasPressurePlates = room:HasTriggerPressurePlates()
|
package/dist/functions/input.lua
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
|
-
/**
|
|
3
|
-
* Converts a Lua table to a JSON string.
|
|
4
|
-
* In most cases, this function will be used for writing data to a "save#.dat" file.
|
|
5
|
-
* If encoding fails, it will throw an error to prevent writing a blank string or corrupted data to
|
|
6
|
-
* a user's "save#.dat" file.
|
|
7
|
-
*/
|
|
8
|
-
export declare function jsonEncode(table: unknown): string;
|
|
9
2
|
/**
|
|
10
3
|
* Converts a JSON string to a Lua table.
|
|
11
4
|
* In most cases, this function will be used for reading data from a "save#.dat" file.
|
|
@@ -14,3 +7,10 @@ export declare function jsonEncode(table: unknown): string;
|
|
|
14
7
|
* manually removed their existing save data.)
|
|
15
8
|
*/
|
|
16
9
|
export declare function jsonDecode(jsonString: string): LuaTable;
|
|
10
|
+
/**
|
|
11
|
+
* Converts a Lua table to a JSON string.
|
|
12
|
+
* In most cases, this function will be used for writing data to a "save#.dat" file.
|
|
13
|
+
* If encoding fails, it will throw an error to prevent writing a blank string or corrupted data to
|
|
14
|
+
* a user's "save#.dat" file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function jsonEncode(table: unknown): string;
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local tryEncode, tryDecode
|
|
4
3
|
local json = require("@NoResolution:json")
|
|
5
4
|
local ____log = require("functions.log")
|
|
6
5
|
local log = ____log.log
|
|
7
|
-
function
|
|
8
|
-
return json.encode(____table)
|
|
9
|
-
end
|
|
10
|
-
function tryDecode(jsonString)
|
|
6
|
+
local function tryDecode(jsonString)
|
|
11
7
|
return json.decode(jsonString)
|
|
12
8
|
end
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
if not ok then
|
|
16
|
-
error("Failed to convert the Lua table to JSON: " .. jsonStringOrErrMsg)
|
|
17
|
-
end
|
|
18
|
-
return jsonStringOrErrMsg
|
|
9
|
+
local function tryEncode(____table)
|
|
10
|
+
return json.encode(____table)
|
|
19
11
|
end
|
|
20
12
|
function ____exports.jsonDecode(self, jsonString)
|
|
21
13
|
local ok, luaTableOrErrMsg = pcall(tryDecode, jsonString)
|
|
@@ -25,4 +17,11 @@ function ____exports.jsonDecode(self, jsonString)
|
|
|
25
17
|
end
|
|
26
18
|
return luaTableOrErrMsg
|
|
27
19
|
end
|
|
20
|
+
function ____exports.jsonEncode(self, ____table)
|
|
21
|
+
local ok, jsonStringOrErrMsg = pcall(tryEncode, ____table)
|
|
22
|
+
if not ok then
|
|
23
|
+
error("Failed to convert the Lua table to JSON: " .. jsonStringOrErrMsg)
|
|
24
|
+
end
|
|
25
|
+
return jsonStringOrErrMsg
|
|
26
|
+
end
|
|
28
27
|
return ____exports
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -10,44 +10,44 @@ export declare function getDebugPrependString(msg: string, numParentFunctions?:
|
|
|
10
10
|
* and the line number before the string.
|
|
11
11
|
*/
|
|
12
12
|
export declare function log(this: void, msg: string): void;
|
|
13
|
+
export declare function logArray<T>(this: void, array: T[]): void;
|
|
14
|
+
export declare function logColor(this: void, color: Color): void;
|
|
13
15
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
14
|
-
export declare function
|
|
16
|
+
export declare function logDamageFlags(this: void, flags: int): void;
|
|
17
|
+
export declare function logEntities(this: void, includeBackgroundEffects: boolean, entityTypeFilter?: EntityType | int): void;
|
|
18
|
+
export declare function logEntity(this: void, entity: Entity): void;
|
|
15
19
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
16
|
-
export declare function
|
|
20
|
+
export declare function logEntityFlags(this: void, flags: int): void;
|
|
17
21
|
/** Helper function for printing out every flag that is turned on. Useful when debugging. */
|
|
18
|
-
export declare function
|
|
22
|
+
export declare function logFlags(this: void, flags: int, flagEnum?: LuaTable, description?: string): void;
|
|
19
23
|
/**
|
|
20
24
|
* Helper function for printing out every game state flag that is turned on. Useful when debugging.
|
|
21
25
|
*/
|
|
22
|
-
export declare function
|
|
26
|
+
export declare function logGameStateFlags(this: void): void;
|
|
27
|
+
export declare function logGridEntities(this: void, includeWalls: boolean, gridEntityTypeFilter?: GridEntityType | int): void;
|
|
28
|
+
export declare function logKColor(this: void, kColor: KColor): void;
|
|
29
|
+
export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
|
|
30
|
+
export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
23
31
|
/**
|
|
24
32
|
* Helper function for printing out every projectile flag that is turned on. Useful when debugging.
|
|
25
33
|
*/
|
|
26
|
-
export declare function
|
|
34
|
+
export declare function logProjectileFlags(this: void, flags: int): void;
|
|
35
|
+
/** Helper function for logging information about the current room. */
|
|
36
|
+
export declare function logRoom(this: void): void;
|
|
27
37
|
/**
|
|
28
38
|
* Helper function for printing out every seed effect (i.e. Easter Egg) that is turned on for the
|
|
29
39
|
* particular run.
|
|
30
40
|
*/
|
|
31
|
-
export declare function
|
|
32
|
-
|
|
33
|
-
export declare function logAllTearFlags(this: void, flags: int): void;
|
|
34
|
-
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
35
|
-
export declare function logAllUseFlags(this: void, _flags: int): void;
|
|
36
|
-
export declare function logArray<T>(this: void, array: T[]): void;
|
|
37
|
-
export declare function logColor(this: void, color: Color): void;
|
|
38
|
-
export declare function logEntity(this: void, entity: Entity): void;
|
|
39
|
-
export declare function logEntities(this: void, includeBackgroundEffects: boolean, entityTypeFilter?: EntityType | int): void;
|
|
40
|
-
export declare function logGridEntities(this: void, includeWalls: boolean, gridEntityTypeFilter?: GridEntityType | int): void;
|
|
41
|
-
export declare function logKColor(this: void, kColor: KColor): void;
|
|
42
|
-
export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
|
|
43
|
-
export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
44
|
-
/** Helper function for logging information about the current room. */
|
|
45
|
-
export declare function logRoom(this: void): void;
|
|
41
|
+
export declare function logSeedEffects(this: void): void;
|
|
42
|
+
export declare function logSet(this: void, set: Set<AnyNotNil>): void;
|
|
46
43
|
/** Helper function for logging every sound effect that is currently playing. */
|
|
47
44
|
export declare function logSounds(this: void): void;
|
|
48
45
|
export declare function logTable(this: void, table: unknown, parentTables?: number): void;
|
|
46
|
+
/** Helper function for printing out every tear flag that is turned on. Useful when debugging. */
|
|
47
|
+
export declare function logTearFlags(this: void, flags: int): void;
|
|
49
48
|
export declare function logTemporaryEffects(this: void, player: EntityPlayer): void;
|
|
50
|
-
|
|
49
|
+
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
50
|
+
export declare function logUseFlags(this: void, _flags: int): void;
|
|
51
51
|
export declare function logVector(this: void, vector: Vector): void;
|
|
52
52
|
/**
|
|
53
53
|
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
package/dist/functions/log.lua
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____lualib = require("lualib_bundle")
|
|
3
2
|
local Set = ____lualib.Set
|
|
4
3
|
local __TS__New = ____lualib.__TS__New
|
|
@@ -28,10 +27,10 @@ local getEffectsList = ____player.getEffectsList
|
|
|
28
27
|
local getPlayerName = ____player.getPlayerName
|
|
29
28
|
local ____playerHealth = require("functions.playerHealth")
|
|
30
29
|
local getPlayerHealth = ____playerHealth.getPlayerHealth
|
|
31
|
-
local
|
|
32
|
-
local getRoomData =
|
|
33
|
-
local getRoomGridIndex =
|
|
34
|
-
local getRoomListIndex =
|
|
30
|
+
local ____roomData = require("functions.roomData")
|
|
31
|
+
local getRoomData = ____roomData.getRoomData
|
|
32
|
+
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
33
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
35
34
|
local ____set = require("functions.set")
|
|
36
35
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
37
36
|
local ____trinkets = require("functions.trinkets")
|
|
@@ -55,7 +54,7 @@ function ____exports.log(msg)
|
|
|
55
54
|
local debugMsg = ____exports.getDebugPrependString(nil, msg)
|
|
56
55
|
Isaac.DebugString(debugMsg)
|
|
57
56
|
end
|
|
58
|
-
function ____exports.
|
|
57
|
+
function ____exports.logFlags(flags, flagEnum, description)
|
|
59
58
|
if description == nil then
|
|
60
59
|
description = ""
|
|
61
60
|
end
|
|
@@ -72,19 +71,19 @@ function ____exports.logAllFlags(flags, flagEnum, description)
|
|
|
72
71
|
end
|
|
73
72
|
end
|
|
74
73
|
end
|
|
75
|
-
____exports.log(((("Logging
|
|
74
|
+
____exports.log(((("Logging " .. description) .. "flags for value ") .. tostring(flags)) .. ":")
|
|
76
75
|
local hasNoFlags = true
|
|
77
76
|
for key, value in pairs(flagEnum) do
|
|
78
77
|
do
|
|
79
78
|
if type(value) ~= "number" then
|
|
80
|
-
goto
|
|
79
|
+
goto __continue34
|
|
81
80
|
end
|
|
82
81
|
if hasFlag(nil, flags, value) then
|
|
83
82
|
____exports.log((((" Has flag: " .. tostring(key)) .. " (") .. tostring(value)) .. ")")
|
|
84
83
|
hasNoFlags = false
|
|
85
84
|
end
|
|
86
85
|
end
|
|
87
|
-
::
|
|
86
|
+
::__continue34::
|
|
88
87
|
end
|
|
89
88
|
if hasNoFlags then
|
|
90
89
|
____exports.log(" n/a (no flags)")
|
|
@@ -101,51 +100,6 @@ local IGNORE_EFFECT_VARIANTS = __TS__New(Set, {
|
|
|
101
100
|
EffectVariant.LIGHT,
|
|
102
101
|
EffectVariant.TADPOLE
|
|
103
102
|
})
|
|
104
|
-
function ____exports.logAllDamageFlags(flags)
|
|
105
|
-
____exports.logAllFlags(flags, DamageFlag, "damage")
|
|
106
|
-
end
|
|
107
|
-
function ____exports.logAllEntityFlags(flags)
|
|
108
|
-
____exports.logAllFlags(flags, EntityFlag, "entity")
|
|
109
|
-
end
|
|
110
|
-
function ____exports.logAllGameStateFlags()
|
|
111
|
-
____exports.log("Logging all game state flags:")
|
|
112
|
-
local hasNoFlags = true
|
|
113
|
-
for key, value in pairs(GameStateFlag) do
|
|
114
|
-
local gameStateFlag = value
|
|
115
|
-
local flagValue = game:GetStateFlag(gameStateFlag)
|
|
116
|
-
if flagValue then
|
|
117
|
-
____exports.log((((" Has flag: " .. key) .. " (") .. tostring(value)) .. ")")
|
|
118
|
-
hasNoFlags = false
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
if hasNoFlags then
|
|
122
|
-
____exports.log(" n/a (no flags)")
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
function ____exports.logAllProjectileFlags(flags)
|
|
126
|
-
____exports.logAllFlags(flags, ProjectileFlags, "projectile")
|
|
127
|
-
end
|
|
128
|
-
function ____exports.logAllSeedEffects()
|
|
129
|
-
local seeds = game:GetSeeds()
|
|
130
|
-
____exports.log("Logging all seed effects:")
|
|
131
|
-
local hasNoSeedEffects = true
|
|
132
|
-
for key, value in pairs(SeedEffect) do
|
|
133
|
-
local seedEffect = value
|
|
134
|
-
if seeds:HasSeedEffect(seedEffect) then
|
|
135
|
-
____exports.log((((" " .. key) .. " (") .. tostring(value)) .. ")")
|
|
136
|
-
hasNoSeedEffects = false
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
if hasNoSeedEffects then
|
|
140
|
-
____exports.log(" n/a (no seed effects)")
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
function ____exports.logAllTearFlags(flags)
|
|
144
|
-
____exports.logAllFlags(flags, TearFlags, "tear")
|
|
145
|
-
end
|
|
146
|
-
function ____exports.logAllUseFlags(_flags)
|
|
147
|
-
____exports.log("The \"logAllUseFlags\" helper function is temporarily disabled while the UseFlag enum remains unpatched in vanilla.")
|
|
148
|
-
end
|
|
149
103
|
function ____exports.logArray(array)
|
|
150
104
|
local arrayString = arrayToString(nil, array)
|
|
151
105
|
____exports.log("Array: " .. arrayString)
|
|
@@ -153,8 +107,8 @@ end
|
|
|
153
107
|
function ____exports.logColor(color)
|
|
154
108
|
____exports.log((((((((((((("Color: R" .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO))
|
|
155
109
|
end
|
|
156
|
-
function ____exports.
|
|
157
|
-
____exports.
|
|
110
|
+
function ____exports.logDamageFlags(flags)
|
|
111
|
+
____exports.logFlags(flags, DamageFlag, "damage")
|
|
158
112
|
end
|
|
159
113
|
function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
160
114
|
local headerMsg = "Entities in the room"
|
|
@@ -234,6 +188,27 @@ function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
|
234
188
|
____exports.log(("(" .. tostring(numMatchedEntities)) .. " total entities)")
|
|
235
189
|
end
|
|
236
190
|
end
|
|
191
|
+
function ____exports.logEntity(entity)
|
|
192
|
+
____exports.log((((("Entity: " .. tostring(entity.Type)) .. ".") .. tostring(entity.Variant)) .. ".") .. tostring(entity.SubType))
|
|
193
|
+
end
|
|
194
|
+
function ____exports.logEntityFlags(flags)
|
|
195
|
+
____exports.logFlags(flags, EntityFlag, "entity")
|
|
196
|
+
end
|
|
197
|
+
function ____exports.logGameStateFlags()
|
|
198
|
+
____exports.log("Logging game state flags:")
|
|
199
|
+
local hasNoFlags = true
|
|
200
|
+
for key, value in pairs(GameStateFlag) do
|
|
201
|
+
local gameStateFlag = value
|
|
202
|
+
local flagValue = game:GetStateFlag(gameStateFlag)
|
|
203
|
+
if flagValue then
|
|
204
|
+
____exports.log((((" Has flag: " .. key) .. " (") .. tostring(value)) .. ")")
|
|
205
|
+
hasNoFlags = false
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
if hasNoFlags then
|
|
209
|
+
____exports.log(" n/a (no flags)")
|
|
210
|
+
end
|
|
211
|
+
end
|
|
237
212
|
function ____exports.logGridEntities(includeWalls, gridEntityTypeFilter)
|
|
238
213
|
local headerMsg = "Grid entities in the room"
|
|
239
214
|
if gridEntityTypeFilter ~= nil then
|
|
@@ -329,6 +304,9 @@ function ____exports.logPlayerHealth(player)
|
|
|
329
304
|
____exports.log(" Blood charges: " .. tostring(playerHealth.bloodCharges))
|
|
330
305
|
____exports.log((" Soul heart types: [" .. table.concat(playerHealth.soulHeartTypes, "," or ",")) .. "]")
|
|
331
306
|
end
|
|
307
|
+
function ____exports.logProjectileFlags(flags)
|
|
308
|
+
____exports.logFlags(flags, ProjectileFlags, "projectile")
|
|
309
|
+
end
|
|
332
310
|
function ____exports.logRoom()
|
|
333
311
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
334
312
|
local roomListIndex = getRoomListIndex(nil)
|
|
@@ -343,6 +321,29 @@ function ____exports.logRoom()
|
|
|
343
321
|
____exports.log("Current room grid index: " .. tostring(roomGridIndex))
|
|
344
322
|
____exports.log("Current room list index: " .. tostring(roomListIndex))
|
|
345
323
|
end
|
|
324
|
+
function ____exports.logSeedEffects()
|
|
325
|
+
local seeds = game:GetSeeds()
|
|
326
|
+
____exports.log("Logging seed effects:")
|
|
327
|
+
local hasNoSeedEffects = true
|
|
328
|
+
for key, value in pairs(SeedEffect) do
|
|
329
|
+
local seedEffect = value
|
|
330
|
+
if seeds:HasSeedEffect(seedEffect) then
|
|
331
|
+
____exports.log((((" " .. key) .. " (") .. tostring(value)) .. ")")
|
|
332
|
+
hasNoSeedEffects = false
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
if hasNoSeedEffects then
|
|
336
|
+
____exports.log(" n/a (no seed effects)")
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
function ____exports.logSet(set)
|
|
340
|
+
____exports.log("Printing out a TSTL Set:")
|
|
341
|
+
local setValues = getSortedSetValues(nil, set)
|
|
342
|
+
for ____, value in ipairs(setValues) do
|
|
343
|
+
____exports.log(" Value: " .. tostring(value))
|
|
344
|
+
end
|
|
345
|
+
____exports.log("The size of the set was: " .. tostring(set.size))
|
|
346
|
+
end
|
|
346
347
|
function ____exports.logSounds()
|
|
347
348
|
for ____, soundEffect in ipairs(range(nil, 0, SoundEffect.NUM_SOUND_EFFECTS - 1)) do
|
|
348
349
|
if sfxManager:IsPlaying(soundEffect) then
|
|
@@ -377,9 +378,12 @@ function ____exports.logTable(____table, parentTables)
|
|
|
377
378
|
end
|
|
378
379
|
____exports.log("The size of the table was: " .. tostring(numKeys))
|
|
379
380
|
end
|
|
381
|
+
function ____exports.logTearFlags(flags)
|
|
382
|
+
____exports.logFlags(flags, TearFlags, "tear")
|
|
383
|
+
end
|
|
380
384
|
function ____exports.logTemporaryEffects(player)
|
|
381
385
|
local effects = getEffectsList(nil, player)
|
|
382
|
-
____exports.log("Logging
|
|
386
|
+
____exports.log("Logging player temporary effects:")
|
|
383
387
|
if #effects == 0 then
|
|
384
388
|
____exports.log(" n/a (no temporary effects)")
|
|
385
389
|
return
|
|
@@ -401,13 +405,8 @@ function ____exports.logTemporaryEffects(player)
|
|
|
401
405
|
end
|
|
402
406
|
)
|
|
403
407
|
end
|
|
404
|
-
function ____exports.
|
|
405
|
-
____exports.log("
|
|
406
|
-
local setValues = getSortedSetValues(nil, set)
|
|
407
|
-
for ____, value in ipairs(setValues) do
|
|
408
|
-
____exports.log(" Value: " .. tostring(value))
|
|
409
|
-
end
|
|
410
|
-
____exports.log("The size of the set was: " .. tostring(set.size))
|
|
408
|
+
function ____exports.logUseFlags(_flags)
|
|
409
|
+
____exports.log("The \"logUseFlags\" helper function is temporarily disabled while the UseFlag enum remains unpatched in vanilla.")
|
|
411
410
|
end
|
|
412
411
|
function ____exports.logVector(vector)
|
|
413
412
|
____exports.log(((("Vector: (" .. tostring(vector.X)) .. ", ") .. tostring(vector.Y)) .. ")")
|
|
@@ -415,26 +414,27 @@ end
|
|
|
415
414
|
function ____exports.setLogFunctionsGlobal(self)
|
|
416
415
|
local globals = _G
|
|
417
416
|
globals.log = ____exports.log
|
|
418
|
-
globals.logAllDamageFlags = ____exports.logAllDamageFlags
|
|
419
|
-
globals.logAllEntityFlags = ____exports.logAllEntityFlags
|
|
420
|
-
globals.logAllFlags = ____exports.logAllFlags
|
|
421
|
-
globals.logAllGameStateFlags = ____exports.logAllGameStateFlags
|
|
422
|
-
globals.logAllProjectileFlags = ____exports.logAllProjectileFlags
|
|
423
|
-
globals.logAllSeedEffects = ____exports.logAllSeedEffects
|
|
424
|
-
globals.logAllTearFlags = ____exports.logAllTearFlags
|
|
425
|
-
globals.logAllUseFlags = ____exports.logAllUseFlags
|
|
426
417
|
globals.logArray = ____exports.logArray
|
|
427
418
|
globals.logColor = ____exports.logColor
|
|
428
|
-
globals.
|
|
419
|
+
globals.logDamageFlags = ____exports.logDamageFlags
|
|
429
420
|
globals.logEntities = ____exports.logEntities
|
|
421
|
+
globals.logEntity = ____exports.logEntity
|
|
422
|
+
globals.logEntityFlags = ____exports.logEntityFlags
|
|
423
|
+
globals.logFlags = ____exports.logFlags
|
|
424
|
+
globals.logGameStateFlags = ____exports.logGameStateFlags
|
|
430
425
|
globals.logGridEntities = ____exports.logGridEntities
|
|
431
426
|
globals.logKColor = ____exports.logKColor
|
|
432
427
|
globals.logMap = ____exports.logMap
|
|
428
|
+
globals.logPlayerHealth = ____exports.logPlayerHealth
|
|
429
|
+
globals.logProjectileFlags = ____exports.logProjectileFlags
|
|
433
430
|
globals.logRoom = ____exports.logRoom
|
|
434
|
-
globals.
|
|
435
|
-
globals.logTemporaryEffects = ____exports.logTemporaryEffects
|
|
431
|
+
globals.logSeedEffects = ____exports.logSeedEffects
|
|
436
432
|
globals.logSet = ____exports.logSet
|
|
437
433
|
globals.logSounds = ____exports.logSounds
|
|
434
|
+
globals.logTable = ____exports.logTable
|
|
435
|
+
globals.logTearFlags = ____exports.logTearFlags
|
|
436
|
+
globals.logTemporaryEffects = ____exports.logTemporaryEffects
|
|
437
|
+
globals.logUseFlags = ____exports.logUseFlags
|
|
438
438
|
globals.logVector = ____exports.logVector
|
|
439
439
|
end
|
|
440
440
|
return ____exports
|
package/dist/functions/map.lua
CHANGED
package/dist/functions/math.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export declare function range(start: int, end: int): int[];
|
|
|
36
36
|
* @param numDecimalPlaces Default is 0.
|
|
37
37
|
*/
|
|
38
38
|
export declare function round(num: float, numDecimalPlaces?: number): float;
|
|
39
|
-
export declare function tanh(x: number): number;
|
|
40
39
|
/**
|
|
41
40
|
* @returns 1 if n is positive, -1 if n is negative, or 0 if n is 0.
|
|
42
41
|
*/
|
|
43
42
|
export declare function sign(n: number): int;
|
|
43
|
+
export declare function tanh(x: number): number;
|
package/dist/functions/math.lua
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____lualib = require("lualib_bundle")
|
|
3
2
|
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
4
3
|
local ____exports = {}
|
|
@@ -83,9 +82,6 @@ function ____exports.round(self, num, numDecimalPlaces)
|
|
|
83
82
|
))
|
|
84
83
|
return roundedNum == nil and 0 or roundedNum
|
|
85
84
|
end
|
|
86
|
-
function ____exports.tanh(self, x)
|
|
87
|
-
return (math.exp(x) - math.exp(-x)) / (math.exp(x) + math.exp(-x))
|
|
88
|
-
end
|
|
89
85
|
function ____exports.sign(self, n)
|
|
90
86
|
if n > 0 then
|
|
91
87
|
return 1
|
|
@@ -95,4 +91,7 @@ function ____exports.sign(self, n)
|
|
|
95
91
|
end
|
|
96
92
|
return 0
|
|
97
93
|
end
|
|
94
|
+
function ____exports.tanh(self, x)
|
|
95
|
+
return (math.exp(x) - math.exp(-x)) / (math.exp(x) + math.exp(-x))
|
|
96
|
+
end
|
|
98
97
|
return ____exports
|
package/dist/functions/npc.lua
CHANGED
|
@@ -3,8 +3,6 @@ import { HealthType } from "../enums/HealthType";
|
|
|
3
3
|
import { PlayerIndex } from "../types/PlayerIndex";
|
|
4
4
|
export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
|
|
5
5
|
export declare function addTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
|
|
6
|
-
/** Iterates over all players and checks if any player is close enough to the specified position. */
|
|
7
|
-
export declare function anyPlayerCloserThan(position: Vector, distance: float): boolean;
|
|
8
6
|
export declare function anyPlayerHasCollectible(collectibleType: CollectibleType | int): boolean;
|
|
9
7
|
export declare function anyPlayerHasTrinket(trinketType: TrinketType | int): boolean;
|
|
10
8
|
/**
|
|
@@ -24,6 +22,11 @@ export declare function anyPlayerIs(...matchingCharacters: Array<PlayerType | in
|
|
|
24
22
|
* - the player has Stompy (transformation 13)
|
|
25
23
|
*/
|
|
26
24
|
export declare function canPlayerCrushRocks(player: EntityPlayer): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Helper function for detecting when a player is one of the characters that can take free Devil
|
|
27
|
+
* Deals. (e.g. The Lost, Tainted Lost, etc.)
|
|
28
|
+
*/
|
|
29
|
+
export declare function canTakeFreeDevilDeals(player: EntityPlayer): boolean;
|
|
27
30
|
/**
|
|
28
31
|
* Helper function to determine if the provided character can have red heart containers. Returns
|
|
29
32
|
* true for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper,
|
|
@@ -284,16 +287,11 @@ export declare function isJacobOrEsau(player: EntityPlayer): boolean;
|
|
|
284
287
|
export declare function isKeeper(player: EntityPlayer): boolean;
|
|
285
288
|
/** Helper function for detecting when a player is The Lost or Tainted Lost. */
|
|
286
289
|
export declare function isLost(player: EntityPlayer): boolean;
|
|
287
|
-
|
|
288
|
-
* Helper function for detecting when a player is one of the characters that can take free Devil
|
|
289
|
-
* Deals. (e.g. The Lost, Tainted Lost, etc.)
|
|
290
|
-
*/
|
|
291
|
-
export declare function canTakeFreeDevilDeals(player: EntityPlayer): boolean;
|
|
290
|
+
export declare function isModdedCharacter(player: EntityPlayer): boolean;
|
|
292
291
|
/** Helper function for detecting if a player is one of the Tainted characters. */
|
|
293
292
|
export declare function isTainted(player: EntityPlayer): boolean;
|
|
294
293
|
/** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
|
|
295
294
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
296
|
-
export declare function isModdedCharacter(player: EntityPlayer): boolean;
|
|
297
295
|
export declare function isVanillaCharacter(player: EntityPlayer): boolean;
|
|
298
296
|
/**
|
|
299
297
|
* Helper function to remove a collectible costume from a player. Use this helper function to avoid
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____lualib = require("lualib_bundle")
|
|
3
2
|
local Set = ____lualib.Set
|
|
4
3
|
local __TS__New = ____lualib.__TS__New
|
|
@@ -96,15 +95,15 @@ end
|
|
|
96
95
|
function getPlayerIndexCollectibleType(self, player, differentiateForgottenAndSoul)
|
|
97
96
|
local character = player:GetPlayerType()
|
|
98
97
|
repeat
|
|
99
|
-
local
|
|
100
|
-
local
|
|
101
|
-
if
|
|
98
|
+
local ____switch71 = character
|
|
99
|
+
local ____cond71 = ____switch71 == PlayerType.PLAYER_THESOUL
|
|
100
|
+
if ____cond71 then
|
|
102
101
|
do
|
|
103
102
|
return differentiateForgottenAndSoul and CollectibleType.COLLECTIBLE_SPOON_BENDER or DEFAULT_COLLECTIBLE_TYPE
|
|
104
103
|
end
|
|
105
104
|
end
|
|
106
|
-
|
|
107
|
-
if
|
|
105
|
+
____cond71 = ____cond71 or ____switch71 == PlayerType.PLAYER_LAZARUS2_B
|
|
106
|
+
if ____cond71 then
|
|
108
107
|
do
|
|
109
108
|
return CollectibleType.COLLECTIBLE_INNER_EYE
|
|
110
109
|
end
|
|
@@ -172,16 +171,16 @@ function ____exports.isKeeper(self, player)
|
|
|
172
171
|
local character = player:GetPlayerType()
|
|
173
172
|
return character == PlayerType.PLAYER_KEEPER or character == PlayerType.PLAYER_KEEPER_B
|
|
174
173
|
end
|
|
174
|
+
function ____exports.isModdedCharacter(self, player)
|
|
175
|
+
local character = player:GetPlayerType()
|
|
176
|
+
return character > MAX_VANILLA_CHARACTER
|
|
177
|
+
end
|
|
175
178
|
function isTaintedModded(self, player)
|
|
176
179
|
local character = player:GetPlayerType()
|
|
177
180
|
local name = player:GetName()
|
|
178
181
|
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
179
182
|
return character == taintedCharacter
|
|
180
183
|
end
|
|
181
|
-
function ____exports.isModdedCharacter(self, player)
|
|
182
|
-
local character = player:GetPlayerType()
|
|
183
|
-
return character > MAX_VANILLA_CHARACTER
|
|
184
|
-
end
|
|
185
184
|
function ____exports.isVanillaCharacter(self, player)
|
|
186
185
|
return not ____exports.isModdedCharacter(nil, player)
|
|
187
186
|
end
|
|
@@ -201,13 +200,6 @@ function ____exports.addTrinketCostume(self, player, trinketType)
|
|
|
201
200
|
end
|
|
202
201
|
player:AddCostume(itemConfigTrinket, false)
|
|
203
202
|
end
|
|
204
|
-
function ____exports.anyPlayerCloserThan(self, position, distance)
|
|
205
|
-
local players = ____exports.getPlayers(nil)
|
|
206
|
-
return __TS__ArraySome(
|
|
207
|
-
players,
|
|
208
|
-
function(____, player) return player.Position:Distance(position) <= distance end
|
|
209
|
-
)
|
|
210
|
-
end
|
|
211
203
|
function ____exports.anyPlayerHasCollectible(self, collectibleType)
|
|
212
204
|
local players = ____exports.getPlayers(nil)
|
|
213
205
|
return __TS__ArraySome(
|
|
@@ -235,6 +227,10 @@ function ____exports.canPlayerCrushRocks(self, player)
|
|
|
235
227
|
local effects = player:GetEffects()
|
|
236
228
|
return player:HasCollectible(CollectibleType.COLLECTIBLE_LEO) or player:HasCollectible(CollectibleType.COLLECTIBLE_THUNDER_THIGHS) or effects:HasCollectibleEffect(CollectibleType.COLLECTIBLE_MEGA_MUSH) or player:HasPlayerForm(PlayerForm.PLAYERFORM_STOMPY)
|
|
237
229
|
end
|
|
230
|
+
function ____exports.canTakeFreeDevilDeals(self, player)
|
|
231
|
+
local character = player:GetPlayerType()
|
|
232
|
+
return CHARACTERS_WITH_FREE_DEVIL_DEALS:has(character)
|
|
233
|
+
end
|
|
238
234
|
function ____exports.characterCanHaveRedHearts(self, character)
|
|
239
235
|
return not CHARACTERS_WITH_NO_RED_HEARTS:has(character)
|
|
240
236
|
end
|
|
@@ -515,10 +511,6 @@ function ____exports.isLost(self, player)
|
|
|
515
511
|
local character = player:GetPlayerType()
|
|
516
512
|
return character == PlayerType.PLAYER_THELOST or character == PlayerType.PLAYER_THELOST_B
|
|
517
513
|
end
|
|
518
|
-
function ____exports.canTakeFreeDevilDeals(self, player)
|
|
519
|
-
local character = player:GetPlayerType()
|
|
520
|
-
return CHARACTERS_WITH_FREE_DEVIL_DEALS:has(character)
|
|
521
|
-
end
|
|
522
514
|
function ____exports.isTainted(self, player)
|
|
523
515
|
local character = player:GetPlayerType()
|
|
524
516
|
local ____isVanillaCharacter_result_0
|
|
@@ -571,9 +563,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
571
563
|
itemPool:RemoveCollectible(collectibleType)
|
|
572
564
|
end
|
|
573
565
|
repeat
|
|
574
|
-
local
|
|
575
|
-
local
|
|
576
|
-
if
|
|
566
|
+
local ____switch124 = activeSlot
|
|
567
|
+
local ____cond124 = ____switch124 == ActiveSlot.SLOT_PRIMARY
|
|
568
|
+
if ____cond124 then
|
|
577
569
|
do
|
|
578
570
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
579
571
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -582,8 +574,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
582
574
|
break
|
|
583
575
|
end
|
|
584
576
|
end
|
|
585
|
-
|
|
586
|
-
if
|
|
577
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_SECONDARY
|
|
578
|
+
if ____cond124 then
|
|
587
579
|
do
|
|
588
580
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
589
581
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -598,16 +590,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
598
590
|
break
|
|
599
591
|
end
|
|
600
592
|
end
|
|
601
|
-
|
|
602
|
-
if
|
|
593
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET
|
|
594
|
+
if ____cond124 then
|
|
603
595
|
do
|
|
604
596
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
605
597
|
player:SetActiveCharge(charge, activeSlot)
|
|
606
598
|
break
|
|
607
599
|
end
|
|
608
600
|
end
|
|
609
|
-
|
|
610
|
-
if
|
|
601
|
+
____cond124 = ____cond124 or ____switch124 == ActiveSlot.SLOT_POCKET2
|
|
602
|
+
if ____cond124 then
|
|
611
603
|
do
|
|
612
604
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
613
605
|
break
|