isaacscript-common 2.0.33 → 2.2.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/README.md +1 -1
- package/callbacks/customRevive.lua +11 -11
- package/callbacks/itemPickup.lua +7 -7
- package/callbacks/postBombInitLate.lua +2 -2
- package/callbacks/postBoneSwing.lua +2 -2
- package/callbacks/postCollectibleInitFirst.lua +3 -3
- package/callbacks/postCursedTeleport.lua +6 -6
- package/callbacks/postCustomDoorEnter.lua +9 -9
- package/callbacks/postDoorRender.lua +2 -2
- package/callbacks/postDoorUpdate.lua +2 -2
- package/callbacks/postEffectInitLate.lua +2 -2
- package/callbacks/postEffectStateChanged.lua +3 -3
- package/callbacks/postEsauJr.lua +5 -5
- package/callbacks/postFamiliarInitLate.lua +2 -2
- package/callbacks/postFamiliarStateChanged.lua +3 -3
- package/callbacks/postFlip.lua +4 -4
- package/callbacks/postGreedModeWave.lua +3 -3
- package/callbacks/postGridEntity.lua +7 -7
- package/callbacks/postGridEntityCollision.lua +4 -4
- package/callbacks/postGridEntityRender.lua +2 -2
- package/callbacks/postHolyMantleRemoved.lua +5 -5
- package/callbacks/postItemDischarged.lua +7 -7
- package/callbacks/postKnifeInitLate.lua +2 -2
- package/callbacks/postLaserInitLate.lua +2 -2
- package/callbacks/postNPCInitLate.lua +2 -2
- package/callbacks/postNPCStateChanged.lua +3 -3
- package/callbacks/postNewRoomEarly.lua +4 -4
- package/callbacks/postPickupCollect.lua +3 -3
- package/callbacks/postPickupInitLate.lua +2 -2
- package/callbacks/postPickupStateChanged.lua +3 -3
- package/callbacks/postPitRender.lua +2 -2
- package/callbacks/postPitUpdate.lua +2 -2
- package/callbacks/postPlayerChangeHealth.lua +8 -8
- package/callbacks/postPlayerChangeType.lua +5 -5
- package/callbacks/postPlayerFatalDamage.lua +6 -6
- package/callbacks/postPlayerInitLate.lua +3 -3
- package/callbacks/postPlayerReordered.lua +7 -7
- package/callbacks/postPoopRender.lua +2 -2
- package/callbacks/postPoopUpdate.lua +2 -2
- package/callbacks/postPressurePlateRender.lua +2 -2
- package/callbacks/postPressurePlateUpdate.lua +2 -2
- package/callbacks/postProjectileInitLate.lua +2 -2
- package/callbacks/postPurchase.lua +6 -6
- package/callbacks/postRockRender.lua +2 -2
- package/callbacks/postRockUpdate.lua +2 -2
- package/callbacks/postRoomClearChanged.lua +3 -3
- package/callbacks/postSacrifice.lua +4 -4
- package/callbacks/postSlotInitUpdate.lua +4 -4
- package/callbacks/postSlotRender.lua +6 -6
- package/callbacks/postSpikesRender.lua +2 -2
- package/callbacks/postSpikesUpdate.lua +2 -2
- package/callbacks/postTNTRender.lua +2 -2
- package/callbacks/postTNTUpdate.lua +2 -2
- package/callbacks/postTearInitLate.lua +2 -2
- package/callbacks/postTearInitVeryLate.lua +2 -2
- package/callbacks/postTransformation.lua +6 -6
- package/callbacks/postTrinketBreak.lua +5 -5
- package/callbacks/preBerserkDeath.lua +5 -5
- package/callbacks/preNewLevel.lua +3 -3
- package/callbacks/reorderedCallbacks.lua +4 -4
- package/classes/DefaultMap.d.ts +11 -7
- package/classes/ModUpgraded.d.ts +8 -2
- package/classes/ModUpgraded.lua +1 -1
- package/constants.d.ts +5 -5
- package/constants.lua +2 -2
- package/{constantsMax.d.ts → constantsFirstLast.d.ts} +0 -0
- package/{constantsMax.lua → constantsFirstLast.lua} +2 -2
- package/enums/HealthType.d.ts +2 -2
- package/enums/ModCallbackCustom.d.ts +753 -2
- package/features/characterHealthConversion.d.ts +1 -2
- package/features/characterHealthConversion.lua +3 -3
- package/features/characterStats.lua +3 -3
- package/features/debugDisplay/debugDisplay.lua +4 -4
- package/features/debugDisplay/exports.d.ts +36 -36
- package/features/debugDisplay/exports.lua +2 -2
- package/features/debugDisplay/v.lua +2 -2
- package/features/deployJSONRoom.d.ts +1 -1
- package/features/deployJSONRoom.lua +15 -15
- package/features/disableInputs.d.ts +5 -5
- package/features/disableInputs.lua +3 -3
- package/features/disableSound.d.ts +2 -2
- package/features/disableSound.lua +4 -4
- package/features/extraConsoleCommands/commandsDisplay.d.ts +18 -18
- package/features/extraConsoleCommands/commandsDisplay.lua +1 -1
- package/features/extraConsoleCommands/commandsSubroutines.lua +10 -10
- package/features/extraConsoleCommands/init.d.ts +3 -2
- package/features/extraConsoleCommands/init.lua +83 -83
- package/features/extraConsoleCommands/{commands.d.ts → listCommands.d.ts} +17 -17
- package/features/extraConsoleCommands/{commands.lua → listCommands.lua} +36 -36
- package/features/fadeInRemover.lua +3 -3
- package/features/fastReset.lua +4 -4
- package/features/forgottenSwitch.lua +2 -2
- package/features/getCollectibleItemPoolType.lua +6 -6
- package/features/playerInventory.lua +10 -10
- package/features/{isPonyActive.d.ts → ponyDetection.d.ts} +0 -0
- package/features/{isPonyActive.lua → ponyDetection.lua} +7 -7
- package/features/{preventCollectibleRotate.d.ts → preventCollectibleRotation.d.ts} +1 -1
- package/features/{preventCollectibleRotate.lua → preventCollectibleRotation.lua} +9 -9
- package/features/runInNFrames.lua +3 -3
- package/features/saveDataManager/exports.d.ts +15 -12
- package/features/saveDataManager/exports.lua +6 -6
- package/features/saveDataManager/load.d.ts +1 -1
- package/features/saveDataManager/load.lua +4 -4
- package/features/saveDataManager/main.d.ts +1 -1
- package/features/saveDataManager/main.lua +11 -11
- package/features/saveDataManager/maps.d.ts +1 -1
- package/features/saveDataManager/merge.lua +10 -10
- package/features/saveDataManager/save.d.ts +1 -1
- package/features/saveDataManager/save.lua +5 -5
- package/features/saveDataManager/serializationBrand.lua +2 -2
- package/features/sirenHelpers.lua +3 -3
- package/features/taintedLazarusPlayers.lua +2 -2
- package/functions/array.lua +3 -3
- package/functions/benchmark.lua +1 -1
- package/functions/boss.lua +7 -7
- package/functions/cacheFlag.lua +1 -1
- package/functions/cards.d.ts +1 -1
- package/functions/cards.lua +13 -13
- package/functions/challenges.lua +1 -1
- package/functions/character.lua +9 -9
- package/functions/charge.lua +3 -3
- package/functions/chargeBar.d.ts +1 -8
- package/functions/chargeBar.lua +1 -1
- package/functions/collectibleCacheFlag.d.ts +4 -4
- package/functions/collectibleCacheFlag.lua +6 -6
- package/functions/collectibleSet.lua +5 -5
- package/functions/collectibleTag.lua +6 -6
- package/functions/collectibles.lua +15 -15
- package/functions/color.d.ts +17 -3
- package/functions/color.lua +5 -5
- package/functions/debug.lua +1 -1
- package/functions/deepCopy.lua +13 -13
- package/functions/deepCopyTests.lua +6 -6
- package/functions/direction.lua +3 -3
- package/functions/doors.lua +6 -6
- package/functions/eden.lua +5 -5
- package/functions/entity.lua +5 -5
- package/functions/entitySpecific.d.ts +15 -1
- package/functions/entitySpecific.lua +10 -2
- package/functions/enums.d.ts +3 -3
- package/functions/enums.lua +2 -2
- package/functions/familiars.lua +2 -2
- package/functions/flying.lua +2 -2
- package/functions/globals.lua +3 -3
- package/functions/gridEntity.lua +10 -10
- package/functions/gridEntitySpecific.lua +2 -2
- package/functions/input.lua +4 -4
- package/functions/jsonHelpers.lua +1 -1
- package/functions/jsonRoom.d.ts +1 -1
- package/functions/jsonRoom.lua +4 -4
- package/functions/kColor.d.ts +1 -1
- package/functions/kColor.lua +5 -5
- package/functions/level.lua +3 -3
- package/functions/log.lua +15 -15
- package/functions/math.lua +1 -1
- package/functions/mergeTests.lua +7 -7
- package/functions/npc.lua +3 -3
- package/functions/pickups.lua +6 -6
- package/functions/pills.lua +15 -15
- package/functions/player.lua +11 -11
- package/functions/playerDataStructures.d.ts +51 -0
- package/functions/playerDataStructures.lua +5 -1
- package/functions/playerHealth.d.ts +1 -1
- package/functions/playerHealth.lua +4 -4
- package/functions/playerIndex.lua +1 -1
- package/functions/pocketItems.d.ts +1 -1
- package/functions/pocketItems.lua +3 -3
- package/functions/positionVelocity.lua +6 -6
- package/functions/random.lua +1 -1
- package/functions/revive.lua +6 -6
- package/functions/rng.d.ts +1 -1
- package/functions/rng.lua +6 -6
- package/functions/roomData.lua +4 -4
- package/functions/roomGrid.lua +3 -3
- package/functions/roomShape.lua +8 -8
- package/functions/rooms.lua +12 -12
- package/functions/run.lua +4 -4
- package/functions/seeds.lua +2 -2
- package/functions/serialization.lua +5 -5
- package/functions/set.lua +2 -2
- package/functions/sound.lua +2 -2
- package/functions/spawnCollectible.lua +10 -10
- package/functions/sprite.lua +3 -3
- package/functions/stage.lua +2 -2
- package/functions/transformations.lua +6 -6
- package/functions/trinketCacheFlag.lua +3 -3
- package/functions/trinketGive.d.ts +1 -1
- package/functions/trinketGive.lua +3 -3
- package/functions/trinkets.d.ts +3 -3
- package/functions/trinkets.lua +14 -14
- package/functions/tstlClass.lua +1 -1
- package/functions/ui.lua +3 -3
- package/functions/utils.d.ts +2 -2
- package/functions/utils.lua +1 -1
- package/functions/vector.d.ts +1 -1
- package/functions/vector.lua +5 -5
- package/index.d.ts +14 -13
- package/index.lua +123 -123
- package/initCustomCallbacks.lua +58 -58
- package/initFeatures.lua +19 -19
- package/{types → interfaces}/AddCallbackParameterCustom.d.ts +0 -0
- package/{types → interfaces}/AddCallbackParameterCustom.lua +1 -1
- package/interfaces/ChargeBarSprites.d.ts +13 -0
- package/{types/JSONDoor.lua → interfaces/ChargeBarSprites.lua} +0 -0
- package/{types → interfaces}/JSONDoor.d.ts +1 -0
- package/{types/JSONEntity.lua → interfaces/JSONDoor.lua} +0 -0
- package/{types → interfaces}/JSONEntity.d.ts +1 -0
- package/{types/JSONRoom.lua → interfaces/JSONEntity.lua} +0 -0
- package/{types → interfaces}/JSONRoom.d.ts +1 -5
- package/{types/JSONRooms.lua → interfaces/JSONRoom.lua} +0 -0
- package/{types → interfaces}/JSONRooms.d.ts +0 -0
- package/{types/JSONSpawn.lua → interfaces/JSONRooms.lua} +0 -0
- package/{types → interfaces}/JSONSpawn.d.ts +1 -0
- package/{types/PlayerHealth.lua → interfaces/JSONSpawn.lua} +0 -0
- package/{types → interfaces}/PlayerHealth.d.ts +1 -0
- package/{types/PocketItemDescription.lua → interfaces/PlayerHealth.lua} +0 -0
- package/{types → interfaces}/PocketItemDescription.d.ts +1 -0
- package/{types/Primitive.lua → interfaces/PocketItemDescription.lua} +0 -0
- package/interfaces/SaveData.d.ts +29 -0
- package/{types/private → interfaces}/SaveData.lua +0 -0
- package/{types → interfaces}/TrinketSituation.d.ts +1 -0
- package/{types → interfaces}/TrinketSituation.lua +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.d.ts +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.lua +0 -0
- package/maps/cardMap.lua +85 -85
- package/maps/characterMap.lua +58 -58
- package/maps/defaultPlayerStatMap.lua +1 -1
- package/maps/pillEffectMap.lua +39 -39
- package/maps/roomTypeMap.lua +12 -12
- package/objects/LRoomShapeToRectangles.lua +1 -1
- package/objects/callbackRegisterFunctions.d.ts +1 -1
- package/objects/callbackRegisterFunctions.lua +76 -76
- package/objects/directionToVector.lua +1 -1
- package/objects/isaacAPIClassTypeToBrand.lua +2 -2
- package/objects/isaacAPIClassTypeToCopyFunction.lua +5 -5
- package/objects/roomShapeBounds.lua +1 -1
- package/objects/roomShapeLayoutSizes.lua +1 -1
- package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +1 -1
- package/objects/roomShapeToTopLeftPosition.lua +1 -1
- package/objects/roomTypeNames.lua +1 -1
- package/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +5 -5
- package/package.json +2 -2
- package/patchErrorFunctions.lua +1 -1
- package/types/CollectibleIndex.d.ts +2 -2
- package/types/PickingUpItem.d.ts +12 -2
- package/types/PickingUpItem.lua +3 -0
- package/types/PlayerIndex.d.ts +2 -2
- package/types/private/IsaacAPIClass.d.ts +1 -1
- package/types/private/SerializedIsaacAPIClass.d.ts +1 -1
- package/types/private/TSTLClass.d.ts +1 -1
- package/upgradeMod.d.ts +2 -1
- package/upgradeMod.lua +7 -7
- package/types/Primitive.d.ts +0 -1
- package/types/private/SaveData.d.ts +0 -22
package/functions/gridEntity.lua
CHANGED
|
@@ -11,26 +11,26 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
11
11
|
local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
|
|
12
12
|
local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
|
|
13
13
|
local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
|
|
14
|
-
local ____cachedClasses = require("
|
|
14
|
+
local ____cachedClasses = require("cachedClasses")
|
|
15
15
|
local game = ____cachedClasses.game
|
|
16
|
-
local ____constants = require("
|
|
16
|
+
local ____constants = require("constants")
|
|
17
17
|
local DISTANCE_OF_GRID_TILE = ____constants.DISTANCE_OF_GRID_TILE
|
|
18
|
-
local ____gridEntityTypeToBrokenStateMap = require("
|
|
18
|
+
local ____gridEntityTypeToBrokenStateMap = require("maps.gridEntityTypeToBrokenStateMap")
|
|
19
19
|
local GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP = ____gridEntityTypeToBrokenStateMap.GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP
|
|
20
|
-
local ____gridEntityXMLMap = require("
|
|
20
|
+
local ____gridEntityXMLMap = require("maps.gridEntityXMLMap")
|
|
21
21
|
local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
|
|
22
|
-
local ____roomShapeToTopLeftWallGridIndexMap = require("
|
|
22
|
+
local ____roomShapeToTopLeftWallGridIndexMap = require("maps.roomShapeToTopLeftWallGridIndexMap")
|
|
23
23
|
local DEFAULT_TOP_LEFT_WALL_GRID_INDEX = ____roomShapeToTopLeftWallGridIndexMap.DEFAULT_TOP_LEFT_WALL_GRID_INDEX
|
|
24
24
|
local ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = ____roomShapeToTopLeftWallGridIndexMap.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP
|
|
25
|
-
local ____math = require("
|
|
25
|
+
local ____math = require("functions.math")
|
|
26
26
|
local isCircleIntersectingRectangle = ____math.isCircleIntersectingRectangle
|
|
27
|
-
local ____rooms = require("
|
|
27
|
+
local ____rooms = require("functions.rooms")
|
|
28
28
|
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
29
|
-
local ____sprite = require("
|
|
29
|
+
local ____sprite = require("functions.sprite")
|
|
30
30
|
local clearSprite = ____sprite.clearSprite
|
|
31
|
-
local ____utils = require("
|
|
31
|
+
local ____utils = require("functions.utils")
|
|
32
32
|
local erange = ____utils.erange
|
|
33
|
-
local ____vector = require("
|
|
33
|
+
local ____vector = require("functions.vector")
|
|
34
34
|
local isVector = ____vector.isVector
|
|
35
35
|
function getAllGridEntities(self)
|
|
36
36
|
local room = game:GetRoom()
|
|
@@ -3,9 +3,9 @@ local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
5
|
local PressurePlateState = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateState
|
|
6
|
-
local ____cachedClasses = require("
|
|
6
|
+
local ____cachedClasses = require("cachedClasses")
|
|
7
7
|
local game = ____cachedClasses.game
|
|
8
|
-
local ____gridEntity = require("
|
|
8
|
+
local ____gridEntity = require("functions.gridEntity")
|
|
9
9
|
local getGridEntities = ____gridEntity.getGridEntities
|
|
10
10
|
function ____exports.getPits(self)
|
|
11
11
|
local gridEntities = getGridEntities(nil)
|
package/functions/input.lua
CHANGED
|
@@ -8,13 +8,13 @@ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
|
8
8
|
local Controller = ____isaac_2Dtypescript_2Ddefinitions.Controller
|
|
9
9
|
local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
|
|
10
10
|
local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
|
|
11
|
-
local ____constants = require("
|
|
11
|
+
local ____constants = require("constants")
|
|
12
12
|
local MAX_NUM_INPUTS = ____constants.MAX_NUM_INPUTS
|
|
13
|
-
local ____set = require("
|
|
13
|
+
local ____set = require("functions.set")
|
|
14
14
|
local copySet = ____set.copySet
|
|
15
|
-
local ____string = require("
|
|
15
|
+
local ____string = require("functions.string")
|
|
16
16
|
local trimPrefix = ____string.trimPrefix
|
|
17
|
-
local ____utils = require("
|
|
17
|
+
local ____utils = require("functions.utils")
|
|
18
18
|
local erange = ____utils.erange
|
|
19
19
|
local MODIFIER_KEYS = {
|
|
20
20
|
Keyboard.LEFT_SHIFT,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local json = require("@NoResolution:json")
|
|
3
|
-
local ____log = require("
|
|
3
|
+
local ____log = require("functions.log")
|
|
4
4
|
local logError = ____log.logError
|
|
5
5
|
local function tryDecode(jsonString)
|
|
6
6
|
return json.decode(jsonString)
|
package/functions/jsonRoom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
import { JSONRoom } from "../
|
|
2
|
+
import { JSONRoom } from "../interfaces/JSONRoom";
|
|
3
3
|
export declare function getJSONRoomOfVariant(jsonRooms: JSONRoom[], variant: int): JSONRoom | undefined;
|
|
4
4
|
export declare function getJSONRoomsOfSubType(jsonRooms: JSONRoom[], subType: int): JSONRoom[];
|
|
5
5
|
/**
|
package/functions/jsonRoom.lua
CHANGED
|
@@ -3,13 +3,13 @@ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
|
3
3
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local getTotalWeightOfJSONRooms, getJSONRoomWithChosenWeight
|
|
6
|
-
local ____array = require("
|
|
6
|
+
local ____array = require("functions.array")
|
|
7
7
|
local sumArray = ____array.sumArray
|
|
8
|
-
local ____log = require("
|
|
8
|
+
local ____log = require("functions.log")
|
|
9
9
|
local log = ____log.log
|
|
10
|
-
local ____random = require("
|
|
10
|
+
local ____random = require("functions.random")
|
|
11
11
|
local getRandomFloat = ____random.getRandomFloat
|
|
12
|
-
local ____rng = require("
|
|
12
|
+
local ____rng = require("functions.rng")
|
|
13
13
|
local getRandomSeed = ____rng.getRandomSeed
|
|
14
14
|
function getTotalWeightOfJSONRooms(self, jsonRooms)
|
|
15
15
|
local weights = __TS__ArrayMap(
|
package/functions/kColor.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
3
3
|
import { SerializationType } from "../enums/SerializationType";
|
|
4
4
|
declare type SerializedKColor = LuaTable<string, unknown> & {
|
|
5
|
-
__serializedKColorBrand:
|
|
5
|
+
__serializedKColorBrand: void;
|
|
6
6
|
};
|
|
7
7
|
interface CopyKColorReturn {
|
|
8
8
|
[SerializationType.NONE]: KColor;
|
package/functions/kColor.lua
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local OBJECT_NAME
|
|
3
|
-
local ____SerializationBrand = require("
|
|
3
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
4
4
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
5
|
-
local ____SerializationType = require("
|
|
5
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
6
6
|
local SerializationType = ____SerializationType.SerializationType
|
|
7
|
-
local ____isaacAPIClass = require("
|
|
7
|
+
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
8
8
|
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
9
9
|
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
10
|
-
local ____table = require("
|
|
10
|
+
local ____table = require("functions.table")
|
|
11
11
|
local copyValuesToTable = ____table.copyValuesToTable
|
|
12
12
|
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
13
13
|
local tableHasKeys = ____table.tableHasKeys
|
|
14
|
-
local ____utils = require("
|
|
14
|
+
local ____utils = require("functions.utils")
|
|
15
15
|
local ensureAllCases = ____utils.ensureAllCases
|
|
16
16
|
function ____exports.isKColor(self, object)
|
|
17
17
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
package/functions/level.lua
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
4
|
-
local ____cachedClasses = require("
|
|
4
|
+
local ____cachedClasses = require("cachedClasses")
|
|
5
5
|
local game = ____cachedClasses.game
|
|
6
|
-
local ____enums = require("
|
|
6
|
+
local ____enums = require("functions.enums")
|
|
7
7
|
local getEnumValues = ____enums.getEnumValues
|
|
8
|
-
local ____rooms = require("
|
|
8
|
+
local ____rooms = require("functions.rooms")
|
|
9
9
|
local getNumRooms = ____rooms.getNumRooms
|
|
10
10
|
local getRooms = ____rooms.getRooms
|
|
11
11
|
local isDoorSlotValidAtGridIndexForRedRoom = ____rooms.isDoorSlotValidAtGridIndexForRedRoom
|
package/functions/log.lua
CHANGED
|
@@ -18,40 +18,40 @@ local SeedEffect = ____isaac_2Dtypescript_2Ddefinitions.SeedEffect
|
|
|
18
18
|
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
19
19
|
local TearFlag = ____isaac_2Dtypescript_2Ddefinitions.TearFlag
|
|
20
20
|
local UseFlag = ____isaac_2Dtypescript_2Ddefinitions.UseFlag
|
|
21
|
-
local ____cachedClasses = require("
|
|
21
|
+
local ____cachedClasses = require("cachedClasses")
|
|
22
22
|
local game = ____cachedClasses.game
|
|
23
23
|
local sfxManager = ____cachedClasses.sfxManager
|
|
24
|
-
local ____array = require("
|
|
24
|
+
local ____array = require("functions.array")
|
|
25
25
|
local arrayToString = ____array.arrayToString
|
|
26
|
-
local ____collectibles = require("
|
|
26
|
+
local ____collectibles = require("functions.collectibles")
|
|
27
27
|
local getCollectibleName = ____collectibles.getCollectibleName
|
|
28
|
-
local ____entity = require("
|
|
28
|
+
local ____entity = require("functions.entity")
|
|
29
29
|
local getEntities = ____entity.getEntities
|
|
30
30
|
local getEntityID = ____entity.getEntityID
|
|
31
|
-
local ____enums = require("
|
|
31
|
+
local ____enums = require("functions.enums")
|
|
32
32
|
local getEnumEntries = ____enums.getEnumEntries
|
|
33
|
-
local ____flag = require("
|
|
33
|
+
local ____flag = require("functions.flag")
|
|
34
34
|
local hasFlag = ____flag.hasFlag
|
|
35
|
-
local ____gridEntity = require("
|
|
35
|
+
local ____gridEntity = require("functions.gridEntity")
|
|
36
36
|
local getGridEntities = ____gridEntity.getGridEntities
|
|
37
|
-
local ____isaacAPIClass = require("
|
|
37
|
+
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
38
38
|
local getIsaacAPIClassType = ____isaacAPIClass.getIsaacAPIClassType
|
|
39
|
-
local ____player = require("
|
|
39
|
+
local ____player = require("functions.player")
|
|
40
40
|
local getEffectsList = ____player.getEffectsList
|
|
41
41
|
local getPlayerName = ____player.getPlayerName
|
|
42
|
-
local ____playerHealth = require("
|
|
42
|
+
local ____playerHealth = require("functions.playerHealth")
|
|
43
43
|
local getPlayerHealth = ____playerHealth.getPlayerHealth
|
|
44
|
-
local ____roomData = require("
|
|
44
|
+
local ____roomData = require("functions.roomData")
|
|
45
45
|
local getRoomData = ____roomData.getRoomData
|
|
46
46
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
47
47
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
48
|
-
local ____set = require("
|
|
48
|
+
local ____set = require("functions.set")
|
|
49
49
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
50
|
-
local ____trinkets = require("
|
|
50
|
+
local ____trinkets = require("functions.trinkets")
|
|
51
51
|
local getTrinketName = ____trinkets.getTrinketName
|
|
52
|
-
local ____utils = require("
|
|
52
|
+
local ____utils = require("functions.utils")
|
|
53
53
|
local printConsole = ____utils.printConsole
|
|
54
|
-
local ____vector = require("
|
|
54
|
+
local ____vector = require("functions.vector")
|
|
55
55
|
local vectorToString = ____vector.vectorToString
|
|
56
56
|
function ____exports.getDebugPrependString(self, msg, numParentFunctions)
|
|
57
57
|
if numParentFunctions == nil then
|
package/functions/math.lua
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
4
|
-
local ____direction = require("
|
|
4
|
+
local ____direction = require("functions.direction")
|
|
5
5
|
local directionToVector = ____direction.directionToVector
|
|
6
6
|
function ____exports.clamp(self, x, min, max)
|
|
7
7
|
return math.max(
|
package/functions/mergeTests.lua
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local oldTableHasUpdatedValue, newTableHasSameValue, oldTableHasUpdatedValueFromNull, oldTableHasSerializedIsaacAPIClass, oldTableHasFilledInterface, oldTableHasVector, oldTableHasVectorSerialized, oldTableHasRNG, oldTableHasRNGSerialized
|
|
3
|
-
local ____SerializationType = require("
|
|
3
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
4
4
|
local SerializationType = ____SerializationType.SerializationType
|
|
5
|
-
local ____merge = require("
|
|
5
|
+
local ____merge = require("features.saveDataManager.merge")
|
|
6
6
|
local merge = ____merge.merge
|
|
7
|
-
local ____deepCopy = require("
|
|
7
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
8
8
|
local deepCopy = ____deepCopy.deepCopy
|
|
9
|
-
local ____log = require("
|
|
9
|
+
local ____log = require("functions.log")
|
|
10
10
|
local log = ____log.log
|
|
11
|
-
local ____rng = require("
|
|
11
|
+
local ____rng = require("functions.rng")
|
|
12
12
|
local isRNG = ____rng.isRNG
|
|
13
13
|
local newRNG = ____rng.newRNG
|
|
14
|
-
local ____serialization = require("
|
|
14
|
+
local ____serialization = require("functions.serialization")
|
|
15
15
|
local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
|
|
16
|
-
local ____vector = require("
|
|
16
|
+
local ____vector = require("functions.vector")
|
|
17
17
|
local copyVector = ____vector.copyVector
|
|
18
18
|
local isVector = ____vector.isVector
|
|
19
19
|
function oldTableHasUpdatedValue(self)
|
package/functions/npc.lua
CHANGED
|
@@ -20,11 +20,11 @@ local PeepVariant = ____isaac_2Dtypescript_2Ddefinitions.PeepVariant
|
|
|
20
20
|
local ProjectilesMode = ____isaac_2Dtypescript_2Ddefinitions.ProjectilesMode
|
|
21
21
|
local RaglingVariant = ____isaac_2Dtypescript_2Ddefinitions.RaglingVariant
|
|
22
22
|
local VisVariant = ____isaac_2Dtypescript_2Ddefinitions.VisVariant
|
|
23
|
-
local ____constants = require("
|
|
23
|
+
local ____constants = require("constants")
|
|
24
24
|
local EGGY_STATE_FRAME_OF_FINAL_SPIDER = ____constants.EGGY_STATE_FRAME_OF_FINAL_SPIDER
|
|
25
|
-
local ____entity = require("
|
|
25
|
+
local ____entity = require("functions.entity")
|
|
26
26
|
local getFilteredNewEntities = ____entity.getFilteredNewEntities
|
|
27
|
-
local ____entitySpecific = require("
|
|
27
|
+
local ____entitySpecific = require("functions.entitySpecific")
|
|
28
28
|
local getNPCs = ____entitySpecific.getNPCs
|
|
29
29
|
local getProjectiles = ____entitySpecific.getProjectiles
|
|
30
30
|
function ____exports.isAliveExceptionNPC(self, npc)
|
package/functions/pickups.lua
CHANGED
|
@@ -3,20 +3,20 @@ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
5
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
|
-
local ____constants = require("
|
|
6
|
+
local ____constants = require("constants")
|
|
7
7
|
local VectorZero = ____constants.VectorZero
|
|
8
|
-
local ____coinSubTypeToValue = require("
|
|
8
|
+
local ____coinSubTypeToValue = require("objects.coinSubTypeToValue")
|
|
9
9
|
local COIN_SUBTYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUBTYPE_TO_VALUE
|
|
10
10
|
local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
|
|
11
|
-
local ____chestPickupVariantsSet = require("
|
|
11
|
+
local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
|
|
12
12
|
local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
|
|
13
|
-
local ____redHeartSubTypesSet = require("
|
|
13
|
+
local ____redHeartSubTypesSet = require("sets.redHeartSubTypesSet")
|
|
14
14
|
local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
|
|
15
|
-
local ____entitySpecific = require("
|
|
15
|
+
local ____entitySpecific = require("functions.entitySpecific")
|
|
16
16
|
local getPickups = ____entitySpecific.getPickups
|
|
17
17
|
local removeAllPickups = ____entitySpecific.removeAllPickups
|
|
18
18
|
local spawnPickup = ____entitySpecific.spawnPickup
|
|
19
|
-
local ____pickupVariants = require("
|
|
19
|
+
local ____pickupVariants = require("functions.pickupVariants")
|
|
20
20
|
local isHeart = ____pickupVariants.isHeart
|
|
21
21
|
function ____exports.getBatteries(self, matchingSubType)
|
|
22
22
|
if matchingSubType == nil then
|
package/functions/pills.lua
CHANGED
|
@@ -3,29 +3,29 @@ local __TS__ArraySlice = ____lualib.__TS__ArraySlice
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
5
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
6
|
-
local ____cachedClasses = require("
|
|
6
|
+
local ____cachedClasses = require("cachedClasses")
|
|
7
7
|
local itemConfig = ____cachedClasses.itemConfig
|
|
8
|
-
local
|
|
9
|
-
local FIRST_HORSE_PILL_COLOR =
|
|
10
|
-
local FIRST_MODDED_PILL_EFFECT =
|
|
11
|
-
local FIRST_PILL_COLOR =
|
|
12
|
-
local FIRST_PILL_EFFECT =
|
|
13
|
-
local LAST_HORSE_PILL_COLOR =
|
|
14
|
-
local LAST_NORMAL_PILL_COLOR =
|
|
15
|
-
local LAST_PILL_EFFECT =
|
|
16
|
-
local LAST_VANILLA_PILL_EFFECT =
|
|
17
|
-
local ____pillEffectClasses = require("
|
|
8
|
+
local ____constantsFirstLast = require("constantsFirstLast")
|
|
9
|
+
local FIRST_HORSE_PILL_COLOR = ____constantsFirstLast.FIRST_HORSE_PILL_COLOR
|
|
10
|
+
local FIRST_MODDED_PILL_EFFECT = ____constantsFirstLast.FIRST_MODDED_PILL_EFFECT
|
|
11
|
+
local FIRST_PILL_COLOR = ____constantsFirstLast.FIRST_PILL_COLOR
|
|
12
|
+
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
|
|
13
|
+
local LAST_HORSE_PILL_COLOR = ____constantsFirstLast.LAST_HORSE_PILL_COLOR
|
|
14
|
+
local LAST_NORMAL_PILL_COLOR = ____constantsFirstLast.LAST_NORMAL_PILL_COLOR
|
|
15
|
+
local LAST_PILL_EFFECT = ____constantsFirstLast.LAST_PILL_EFFECT
|
|
16
|
+
local LAST_VANILLA_PILL_EFFECT = ____constantsFirstLast.LAST_VANILLA_PILL_EFFECT
|
|
17
|
+
local ____pillEffectClasses = require("objects.pillEffectClasses")
|
|
18
18
|
local DEFAULT_PILL_EFFECT_CLASS = ____pillEffectClasses.DEFAULT_PILL_EFFECT_CLASS
|
|
19
19
|
local PILL_EFFECT_CLASSES = ____pillEffectClasses.PILL_EFFECT_CLASSES
|
|
20
|
-
local ____pillEffectNames = require("
|
|
20
|
+
local ____pillEffectNames = require("objects.pillEffectNames")
|
|
21
21
|
local DEFAULT_PILL_EFFECT_NAME = ____pillEffectNames.DEFAULT_PILL_EFFECT_NAME
|
|
22
22
|
local PILL_EFFECT_NAMES = ____pillEffectNames.PILL_EFFECT_NAMES
|
|
23
|
-
local ____pillEffectTypes = require("
|
|
23
|
+
local ____pillEffectTypes = require("objects.pillEffectTypes")
|
|
24
24
|
local DEFAULT_PILL_EFFECT_TYPE = ____pillEffectTypes.DEFAULT_PILL_EFFECT_TYPE
|
|
25
25
|
local PILL_EFFECT_TYPES = ____pillEffectTypes.PILL_EFFECT_TYPES
|
|
26
|
-
local ____enums = require("
|
|
26
|
+
local ____enums = require("functions.enums")
|
|
27
27
|
local getEnumValues = ____enums.getEnumValues
|
|
28
|
-
local ____utils = require("
|
|
28
|
+
local ____utils = require("functions.utils")
|
|
29
29
|
local irange = ____utils.irange
|
|
30
30
|
local HORSE_PILL_ADJUSTMENT = 2048
|
|
31
31
|
function ____exports.getAllPillColors(self)
|
package/functions/player.lua
CHANGED
|
@@ -19,34 +19,34 @@ local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
|
19
19
|
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
20
20
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
21
21
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
22
|
-
local ____cachedClasses = require("
|
|
22
|
+
local ____cachedClasses = require("cachedClasses")
|
|
23
23
|
local game = ____cachedClasses.game
|
|
24
24
|
local itemConfig = ____cachedClasses.itemConfig
|
|
25
|
-
local ____HealthType = require("
|
|
25
|
+
local ____HealthType = require("enums.HealthType")
|
|
26
26
|
local HealthType = ____HealthType.HealthType
|
|
27
|
-
local ____array = require("
|
|
27
|
+
local ____array = require("functions.array")
|
|
28
28
|
local getLastElement = ____array.getLastElement
|
|
29
29
|
local sumArray = ____array.sumArray
|
|
30
|
-
local ____bitwise = require("
|
|
30
|
+
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 ____character = require("
|
|
34
|
+
local ____character = require("functions.character")
|
|
35
35
|
local getCharacterMaxHeartContainers = ____character.getCharacterMaxHeartContainers
|
|
36
36
|
local getCharacterName = ____character.getCharacterName
|
|
37
37
|
local isVanillaCharacter = ____character.isVanillaCharacter
|
|
38
|
-
local ____collectibles = require("
|
|
38
|
+
local ____collectibles = require("functions.collectibles")
|
|
39
39
|
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
40
|
-
local ____collectibleSet = require("
|
|
40
|
+
local ____collectibleSet = require("functions.collectibleSet")
|
|
41
41
|
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
42
|
-
local ____enums = require("
|
|
42
|
+
local ____enums = require("functions.enums")
|
|
43
43
|
local getEnumValues = ____enums.getEnumValues
|
|
44
|
-
local ____playerIndex = require("
|
|
44
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
45
45
|
local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
|
|
46
46
|
local getPlayers = ____playerIndex.getPlayers
|
|
47
|
-
local ____tears = require("
|
|
47
|
+
local ____tears = require("functions.tears")
|
|
48
48
|
local addTearsStat = ____tears.addTearsStat
|
|
49
|
-
local ____utils = require("
|
|
49
|
+
local ____utils = require("functions.utils")
|
|
50
50
|
local ensureAllCases = ____utils.ensureAllCases
|
|
51
51
|
local ____repeat = ____utils["repeat"]
|
|
52
52
|
function ____exports.getCharacters(self)
|
|
@@ -4,6 +4,20 @@ import { PlayerIndex } from "../types/PlayerIndex";
|
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to make using default maps with an index of `PlayerIndex` easier. Use this
|
|
6
6
|
* instead of the `DefaultMap.getAndSetDefault` method if you have a default map of this type.
|
|
7
|
+
*
|
|
8
|
+
* For example:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* const v = {
|
|
12
|
+
* run: {
|
|
13
|
+
* playersSpeedBoost: new DefaultMap<PlayerIndex, int>(0),
|
|
14
|
+
* },
|
|
15
|
+
* };
|
|
16
|
+
*
|
|
17
|
+
* function evaluateCacheSpeed(player: EntityPlayer) {
|
|
18
|
+
* player.MoveSpeed = defaultMapGetPlayer(v.run.playersSpeedBoost, player);
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
7
21
|
*/
|
|
8
22
|
export declare function defaultMapGetPlayer<V, A extends unknown[]>(map: DefaultMap<PlayerIndex, V, A>, player: EntityPlayer, ...extraArgs: A): V;
|
|
9
23
|
/**
|
|
@@ -17,11 +31,48 @@ export declare function defaultMapSetPlayer<V>(map: Map<PlayerIndex, V>, player:
|
|
|
17
31
|
/**
|
|
18
32
|
* Helper function to make using maps with an index of `PlayerIndex` easier. Use this instead of the
|
|
19
33
|
* `Map.get` method if you have a map of this type.
|
|
34
|
+
*
|
|
35
|
+
* For example:
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* const v = {
|
|
39
|
+
* run: {
|
|
40
|
+
* playersSpeedBoost: new Map<PlayerIndex, int>(),
|
|
41
|
+
* },
|
|
42
|
+
* };
|
|
43
|
+
*
|
|
44
|
+
* function incrementSpeedBoost(player: EntityPlayer) {
|
|
45
|
+
* const oldSpeedBoost = mapGetPlayer(v.run.playersSpeedBoost, player);
|
|
46
|
+
* const newSpeedBoost = oldSpeedBoost + 0.1;
|
|
47
|
+
* mapSetPlayer(v.run.playersSpeedBoost, player);
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
20
50
|
*/
|
|
21
51
|
export declare function mapGetPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer): V | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Helper function to make using maps with an index of `PlayerIndex` easier. Use this instead of the
|
|
54
|
+
* `Map.has` method if you have a map of this type.
|
|
55
|
+
*/
|
|
56
|
+
export declare function mapHasPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer): boolean;
|
|
22
57
|
/**
|
|
23
58
|
* Helper function to make using maps with an index of `PlayerIndex` easier. Use this instead of the
|
|
24
59
|
* `Map.set` method if you have a map of this type.
|
|
60
|
+
*
|
|
61
|
+
* For example:
|
|
62
|
+
*
|
|
63
|
+
* ```ts
|
|
64
|
+
* const v = {
|
|
65
|
+
* run: {
|
|
66
|
+
* playersSpeedBoost: new Map<PlayerIndex, int>(),
|
|
67
|
+
* },
|
|
68
|
+
* };
|
|
69
|
+
*
|
|
70
|
+
* function incrementSpeedBoost(player: EntityPlayer) {
|
|
71
|
+
* const oldSpeedBoost = mapGetPlayer(v.run.playersSpeedBoost, player);
|
|
72
|
+
* const newSpeedBoost = oldSpeedBoost + 0.1;
|
|
73
|
+
* mapSetPlayer(v.run.playersSpeedBoost, player);
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
25
76
|
*/
|
|
26
77
|
export declare function mapSetPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer, value: V): void;
|
|
27
78
|
/**
|
|
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local Set = ____lualib.Set
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local ____playerIndex = require("
|
|
5
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
6
6
|
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
7
7
|
function ____exports.mapSetPlayer(self, map, player, value)
|
|
8
8
|
local playerIndex = getPlayerIndex(nil, player)
|
|
@@ -19,6 +19,10 @@ function ____exports.mapGetPlayer(self, map, player)
|
|
|
19
19
|
local playerIndex = getPlayerIndex(nil, player)
|
|
20
20
|
return map:get(playerIndex)
|
|
21
21
|
end
|
|
22
|
+
function ____exports.mapHasPlayer(self, map, player)
|
|
23
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
24
|
+
return map:has(playerIndex)
|
|
25
|
+
end
|
|
22
26
|
function ____exports.setAddPlayer(self, set, player)
|
|
23
27
|
local playerIndex = getPlayerIndex(nil, player)
|
|
24
28
|
return set:add(playerIndex)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
import { HealthType } from "../enums/HealthType";
|
|
3
|
-
import { PlayerHealth } from "../
|
|
3
|
+
import { PlayerHealth } from "../interfaces/PlayerHealth";
|
|
4
4
|
export declare function addPlayerHealthType(player: EntityPlayer, healthType: HealthType, numHearts: int): void;
|
|
5
5
|
/**
|
|
6
6
|
* Helper function to get an object representing the player's health. You can use this in
|
|
@@ -4,16 +4,16 @@ local ____exports = {}
|
|
|
4
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
5
|
local HeartSubType = ____isaac_2Dtypescript_2Ddefinitions.HeartSubType
|
|
6
6
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
7
|
-
local ____constants = require("
|
|
7
|
+
local ____constants = require("constants")
|
|
8
8
|
local MAX_PLAYER_HEART_CONTAINERS = ____constants.MAX_PLAYER_HEART_CONTAINERS
|
|
9
|
-
local ____HealthType = require("
|
|
9
|
+
local ____HealthType = require("enums.HealthType")
|
|
10
10
|
local HealthType = ____HealthType.HealthType
|
|
11
|
-
local ____player = require("
|
|
11
|
+
local ____player = require("functions.player")
|
|
12
12
|
local getPlayerBlackHearts = ____player.getPlayerBlackHearts
|
|
13
13
|
local getPlayerHearts = ____player.getPlayerHearts
|
|
14
14
|
local getPlayerSoulHearts = ____player.getPlayerSoulHearts
|
|
15
15
|
local isCharacter = ____player.isCharacter
|
|
16
|
-
local ____utils = require("
|
|
16
|
+
local ____utils = require("functions.utils")
|
|
17
17
|
local ensureAllCases = ____utils.ensureAllCases
|
|
18
18
|
local ____repeat = ____utils["repeat"]
|
|
19
19
|
function ____exports.addPlayerHealthType(self, player, healthType, numHearts)
|
|
@@ -8,7 +8,7 @@ local getPlayerIndexCollectibleType, DEFAULT_COLLECTIBLE_TYPE, EXCLUDED_CHARACTE
|
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
9
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
|
-
local ____cachedClasses = require("
|
|
11
|
+
local ____cachedClasses = require("cachedClasses")
|
|
12
12
|
local game = ____cachedClasses.game
|
|
13
13
|
function ____exports.getAllPlayers(self)
|
|
14
14
|
local numPlayers = game:GetNumPlayers()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PocketItemSlot } from "isaac-typescript-definitions";
|
|
2
|
-
import { PocketItemDescription } from "../
|
|
2
|
+
import { PocketItemDescription } from "../interfaces/PocketItemDescription";
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to get the `PocketItemSlot` that the player's pocket active collectible item is
|
|
5
5
|
* in, if any. Returns undefined if the player does not have a pocket active item.
|
|
@@ -9,11 +9,11 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
9
9
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
11
|
local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
|
|
12
|
-
local ____PocketItemType = require("
|
|
12
|
+
local ____PocketItemType = require("enums.PocketItemType")
|
|
13
13
|
local PocketItemType = ____PocketItemType.PocketItemType
|
|
14
|
-
local ____enums = require("
|
|
14
|
+
local ____enums = require("functions.enums")
|
|
15
15
|
local getEnumValues = ____enums.getEnumValues
|
|
16
|
-
local ____player = require("
|
|
16
|
+
local ____player = require("functions.player")
|
|
17
17
|
local isCharacter = ____player.isCharacter
|
|
18
18
|
function ____exports.getPocketItems(self, player)
|
|
19
19
|
local pocketItem = player:GetActiveItem(ActiveSlot.POCKET)
|
|
@@ -6,17 +6,17 @@ local ____exports = {}
|
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
8
8
|
local HeavenLightDoorSubType = ____isaac_2Dtypescript_2Ddefinitions.HeavenLightDoorSubType
|
|
9
|
-
local ____cachedClasses = require("
|
|
9
|
+
local ____cachedClasses = require("cachedClasses")
|
|
10
10
|
local game = ____cachedClasses.game
|
|
11
|
-
local ____constants = require("
|
|
11
|
+
local ____constants = require("constants")
|
|
12
12
|
local DISTANCE_OF_GRID_TILE = ____constants.DISTANCE_OF_GRID_TILE
|
|
13
|
-
local ____entity = require("
|
|
13
|
+
local ____entity = require("functions.entity")
|
|
14
14
|
local getEntities = ____entity.getEntities
|
|
15
|
-
local ____entitySpecific = require("
|
|
15
|
+
local ____entitySpecific = require("functions.entitySpecific")
|
|
16
16
|
local getEffects = ____entitySpecific.getEffects
|
|
17
|
-
local ____player = require("
|
|
17
|
+
local ____player = require("functions.player")
|
|
18
18
|
local getPlayerCloserThan = ____player.getPlayerCloserThan
|
|
19
|
-
local ____playerIndex = require("
|
|
19
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
20
20
|
local getPlayers = ____playerIndex.getPlayers
|
|
21
21
|
local MAX_FIND_FREE_POSITION_ATTEMPTS = 100
|
|
22
22
|
function ____exports.anyEntityCloserThan(self, entities, position, distance)
|
package/functions/random.lua
CHANGED
package/functions/revive.lua
CHANGED
|
@@ -5,21 +5,21 @@ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
|
5
5
|
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
6
6
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
7
7
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
8
|
-
local ____cachedClasses = require("
|
|
8
|
+
local ____cachedClasses = require("cachedClasses")
|
|
9
9
|
local game = ____cachedClasses.game
|
|
10
|
-
local ____constants = require("
|
|
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 ____character = require("
|
|
13
|
+
local ____character = require("functions.character")
|
|
14
14
|
local getCharacterDeathAnimationName = ____character.getCharacterDeathAnimationName
|
|
15
|
-
local ____player = require("
|
|
15
|
+
local ____player = require("functions.player")
|
|
16
16
|
local getPlayerMaxHeartContainers = ____player.getPlayerMaxHeartContainers
|
|
17
17
|
local getPlayerNumHitsRemaining = ____player.getPlayerNumHitsRemaining
|
|
18
18
|
local hasLostCurse = ____player.hasLostCurse
|
|
19
19
|
local isKeeper = ____player.isKeeper
|
|
20
|
-
local ____sprite = require("
|
|
20
|
+
local ____sprite = require("functions.sprite")
|
|
21
21
|
local getLastFrameOfAnimation = ____sprite.getLastFrameOfAnimation
|
|
22
|
-
local ____trinketGive = require("
|
|
22
|
+
local ____trinketGive = require("functions.trinketGive")
|
|
23
23
|
local giveTrinketsBack = ____trinketGive.giveTrinketsBack
|
|
24
24
|
local temporarilyRemoveTrinket = ____trinketGive.temporarilyRemoveTrinket
|
|
25
25
|
function ____exports.willReviveFromHeartbreak(self, player)
|
package/functions/rng.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
3
3
|
import { SerializationType } from "../enums/SerializationType";
|
|
4
4
|
declare type SerializedRNG = LuaTable<string, unknown> & {
|
|
5
|
-
__serializedRNGBrand:
|
|
5
|
+
__serializedRNGBrand: void;
|
|
6
6
|
};
|
|
7
7
|
interface CopyRNGReturn {
|
|
8
8
|
[SerializationType.NONE]: RNG;
|