isaacscript-common 7.1.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/callbacks/itemPickup.d.ts.map +1 -1
- package/dist/callbacks/itemPickup.lua +3 -1
- package/dist/callbacks/postCustomDoorEnter.d.ts.map +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +14 -11
- package/dist/callbacks/postDiceRoomActivated.d.ts.map +1 -1
- package/dist/callbacks/postDiceRoomActivated.lua +5 -4
- package/dist/callbacks/postItemDischarged.lua +2 -1
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
- package/dist/callbacks/postPlayerChangeStat.lua +44 -15
- package/dist/callbacks/postSlotDestroyed.lua +3 -3
- package/dist/classes/DefaultMap.d.ts +5 -5
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.lua +3 -1
- package/dist/core/constantsFirstLast.d.ts +2 -0
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +36 -9
- package/dist/enums/AmbushType.d.ts +1 -0
- package/dist/enums/AmbushType.d.ts.map +1 -1
- package/dist/enums/AmbushType.lua +1 -0
- package/dist/enums/CornerType.d.ts +1 -0
- package/dist/enums/CornerType.d.ts.map +1 -1
- package/dist/enums/CornerType.lua +1 -0
- package/dist/enums/PocketItemType.d.ts +1 -0
- package/dist/enums/PocketItemType.d.ts.map +1 -1
- package/dist/enums/PocketItemType.lua +1 -0
- package/dist/enums/RockAltType.d.ts +1 -0
- package/dist/enums/RockAltType.d.ts.map +1 -1
- package/dist/enums/RockAltType.lua +1 -0
- package/dist/enums/SaveDataKey.d.ts +11 -0
- package/dist/enums/SaveDataKey.d.ts.map +1 -0
- package/dist/enums/{private/SaveDataKey.lua → SaveDataKey.lua} +2 -0
- package/dist/enums/SerializationType.d.ts +1 -0
- package/dist/enums/SerializationType.d.ts.map +1 -1
- package/dist/enums/SerializationType.lua +1 -0
- package/dist/enums/SlotDestructionType.d.ts +1 -0
- package/dist/enums/SlotDestructionType.d.ts.map +1 -1
- package/dist/enums/SlotDestructionType.lua +1 -0
- package/dist/enums/StatType.d.ts +1 -3
- package/dist/enums/StatType.d.ts.map +1 -1
- package/dist/enums/StatType.lua +0 -2
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.lua +8 -0
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +3 -1
- package/dist/features/customStage/backdrop.d.ts +1 -1
- package/dist/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/features/customStage/backdrop.lua +5 -3
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
- package/dist/features/customStage/customStageGridEntities.lua +3 -1
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +3 -1
- package/dist/features/customStage/init.lua +2 -2
- package/dist/features/customStage/shadows.d.ts.map +1 -1
- package/dist/features/customStage/shadows.lua +2 -1
- package/dist/features/deployJSONRoom.lua +13 -10
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +8 -2
- package/dist/features/saveDataManager/exports.d.ts +2 -1
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/saveDataManager/main.d.ts +1 -1
- package/dist/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/features/saveDataManager/main.lua +1 -1
- package/dist/functions/bitSet128.d.ts.map +1 -1
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.lua +3 -1
- package/dist/functions/cacheFlag.d.ts +23 -1
- package/dist/functions/cacheFlag.d.ts.map +1 -1
- package/dist/functions/cacheFlag.lua +78 -0
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +2 -1
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.lua +3 -1
- package/dist/functions/entities.lua +2 -1
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/gridEntities.lua +2 -1
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
- package/dist/functions/gridEntitiesSpecific.lua +5 -3
- package/dist/functions/index.d.ts +0 -1
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.lua +0 -8
- package/dist/functions/input.d.ts +5 -2
- package/dist/functions/input.d.ts.map +1 -1
- package/dist/functions/input.lua +11 -3
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.lua +3 -1
- package/dist/functions/nextStage.d.ts.map +1 -1
- package/dist/functions/nextStage.lua +7 -5
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +4 -2
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +9 -3
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +2 -1
- package/dist/functions/playerStats.d.ts.map +1 -1
- package/dist/functions/playerStats.lua +1 -2
- package/dist/functions/players.d.ts +1 -1
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +13 -15
- package/dist/functions/pocketItems.d.ts.map +1 -1
- package/dist/functions/pocketItems.lua +3 -1
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rng.lua +3 -0
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +11 -20
- package/dist/functions/rooms.d.ts +4 -4
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +18 -16
- package/dist/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +8 -2
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +4 -2
- package/dist/functions/types.d.ts +64 -0
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/functions/types.lua +63 -0
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/interfaces/ChargeBarSprites.d.ts +1 -1
- package/dist/interfaces/Corner.d.ts +5 -0
- package/dist/interfaces/Corner.d.ts.map +1 -1
- package/dist/interfaces/CustomStageLua.d.ts +57 -0
- package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
- package/dist/interfaces/GridEntityCustomData.d.ts +6 -0
- package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
- package/dist/interfaces/JSONRoomsFile.d.ts +7 -3
- package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
- package/dist/interfaces/PlayerHealth.d.ts +1 -1
- package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +1 -1
- package/dist/interfaces/RoomDescription.d.ts.map +1 -1
- package/dist/interfaces/StatTypeType.d.ts +4 -1
- package/dist/interfaces/StatTypeType.d.ts.map +1 -1
- package/dist/interfaces/TrinketSituation.d.ts +1 -1
- package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
- package/dist/maps/keyboardToString.d.ts +4 -0
- package/dist/maps/keyboardToString.d.ts.map +1 -0
- package/dist/maps/keyboardToString.lua +73 -0
- package/dist/types/AnyEntity.d.ts +5 -0
- package/dist/types/AnyEntity.d.ts.map +1 -1
- package/dist/types/AnyGridEntity.d.ts +5 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/types/CollectibleIndex.d.ts +4 -3
- package/dist/types/CollectibleIndex.d.ts.map +1 -1
- package/dist/types/Immutable.d.ts +3 -1
- package/dist/types/Immutable.d.ts.map +1 -1
- package/dist/types/PickupIndex.d.ts +4 -2
- package/dist/types/PickupIndex.d.ts.map +1 -1
- package/dist/types/PlayerIndex.d.ts +3 -2
- package/dist/types/PlayerIndex.d.ts.map +1 -1
- package/dist/types/SerializedIsaacAPIClass.d.ts +6 -0
- package/dist/types/SerializedIsaacAPIClass.d.ts.map +1 -1
- package/dist/types/TSTLClass.d.ts +5 -0
- package/dist/types/TSTLClass.d.ts.map +1 -1
- package/dist/types/TrapdoorDestination.d.ts +3 -0
- package/dist/types/TrapdoorDestination.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/itemPickup.ts +5 -2
- package/src/callbacks/postCustomDoorEnter.ts +18 -11
- package/src/callbacks/postDiceRoomActivated.ts +7 -12
- package/src/callbacks/postItemDischarged.ts +3 -1
- package/src/callbacks/postPlayerChangeStat.ts +45 -3
- package/src/callbacks/postSlotDestroyed.ts +3 -2
- package/src/callbacks/reorderedCallbacks.ts +2 -2
- package/src/classes/DefaultMap.ts +8 -8
- package/src/core/constants.ts +3 -3
- package/src/core/constantsFirstLast.ts +29 -14
- package/src/enums/AmbushType.ts +1 -0
- package/src/enums/CornerType.ts +1 -0
- package/src/enums/PocketItemType.ts +1 -0
- package/src/enums/RockAltType.ts +1 -0
- package/src/enums/SaveDataKey.ts +10 -0
- package/src/enums/SerializationType.ts +1 -0
- package/src/enums/SlotDestructionType.ts +1 -0
- package/src/enums/StatType.ts +7 -7
- package/src/enums/index.ts +1 -0
- package/src/enums/indexTypeDoc.ts +1 -0
- package/src/features/customGridEntity.ts +2 -1
- package/src/features/customStage/backdrop.ts +5 -3
- package/src/features/customStage/customStageGridEntities.ts +2 -1
- package/src/features/customStage/exports.ts +5 -4
- package/src/features/customStage/init.ts +2 -2
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/deployJSONRoom.ts +14 -19
- package/src/features/extraConsoleCommands/listCommands.ts +3 -2
- package/src/features/fastReset.ts +1 -1
- package/src/features/indexTypeDoc.ts +2 -1
- package/src/features/saveDataManager/exports.ts +4 -4
- package/src/features/saveDataManager/main.ts +1 -1
- package/src/features/saveDataManager/save.ts +1 -1
- package/src/functions/bitSet128.ts +1 -5
- package/src/functions/bosses.ts +2 -1
- package/src/functions/cacheFlag.ts +90 -1
- package/src/functions/cards.ts +3 -3
- package/src/functions/collectibles.ts +2 -8
- package/src/functions/color.ts +1 -1
- package/src/functions/deepCopy.ts +2 -2
- package/src/functions/dimensions.ts +1 -1
- package/src/functions/doors.ts +2 -2
- package/src/functions/entities.ts +2 -2
- package/src/functions/flying.ts +1 -1
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/gridEntitiesSpecific.ts +4 -3
- package/src/functions/index.ts +0 -1
- package/src/functions/indexTypeDoc.ts +0 -1
- package/src/functions/input.ts +17 -4
- package/src/functions/jsonHelpers.ts +1 -1
- package/src/functions/kColor.ts +1 -5
- package/src/functions/levelGrid.ts +3 -2
- package/src/functions/nextStage.ts +6 -5
- package/src/functions/npcs.ts +3 -2
- package/src/functions/pills.ts +11 -9
- package/src/functions/playerIndex.ts +3 -1
- package/src/functions/playerStats.ts +0 -1
- package/src/functions/players.ts +5 -6
- package/src/functions/pocketItems.ts +4 -4
- package/src/functions/rng.ts +8 -5
- package/src/functions/rockAlt.ts +28 -13
- package/src/functions/rooms.ts +27 -26
- package/src/functions/spawnCollectible.ts +1 -2
- package/src/functions/stage.ts +3 -2
- package/src/functions/trinkets.ts +6 -5
- package/src/functions/types.ts +100 -0
- package/src/functions/vector.ts +1 -5
- package/src/interfaces/ChargeBarSprites.ts +1 -1
- package/src/interfaces/Corner.ts +5 -0
- package/src/interfaces/CustomStageLua.ts +66 -0
- package/src/interfaces/GridEntityCustomData.ts +6 -0
- package/src/interfaces/JSONRoomsFile.ts +7 -3
- package/src/interfaces/PlayerHealth.ts +1 -1
- package/src/interfaces/PocketItemDescription.ts +1 -1
- package/src/interfaces/RoomDescription.ts +1 -1
- package/src/interfaces/StatTypeType.ts +4 -1
- package/src/interfaces/TrinketSituation.ts +1 -1
- package/src/maps/keyboardToString.ts +77 -0
- package/src/types/AnyEntity.ts +5 -0
- package/src/types/AnyGridEntity.ts +5 -0
- package/src/types/CollectibleIndex.ts +4 -3
- package/src/types/Immutable.ts +3 -1
- package/src/types/PickupIndex.ts +4 -2
- package/src/types/PlayerIndex.ts +3 -2
- package/src/types/SerializedIsaacAPIClass.ts +6 -0
- package/src/types/TSTLClass.ts +5 -0
- package/src/types/TrapdoorDestination.ts +3 -0
- package/dist/enums/private/SaveDataKey.d.ts +0 -7
- package/dist/enums/private/SaveDataKey.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.d.ts +0 -24
- package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.lua +0 -80
- package/src/enums/private/SaveDataKey.ts +0 -6
- package/src/functions/collectibleCacheFlag.ts +0 -90
|
@@ -9,8 +9,8 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
9
9
|
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
11
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
12
|
-
local
|
|
13
|
-
local getCollectiblesForCacheFlag =
|
|
12
|
+
local ____cacheFlag = require("functions.cacheFlag")
|
|
13
|
+
local getCollectiblesForCacheFlag = ____cacheFlag.getCollectiblesForCacheFlag
|
|
14
14
|
local ____set = require("functions.set")
|
|
15
15
|
local copySet = ____set.copySet
|
|
16
16
|
local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
@@ -29,6 +29,7 @@ local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
|
29
29
|
local ____sprites = require("functions.sprites")
|
|
30
30
|
local clearSprite = ____sprites.clearSprite
|
|
31
31
|
local ____types = require("functions.types")
|
|
32
|
+
local asNumber = ____types.asNumber
|
|
32
33
|
local isNumber = ____types.isNumber
|
|
33
34
|
local ____utils = require("functions.utils")
|
|
34
35
|
local erange = ____utils.erange
|
|
@@ -219,7 +220,7 @@ function ____exports.getCrawlSpaces(self, crawlSpaceVariant)
|
|
|
219
220
|
if crawlSpaceVariant == nil then
|
|
220
221
|
crawlSpaceVariant = -1
|
|
221
222
|
end
|
|
222
|
-
if crawlSpaceVariant == -1 then
|
|
223
|
+
if asNumber(nil, crawlSpaceVariant) == -1 then
|
|
223
224
|
return ____exports.getGridEntities(nil, GridEntityType.CRAWL_SPACE)
|
|
224
225
|
end
|
|
225
226
|
return ____exports.getMatchingGridEntities(nil, GridEntityType.CRAWL_SPACE, crawlSpaceVariant)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACZ,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAWtC;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,UAAU,GAAE,UAAe,GAAG,aAAa,EAAE,CAepE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,WAAW,GAAE,qBAA0B,GACtC,cAAc,EAAE,CAelB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,oBAAoB,GAAE,oBAAyB,GAC9C,uBAAuB,EAAE,CAkB3B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,SAAK,GAAG,cAAc,EAAE,CAevD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,OAAO,SAAK,GAAG,gBAAgB,EAAE,CAe1D;AAED,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,OAAO,SAAK,GAAG,aAAa,EAAE,CAepD;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,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S,CAgB3B"}
|
|
@@ -10,6 +10,8 @@ local ____gridEntities = require("functions.gridEntities")
|
|
|
10
10
|
local getGridEntities = ____gridEntities.getGridEntities
|
|
11
11
|
local removeGridEntities = ____gridEntities.removeGridEntities
|
|
12
12
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
13
|
+
local ____types = require("functions.types")
|
|
14
|
+
local asNumber = ____types.asNumber
|
|
13
15
|
--- Helper function to spawn a `GridEntityType.DOOR` (16) with a specific variant.
|
|
14
16
|
function ____exports.spawnDoorWithVariant(self, doorVariant, gridIndexOrPosition)
|
|
15
17
|
local gridEntity = spawnGridEntityWithVariant(nil, GridEntityType.DOOR, doorVariant, gridIndexOrPosition)
|
|
@@ -108,7 +110,7 @@ function ____exports.getPits(self, pitVariant)
|
|
|
108
110
|
local pit = gridEntity:ToPit()
|
|
109
111
|
if pit ~= nil then
|
|
110
112
|
local gridEntityVariant = pit:GetVariant()
|
|
111
|
-
if pitVariant == -1 or pitVariant == gridEntityVariant then
|
|
113
|
+
if asNumber(nil, pitVariant) == -1 or pitVariant == gridEntityVariant then
|
|
112
114
|
pits[#pits + 1] = pit
|
|
113
115
|
end
|
|
114
116
|
end
|
|
@@ -129,7 +131,7 @@ function ____exports.getPoops(self, poopVariant)
|
|
|
129
131
|
local poop = gridEntity:ToPoop()
|
|
130
132
|
if poop ~= nil then
|
|
131
133
|
local gridEntityVariant = poop:GetVariant()
|
|
132
|
-
if poopVariant == -1 or poopVariant == gridEntityVariant then
|
|
134
|
+
if asNumber(nil, poopVariant) == -1 or poopVariant == gridEntityVariant then
|
|
133
135
|
poops[#poops + 1] = poop
|
|
134
136
|
end
|
|
135
137
|
end
|
|
@@ -150,7 +152,7 @@ function ____exports.getPressurePlates(self, pressurePlateVariant)
|
|
|
150
152
|
local pressurePlate = gridEntity:ToPressurePlate()
|
|
151
153
|
if pressurePlate ~= nil then
|
|
152
154
|
local gridEntityVariant = pressurePlate:GetVariant()
|
|
153
|
-
if pressurePlateVariant == -1 or pressurePlateVariant == gridEntityVariant then
|
|
155
|
+
if asNumber(nil, pressurePlateVariant) == -1 or pressurePlateVariant == gridEntityVariant then
|
|
154
156
|
pressurePlates[#pressurePlates + 1] = pressurePlate
|
|
155
157
|
end
|
|
156
158
|
end
|
|
@@ -11,7 +11,6 @@ export * from "./challenges";
|
|
|
11
11
|
export * from "./characters";
|
|
12
12
|
export * from "./charge";
|
|
13
13
|
export * from "./chargeBar";
|
|
14
|
-
export * from "./collectibleCacheFlag";
|
|
15
14
|
export * from "./collectibles";
|
|
16
15
|
export * from "./collectibleSet";
|
|
17
16
|
export * from "./collectibleTag";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;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AAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/dist/functions/index.lua
CHANGED
|
@@ -103,14 +103,6 @@ do
|
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
end
|
|
106
|
-
do
|
|
107
|
-
local ____export = require("functions.collectibleCacheFlag")
|
|
108
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
109
|
-
if ____exportKey ~= "default" then
|
|
110
|
-
____exports[____exportKey] = ____exportValue
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
106
|
do
|
|
115
107
|
local ____export = require("functions.collectibles")
|
|
116
108
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonAction, Controller, Keyboard } from "isaac-typescript-definitions";
|
|
2
2
|
/** Helper function to get the enum name for the specified `Controller` value. */
|
|
3
|
-
export declare function controllerToString(controller: Controller): string;
|
|
3
|
+
export declare function controllerToString(controller: Controller): string | undefined;
|
|
4
4
|
export declare function getMoveActions(): Set<ButtonAction>;
|
|
5
5
|
export declare function getShootActions(): Set<ButtonAction>;
|
|
6
6
|
/** Iterates over all inputs to determine if a particular button is pressed (i.e. held down). */
|
|
@@ -29,5 +29,8 @@ export declare function isMoveActionTriggeredOnAnyInput(): boolean;
|
|
|
29
29
|
export declare function isShootAction(buttonAction: ButtonAction): boolean;
|
|
30
30
|
export declare function isShootActionPressedOnAnyInput(): boolean;
|
|
31
31
|
export declare function isShootActionTriggeredOnAnyInput(): boolean;
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Helper function to get the string that would be typed if someone pressed the corresponding key.
|
|
34
|
+
*/
|
|
35
|
+
export declare function keyboardToString(keyboard: Keyboard, uppercase: boolean): string | undefined;
|
|
33
36
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuCtC,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAO7E;AAED,wBAAgB,cAAc,IAAI,GAAG,CAAC,YAAY,CAAC,CAElD;AAED,wBAAgB,eAAe,IAAI,GAAG,CAAC,YAAY,CAAC,CAEnD;AAED,gGAAgG;AAChG,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAK7E;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,YAAY,GACzB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEhE;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAIvD;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAIzD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAIxD;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAI1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,GAAG,SAAS,CAQpB"}
|
package/dist/functions/input.lua
CHANGED
|
@@ -8,6 +8,8 @@ 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 ____keyboardToString = require("maps.keyboardToString")
|
|
12
|
+
local KEYBOARD_TO_STRING = ____keyboardToString.KEYBOARD_TO_STRING
|
|
11
13
|
local ____enums = require("functions.enums")
|
|
12
14
|
local getEnumValues = ____enums.getEnumValues
|
|
13
15
|
local ____set = require("functions.set")
|
|
@@ -32,7 +34,7 @@ local SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
|
|
|
32
34
|
function ____exports.controllerToString(self, controller)
|
|
33
35
|
local key = Controller[controller]
|
|
34
36
|
if key == nil then
|
|
35
|
-
return
|
|
37
|
+
return nil
|
|
36
38
|
end
|
|
37
39
|
return trimPrefix(nil, key, "BUTTON_")
|
|
38
40
|
end
|
|
@@ -109,7 +111,13 @@ function ____exports.isShootActionTriggeredOnAnyInput(self)
|
|
|
109
111
|
function(____, shootAction) return ____exports.isActionTriggeredOnAnyInput(nil, shootAction) end
|
|
110
112
|
)
|
|
111
113
|
end
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
+
--- Helper function to get the string that would be typed if someone pressed the corresponding key.
|
|
115
|
+
function ____exports.keyboardToString(self, keyboard, uppercase)
|
|
116
|
+
local tuple = KEYBOARD_TO_STRING:get(keyboard)
|
|
117
|
+
if tuple == nil then
|
|
118
|
+
return nil
|
|
119
|
+
end
|
|
120
|
+
local lowercaseCharacter, uppercaseCharacter = table.unpack(tuple)
|
|
121
|
+
return uppercase and uppercaseCharacter or lowercaseCharacter
|
|
114
122
|
end
|
|
115
123
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CA+BlE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAQ5B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AA8BtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,CAAC,EAA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AAE,GAAG,GACjB,OAAO,CAGT;AAED,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,GAAG,GACjB,OAAO,CAqBT;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAM7D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,IAAI,GAAG,GAAG,SAAS,CA6CzC;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,OAAO,CAGtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAKtE"}
|
|
@@ -43,6 +43,8 @@ local getRooms = ____rooms.getRooms
|
|
|
43
43
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
44
44
|
local ____roomShape = require("functions.roomShape")
|
|
45
45
|
local getGridIndexDelta = ____roomShape.getGridIndexDelta
|
|
46
|
+
local ____types = require("functions.types")
|
|
47
|
+
local asNumber = ____types.asNumber
|
|
46
48
|
--- Helper function to get the room grid indexes that are adjacent to a given room grid index.
|
|
47
49
|
--
|
|
48
50
|
-- Adjacent room grid indexes that are outside of the grid will not be included in the returned
|
|
@@ -113,7 +115,7 @@ function ____exports.getNewRoomCandidatesForLevel(self)
|
|
|
113
115
|
local rooms = getRoomsInsideGrid(nil)
|
|
114
116
|
local normalRooms = __TS__ArrayFilter(
|
|
115
117
|
rooms,
|
|
116
|
-
function(____, room) return room.Data ~= nil and room.Data.Type == RoomType.DEFAULT and room.Data.Subtype ~= DownpourRoomSubType.MIRROR and room.Data.Subtype ~= MinesRoomSubType.MINESHAFT_ENTRANCE end
|
|
118
|
+
function(____, room) return room.Data ~= nil and room.Data.Type == RoomType.DEFAULT and room.Data.Subtype ~= asNumber(nil, DownpourRoomSubType.MIRROR) and room.Data.Subtype ~= asNumber(nil, MinesRoomSubType.MINESHAFT_ENTRANCE) end
|
|
117
119
|
)
|
|
118
120
|
local newRoomCandidates = {}
|
|
119
121
|
for ____, room in ipairs(normalRooms) do
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextStage.d.ts","sourceRoot":"","sources":["../../src/functions/nextStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"nextStage.d.ts","sourceRoot":"","sources":["../../src/functions/nextStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAYtC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,UAAU,CAwFzC;AA+HD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,UAAQ,GAAG,SAAS,CAiF3D"}
|
|
@@ -17,9 +17,11 @@ local ____stage = require("functions.stage")
|
|
|
17
17
|
local calculateStageType = ____stage.calculateStageType
|
|
18
18
|
local calculateStageTypeRepentance = ____stage.calculateStageTypeRepentance
|
|
19
19
|
local onRepentanceStage = ____stage.onRepentanceStage
|
|
20
|
+
local ____types = require("functions.types")
|
|
21
|
+
local asNumber = ____types.asNumber
|
|
20
22
|
function getNextStageBackwardsPath(self, stage, repentanceStage)
|
|
21
23
|
if not areFeaturesInitialized(nil) then
|
|
22
|
-
return stage - 1
|
|
24
|
+
return asNumber(nil, stage) - 1
|
|
23
25
|
end
|
|
24
26
|
local visitedDownpour1 = hasVisitedStage(nil, LevelStage.BASEMENT_1, StageType.REPENTANCE)
|
|
25
27
|
local visitedDross1 = hasVisitedStage(nil, LevelStage.BASEMENT_1, StageType.REPENTANCE_B)
|
|
@@ -77,7 +79,7 @@ function getNextStageBackwardsPath(self, stage, repentanceStage)
|
|
|
77
79
|
end
|
|
78
80
|
return LevelStage.DEPTHS_1
|
|
79
81
|
end
|
|
80
|
-
return stage - 1
|
|
82
|
+
return asNumber(nil, stage) - 1
|
|
81
83
|
end
|
|
82
84
|
function getStageTypeBackwardsPath(self, stage, nextStage, repentanceStage)
|
|
83
85
|
local visitedDownpour1 = hasVisitedStage(nil, LevelStage.BASEMENT_1, StageType.REPENTANCE)
|
|
@@ -164,7 +166,7 @@ function ____exports.getNextStage(self)
|
|
|
164
166
|
if ____cond4 then
|
|
165
167
|
do
|
|
166
168
|
if repentanceStage then
|
|
167
|
-
return stage + 1
|
|
169
|
+
return asNumber(nil, stage) + 1
|
|
168
170
|
end
|
|
169
171
|
if stage == LevelStage.DEPTHS_2 then
|
|
170
172
|
return LevelStage.DEPTHS_2
|
|
@@ -194,7 +196,7 @@ function ____exports.getNextStage(self)
|
|
|
194
196
|
if stage == LevelStage.THE_VOID then
|
|
195
197
|
return LevelStage.THE_VOID
|
|
196
198
|
end
|
|
197
|
-
return stage + 1
|
|
199
|
+
return asNumber(nil, stage) + 1
|
|
198
200
|
end
|
|
199
201
|
--- Helper function to get the stage type that a trapdoor or heaven door would take the player to,
|
|
200
202
|
-- based on the current stage, room, and game state flags.
|
|
@@ -216,7 +218,7 @@ function ____exports.getNextStageType(self, upwards)
|
|
|
216
218
|
if backwardsPath then
|
|
217
219
|
return getStageTypeBackwardsPath(nil, stage, nextStage, repentanceStage)
|
|
218
220
|
end
|
|
219
|
-
if roomGridIndex == GridRoom.SECRET_EXIT then
|
|
221
|
+
if roomGridIndex == asNumber(nil, GridRoom.SECRET_EXIT) then
|
|
220
222
|
return calculateStageTypeRepentance(nil, nextStage)
|
|
221
223
|
end
|
|
222
224
|
if repentanceStage and (stage == LevelStage.BASEMENT_1 or stage == LevelStage.CAVES_1 or stage == LevelStage.DEPTHS_1 or stage == LevelStage.WOMB_1) then
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,UAAU,EASX,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"npcs.d.ts","sourceRoot":"","sources":["../../src/functions/npcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,UAAU,EASX,MAAM,8BAA8B,CAAC;AAgCtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CA4B3D;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAOpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAO3D"}
|
package/dist/functions/npcs.lua
CHANGED
|
@@ -24,6 +24,8 @@ local ____constants = require("core.constants")
|
|
|
24
24
|
local EGGY_STATE_FRAME_OF_FINAL_SPIDER = ____constants.EGGY_STATE_FRAME_OF_FINAL_SPIDER
|
|
25
25
|
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
26
26
|
local getNPCs = ____entitiesSpecific.getNPCs
|
|
27
|
+
local ____types = require("functions.types")
|
|
28
|
+
local asNumber = ____types.asNumber
|
|
27
29
|
--- Checks for specific NPCs that have "CanShutDoors" set to true naturally by the game, but should
|
|
28
30
|
-- not actually keep the doors closed (like Death's scythes).
|
|
29
31
|
function ____exports.isAliveExceptionNPC(self, npc)
|
|
@@ -59,14 +61,14 @@ end
|
|
|
59
61
|
-- dead by the game. Instead, when Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and
|
|
60
62
|
-- spawn 14 Swarm Spiders while their StateFrame ticks upwards.
|
|
61
63
|
function ____exports.isDyingEggyWithNoSpidersLeft(self, npc)
|
|
62
|
-
return npc.Type == EntityType.HOPPER and npc.Variant == HopperVariant.EGGY and npc.State == NpcState.SUICIDE and npc.StateFrame >= EGGY_STATE_FRAME_OF_FINAL_SPIDER
|
|
64
|
+
return npc.Type == EntityType.HOPPER and npc.Variant == asNumber(nil, HopperVariant.EGGY) and npc.State == NpcState.SUICIDE and npc.StateFrame >= EGGY_STATE_FRAME_OF_FINAL_SPIDER
|
|
63
65
|
end
|
|
64
66
|
--- Helper function to detect the custom death state of a Rag Man Ragling. When Rag Man Raglings die,
|
|
65
67
|
-- they turn into a patch on the ground and can be revived by Rag Man at a later time. This causes
|
|
66
68
|
-- them to show up as an "alive" enemy, so they should usually be filtered out of lists of alive
|
|
67
69
|
-- enemies.
|
|
68
70
|
function ____exports.isRaglingDeathPatch(self, npc)
|
|
69
|
-
return npc.Type == EntityType.RAGLING and npc.Variant == RaglingVariant.RAG_MANS_RAGLING and npc.State == NpcState.SPECIAL
|
|
71
|
+
return npc.Type == EntityType.RAGLING and npc.Variant == asNumber(nil, RaglingVariant.RAG_MANS_RAGLING) and npc.State == NpcState.SPECIAL
|
|
70
72
|
end
|
|
71
73
|
NON_ALIVE_NPCS_TYPE_VARIANT = __TS__New(
|
|
72
74
|
Set,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../src/functions/pills.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,SAAS,EACT,UAAU,EACX,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../src/functions/pills.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,SAAS,EACT,UAAU,EACX,MAAM,8BAA8B,CAAC;AAuCtC;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,EAAE,CAI9C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,EAAE,CAEhD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAEjE;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,SAAS,EAAE,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAMnD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAM3E;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,IAAI,SAAS,EAAE,CAEjD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAGnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,GACrB,yBAAyB,CAS3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAgBhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GACrB,wBAAwB,CAS1B;AAED,sEAAsE;AACtE,wBAAgB,qBAAqB,IAAI,UAAU,EAAE,CAEpD;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAEzD"}
|
package/dist/functions/pills.lua
CHANGED
|
@@ -29,6 +29,9 @@ local DEFAULT_PILL_EFFECT_TYPE = ____pillEffectTypes.DEFAULT_PILL_EFFECT_TYPE
|
|
|
29
29
|
local PILL_EFFECT_TYPES = ____pillEffectTypes.PILL_EFFECT_TYPES
|
|
30
30
|
local ____enums = require("functions.enums")
|
|
31
31
|
local getEnumValues = ____enums.getEnumValues
|
|
32
|
+
local ____types = require("functions.types")
|
|
33
|
+
local asNumber = ____types.asNumber
|
|
34
|
+
local asPillColor = ____types.asPillColor
|
|
32
35
|
local ____utils = require("functions.utils")
|
|
33
36
|
local irange = ____utils.irange
|
|
34
37
|
--- Add this to a `PillColor` to get the corresponding giant pill color.
|
|
@@ -59,7 +62,7 @@ end
|
|
|
59
62
|
-- For example, passing `PillColor.BLUE_BLUE` would result in 2049, which is the value that
|
|
60
63
|
-- corresponds to the horse pill color for blue/blue.
|
|
61
64
|
function ____exports.getHorsePillColor(self, pillColor)
|
|
62
|
-
return pillColor + HORSE_PILL_ADJUSTMENT
|
|
65
|
+
return asNumber(nil, pillColor) + HORSE_PILL_ADJUSTMENT
|
|
63
66
|
end
|
|
64
67
|
--- Helper function to get an array with every non-gold horse pill color.
|
|
65
68
|
function ____exports.getHorsePillColors(self)
|
|
@@ -80,7 +83,10 @@ end
|
|
|
80
83
|
--
|
|
81
84
|
-- If called with a non-horse pill color, this function will return back the same color.
|
|
82
85
|
function ____exports.getNormalPillColorFromHorse(self, pillColor)
|
|
83
|
-
local normalPillColor =
|
|
86
|
+
local normalPillColor = asPillColor(
|
|
87
|
+
nil,
|
|
88
|
+
asNumber(nil, pillColor) - HORSE_PILL_ADJUSTMENT
|
|
89
|
+
)
|
|
84
90
|
return normalPillColor > PillColor.NULL and normalPillColor or pillColor
|
|
85
91
|
end
|
|
86
92
|
--- Helper function to get an array with every non-gold and non-horse pill color.
|
|
@@ -139,6 +145,6 @@ function ____exports.getVanillaPillEffects(self)
|
|
|
139
145
|
return irange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
140
146
|
end
|
|
141
147
|
function ____exports.isHorsePill(self, pillColor)
|
|
142
|
-
return pillColor > HORSE_PILL_ADJUSTMENT
|
|
148
|
+
return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
|
|
143
149
|
end
|
|
144
150
|
return ____exports
|
|
@@ -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;;;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,
|
|
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,CA8Bb;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"}
|
|
@@ -63,7 +63,8 @@ function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
|
|
|
63
63
|
local playerToUse = player
|
|
64
64
|
local isSubPlayer = player:IsSubPlayer()
|
|
65
65
|
if isSubPlayer then
|
|
66
|
-
local
|
|
66
|
+
local subPlayer = player
|
|
67
|
+
local playerParent = ____exports.getSubPlayerParent(nil, subPlayer)
|
|
67
68
|
if playerParent ~= nil then
|
|
68
69
|
playerToUse = playerParent
|
|
69
70
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAiBjB"}
|
|
@@ -15,8 +15,7 @@ function ____exports.getPlayerStat(self, player, statType)
|
|
|
15
15
|
[StatType.TEAR_FLAG] = player.TearFlags,
|
|
16
16
|
[StatType.TEAR_COLOR] = player.TearColor,
|
|
17
17
|
[StatType.FLYING] = player.CanFly,
|
|
18
|
-
[StatType.LUCK] = player.Luck
|
|
19
|
-
[StatType.SIZE] = player.SizeMulti
|
|
18
|
+
[StatType.LUCK] = player.Luck
|
|
20
19
|
})[statType]
|
|
21
20
|
end
|
|
22
21
|
return ____exports
|
|
@@ -73,7 +73,7 @@ export declare function getActiveItemSlot(player: EntityPlayer, collectibleType:
|
|
|
73
73
|
* Helper function to get how long Azazel's Brimstone laser should be. You can pass either an
|
|
74
74
|
* `EntityPlayer` object or a tear height stat.
|
|
75
75
|
*
|
|
76
|
-
* The formula for calculating it is: 32 - 2.5 *
|
|
76
|
+
* The formula for calculating it is: 32 - 2.5 * tearHeight
|
|
77
77
|
*/
|
|
78
78
|
export declare function getAzazelBrimstoneDistance(playerOrTearHeight: EntityPlayer | float): float;
|
|
79
79
|
/** Helper function to get an array containing the characters of all of the current players. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAyBjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,YAAY,EACpB,S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YAAY,GAAG,OAAO,CAMvD;AAaD,8FAA8F;AAC9F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAM9D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
|
|
@@ -46,6 +46,8 @@ local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
|
|
|
46
46
|
local getPlayers = ____playerIndex.getPlayers
|
|
47
47
|
local ____tears = require("functions.tears")
|
|
48
48
|
local addTearsStat = ____tears.addTearsStat
|
|
49
|
+
local ____types = require("functions.types")
|
|
50
|
+
local isNumber = ____types.isNumber
|
|
49
51
|
local ____utils = require("functions.utils")
|
|
50
52
|
local ____repeat = ____utils["repeat"]
|
|
51
53
|
--- Helper function to get an array containing the characters of all of the current players.
|
|
@@ -295,13 +297,9 @@ end
|
|
|
295
297
|
--- Helper function to get how long Azazel's Brimstone laser should be. You can pass either an
|
|
296
298
|
-- `EntityPlayer` object or a tear height stat.
|
|
297
299
|
--
|
|
298
|
-
-- The formula for calculating it is: 32 - 2.5 *
|
|
300
|
+
-- The formula for calculating it is: 32 - 2.5 * tearHeight
|
|
299
301
|
function ____exports.getAzazelBrimstoneDistance(self, playerOrTearHeight)
|
|
300
|
-
local tearHeight =
|
|
301
|
-
if tearHeight == nil then
|
|
302
|
-
local player = playerOrTearHeight
|
|
303
|
-
tearHeight = player.TearHeight
|
|
304
|
-
end
|
|
302
|
+
local tearHeight = isNumber(nil, playerOrTearHeight) and playerOrTearHeight or playerOrTearHeight.TearHeight
|
|
305
303
|
return 32 - 2.5 * tearHeight
|
|
306
304
|
end
|
|
307
305
|
function ____exports.getClosestPlayer(self, position)
|
|
@@ -743,9 +741,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
743
741
|
itemPool:RemoveCollectible(collectibleType)
|
|
744
742
|
end
|
|
745
743
|
repeat
|
|
746
|
-
local
|
|
747
|
-
local
|
|
748
|
-
if
|
|
744
|
+
local ____switch122 = activeSlot
|
|
745
|
+
local ____cond122 = ____switch122 == ActiveSlot.PRIMARY
|
|
746
|
+
if ____cond122 then
|
|
749
747
|
do
|
|
750
748
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
751
749
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -754,8 +752,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
754
752
|
break
|
|
755
753
|
end
|
|
756
754
|
end
|
|
757
|
-
|
|
758
|
-
if
|
|
755
|
+
____cond122 = ____cond122 or ____switch122 == ActiveSlot.SECONDARY
|
|
756
|
+
if ____cond122 then
|
|
759
757
|
do
|
|
760
758
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
761
759
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -770,16 +768,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
770
768
|
break
|
|
771
769
|
end
|
|
772
770
|
end
|
|
773
|
-
|
|
774
|
-
if
|
|
771
|
+
____cond122 = ____cond122 or ____switch122 == ActiveSlot.POCKET
|
|
772
|
+
if ____cond122 then
|
|
775
773
|
do
|
|
776
774
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
777
775
|
player:SetActiveCharge(charge, activeSlot)
|
|
778
776
|
break
|
|
779
777
|
end
|
|
780
778
|
end
|
|
781
|
-
|
|
782
|
-
if
|
|
779
|
+
____cond122 = ____cond122 or ____switch122 == ActiveSlot.POCKET_SINGLE_USE
|
|
780
|
+
if ____cond122 then
|
|
783
781
|
do
|
|
784
782
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
785
783
|
break
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pocketItems.d.ts","sourceRoot":"","sources":["../../src/functions/pocketItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"pocketItems.d.ts","sourceRoot":"","sources":["../../src/functions/pocketItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAK5E;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,GACnB,cAAc,GAAG,SAAS,CAS5B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,GACnB,qBAAqB,GAAG,SAAS,CAOnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,qBAAqB,EAAE,CA+D5E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASnE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAQzE"}
|
|
@@ -15,6 +15,8 @@ local ____enums = require("functions.enums")
|
|
|
15
15
|
local getEnumValues = ____enums.getEnumValues
|
|
16
16
|
local ____players = require("functions.players")
|
|
17
17
|
local isCharacter = ____players.isCharacter
|
|
18
|
+
local ____types = require("functions.types")
|
|
19
|
+
local asNumber = ____types.asNumber
|
|
18
20
|
--- Use this helper function as a workaround for the `EntityPlayer.GetPocketItem` method not working
|
|
19
21
|
-- correctly.
|
|
20
22
|
--
|
|
@@ -51,7 +53,7 @@ function ____exports.getPocketItems(self, player)
|
|
|
51
53
|
else
|
|
52
54
|
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.EMPTY, subType = 0}
|
|
53
55
|
end
|
|
54
|
-
if slot + 1 == maxPocketItems then
|
|
56
|
+
if asNumber(nil, slot) + 1 == maxPocketItems then
|
|
55
57
|
break
|
|
56
58
|
end
|
|
57
59
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAMA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAMA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,CAgBtD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,OAAkB,GAAG,GAAG,CAIlD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,aAAa,CAYpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAoBjE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAK1D;AAED,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CASlD"}
|
package/dist/functions/rng.lua
CHANGED
|
@@ -67,6 +67,9 @@ function ____exports.deserializeRNG(self, rng)
|
|
|
67
67
|
OBJECT_NAME,
|
|
68
68
|
table.unpack(KEYS)
|
|
69
69
|
))
|
|
70
|
+
if seed == nil then
|
|
71
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: seed")
|
|
72
|
+
end
|
|
70
73
|
return ____exports.newRNG(nil, seed)
|
|
71
74
|
end
|
|
72
75
|
--- Used to determine is the given table is a serialized `RNG` object created by the save data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rockAlt.d.ts","sourceRoot":"","sources":["../../src/functions/rockAlt.ts"],"names":[],"mappings":";;;AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAuCnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,OAAO,CA4BT"}
|