isaacscript-common 41.0.0 → 41.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +5 -7
- package/dist/isaacscript-common.lua +85 -84
- package/dist/lualib_bundle.lua +61 -56
- package/dist/src/core/constants.d.ts +3 -7
- package/dist/src/core/constants.d.ts.map +1 -1
- package/dist/src/core/constants.lua +20 -0
- package/dist/src/functions/pickups.lua +3 -3
- package/package.json +1 -1
- package/src/core/constants.ts +21 -0
- package/src/functions/pickups.ts +2 -2
- package/dist/src/sets/chestPickupVariantsSet.d.ts +0 -3
- package/dist/src/sets/chestPickupVariantsSet.d.ts.map +0 -1
- package/dist/src/sets/chestPickupVariantsSet.lua +0 -22
- package/src/sets/chestPickupVariantsSet.ts +0 -17
package/dist/index.rollup.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ import type { Music } from 'isaac-typescript-definitions';
|
|
|
56
56
|
import type { NPCState } from 'isaac-typescript-definitions';
|
|
57
57
|
import { NullItemID } from 'isaac-typescript-definitions';
|
|
58
58
|
import { PickupPrice } from 'isaac-typescript-definitions';
|
|
59
|
-
import
|
|
59
|
+
import { PickupVariant } from 'isaac-typescript-definitions';
|
|
60
60
|
import { PillColor } from 'isaac-typescript-definitions';
|
|
61
61
|
import { PillEffect } from 'isaac-typescript-definitions';
|
|
62
62
|
import { PitVariant } from 'isaac-typescript-definitions';
|
|
@@ -949,12 +949,6 @@ export declare function addTrinketCostume(player: EntityPlayer, trinketType: Tri
|
|
|
949
949
|
export declare const ALL_DISPLAY_FLAGS: BitFlags<number & {
|
|
950
950
|
readonly __bitFlagBrand: symbol;
|
|
951
951
|
} & {
|
|
952
|
-
/**
|
|
953
|
-
* The combination of the following flags:
|
|
954
|
-
* - `DisplayFlag.VISIBLE` (1 << 0)
|
|
955
|
-
* - `DisplayFlag.SHADOW` (1 << 1)
|
|
956
|
-
* - `DisplayFlag.SHOW_ICON` (1 << 2)
|
|
957
|
-
*/
|
|
958
952
|
readonly __displayFlagBrand: symbol;
|
|
959
953
|
}>;
|
|
960
954
|
|
|
@@ -1523,6 +1517,10 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: Col
|
|
|
1523
1517
|
*/
|
|
1524
1518
|
export declare function checkFamiliarFromCollectibles(player: EntityPlayer, collectibleType: CollectibleType, familiarVariant: FamiliarVariant, familiarSubType?: int): void;
|
|
1525
1519
|
|
|
1520
|
+
export declare const CHEST_PICKUP_VARIANTS: readonly [PickupVariant.CHEST, PickupVariant.BOMB_CHEST, PickupVariant.SPIKED_CHEST, PickupVariant.ETERNAL_CHEST, PickupVariant.MIMIC_CHEST, PickupVariant.OLD_CHEST, PickupVariant.WOODEN_CHEST, PickupVariant.MEGA_CHEST, PickupVariant.HAUNTED_CHEST, PickupVariant.LOCKED_CHEST, PickupVariant.RED_CHEST, PickupVariant.MOMS_CHEST];
|
|
1521
|
+
|
|
1522
|
+
export declare const CHEST_PICKUP_VARIANTS_SET: ReadonlySet<PickupVariant>;
|
|
1523
|
+
|
|
1526
1524
|
/**
|
|
1527
1525
|
* Helper function to normalize a number, ensuring that it is within a certain range.
|
|
1528
1526
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 41.
|
|
3
|
+
isaacscript-common 41.1.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -1118,6 +1118,9 @@ end
|
|
|
1118
1118
|
local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError
|
|
1119
1119
|
do
|
|
1120
1120
|
local function getErrorStack(self, constructor)
|
|
1121
|
+
if debug == nil then
|
|
1122
|
+
return nil
|
|
1123
|
+
end
|
|
1121
1124
|
local level = 1
|
|
1122
1125
|
while true do
|
|
1123
1126
|
local info = debug.getinfo(level, "f")
|
|
@@ -1499,6 +1502,62 @@ local function __TS__NumberIsNaN(value)
|
|
|
1499
1502
|
return value ~= value
|
|
1500
1503
|
end
|
|
1501
1504
|
|
|
1505
|
+
local function __TS__StringSubstring(self, start, ____end)
|
|
1506
|
+
if ____end ~= ____end then
|
|
1507
|
+
____end = 0
|
|
1508
|
+
end
|
|
1509
|
+
if ____end ~= nil and start > ____end then
|
|
1510
|
+
start, ____end = ____end, start
|
|
1511
|
+
end
|
|
1512
|
+
if start >= 0 then
|
|
1513
|
+
start = start + 1
|
|
1514
|
+
else
|
|
1515
|
+
start = 1
|
|
1516
|
+
end
|
|
1517
|
+
if ____end ~= nil and ____end < 0 then
|
|
1518
|
+
____end = 0
|
|
1519
|
+
end
|
|
1520
|
+
return string.sub(self, start, ____end)
|
|
1521
|
+
end
|
|
1522
|
+
|
|
1523
|
+
local __TS__ParseInt
|
|
1524
|
+
do
|
|
1525
|
+
local parseIntBasePattern = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTvVwWxXyYzZ"
|
|
1526
|
+
function __TS__ParseInt(numberString, base)
|
|
1527
|
+
if base == nil then
|
|
1528
|
+
base = 10
|
|
1529
|
+
local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
|
|
1530
|
+
if hexMatch ~= nil then
|
|
1531
|
+
base = 16
|
|
1532
|
+
numberString = (__TS__Match(hexMatch, "-")) and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
|
|
1533
|
+
end
|
|
1534
|
+
end
|
|
1535
|
+
if base < 2 or base > 36 then
|
|
1536
|
+
return 0 / 0
|
|
1537
|
+
end
|
|
1538
|
+
local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1539
|
+
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
1540
|
+
local number = tonumber((__TS__Match(numberString, pattern)), base)
|
|
1541
|
+
if number == nil then
|
|
1542
|
+
return 0 / 0
|
|
1543
|
+
end
|
|
1544
|
+
if number >= 0 then
|
|
1545
|
+
return math.floor(number)
|
|
1546
|
+
else
|
|
1547
|
+
return math.ceil(number)
|
|
1548
|
+
end
|
|
1549
|
+
end
|
|
1550
|
+
end
|
|
1551
|
+
|
|
1552
|
+
local function __TS__ParseFloat(numberString)
|
|
1553
|
+
local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
|
|
1554
|
+
if infinityMatch ~= nil then
|
|
1555
|
+
return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
|
|
1556
|
+
end
|
|
1557
|
+
local number = tonumber((__TS__Match(numberString, "^%s*(-?%d+%.?%d*)")))
|
|
1558
|
+
return number or 0 / 0
|
|
1559
|
+
end
|
|
1560
|
+
|
|
1502
1561
|
local __TS__NumberToString
|
|
1503
1562
|
do
|
|
1504
1563
|
local radixChars = "0123456789abcdefghijklmnopqrstuvwxyz"
|
|
@@ -1673,62 +1732,6 @@ local function __TS__ObjectValues(obj)
|
|
|
1673
1732
|
return result
|
|
1674
1733
|
end
|
|
1675
1734
|
|
|
1676
|
-
local function __TS__ParseFloat(numberString)
|
|
1677
|
-
local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
|
|
1678
|
-
if infinityMatch ~= nil then
|
|
1679
|
-
return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
|
|
1680
|
-
end
|
|
1681
|
-
local number = tonumber((__TS__Match(numberString, "^%s*(-?%d+%.?%d*)")))
|
|
1682
|
-
return number or 0 / 0
|
|
1683
|
-
end
|
|
1684
|
-
|
|
1685
|
-
local function __TS__StringSubstring(self, start, ____end)
|
|
1686
|
-
if ____end ~= ____end then
|
|
1687
|
-
____end = 0
|
|
1688
|
-
end
|
|
1689
|
-
if ____end ~= nil and start > ____end then
|
|
1690
|
-
start, ____end = ____end, start
|
|
1691
|
-
end
|
|
1692
|
-
if start >= 0 then
|
|
1693
|
-
start = start + 1
|
|
1694
|
-
else
|
|
1695
|
-
start = 1
|
|
1696
|
-
end
|
|
1697
|
-
if ____end ~= nil and ____end < 0 then
|
|
1698
|
-
____end = 0
|
|
1699
|
-
end
|
|
1700
|
-
return string.sub(self, start, ____end)
|
|
1701
|
-
end
|
|
1702
|
-
|
|
1703
|
-
local __TS__ParseInt
|
|
1704
|
-
do
|
|
1705
|
-
local parseIntBasePattern = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTvVwWxXyYzZ"
|
|
1706
|
-
function __TS__ParseInt(numberString, base)
|
|
1707
|
-
if base == nil then
|
|
1708
|
-
base = 10
|
|
1709
|
-
local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
|
|
1710
|
-
if hexMatch ~= nil then
|
|
1711
|
-
base = 16
|
|
1712
|
-
numberString = (__TS__Match(hexMatch, "-")) and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
|
|
1713
|
-
end
|
|
1714
|
-
end
|
|
1715
|
-
if base < 2 or base > 36 then
|
|
1716
|
-
return 0 / 0
|
|
1717
|
-
end
|
|
1718
|
-
local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1719
|
-
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
1720
|
-
local number = tonumber((__TS__Match(numberString, pattern)), base)
|
|
1721
|
-
if number == nil then
|
|
1722
|
-
return 0 / 0
|
|
1723
|
-
end
|
|
1724
|
-
if number >= 0 then
|
|
1725
|
-
return math.floor(number)
|
|
1726
|
-
else
|
|
1727
|
-
return math.ceil(number)
|
|
1728
|
-
end
|
|
1729
|
-
end
|
|
1730
|
-
end
|
|
1731
|
-
|
|
1732
1735
|
local function __TS__PromiseAll(iterable)
|
|
1733
1736
|
local results = {}
|
|
1734
1737
|
local toResolve = {}
|
|
@@ -2596,6 +2599,8 @@ return {
|
|
|
2596
2599
|
__TS__Number = __TS__Number,
|
|
2597
2600
|
__TS__NumberIsFinite = __TS__NumberIsFinite,
|
|
2598
2601
|
__TS__NumberIsNaN = __TS__NumberIsNaN,
|
|
2602
|
+
__TS__ParseInt = __TS__ParseInt,
|
|
2603
|
+
__TS__ParseFloat = __TS__ParseFloat,
|
|
2599
2604
|
__TS__NumberToString = __TS__NumberToString,
|
|
2600
2605
|
__TS__NumberToFixed = __TS__NumberToFixed,
|
|
2601
2606
|
__TS__ObjectAssign = __TS__ObjectAssign,
|
|
@@ -17932,12 +17937,15 @@ ____exports.NUM_VANILLA_CHALLENGES = getEnumLength(nil, Challenge) - 1
|
|
|
17932
17937
|
return ____exports
|
|
17933
17938
|
end,
|
|
17934
17939
|
["src.core.constants"] = function(...)
|
|
17940
|
+
local ____lualib = require("lualib_bundle")
|
|
17941
|
+
local __TS__New = ____lualib.__TS__New
|
|
17935
17942
|
local ____exports = {}
|
|
17936
17943
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17937
17944
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
17938
17945
|
local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
|
|
17939
17946
|
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
17940
17947
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
17948
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
17941
17949
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
17942
17950
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
17943
17951
|
local ____enums = require("src.functions.enums")
|
|
@@ -17952,12 +17960,29 @@ local ____types = require("src.functions.types")
|
|
|
17952
17960
|
local asCollectibleType = ____types.asCollectibleType
|
|
17953
17961
|
local ____utils = require("src.functions.utils")
|
|
17954
17962
|
local eRange = ____utils.eRange
|
|
17963
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
17964
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
17955
17965
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
17956
17966
|
local NUM_NORMAL_PILL_COLORS = ____constantsFirstLast.NUM_NORMAL_PILL_COLORS
|
|
17957
17967
|
____exports.ALL_DISPLAY_FLAGS = addFlag(nil, DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON)
|
|
17958
17968
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
17959
17969
|
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
17960
17970
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
17971
|
+
____exports.CHEST_PICKUP_VARIANTS = {
|
|
17972
|
+
PickupVariant.CHEST,
|
|
17973
|
+
PickupVariant.BOMB_CHEST,
|
|
17974
|
+
PickupVariant.SPIKED_CHEST,
|
|
17975
|
+
PickupVariant.ETERNAL_CHEST,
|
|
17976
|
+
PickupVariant.MIMIC_CHEST,
|
|
17977
|
+
PickupVariant.OLD_CHEST,
|
|
17978
|
+
PickupVariant.WOODEN_CHEST,
|
|
17979
|
+
PickupVariant.MEGA_CHEST,
|
|
17980
|
+
PickupVariant.HAUNTED_CHEST,
|
|
17981
|
+
PickupVariant.LOCKED_CHEST,
|
|
17982
|
+
PickupVariant.RED_CHEST,
|
|
17983
|
+
PickupVariant.MOMS_CHEST
|
|
17984
|
+
}
|
|
17985
|
+
____exports.CHEST_PICKUP_VARIANTS_SET = __TS__New(ReadonlySet, ____exports.CHEST_PICKUP_VARIANTS)
|
|
17961
17986
|
____exports.COLLECTIBLE_INITIAL_WAIT = 20
|
|
17962
17987
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE
|
|
17963
17988
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
@@ -39783,30 +39808,6 @@ ____exports.COIN_SUB_TYPE_TO_VALUE = {
|
|
|
39783
39808
|
[CoinSubType.STICKY_NICKEL] = 5,
|
|
39784
39809
|
[CoinSubType.GOLDEN] = 1
|
|
39785
39810
|
}
|
|
39786
|
-
return ____exports
|
|
39787
|
-
end,
|
|
39788
|
-
["src.sets.chestPickupVariantsSet"] = function(...)
|
|
39789
|
-
local ____lualib = require("lualib_bundle")
|
|
39790
|
-
local __TS__New = ____lualib.__TS__New
|
|
39791
|
-
local ____exports = {}
|
|
39792
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
39793
|
-
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
39794
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
39795
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
39796
|
-
____exports.CHEST_PICKUP_VARIANTS = __TS__New(ReadonlySet, {
|
|
39797
|
-
PickupVariant.CHEST,
|
|
39798
|
-
PickupVariant.BOMB_CHEST,
|
|
39799
|
-
PickupVariant.SPIKED_CHEST,
|
|
39800
|
-
PickupVariant.ETERNAL_CHEST,
|
|
39801
|
-
PickupVariant.MIMIC_CHEST,
|
|
39802
|
-
PickupVariant.OLD_CHEST,
|
|
39803
|
-
PickupVariant.WOODEN_CHEST,
|
|
39804
|
-
PickupVariant.MEGA_CHEST,
|
|
39805
|
-
PickupVariant.HAUNTED_CHEST,
|
|
39806
|
-
PickupVariant.LOCKED_CHEST,
|
|
39807
|
-
PickupVariant.RED_CHEST,
|
|
39808
|
-
PickupVariant.MOMS_CHEST
|
|
39809
|
-
})
|
|
39810
39811
|
return ____exports
|
|
39811
39812
|
end,
|
|
39812
39813
|
["src.sets.redHeartSubTypesSet"] = function(...)
|
|
@@ -40178,11 +40179,11 @@ return ____exports
|
|
|
40178
40179
|
local ____lualib = require("lualib_bundle")
|
|
40179
40180
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
40180
40181
|
local ____exports = {}
|
|
40182
|
+
local ____constants = require("src.core.constants")
|
|
40183
|
+
local CHEST_PICKUP_VARIANTS_SET = ____constants.CHEST_PICKUP_VARIANTS_SET
|
|
40181
40184
|
local ____coinSubTypeToValue = require("src.objects.coinSubTypeToValue")
|
|
40182
40185
|
local COIN_SUB_TYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUB_TYPE_TO_VALUE
|
|
40183
40186
|
local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
|
|
40184
|
-
local ____chestPickupVariantsSet = require("src.sets.chestPickupVariantsSet")
|
|
40185
|
-
local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
|
|
40186
40187
|
local ____redHeartSubTypesSet = require("src.sets.redHeartSubTypesSet")
|
|
40187
40188
|
local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
|
|
40188
40189
|
local ____entities = require("src.functions.entities")
|
|
@@ -40192,7 +40193,7 @@ local isHeart = ____pickupVariants.isHeart
|
|
|
40192
40193
|
local ____pickupsSpecific = require("src.functions.pickupsSpecific")
|
|
40193
40194
|
local getHearts = ____pickupsSpecific.getHearts
|
|
40194
40195
|
function ____exports.isChestVariant(self, pickupVariant)
|
|
40195
|
-
return
|
|
40196
|
+
return CHEST_PICKUP_VARIANTS_SET:has(pickupVariant)
|
|
40196
40197
|
end
|
|
40197
40198
|
function ____exports.getCoinValue(self, coinSubType)
|
|
40198
40199
|
local value = COIN_SUB_TYPE_TO_VALUE[coinSubType]
|
package/dist/lualib_bundle.lua
CHANGED
|
@@ -1067,6 +1067,9 @@ end
|
|
|
1067
1067
|
local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError
|
|
1068
1068
|
do
|
|
1069
1069
|
local function getErrorStack(self, constructor)
|
|
1070
|
+
if debug == nil then
|
|
1071
|
+
return nil
|
|
1072
|
+
end
|
|
1070
1073
|
local level = 1
|
|
1071
1074
|
while true do
|
|
1072
1075
|
local info = debug.getinfo(level, "f")
|
|
@@ -1448,6 +1451,62 @@ local function __TS__NumberIsNaN(value)
|
|
|
1448
1451
|
return value ~= value
|
|
1449
1452
|
end
|
|
1450
1453
|
|
|
1454
|
+
local function __TS__StringSubstring(self, start, ____end)
|
|
1455
|
+
if ____end ~= ____end then
|
|
1456
|
+
____end = 0
|
|
1457
|
+
end
|
|
1458
|
+
if ____end ~= nil and start > ____end then
|
|
1459
|
+
start, ____end = ____end, start
|
|
1460
|
+
end
|
|
1461
|
+
if start >= 0 then
|
|
1462
|
+
start = start + 1
|
|
1463
|
+
else
|
|
1464
|
+
start = 1
|
|
1465
|
+
end
|
|
1466
|
+
if ____end ~= nil and ____end < 0 then
|
|
1467
|
+
____end = 0
|
|
1468
|
+
end
|
|
1469
|
+
return string.sub(self, start, ____end)
|
|
1470
|
+
end
|
|
1471
|
+
|
|
1472
|
+
local __TS__ParseInt
|
|
1473
|
+
do
|
|
1474
|
+
local parseIntBasePattern = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTvVwWxXyYzZ"
|
|
1475
|
+
function __TS__ParseInt(numberString, base)
|
|
1476
|
+
if base == nil then
|
|
1477
|
+
base = 10
|
|
1478
|
+
local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
|
|
1479
|
+
if hexMatch ~= nil then
|
|
1480
|
+
base = 16
|
|
1481
|
+
numberString = (__TS__Match(hexMatch, "-")) and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
|
|
1482
|
+
end
|
|
1483
|
+
end
|
|
1484
|
+
if base < 2 or base > 36 then
|
|
1485
|
+
return 0 / 0
|
|
1486
|
+
end
|
|
1487
|
+
local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1488
|
+
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
1489
|
+
local number = tonumber((__TS__Match(numberString, pattern)), base)
|
|
1490
|
+
if number == nil then
|
|
1491
|
+
return 0 / 0
|
|
1492
|
+
end
|
|
1493
|
+
if number >= 0 then
|
|
1494
|
+
return math.floor(number)
|
|
1495
|
+
else
|
|
1496
|
+
return math.ceil(number)
|
|
1497
|
+
end
|
|
1498
|
+
end
|
|
1499
|
+
end
|
|
1500
|
+
|
|
1501
|
+
local function __TS__ParseFloat(numberString)
|
|
1502
|
+
local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
|
|
1503
|
+
if infinityMatch ~= nil then
|
|
1504
|
+
return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
|
|
1505
|
+
end
|
|
1506
|
+
local number = tonumber((__TS__Match(numberString, "^%s*(-?%d+%.?%d*)")))
|
|
1507
|
+
return number or 0 / 0
|
|
1508
|
+
end
|
|
1509
|
+
|
|
1451
1510
|
local __TS__NumberToString
|
|
1452
1511
|
do
|
|
1453
1512
|
local radixChars = "0123456789abcdefghijklmnopqrstuvwxyz"
|
|
@@ -1622,62 +1681,6 @@ local function __TS__ObjectValues(obj)
|
|
|
1622
1681
|
return result
|
|
1623
1682
|
end
|
|
1624
1683
|
|
|
1625
|
-
local function __TS__ParseFloat(numberString)
|
|
1626
|
-
local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
|
|
1627
|
-
if infinityMatch ~= nil then
|
|
1628
|
-
return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
|
|
1629
|
-
end
|
|
1630
|
-
local number = tonumber((__TS__Match(numberString, "^%s*(-?%d+%.?%d*)")))
|
|
1631
|
-
return number or 0 / 0
|
|
1632
|
-
end
|
|
1633
|
-
|
|
1634
|
-
local function __TS__StringSubstring(self, start, ____end)
|
|
1635
|
-
if ____end ~= ____end then
|
|
1636
|
-
____end = 0
|
|
1637
|
-
end
|
|
1638
|
-
if ____end ~= nil and start > ____end then
|
|
1639
|
-
start, ____end = ____end, start
|
|
1640
|
-
end
|
|
1641
|
-
if start >= 0 then
|
|
1642
|
-
start = start + 1
|
|
1643
|
-
else
|
|
1644
|
-
start = 1
|
|
1645
|
-
end
|
|
1646
|
-
if ____end ~= nil and ____end < 0 then
|
|
1647
|
-
____end = 0
|
|
1648
|
-
end
|
|
1649
|
-
return string.sub(self, start, ____end)
|
|
1650
|
-
end
|
|
1651
|
-
|
|
1652
|
-
local __TS__ParseInt
|
|
1653
|
-
do
|
|
1654
|
-
local parseIntBasePattern = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTvVwWxXyYzZ"
|
|
1655
|
-
function __TS__ParseInt(numberString, base)
|
|
1656
|
-
if base == nil then
|
|
1657
|
-
base = 10
|
|
1658
|
-
local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
|
|
1659
|
-
if hexMatch ~= nil then
|
|
1660
|
-
base = 16
|
|
1661
|
-
numberString = (__TS__Match(hexMatch, "-")) and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
|
|
1662
|
-
end
|
|
1663
|
-
end
|
|
1664
|
-
if base < 2 or base > 36 then
|
|
1665
|
-
return 0 / 0
|
|
1666
|
-
end
|
|
1667
|
-
local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1668
|
-
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
1669
|
-
local number = tonumber((__TS__Match(numberString, pattern)), base)
|
|
1670
|
-
if number == nil then
|
|
1671
|
-
return 0 / 0
|
|
1672
|
-
end
|
|
1673
|
-
if number >= 0 then
|
|
1674
|
-
return math.floor(number)
|
|
1675
|
-
else
|
|
1676
|
-
return math.ceil(number)
|
|
1677
|
-
end
|
|
1678
|
-
end
|
|
1679
|
-
end
|
|
1680
|
-
|
|
1681
1684
|
local function __TS__PromiseAll(iterable)
|
|
1682
1685
|
local results = {}
|
|
1683
1686
|
local toResolve = {}
|
|
@@ -2545,6 +2548,8 @@ return {
|
|
|
2545
2548
|
__TS__Number = __TS__Number,
|
|
2546
2549
|
__TS__NumberIsFinite = __TS__NumberIsFinite,
|
|
2547
2550
|
__TS__NumberIsNaN = __TS__NumberIsNaN,
|
|
2551
|
+
__TS__ParseInt = __TS__ParseInt,
|
|
2552
|
+
__TS__ParseFloat = __TS__ParseFloat,
|
|
2548
2553
|
__TS__NumberToString = __TS__NumberToString,
|
|
2549
2554
|
__TS__NumberToFixed = __TS__NumberToFixed,
|
|
2550
2555
|
__TS__ObjectAssign = __TS__ObjectAssign,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectibleType, Dimension, ItemPoolType, PlayerType } from "isaac-typescript-definitions";
|
|
1
|
+
import { CollectibleType, Dimension, ItemPoolType, PickupVariant, PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* The combination of the following flags:
|
|
4
4
|
* - `DisplayFlag.VISIBLE` (1 << 0)
|
|
@@ -8,12 +8,6 @@ import { CollectibleType, Dimension, ItemPoolType, PlayerType } from "isaac-type
|
|
|
8
8
|
export declare const ALL_DISPLAY_FLAGS: BitFlags<number & {
|
|
9
9
|
readonly __bitFlagBrand: symbol;
|
|
10
10
|
} & {
|
|
11
|
-
/**
|
|
12
|
-
* The combination of the following flags:
|
|
13
|
-
* - `DisplayFlag.VISIBLE` (1 << 0)
|
|
14
|
-
* - `DisplayFlag.SHADOW` (1 << 1)
|
|
15
|
-
* - `DisplayFlag.SHOW_ICON` (1 << 2)
|
|
16
|
-
*/
|
|
17
11
|
readonly __displayFlagBrand: symbol;
|
|
18
12
|
}>;
|
|
19
13
|
/**
|
|
@@ -28,6 +22,8 @@ export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
|
28
22
|
export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
29
23
|
/** Bombs explode when their frame count is equal to this value. */
|
|
30
24
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
25
|
+
export declare const CHEST_PICKUP_VARIANTS: readonly [PickupVariant.CHEST, PickupVariant.BOMB_CHEST, PickupVariant.SPIKED_CHEST, PickupVariant.ETERNAL_CHEST, PickupVariant.MIMIC_CHEST, PickupVariant.OLD_CHEST, PickupVariant.WOODEN_CHEST, PickupVariant.MEGA_CHEST, PickupVariant.HAUNTED_CHEST, PickupVariant.LOCKED_CHEST, PickupVariant.RED_CHEST, PickupVariant.MOMS_CHEST];
|
|
26
|
+
export declare const CHEST_PICKUP_VARIANTS_SET: ReadonlySet<PickupVariant>;
|
|
31
27
|
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
|
|
32
28
|
export declare const COLLECTIBLE_INITIAL_WAIT = 20;
|
|
33
29
|
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EAET,YAAY,EACZ,UAAU,EAEX,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/core/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
1
3
|
local ____exports = {}
|
|
2
4
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
5
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
6
|
local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
|
|
5
7
|
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
6
8
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
9
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
7
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
8
11
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
9
12
|
local ____enums = require("src.functions.enums")
|
|
@@ -18,6 +21,8 @@ local ____types = require("src.functions.types")
|
|
|
18
21
|
local asCollectibleType = ____types.asCollectibleType
|
|
19
22
|
local ____utils = require("src.functions.utils")
|
|
20
23
|
local eRange = ____utils.eRange
|
|
24
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
25
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
21
26
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
22
27
|
local NUM_NORMAL_PILL_COLORS = ____constantsFirstLast.NUM_NORMAL_PILL_COLORS
|
|
23
28
|
--- The combination of the following flags:
|
|
@@ -33,6 +38,21 @@ ____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
|
33
38
|
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
34
39
|
--- Bombs explode when their frame count is equal to this value.
|
|
35
40
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
41
|
+
____exports.CHEST_PICKUP_VARIANTS = {
|
|
42
|
+
PickupVariant.CHEST,
|
|
43
|
+
PickupVariant.BOMB_CHEST,
|
|
44
|
+
PickupVariant.SPIKED_CHEST,
|
|
45
|
+
PickupVariant.ETERNAL_CHEST,
|
|
46
|
+
PickupVariant.MIMIC_CHEST,
|
|
47
|
+
PickupVariant.OLD_CHEST,
|
|
48
|
+
PickupVariant.WOODEN_CHEST,
|
|
49
|
+
PickupVariant.MEGA_CHEST,
|
|
50
|
+
PickupVariant.HAUNTED_CHEST,
|
|
51
|
+
PickupVariant.LOCKED_CHEST,
|
|
52
|
+
PickupVariant.RED_CHEST,
|
|
53
|
+
PickupVariant.MOMS_CHEST
|
|
54
|
+
}
|
|
55
|
+
____exports.CHEST_PICKUP_VARIANTS_SET = __TS__New(ReadonlySet, ____exports.CHEST_PICKUP_VARIANTS)
|
|
36
56
|
--- This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned.
|
|
37
57
|
____exports.COLLECTIBLE_INITIAL_WAIT = 20
|
|
38
58
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
3
3
|
local ____exports = {}
|
|
4
|
+
local ____constants = require("src.core.constants")
|
|
5
|
+
local CHEST_PICKUP_VARIANTS_SET = ____constants.CHEST_PICKUP_VARIANTS_SET
|
|
4
6
|
local ____coinSubTypeToValue = require("src.objects.coinSubTypeToValue")
|
|
5
7
|
local COIN_SUB_TYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUB_TYPE_TO_VALUE
|
|
6
8
|
local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
|
|
7
|
-
local ____chestPickupVariantsSet = require("src.sets.chestPickupVariantsSet")
|
|
8
|
-
local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
|
|
9
9
|
local ____redHeartSubTypesSet = require("src.sets.redHeartSubTypesSet")
|
|
10
10
|
local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
|
|
11
11
|
local ____entities = require("src.functions.entities")
|
|
@@ -16,7 +16,7 @@ local ____pickupsSpecific = require("src.functions.pickupsSpecific")
|
|
|
16
16
|
local getHearts = ____pickupsSpecific.getHearts
|
|
17
17
|
--- Helper function to test if the provided pickup variant matches one of the various chest variants.
|
|
18
18
|
function ____exports.isChestVariant(self, pickupVariant)
|
|
19
|
-
return
|
|
19
|
+
return CHEST_PICKUP_VARIANTS_SET:has(pickupVariant)
|
|
20
20
|
end
|
|
21
21
|
--- Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
|
|
22
22
|
-- sub-types.
|
package/package.json
CHANGED
package/src/core/constants.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Dimension,
|
|
4
4
|
DisplayFlag,
|
|
5
5
|
ItemPoolType,
|
|
6
|
+
PickupVariant,
|
|
6
7
|
PlayerType,
|
|
7
8
|
TrinketSlot,
|
|
8
9
|
} from "isaac-typescript-definitions";
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
} from "../functions/readOnly";
|
|
16
17
|
import { asCollectibleType } from "../functions/types";
|
|
17
18
|
import { eRange } from "../functions/utils";
|
|
19
|
+
import { ReadonlySet } from "../types/ReadonlySet";
|
|
18
20
|
import { NUM_NORMAL_PILL_COLORS } from "./constantsFirstLast";
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -44,6 +46,25 @@ export const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
|
44
46
|
/** Bombs explode when their frame count is equal to this value. */
|
|
45
47
|
export const BOMB_EXPLODE_FRAME = 45;
|
|
46
48
|
|
|
49
|
+
export const CHEST_PICKUP_VARIANTS = [
|
|
50
|
+
PickupVariant.CHEST, // 50
|
|
51
|
+
PickupVariant.BOMB_CHEST, // 51
|
|
52
|
+
PickupVariant.SPIKED_CHEST, // 52
|
|
53
|
+
PickupVariant.ETERNAL_CHEST, // 53
|
|
54
|
+
PickupVariant.MIMIC_CHEST, // 54
|
|
55
|
+
PickupVariant.OLD_CHEST, // 55
|
|
56
|
+
PickupVariant.WOODEN_CHEST, // 56
|
|
57
|
+
PickupVariant.MEGA_CHEST, // 57
|
|
58
|
+
PickupVariant.HAUNTED_CHEST, // 58
|
|
59
|
+
PickupVariant.LOCKED_CHEST, // 60
|
|
60
|
+
PickupVariant.RED_CHEST, // 360
|
|
61
|
+
PickupVariant.MOMS_CHEST, // 390
|
|
62
|
+
] as const;
|
|
63
|
+
|
|
64
|
+
export const CHEST_PICKUP_VARIANTS_SET = new ReadonlySet<PickupVariant>(
|
|
65
|
+
CHEST_PICKUP_VARIANTS,
|
|
66
|
+
);
|
|
67
|
+
|
|
47
68
|
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
|
|
48
69
|
export const COLLECTIBLE_INITIAL_WAIT = 20;
|
|
49
70
|
|
package/src/functions/pickups.ts
CHANGED
|
@@ -3,11 +3,11 @@ import type {
|
|
|
3
3
|
HeartSubType,
|
|
4
4
|
PickupVariant,
|
|
5
5
|
} from "isaac-typescript-definitions";
|
|
6
|
+
import { CHEST_PICKUP_VARIANTS_SET } from "../core/constants";
|
|
6
7
|
import {
|
|
7
8
|
COIN_SUB_TYPE_TO_VALUE,
|
|
8
9
|
DEFAULT_COIN_VALUE,
|
|
9
10
|
} from "../objects/coinSubTypeToValue";
|
|
10
|
-
import { CHEST_PICKUP_VARIANTS } from "../sets/chestPickupVariantsSet";
|
|
11
11
|
import { RED_HEART_SUB_TYPES_SET } from "../sets/redHeartSubTypesSet";
|
|
12
12
|
import { removeEntities } from "./entities";
|
|
13
13
|
import { isHeart } from "./pickupVariants";
|
|
@@ -39,7 +39,7 @@ export function isChest(pickup: EntityPickup): boolean {
|
|
|
39
39
|
* Helper function to test if the provided pickup variant matches one of the various chest variants.
|
|
40
40
|
*/
|
|
41
41
|
export function isChestVariant(pickupVariant: PickupVariant): boolean {
|
|
42
|
-
return
|
|
42
|
+
return CHEST_PICKUP_VARIANTS_SET.has(pickupVariant);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chestPickupVariantsSet.d.ts","sourceRoot":"","sources":["../../../src/sets/chestPickupVariantsSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,eAAO,MAAM,qBAAqB,4BAahC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__New = ____lualib.__TS__New
|
|
3
|
-
local ____exports = {}
|
|
4
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
-
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
7
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
8
|
-
____exports.CHEST_PICKUP_VARIANTS = __TS__New(ReadonlySet, {
|
|
9
|
-
PickupVariant.CHEST,
|
|
10
|
-
PickupVariant.BOMB_CHEST,
|
|
11
|
-
PickupVariant.SPIKED_CHEST,
|
|
12
|
-
PickupVariant.ETERNAL_CHEST,
|
|
13
|
-
PickupVariant.MIMIC_CHEST,
|
|
14
|
-
PickupVariant.OLD_CHEST,
|
|
15
|
-
PickupVariant.WOODEN_CHEST,
|
|
16
|
-
PickupVariant.MEGA_CHEST,
|
|
17
|
-
PickupVariant.HAUNTED_CHEST,
|
|
18
|
-
PickupVariant.LOCKED_CHEST,
|
|
19
|
-
PickupVariant.RED_CHEST,
|
|
20
|
-
PickupVariant.MOMS_CHEST
|
|
21
|
-
})
|
|
22
|
-
return ____exports
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
|
-
import { ReadonlySet } from "../types/ReadonlySet";
|
|
3
|
-
|
|
4
|
-
export const CHEST_PICKUP_VARIANTS = new ReadonlySet<PickupVariant>([
|
|
5
|
-
PickupVariant.CHEST, // 50
|
|
6
|
-
PickupVariant.BOMB_CHEST, // 51
|
|
7
|
-
PickupVariant.SPIKED_CHEST, // 52
|
|
8
|
-
PickupVariant.ETERNAL_CHEST, // 53
|
|
9
|
-
PickupVariant.MIMIC_CHEST, // 54
|
|
10
|
-
PickupVariant.OLD_CHEST, // 55
|
|
11
|
-
PickupVariant.WOODEN_CHEST, // 56
|
|
12
|
-
PickupVariant.MEGA_CHEST, // 57
|
|
13
|
-
PickupVariant.HAUNTED_CHEST, // 58
|
|
14
|
-
PickupVariant.LOCKED_CHEST, // 60
|
|
15
|
-
PickupVariant.RED_CHEST, // 360
|
|
16
|
-
PickupVariant.MOMS_CHEST, // 390
|
|
17
|
-
]);
|