isaacscript-common 21.9.0 → 23.0.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 +61 -45
- package/dist/isaacscript-common.lua +202 -177
- package/dist/lualib_bundle.lua +59 -100
- package/dist/src/functions/characters.d.ts +8 -1
- package/dist/src/functions/characters.d.ts.map +1 -1
- package/dist/src/functions/characters.lua +9 -0
- package/dist/src/functions/color.d.ts +1 -1
- package/dist/src/functions/color.d.ts.map +1 -1
- package/dist/src/functions/hex.d.ts +2 -2
- package/dist/src/functions/hex.d.ts.map +1 -1
- package/dist/src/functions/isaacAPIClass.d.ts +1 -1
- package/dist/src/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/src/functions/isaacAPIClass.lua +1 -1
- package/dist/src/functions/kColor.d.ts +1 -1
- package/dist/src/functions/kColor.d.ts.map +1 -1
- package/dist/src/functions/log.d.ts +1 -1
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +5 -0
- package/dist/src/functions/players.d.ts +28 -21
- package/dist/src/functions/players.d.ts.map +1 -1
- package/dist/src/functions/players.lua +60 -51
- package/dist/src/functions/positionVelocity.d.ts +1 -1
- package/dist/src/functions/positionVelocity.d.ts.map +1 -1
- package/dist/src/functions/roomGrid.d.ts +5 -5
- package/dist/src/functions/roomGrid.d.ts.map +1 -1
- package/dist/src/functions/ui.d.ts +8 -8
- package/dist/src/functions/ui.d.ts.map +1 -1
- package/dist/src/functions/vector.d.ts +1 -1
- package/dist/src/functions/vector.d.ts.map +1 -1
- package/dist/src/objects/characterStartingCollectibles.d.ts +46 -0
- package/dist/src/objects/characterStartingCollectibles.d.ts.map +1 -0
- package/dist/src/objects/characterStartingCollectibles.lua +49 -0
- package/package.json +1 -1
- package/src/functions/characters.ts +14 -1
- package/src/functions/color.ts +1 -1
- package/src/functions/hex.ts +2 -2
- package/src/functions/isaacAPIClass.ts +1 -1
- package/src/functions/kColor.ts +1 -1
- package/src/functions/log.ts +7 -1
- package/src/functions/players.ts +72 -57
- package/src/functions/positionVelocity.ts +1 -1
- package/src/functions/roomGrid.ts +14 -5
- package/src/functions/ui.ts +8 -8
- package/src/functions/vector.ts +1 -1
- package/src/objects/characterStartingCollectibles.ts +144 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 23.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -813,13 +813,7 @@ local function __TS__AsyncAwaiter(generator)
|
|
|
813
813
|
function(____, resolve, reject)
|
|
814
814
|
local adopt, fulfilled, step, resolved, asyncCoroutine
|
|
815
815
|
function adopt(self, value)
|
|
816
|
-
|
|
817
|
-
if __TS__InstanceOf(value, __TS__Promise) then
|
|
818
|
-
____temp_0 = value
|
|
819
|
-
else
|
|
820
|
-
____temp_0 = __TS__Promise.resolve(value)
|
|
821
|
-
end
|
|
822
|
-
return ____temp_0
|
|
816
|
+
return __TS__InstanceOf(value, __TS__Promise) and value or __TS__Promise.resolve(value)
|
|
823
817
|
end
|
|
824
818
|
function fulfilled(self, value)
|
|
825
819
|
local success, resultOrError = coroutine.resume(asyncCoroutine, value)
|
|
@@ -836,8 +830,8 @@ local function __TS__AsyncAwaiter(generator)
|
|
|
836
830
|
if coroutine.status(asyncCoroutine) == "dead" then
|
|
837
831
|
resolve(nil, result)
|
|
838
832
|
else
|
|
839
|
-
local
|
|
840
|
-
|
|
833
|
+
local ____self_0 = adopt(nil, result)
|
|
834
|
+
____self_0["then"](____self_0, fulfilled, reject)
|
|
841
835
|
end
|
|
842
836
|
end
|
|
843
837
|
resolved = false
|
|
@@ -846,8 +840,8 @@ local function __TS__AsyncAwaiter(generator)
|
|
|
846
840
|
asyncCoroutine,
|
|
847
841
|
function(____, v)
|
|
848
842
|
resolved = true
|
|
849
|
-
local
|
|
850
|
-
|
|
843
|
+
local ____self_1 = adopt(nil, v)
|
|
844
|
+
____self_1["then"](____self_1, resolve, reject)
|
|
851
845
|
end
|
|
852
846
|
)
|
|
853
847
|
if success then
|
|
@@ -954,7 +948,7 @@ do
|
|
|
954
948
|
local descriptors = rawget(metatable, "_descriptors")
|
|
955
949
|
if descriptors then
|
|
956
950
|
local descriptor = descriptors[key]
|
|
957
|
-
if descriptor then
|
|
951
|
+
if descriptor ~= nil then
|
|
958
952
|
if descriptor.get then
|
|
959
953
|
return descriptor.get(self)
|
|
960
954
|
end
|
|
@@ -970,7 +964,7 @@ do
|
|
|
970
964
|
local descriptors = rawget(metatable, "_descriptors")
|
|
971
965
|
if descriptors then
|
|
972
966
|
local descriptor = descriptors[key]
|
|
973
|
-
if descriptor then
|
|
967
|
+
if descriptor ~= nil then
|
|
974
968
|
if descriptor.set then
|
|
975
969
|
descriptor.set(self, value)
|
|
976
970
|
else
|
|
@@ -1023,7 +1017,7 @@ local function __TS__Decorate(decorators, target, key, desc)
|
|
|
1023
1017
|
local i = #decorators
|
|
1024
1018
|
while i >= 0 do
|
|
1025
1019
|
local decorator = decorators[i + 1]
|
|
1026
|
-
if decorator then
|
|
1020
|
+
if decorator ~= nil then
|
|
1027
1021
|
local oldResult = result
|
|
1028
1022
|
if key == nil then
|
|
1029
1023
|
result = decorator(nil, result)
|
|
@@ -1096,7 +1090,7 @@ do
|
|
|
1096
1090
|
if isClassicLua or caller and caller.func ~= error then
|
|
1097
1091
|
return description
|
|
1098
1092
|
else
|
|
1099
|
-
return (
|
|
1093
|
+
return (description .. "\n") .. tostring(self.stack)
|
|
1100
1094
|
end
|
|
1101
1095
|
end
|
|
1102
1096
|
end
|
|
@@ -1107,7 +1101,7 @@ do
|
|
|
1107
1101
|
{__call = function(____, _self, message) return __TS__New(Type, message) end}
|
|
1108
1102
|
)
|
|
1109
1103
|
end
|
|
1110
|
-
local
|
|
1104
|
+
local ____initErrorClass_1 = initErrorClass
|
|
1111
1105
|
local ____class_0 = __TS__Class()
|
|
1112
1106
|
____class_0.name = ""
|
|
1113
1107
|
function ____class_0.prototype.____constructor(self, message)
|
|
@@ -1118,31 +1112,25 @@ do
|
|
|
1118
1112
|
self.name = "Error"
|
|
1119
1113
|
self.stack = getErrorStack(nil, self.constructor.new)
|
|
1120
1114
|
local metatable = getmetatable(self)
|
|
1121
|
-
if not metatable.__errorToStringPatched then
|
|
1115
|
+
if metatable and not metatable.__errorToStringPatched then
|
|
1122
1116
|
metatable.__errorToStringPatched = true
|
|
1123
1117
|
metatable.__tostring = wrapErrorToString(nil, metatable.__tostring)
|
|
1124
1118
|
end
|
|
1125
1119
|
end
|
|
1126
1120
|
function ____class_0.prototype.__tostring(self)
|
|
1127
|
-
|
|
1128
|
-
if self.message ~= "" then
|
|
1129
|
-
____temp_1 = (self.name .. ": ") .. self.message
|
|
1130
|
-
else
|
|
1131
|
-
____temp_1 = self.name
|
|
1132
|
-
end
|
|
1133
|
-
return ____temp_1
|
|
1121
|
+
return self.message ~= "" and (self.name .. ": ") .. self.message or self.name
|
|
1134
1122
|
end
|
|
1135
|
-
Error =
|
|
1123
|
+
Error = ____initErrorClass_1(nil, ____class_0, "Error")
|
|
1136
1124
|
local function createErrorClass(self, name)
|
|
1137
|
-
local
|
|
1138
|
-
local
|
|
1139
|
-
|
|
1140
|
-
__TS__ClassExtends(
|
|
1141
|
-
function
|
|
1142
|
-
|
|
1125
|
+
local ____initErrorClass_3 = initErrorClass
|
|
1126
|
+
local ____class_2 = __TS__Class()
|
|
1127
|
+
____class_2.name = ____class_2.name
|
|
1128
|
+
__TS__ClassExtends(____class_2, Error)
|
|
1129
|
+
function ____class_2.prototype.____constructor(self, ...)
|
|
1130
|
+
____class_2.____super.prototype.____constructor(self, ...)
|
|
1143
1131
|
self.name = name
|
|
1144
1132
|
end
|
|
1145
|
-
return
|
|
1133
|
+
return ____initErrorClass_3(nil, ____class_2, name)
|
|
1146
1134
|
end
|
|
1147
1135
|
RangeError = createErrorClass(nil, "RangeError")
|
|
1148
1136
|
ReferenceError = createErrorClass(nil, "ReferenceError")
|
|
@@ -1312,13 +1300,13 @@ do
|
|
|
1312
1300
|
self.size = self.size - 1
|
|
1313
1301
|
local next = self.nextKey[key]
|
|
1314
1302
|
local previous = self.previousKey[key]
|
|
1315
|
-
if next and previous then
|
|
1303
|
+
if next ~= nil and previous ~= nil then
|
|
1316
1304
|
self.nextKey[previous] = next
|
|
1317
1305
|
self.previousKey[next] = previous
|
|
1318
|
-
elseif next then
|
|
1306
|
+
elseif next ~= nil then
|
|
1319
1307
|
self.firstKey = next
|
|
1320
1308
|
self.previousKey[next] = nil
|
|
1321
|
-
elseif previous then
|
|
1309
|
+
elseif previous ~= nil then
|
|
1322
1310
|
self.lastKey = previous
|
|
1323
1311
|
self.nextKey[previous] = nil
|
|
1324
1312
|
else
|
|
@@ -1504,13 +1492,7 @@ do
|
|
|
1504
1492
|
end
|
|
1505
1493
|
|
|
1506
1494
|
local function __TS__ObjectDefineProperty(target, key, desc)
|
|
1507
|
-
local
|
|
1508
|
-
if type(key) == "number" then
|
|
1509
|
-
____temp_0 = key + 1
|
|
1510
|
-
else
|
|
1511
|
-
____temp_0 = key
|
|
1512
|
-
end
|
|
1513
|
-
local luaKey = ____temp_0
|
|
1495
|
+
local luaKey = type(key) == "number" and key + 1 or key
|
|
1514
1496
|
local value = rawget(target, luaKey)
|
|
1515
1497
|
local hasGetterOrSetter = desc.get ~= nil or desc.set ~= nil
|
|
1516
1498
|
local descriptor
|
|
@@ -1524,39 +1506,39 @@ local function __TS__ObjectDefineProperty(target, key, desc)
|
|
|
1524
1506
|
descriptor = desc
|
|
1525
1507
|
else
|
|
1526
1508
|
local valueExists = value ~= nil
|
|
1527
|
-
local
|
|
1528
|
-
local
|
|
1529
|
-
local
|
|
1509
|
+
local ____desc_set_4 = desc.set
|
|
1510
|
+
local ____desc_get_5 = desc.get
|
|
1511
|
+
local ____temp_0
|
|
1530
1512
|
if desc.configurable ~= nil then
|
|
1531
|
-
|
|
1513
|
+
____temp_0 = desc.configurable
|
|
1532
1514
|
else
|
|
1533
|
-
|
|
1515
|
+
____temp_0 = valueExists
|
|
1534
1516
|
end
|
|
1535
|
-
local
|
|
1517
|
+
local ____temp_1
|
|
1536
1518
|
if desc.enumerable ~= nil then
|
|
1537
|
-
|
|
1519
|
+
____temp_1 = desc.enumerable
|
|
1538
1520
|
else
|
|
1539
|
-
|
|
1521
|
+
____temp_1 = valueExists
|
|
1540
1522
|
end
|
|
1541
|
-
local
|
|
1523
|
+
local ____temp_2
|
|
1542
1524
|
if desc.writable ~= nil then
|
|
1543
|
-
|
|
1525
|
+
____temp_2 = desc.writable
|
|
1544
1526
|
else
|
|
1545
|
-
|
|
1527
|
+
____temp_2 = valueExists
|
|
1546
1528
|
end
|
|
1547
|
-
local
|
|
1529
|
+
local ____temp_3
|
|
1548
1530
|
if desc.value ~= nil then
|
|
1549
|
-
|
|
1531
|
+
____temp_3 = desc.value
|
|
1550
1532
|
else
|
|
1551
|
-
|
|
1533
|
+
____temp_3 = value
|
|
1552
1534
|
end
|
|
1553
1535
|
descriptor = {
|
|
1554
|
-
set =
|
|
1555
|
-
get =
|
|
1556
|
-
configurable =
|
|
1557
|
-
enumerable =
|
|
1558
|
-
writable =
|
|
1559
|
-
value =
|
|
1536
|
+
set = ____desc_set_4,
|
|
1537
|
+
get = ____desc_get_5,
|
|
1538
|
+
configurable = ____temp_0,
|
|
1539
|
+
enumerable = ____temp_1,
|
|
1540
|
+
writable = ____temp_2,
|
|
1541
|
+
value = ____temp_3
|
|
1560
1542
|
}
|
|
1561
1543
|
end
|
|
1562
1544
|
__TS__SetDescriptor(target, luaKey, descriptor)
|
|
@@ -1626,14 +1608,8 @@ end
|
|
|
1626
1608
|
|
|
1627
1609
|
local function __TS__ParseFloat(numberString)
|
|
1628
1610
|
local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
|
|
1629
|
-
if infinityMatch then
|
|
1630
|
-
|
|
1631
|
-
if __TS__StringAccess(infinityMatch, 0) == "-" then
|
|
1632
|
-
____temp_0 = -math.huge
|
|
1633
|
-
else
|
|
1634
|
-
____temp_0 = math.huge
|
|
1635
|
-
end
|
|
1636
|
-
return ____temp_0
|
|
1611
|
+
if infinityMatch ~= nil then
|
|
1612
|
+
return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
|
|
1637
1613
|
end
|
|
1638
1614
|
local number = tonumber(__TS__Match(numberString, "^%s*(-?%d+%.?%d*)"))
|
|
1639
1615
|
return number or 0 / 0
|
|
@@ -1664,27 +1640,15 @@ do
|
|
|
1664
1640
|
if base == nil then
|
|
1665
1641
|
base = 10
|
|
1666
1642
|
local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
|
|
1667
|
-
if hexMatch then
|
|
1643
|
+
if hexMatch ~= nil then
|
|
1668
1644
|
base = 16
|
|
1669
|
-
|
|
1670
|
-
if __TS__Match(hexMatch, "-") then
|
|
1671
|
-
____TS__Match_result__0_0 = "-" .. __TS__StringSubstring(numberString, #hexMatch)
|
|
1672
|
-
else
|
|
1673
|
-
____TS__Match_result__0_0 = __TS__StringSubstring(numberString, #hexMatch)
|
|
1674
|
-
end
|
|
1675
|
-
numberString = ____TS__Match_result__0_0
|
|
1645
|
+
numberString = __TS__Match(hexMatch, "-") and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
|
|
1676
1646
|
end
|
|
1677
1647
|
end
|
|
1678
1648
|
if base < 2 or base > 36 then
|
|
1679
1649
|
return 0 / 0
|
|
1680
1650
|
end
|
|
1681
|
-
local
|
|
1682
|
-
if base <= 10 then
|
|
1683
|
-
____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, base)
|
|
1684
|
-
else
|
|
1685
|
-
____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1686
|
-
end
|
|
1687
|
-
local allowedDigits = ____temp_1
|
|
1651
|
+
local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1688
1652
|
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
1689
1653
|
local number = tonumber(
|
|
1690
1654
|
__TS__Match(numberString, pattern),
|
|
@@ -1923,13 +1887,13 @@ do
|
|
|
1923
1887
|
self.size = self.size - 1
|
|
1924
1888
|
local next = self.nextKey[value]
|
|
1925
1889
|
local previous = self.previousKey[value]
|
|
1926
|
-
if next and previous then
|
|
1890
|
+
if next ~= nil and previous ~= nil then
|
|
1927
1891
|
self.nextKey[previous] = next
|
|
1928
1892
|
self.previousKey[next] = previous
|
|
1929
|
-
elseif next then
|
|
1893
|
+
elseif next ~= nil then
|
|
1930
1894
|
self.firstKey = next
|
|
1931
1895
|
self.previousKey[next] = nil
|
|
1932
|
-
elseif previous then
|
|
1896
|
+
elseif previous ~= nil then
|
|
1933
1897
|
self.lastKey = previous
|
|
1934
1898
|
self.nextKey[previous] = nil
|
|
1935
1899
|
else
|
|
@@ -2117,7 +2081,7 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
|
|
|
2117
2081
|
if thread == nil and message == nil and level == nil then
|
|
2118
2082
|
trace = originalTraceback()
|
|
2119
2083
|
elseif __TS__StringIncludes(_VERSION, "Lua 5.0") then
|
|
2120
|
-
trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. message)
|
|
2084
|
+
trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. tostring(message))
|
|
2121
2085
|
else
|
|
2122
2086
|
trace = originalTraceback(thread, message, level)
|
|
2123
2087
|
end
|
|
@@ -2126,12 +2090,12 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
|
|
|
2126
2090
|
end
|
|
2127
2091
|
local function replacer(____, file, srcFile, line)
|
|
2128
2092
|
local fileSourceMap = _G.__TS__sourcemap[file]
|
|
2129
|
-
if fileSourceMap and fileSourceMap[line] then
|
|
2093
|
+
if fileSourceMap ~= nil and fileSourceMap[line] ~= nil then
|
|
2130
2094
|
local data = fileSourceMap[line]
|
|
2131
2095
|
if type(data) == "number" then
|
|
2132
2096
|
return (srcFile .. ":") .. tostring(data)
|
|
2133
2097
|
end
|
|
2134
|
-
return (
|
|
2098
|
+
return (data.file .. ":") .. tostring(data.line)
|
|
2135
2099
|
end
|
|
2136
2100
|
return (file .. ":") .. line
|
|
2137
2101
|
end
|
|
@@ -2142,14 +2106,14 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
|
|
|
2142
2106
|
)
|
|
2143
2107
|
local function stringReplacer(____, file, line)
|
|
2144
2108
|
local fileSourceMap = _G.__TS__sourcemap[file]
|
|
2145
|
-
if fileSourceMap and fileSourceMap[line] then
|
|
2109
|
+
if fileSourceMap ~= nil and fileSourceMap[line] ~= nil then
|
|
2146
2110
|
local chunkName = __TS__Match(file, "%[string \"([^\"]+)\"%]")
|
|
2147
2111
|
local sourceName = string.gsub(chunkName, ".lua$", ".ts")
|
|
2148
2112
|
local data = fileSourceMap[line]
|
|
2149
2113
|
if type(data) == "number" then
|
|
2150
2114
|
return (sourceName .. ":") .. tostring(data)
|
|
2151
2115
|
end
|
|
2152
|
-
return (
|
|
2116
|
+
return (data.file .. ":") .. tostring(data.line)
|
|
2153
2117
|
end
|
|
2154
2118
|
return (file .. ":") .. line
|
|
2155
2119
|
end
|
|
@@ -2269,13 +2233,7 @@ do
|
|
|
2269
2233
|
return source
|
|
2270
2234
|
end
|
|
2271
2235
|
local before = sub(source, 1, startPos - 1)
|
|
2272
|
-
local
|
|
2273
|
-
if type(replaceValue) == "string" then
|
|
2274
|
-
____temp_0 = replaceValue
|
|
2275
|
-
else
|
|
2276
|
-
____temp_0 = replaceValue(nil, searchValue, startPos - 1, source)
|
|
2277
|
-
end
|
|
2278
|
-
local replacement = ____temp_0
|
|
2236
|
+
local replacement = type(replaceValue) == "string" and replaceValue or replaceValue(nil, searchValue, startPos - 1, source)
|
|
2279
2237
|
local after = sub(source, endPos + 1)
|
|
2280
2238
|
return (before .. replacement) .. after
|
|
2281
2239
|
end
|
|
@@ -2430,6 +2388,7 @@ do
|
|
|
2430
2388
|
return key
|
|
2431
2389
|
end
|
|
2432
2390
|
end
|
|
2391
|
+
return nil
|
|
2433
2392
|
end
|
|
2434
2393
|
end
|
|
2435
2394
|
|
|
@@ -15469,43 +15428,6 @@ function ____exports.shouldFireTrinketType(self, fireArgs, optionalArgs)
|
|
|
15469
15428
|
local callbackTrinketType = table.unpack(optionalArgs)
|
|
15470
15429
|
return callbackTrinketType == nil or callbackTrinketType == trinketType
|
|
15471
15430
|
end
|
|
15472
|
-
return ____exports
|
|
15473
|
-
end,
|
|
15474
|
-
["src.functions.log"] = function(...)
|
|
15475
|
-
local ____exports = {}
|
|
15476
|
-
function ____exports.getParentFunctionDescription(levels)
|
|
15477
|
-
if levels == nil then
|
|
15478
|
-
levels = 3
|
|
15479
|
-
end
|
|
15480
|
-
if debug ~= nil then
|
|
15481
|
-
local debugTable = debug.getinfo(levels)
|
|
15482
|
-
if debugTable ~= nil then
|
|
15483
|
-
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
15484
|
-
end
|
|
15485
|
-
end
|
|
15486
|
-
if SandboxGetParentFunctionDescription ~= nil then
|
|
15487
|
-
return SandboxGetParentFunctionDescription(levels)
|
|
15488
|
-
end
|
|
15489
|
-
return nil
|
|
15490
|
-
end
|
|
15491
|
-
function ____exports.log(msg, includeParentFunction)
|
|
15492
|
-
if includeParentFunction == nil then
|
|
15493
|
-
includeParentFunction = true
|
|
15494
|
-
end
|
|
15495
|
-
local ____includeParentFunction_0
|
|
15496
|
-
if includeParentFunction then
|
|
15497
|
-
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
15498
|
-
else
|
|
15499
|
-
____includeParentFunction_0 = nil
|
|
15500
|
-
end
|
|
15501
|
-
local parentFunctionDescription = ____includeParentFunction_0
|
|
15502
|
-
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
15503
|
-
Isaac.DebugString(debugMsg)
|
|
15504
|
-
end
|
|
15505
|
-
function ____exports.logAndPrint(self, msg)
|
|
15506
|
-
____exports.log(msg)
|
|
15507
|
-
print(msg)
|
|
15508
|
-
end
|
|
15509
15431
|
return ____exports
|
|
15510
15432
|
end,
|
|
15511
15433
|
["src.functions.types"] = function(...)
|
|
@@ -15562,6 +15484,48 @@ end
|
|
|
15562
15484
|
function ____exports.isUserdata(self, variable)
|
|
15563
15485
|
return type(variable) == "userdata"
|
|
15564
15486
|
end
|
|
15487
|
+
return ____exports
|
|
15488
|
+
end,
|
|
15489
|
+
["src.functions.log"] = function(...)
|
|
15490
|
+
local ____exports = {}
|
|
15491
|
+
local ____types = require("src.functions.types")
|
|
15492
|
+
local isNumber = ____types.isNumber
|
|
15493
|
+
function ____exports.getParentFunctionDescription(levels)
|
|
15494
|
+
if levels == nil then
|
|
15495
|
+
levels = 3
|
|
15496
|
+
end
|
|
15497
|
+
if debug ~= nil then
|
|
15498
|
+
local debugTable = debug.getinfo(levels)
|
|
15499
|
+
if debugTable ~= nil then
|
|
15500
|
+
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
15501
|
+
end
|
|
15502
|
+
end
|
|
15503
|
+
if SandboxGetParentFunctionDescription ~= nil then
|
|
15504
|
+
return SandboxGetParentFunctionDescription(levels)
|
|
15505
|
+
end
|
|
15506
|
+
return nil
|
|
15507
|
+
end
|
|
15508
|
+
function ____exports.log(msg, includeParentFunction)
|
|
15509
|
+
if includeParentFunction == nil then
|
|
15510
|
+
includeParentFunction = true
|
|
15511
|
+
end
|
|
15512
|
+
if isNumber(nil, msg) then
|
|
15513
|
+
msg = tostring(msg)
|
|
15514
|
+
end
|
|
15515
|
+
local ____includeParentFunction_0
|
|
15516
|
+
if includeParentFunction then
|
|
15517
|
+
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
15518
|
+
else
|
|
15519
|
+
____includeParentFunction_0 = nil
|
|
15520
|
+
end
|
|
15521
|
+
local parentFunctionDescription = ____includeParentFunction_0
|
|
15522
|
+
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
15523
|
+
Isaac.DebugString(debugMsg)
|
|
15524
|
+
end
|
|
15525
|
+
function ____exports.logAndPrint(self, msg)
|
|
15526
|
+
____exports.log(msg)
|
|
15527
|
+
print(msg)
|
|
15528
|
+
end
|
|
15565
15529
|
return ____exports
|
|
15566
15530
|
end,
|
|
15567
15531
|
["src.functions.sort"] = function(...)
|
|
@@ -21802,6 +21766,57 @@ ____exports.CHARACTER_NAMES = {
|
|
|
21802
21766
|
[PlayerType.JACOB_2_B] = "Dead Tainted Jacob",
|
|
21803
21767
|
[PlayerType.SOUL_B] = "Tainted Soul"
|
|
21804
21768
|
}
|
|
21769
|
+
return ____exports
|
|
21770
|
+
end,
|
|
21771
|
+
["src.objects.characterStartingCollectibles"] = function(...)
|
|
21772
|
+
local ____exports = {}
|
|
21773
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
21774
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
21775
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
21776
|
+
____exports.CHARACTER_STARTING_COLLECTIBLES = {
|
|
21777
|
+
[PlayerType.POSSESSOR] = {},
|
|
21778
|
+
[PlayerType.ISAAC] = {CollectibleType.D6},
|
|
21779
|
+
[PlayerType.MAGDALENE] = {CollectibleType.YUM_HEART},
|
|
21780
|
+
[PlayerType.CAIN] = {CollectibleType.LUCKY_FOOT},
|
|
21781
|
+
[PlayerType.JUDAS] = {CollectibleType.BOOK_OF_BELIAL},
|
|
21782
|
+
[PlayerType.BLUE_BABY] = {CollectibleType.POOP},
|
|
21783
|
+
[PlayerType.EVE] = {CollectibleType.DEAD_BIRD, CollectibleType.WHORE_OF_BABYLON, CollectibleType.RAZOR_BLADE},
|
|
21784
|
+
[PlayerType.SAMSON] = {CollectibleType.BLOODY_LUST},
|
|
21785
|
+
[PlayerType.AZAZEL] = {},
|
|
21786
|
+
[PlayerType.LAZARUS] = {CollectibleType.ANEMIC},
|
|
21787
|
+
[PlayerType.EDEN] = {},
|
|
21788
|
+
[PlayerType.LOST] = {CollectibleType.ETERNAL_D6},
|
|
21789
|
+
[PlayerType.LAZARUS_2] = {CollectibleType.ANEMIC},
|
|
21790
|
+
[PlayerType.DARK_JUDAS] = {},
|
|
21791
|
+
[PlayerType.LILITH] = {CollectibleType.BOX_OF_FRIENDS, CollectibleType.CAMBION_CONCEPTION},
|
|
21792
|
+
[PlayerType.KEEPER] = {CollectibleType.WOODEN_NICKEL},
|
|
21793
|
+
[PlayerType.APOLLYON] = {CollectibleType.VOID},
|
|
21794
|
+
[PlayerType.FORGOTTEN] = {},
|
|
21795
|
+
[PlayerType.SOUL] = {},
|
|
21796
|
+
[PlayerType.BETHANY] = {CollectibleType.BOOK_OF_VIRTUES},
|
|
21797
|
+
[PlayerType.JACOB] = {},
|
|
21798
|
+
[PlayerType.ESAU] = {},
|
|
21799
|
+
[PlayerType.ISAAC_B] = {},
|
|
21800
|
+
[PlayerType.MAGDALENE_B] = {CollectibleType.YUM_HEART},
|
|
21801
|
+
[PlayerType.CAIN_B] = {CollectibleType.BAG_OF_CRAFTING},
|
|
21802
|
+
[PlayerType.JUDAS_B] = {CollectibleType.DARK_ARTS},
|
|
21803
|
+
[PlayerType.BLUE_BABY_B] = {CollectibleType.HOLD},
|
|
21804
|
+
[PlayerType.EVE_B] = {CollectibleType.SUMPTORIUM},
|
|
21805
|
+
[PlayerType.SAMSON_B] = {},
|
|
21806
|
+
[PlayerType.AZAZEL_B] = {},
|
|
21807
|
+
[PlayerType.LAZARUS_B] = {CollectibleType.FLIP},
|
|
21808
|
+
[PlayerType.EDEN_B] = {},
|
|
21809
|
+
[PlayerType.LOST_B] = {},
|
|
21810
|
+
[PlayerType.LILITH_B] = {},
|
|
21811
|
+
[PlayerType.KEEPER_B] = {},
|
|
21812
|
+
[PlayerType.APOLLYON_B] = {CollectibleType.ABYSS},
|
|
21813
|
+
[PlayerType.FORGOTTEN_B] = {},
|
|
21814
|
+
[PlayerType.BETHANY_B] = {CollectibleType.LEMEGETON},
|
|
21815
|
+
[PlayerType.JACOB_B] = {CollectibleType.ANIMA_SOLA},
|
|
21816
|
+
[PlayerType.LAZARUS_2_B] = {CollectibleType.FLIP},
|
|
21817
|
+
[PlayerType.JACOB_2_B] = {CollectibleType.ANIMA_SOLA},
|
|
21818
|
+
[PlayerType.SOUL_B] = {}
|
|
21819
|
+
}
|
|
21805
21820
|
return ____exports
|
|
21806
21821
|
end,
|
|
21807
21822
|
["src.sets.charactersThatStartWithAnActiveItemSet"] = function(...)
|
|
@@ -21915,6 +21930,8 @@ local ____characterDamageMultipliers = require("src.objects.characterDamageMulti
|
|
|
21915
21930
|
local CHARACTER_DAMAGE_MULTIPLIERS = ____characterDamageMultipliers.CHARACTER_DAMAGE_MULTIPLIERS
|
|
21916
21931
|
local ____characterNames = require("src.objects.characterNames")
|
|
21917
21932
|
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
21933
|
+
local ____characterStartingCollectibles = require("src.objects.characterStartingCollectibles")
|
|
21934
|
+
local CHARACTER_STARTING_COLLECTIBLES = ____characterStartingCollectibles.CHARACTER_STARTING_COLLECTIBLES
|
|
21918
21935
|
local ____charactersThatStartWithAnActiveItemSet = require("src.sets.charactersThatStartWithAnActiveItemSet")
|
|
21919
21936
|
local CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = ____charactersThatStartWithAnActiveItemSet.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET
|
|
21920
21937
|
local ____charactersWithBlackHeartFromEternalHeartSet = require("src.sets.charactersWithBlackHeartFromEternalHeartSet")
|
|
@@ -21997,6 +22014,9 @@ function ____exports.getCharacterName(self, character)
|
|
|
21997
22014
|
end
|
|
21998
22015
|
return CHARACTER_NAMES[character]
|
|
21999
22016
|
end
|
|
22017
|
+
function ____exports.getCharacterStartingItems(self, character)
|
|
22018
|
+
return CHARACTER_STARTING_COLLECTIBLES[character]
|
|
22019
|
+
end
|
|
22000
22020
|
function ____exports.isFlyingCharacter(self, player)
|
|
22001
22021
|
local character = player:GetPlayerType()
|
|
22002
22022
|
return FLYING_CHARACTERS:has(character)
|
|
@@ -22013,7 +22033,6 @@ local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
|
22013
22033
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
22014
22034
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
22015
22035
|
local ____exports = {}
|
|
22016
|
-
local isTaintedModded
|
|
22017
22036
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
22018
22037
|
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
22019
22038
|
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
@@ -22061,16 +22080,16 @@ end
|
|
|
22061
22080
|
function ____exports.isModdedPlayer(self, player)
|
|
22062
22081
|
return not ____exports.isVanillaPlayer(nil, player)
|
|
22063
22082
|
end
|
|
22064
|
-
function isTaintedModded(self, player)
|
|
22065
|
-
local character = player:GetPlayerType()
|
|
22066
|
-
local name = player:GetName()
|
|
22067
|
-
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
22068
|
-
return character == taintedCharacter
|
|
22069
|
-
end
|
|
22070
22083
|
function ____exports.isVanillaPlayer(self, player)
|
|
22071
22084
|
local character = player:GetPlayerType()
|
|
22072
22085
|
return isVanillaCharacter(nil, character)
|
|
22073
22086
|
end
|
|
22087
|
+
function ____exports.addCollectible(self, player, ...)
|
|
22088
|
+
local collectibleTypes = {...}
|
|
22089
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
22090
|
+
player:AddCollectible(collectibleType)
|
|
22091
|
+
end
|
|
22092
|
+
end
|
|
22074
22093
|
function ____exports.addCollectibleCostume(self, player, collectibleType)
|
|
22075
22094
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
22076
22095
|
if itemConfigItem == nil then
|
|
@@ -22300,6 +22319,20 @@ function ____exports.getTotalPlayerCollectibles(self, collectibleType)
|
|
|
22300
22319
|
)
|
|
22301
22320
|
return sumArray(nil, numCollectiblesArray)
|
|
22302
22321
|
end
|
|
22322
|
+
function ____exports.hasCollectible(self, player, ...)
|
|
22323
|
+
local collectibleTypes = {...}
|
|
22324
|
+
return __TS__ArraySome(
|
|
22325
|
+
collectibleTypes,
|
|
22326
|
+
function(____, collectibleType) return player:HasCollectible(collectibleType) end
|
|
22327
|
+
)
|
|
22328
|
+
end
|
|
22329
|
+
function ____exports.hasForm(self, player, ...)
|
|
22330
|
+
local playerForms = {...}
|
|
22331
|
+
return __TS__ArraySome(
|
|
22332
|
+
playerForms,
|
|
22333
|
+
function(____, playerForm) return player:HasPlayerForm(playerForm) end
|
|
22334
|
+
)
|
|
22335
|
+
end
|
|
22303
22336
|
function ____exports.hasLostCurse(self, player)
|
|
22304
22337
|
local effects = player:GetEffects()
|
|
22305
22338
|
return effects:HasNullEffect(NullItemID.LOST_CURSE)
|
|
@@ -22354,6 +22387,12 @@ function ____exports.isLost(self, player)
|
|
|
22354
22387
|
local character = player:GetPlayerType()
|
|
22355
22388
|
return character == PlayerType.LOST or character == PlayerType.LOST_B
|
|
22356
22389
|
end
|
|
22390
|
+
local function isTaintedModded(self, player)
|
|
22391
|
+
local character = player:GetPlayerType()
|
|
22392
|
+
local name = player:GetName()
|
|
22393
|
+
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
22394
|
+
return character == taintedCharacter
|
|
22395
|
+
end
|
|
22357
22396
|
function ____exports.isPlayerAbleToAim(self, player)
|
|
22358
22397
|
return player:IsExtraAnimationFinished()
|
|
22359
22398
|
end
|
|
@@ -22371,26 +22410,6 @@ function ____exports.isTaintedLazarus(self, player)
|
|
|
22371
22410
|
local character = player:GetPlayerType()
|
|
22372
22411
|
return character == PlayerType.LAZARUS_B or character == PlayerType.LAZARUS_2_B
|
|
22373
22412
|
end
|
|
22374
|
-
function ____exports.playerAddCollectible(self, player, ...)
|
|
22375
|
-
local collectibleTypes = {...}
|
|
22376
|
-
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
22377
|
-
player:AddCollectible(collectibleType)
|
|
22378
|
-
end
|
|
22379
|
-
end
|
|
22380
|
-
function ____exports.playerHasCollectible(self, player, ...)
|
|
22381
|
-
local collectibleTypes = {...}
|
|
22382
|
-
return __TS__ArraySome(
|
|
22383
|
-
collectibleTypes,
|
|
22384
|
-
function(____, collectibleType) return player:HasCollectible(collectibleType) end
|
|
22385
|
-
)
|
|
22386
|
-
end
|
|
22387
|
-
function ____exports.playerHasForm(self, player, ...)
|
|
22388
|
-
local playerForms = {...}
|
|
22389
|
-
return __TS__ArraySome(
|
|
22390
|
-
playerForms,
|
|
22391
|
-
function(____, playerForm) return player:HasPlayerForm(playerForm) end
|
|
22392
|
-
)
|
|
22393
|
-
end
|
|
22394
22413
|
function ____exports.removeAllActiveItems(self, player)
|
|
22395
22414
|
for ____, activeSlot in ipairs(ACTIVE_SLOT_VALUES) do
|
|
22396
22415
|
do
|
|
@@ -22398,13 +22417,13 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
22398
22417
|
if collectibleType == CollectibleType.NULL then
|
|
22399
22418
|
goto __continue93
|
|
22400
22419
|
end
|
|
22401
|
-
local
|
|
22420
|
+
local stillHasCollectible
|
|
22402
22421
|
repeat
|
|
22403
22422
|
do
|
|
22404
22423
|
player:RemoveCollectible(collectibleType)
|
|
22405
|
-
|
|
22424
|
+
stillHasCollectible = player:HasCollectible(collectibleType)
|
|
22406
22425
|
end
|
|
22407
|
-
until not
|
|
22426
|
+
until not stillHasCollectible
|
|
22408
22427
|
end
|
|
22409
22428
|
::__continue93::
|
|
22410
22429
|
end
|
|
@@ -22427,6 +22446,12 @@ function ____exports.removeAllPlayerTrinkets(self, player)
|
|
|
22427
22446
|
::__continue98::
|
|
22428
22447
|
end
|
|
22429
22448
|
end
|
|
22449
|
+
function ____exports.removeCollectible(self, player, ...)
|
|
22450
|
+
local collectibleTypes = {...}
|
|
22451
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
22452
|
+
player:RemoveCollectible(collectibleType)
|
|
22453
|
+
end
|
|
22454
|
+
end
|
|
22430
22455
|
function ____exports.removeCollectibleCostume(self, player, collectibleType)
|
|
22431
22456
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
22432
22457
|
if itemConfigItem == nil then
|
|
@@ -22478,9 +22503,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22478
22503
|
itemPool:RemoveCollectible(collectibleType)
|
|
22479
22504
|
end
|
|
22480
22505
|
repeat
|
|
22481
|
-
local
|
|
22482
|
-
local
|
|
22483
|
-
if
|
|
22506
|
+
local ____switch120 = activeSlot
|
|
22507
|
+
local ____cond120 = ____switch120 == ActiveSlot.PRIMARY
|
|
22508
|
+
if ____cond120 then
|
|
22484
22509
|
do
|
|
22485
22510
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
22486
22511
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -22489,8 +22514,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22489
22514
|
break
|
|
22490
22515
|
end
|
|
22491
22516
|
end
|
|
22492
|
-
|
|
22493
|
-
if
|
|
22517
|
+
____cond120 = ____cond120 or ____switch120 == ActiveSlot.SECONDARY
|
|
22518
|
+
if ____cond120 then
|
|
22494
22519
|
do
|
|
22495
22520
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
22496
22521
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -22505,16 +22530,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
22505
22530
|
break
|
|
22506
22531
|
end
|
|
22507
22532
|
end
|
|
22508
|
-
|
|
22509
|
-
if
|
|
22533
|
+
____cond120 = ____cond120 or ____switch120 == ActiveSlot.POCKET
|
|
22534
|
+
if ____cond120 then
|
|
22510
22535
|
do
|
|
22511
22536
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
22512
22537
|
player:SetActiveCharge(charge, activeSlot)
|
|
22513
22538
|
break
|
|
22514
22539
|
end
|
|
22515
22540
|
end
|
|
22516
|
-
|
|
22517
|
-
if
|
|
22541
|
+
____cond120 = ____cond120 or ____switch120 == ActiveSlot.POCKET_SINGLE_USE
|
|
22542
|
+
if ____cond120 then
|
|
22518
22543
|
do
|
|
22519
22544
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
22520
22545
|
break
|