isaacscript-common 71.2.1 → 72.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 +229 -96
- package/dist/isaacscript-common.lua +10 -127
- package/dist/src/classes/features/other/CustomItemPools.d.ts +7 -3
- package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomItemPools.lua +1 -6
- package/dist/src/classes/features/other/DeployJSONRoom.d.ts +7 -3
- package/dist/src/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/src/classes/features/other/DeployJSONRoom.lua +1 -5
- package/dist/src/classes/features/other/ModdedElementSets.d.ts +35 -15
- package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementSets.lua +0 -17
- package/dist/src/classes/features/other/SpawnCollectible.d.ts +14 -6
- package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
- package/dist/src/classes/features/other/SpawnCollectible.lua +0 -8
- package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +8 -4
- package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
- package/dist/src/classes/features/other/SpawnRockAltRewards.lua +0 -4
- package/dist/src/classes/features/other/customStages/utils.d.ts +2 -2
- package/dist/src/classes/features/other/customStages/utils.d.ts.map +1 -1
- package/dist/src/classes/features/other/customStages/utils.lua +0 -8
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +2 -2
- package/dist/src/functions/array.d.ts +35 -15
- package/dist/src/functions/array.d.ts.map +1 -1
- package/dist/src/functions/array.lua +30 -26
- package/dist/src/functions/color.d.ts +8 -4
- package/dist/src/functions/color.d.ts.map +1 -1
- package/dist/src/functions/color.lua +7 -7
- package/dist/src/functions/enums.d.ts +6 -3
- package/dist/src/functions/enums.d.ts.map +1 -1
- package/dist/src/functions/enums.lua +5 -7
- package/dist/src/functions/itemPool.d.ts +8 -1
- package/dist/src/functions/itemPool.d.ts.map +1 -1
- package/dist/src/functions/itemPool.lua +9 -2
- package/dist/src/functions/jsonRoom.d.ts +13 -6
- package/dist/src/functions/jsonRoom.d.ts.map +1 -1
- package/dist/src/functions/jsonRoom.lua +11 -12
- package/dist/src/functions/kColor.d.ts +8 -4
- package/dist/src/functions/kColor.d.ts.map +1 -1
- package/dist/src/functions/kColor.lua +7 -7
- package/dist/src/functions/levelGrid.d.ts +12 -5
- package/dist/src/functions/levelGrid.d.ts.map +1 -1
- package/dist/src/functions/levelGrid.lua +10 -7
- package/dist/src/functions/random.d.ts +22 -13
- package/dist/src/functions/random.d.ts.map +1 -1
- package/dist/src/functions/random.lua +19 -20
- package/dist/src/functions/rng.d.ts +1 -1
- package/dist/src/functions/rng.lua +1 -1
- package/dist/src/functions/set.d.ts +7 -3
- package/dist/src/functions/set.d.ts.map +1 -1
- package/dist/src/functions/set.lua +6 -7
- package/dist/src/functions/spawnCollectible.d.ts +13 -5
- package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/src/functions/spawnCollectible.lua +14 -9
- package/dist/src/functions/vector.d.ts +7 -3
- package/dist/src/functions/vector.d.ts.map +1 -1
- package/dist/src/functions/vector.lua +6 -6
- package/dist/src/functions/weighted.d.ts +18 -2
- package/dist/src/functions/weighted.d.ts.map +1 -1
- package/dist/src/functions/weighted.lua +16 -8
- package/package.json +1 -1
- package/src/classes/features/other/CustomItemPools.ts +7 -4
- package/src/classes/features/other/DeployJSONRoom.ts +9 -5
- package/src/classes/features/other/ModdedElementSets.ts +37 -16
- package/src/classes/features/other/SpawnCollectible.ts +14 -7
- package/src/classes/features/other/SpawnRockAltRewards.ts +9 -5
- package/src/classes/features/other/customStages/utils.ts +2 -3
- package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -2
- package/src/functions/array.ts +36 -16
- package/src/functions/color.ts +9 -5
- package/src/functions/enums.ts +6 -4
- package/src/functions/itemPool.ts +11 -2
- package/src/functions/jsonRoom.ts +13 -7
- package/src/functions/kColor.ts +9 -5
- package/src/functions/levelGrid.ts +13 -6
- package/src/functions/random.ts +23 -14
- package/src/functions/rng.ts +1 -1
- package/src/functions/set.ts +7 -4
- package/src/functions/spawnCollectible.ts +17 -5
- package/src/functions/vector.ts +8 -4
- package/src/functions/weighted.ts +18 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 72.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -16890,20 +16890,13 @@ local ____exports = {}
|
|
|
16890
16890
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
16891
16891
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
16892
16892
|
local ____rng = require("src.functions.rng")
|
|
16893
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
16894
16893
|
local isRNG = ____rng.isRNG
|
|
16895
16894
|
local newRNG = ____rng.newRNG
|
|
16896
16895
|
function ____exports.getRandom(self, seedOrRNG)
|
|
16897
|
-
if seedOrRNG == nil then
|
|
16898
|
-
seedOrRNG = getRandomSeed(nil)
|
|
16899
|
-
end
|
|
16900
16896
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
16901
16897
|
return rng:RandomFloat()
|
|
16902
16898
|
end
|
|
16903
16899
|
function ____exports.getRandomFloat(self, min, max, seedOrRNG)
|
|
16904
|
-
if seedOrRNG == nil then
|
|
16905
|
-
seedOrRNG = getRandomSeed(nil)
|
|
16906
|
-
end
|
|
16907
16900
|
if min > max then
|
|
16908
16901
|
local oldMin = min
|
|
16909
16902
|
local oldMax = max
|
|
@@ -16913,9 +16906,6 @@ function ____exports.getRandomFloat(self, min, max, seedOrRNG)
|
|
|
16913
16906
|
return min + ____exports.getRandom(nil, seedOrRNG) * (max - min)
|
|
16914
16907
|
end
|
|
16915
16908
|
function ____exports.getRandomInt(self, min, max, seedOrRNG, exceptions)
|
|
16916
|
-
if seedOrRNG == nil then
|
|
16917
|
-
seedOrRNG = getRandomSeed(nil)
|
|
16918
|
-
end
|
|
16919
16909
|
if exceptions == nil then
|
|
16920
16910
|
exceptions = {}
|
|
16921
16911
|
end
|
|
@@ -16966,7 +16956,6 @@ local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
|
16966
16956
|
local ____random = require("src.functions.random")
|
|
16967
16957
|
local getRandomInt = ____random.getRandomInt
|
|
16968
16958
|
local ____rng = require("src.functions.rng")
|
|
16969
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
16970
16959
|
local isRNG = ____rng.isRNG
|
|
16971
16960
|
local newRNG = ____rng.newRNG
|
|
16972
16961
|
local ____types = require("src.functions.types")
|
|
@@ -17043,9 +17032,6 @@ function addCombinations(self, n, src, got, all)
|
|
|
17043
17032
|
end
|
|
17044
17033
|
end
|
|
17045
17034
|
function ____exports.getRandomArrayIndex(self, array, seedOrRNG, exceptions)
|
|
17046
|
-
if seedOrRNG == nil then
|
|
17047
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17048
|
-
end
|
|
17049
17035
|
if exceptions == nil then
|
|
17050
17036
|
exceptions = {}
|
|
17051
17037
|
end
|
|
@@ -17061,9 +17047,6 @@ function ____exports.getRandomArrayIndex(self, array, seedOrRNG, exceptions)
|
|
|
17061
17047
|
)
|
|
17062
17048
|
end
|
|
17063
17049
|
function ____exports.shuffleArrayInPlace(self, array, seedOrRNG)
|
|
17064
|
-
if seedOrRNG == nil then
|
|
17065
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17066
|
-
end
|
|
17067
17050
|
local currentIndex = #array
|
|
17068
17051
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
17069
17052
|
while currentIndex > 0 do
|
|
@@ -17227,9 +17210,6 @@ function ____exports.getLowestArrayElement(self, array)
|
|
|
17227
17210
|
return lowestValue
|
|
17228
17211
|
end
|
|
17229
17212
|
function ____exports.getRandomArrayElement(self, array, seedOrRNG, exceptions)
|
|
17230
|
-
if seedOrRNG == nil then
|
|
17231
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17232
|
-
end
|
|
17233
17213
|
if exceptions == nil then
|
|
17234
17214
|
exceptions = {}
|
|
17235
17215
|
end
|
|
@@ -17251,9 +17231,6 @@ function ____exports.getRandomArrayElement(self, array, seedOrRNG, exceptions)
|
|
|
17251
17231
|
return randomElement
|
|
17252
17232
|
end
|
|
17253
17233
|
function ____exports.getRandomArrayElementAndRemove(self, array, seedOrRNG, exceptions)
|
|
17254
|
-
if seedOrRNG == nil then
|
|
17255
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17256
|
-
end
|
|
17257
17234
|
if exceptions == nil then
|
|
17258
17235
|
exceptions = {}
|
|
17259
17236
|
end
|
|
@@ -17329,9 +17306,6 @@ function ____exports.setAllArrayElements(self, array, value)
|
|
|
17329
17306
|
end
|
|
17330
17307
|
end
|
|
17331
17308
|
function ____exports.shuffleArray(self, originalArray, seedOrRNG)
|
|
17332
|
-
if seedOrRNG == nil then
|
|
17333
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17334
|
-
end
|
|
17335
17309
|
local array = ____exports.copyArray(nil, originalArray)
|
|
17336
17310
|
____exports.shuffleArrayInPlace(nil, array, seedOrRNG)
|
|
17337
17311
|
return array
|
|
@@ -17357,8 +17331,6 @@ local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
|
17357
17331
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
17358
17332
|
local ____array = require("src.functions.array")
|
|
17359
17333
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
17360
|
-
local ____rng = require("src.functions.rng")
|
|
17361
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
17362
17334
|
local ____types = require("src.functions.types")
|
|
17363
17335
|
local isNumber = ____types.isNumber
|
|
17364
17336
|
local isString = ____types.isString
|
|
@@ -17437,9 +17409,6 @@ function ____exports.getLowestEnumValue(self, transpiledEnum)
|
|
|
17437
17409
|
return firstElement
|
|
17438
17410
|
end
|
|
17439
17411
|
function ____exports.getRandomEnumValue(self, transpiledEnum, seedOrRNG, exceptions)
|
|
17440
|
-
if seedOrRNG == nil then
|
|
17441
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17442
|
-
end
|
|
17443
17412
|
if exceptions == nil then
|
|
17444
17413
|
exceptions = {}
|
|
17445
17414
|
end
|
|
@@ -17692,7 +17661,6 @@ local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
|
17692
17661
|
local ____random = require("src.functions.random")
|
|
17693
17662
|
local getRandom = ____random.getRandom
|
|
17694
17663
|
local ____rng = require("src.functions.rng")
|
|
17695
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
17696
17664
|
local isRNG = ____rng.isRNG
|
|
17697
17665
|
local newRNG = ____rng.newRNG
|
|
17698
17666
|
local ____table = require("src.functions.table")
|
|
@@ -17757,9 +17725,6 @@ function ____exports.deserializeColor(self, color)
|
|
|
17757
17725
|
)
|
|
17758
17726
|
end
|
|
17759
17727
|
function ____exports.getRandomColor(self, seedOrRNG, alpha)
|
|
17760
|
-
if seedOrRNG == nil then
|
|
17761
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17762
|
-
end
|
|
17763
17728
|
if alpha == nil then
|
|
17764
17729
|
alpha = 1
|
|
17765
17730
|
end
|
|
@@ -17801,7 +17766,6 @@ local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
|
17801
17766
|
local ____random = require("src.functions.random")
|
|
17802
17767
|
local getRandom = ____random.getRandom
|
|
17803
17768
|
local ____rng = require("src.functions.rng")
|
|
17804
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
17805
17769
|
local isRNG = ____rng.isRNG
|
|
17806
17770
|
local newRNG = ____rng.newRNG
|
|
17807
17771
|
local ____table = require("src.functions.table")
|
|
@@ -17840,9 +17804,6 @@ function ____exports.deserializeKColor(self, kColor)
|
|
|
17840
17804
|
return KColor(r, g, b, a)
|
|
17841
17805
|
end
|
|
17842
17806
|
function ____exports.getRandomKColor(self, seedOrRNG, alpha)
|
|
17843
|
-
if seedOrRNG == nil then
|
|
17844
|
-
seedOrRNG = getRandomSeed(nil)
|
|
17845
|
-
end
|
|
17846
17807
|
if alpha == nil then
|
|
17847
17808
|
alpha = 1
|
|
17848
17809
|
end
|
|
@@ -18292,7 +18253,6 @@ local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
|
18292
18253
|
local ____random = require("src.functions.random")
|
|
18293
18254
|
local getRandomFloat = ____random.getRandomFloat
|
|
18294
18255
|
local ____rng = require("src.functions.rng")
|
|
18295
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
18296
18256
|
local isRNG = ____rng.isRNG
|
|
18297
18257
|
local newRNG = ____rng.newRNG
|
|
18298
18258
|
local ____table = require("src.functions.table")
|
|
@@ -18347,9 +18307,6 @@ function ____exports.getClosestVectorTo(self, referenceVector, vectors)
|
|
|
18347
18307
|
return closestVector
|
|
18348
18308
|
end
|
|
18349
18309
|
function ____exports.getRandomVector(self, seedOrRNG)
|
|
18350
|
-
if seedOrRNG == nil then
|
|
18351
|
-
seedOrRNG = getRandomSeed(nil)
|
|
18352
|
-
end
|
|
18353
18310
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
18354
18311
|
local x = getRandomFloat(nil, -1, 1, rng)
|
|
18355
18312
|
local y = getRandomFloat(nil, -1, 1, rng)
|
|
@@ -38759,8 +38716,6 @@ local ____array = require("src.functions.array")
|
|
|
38759
38716
|
local getArrayCombinations = ____array.getArrayCombinations
|
|
38760
38717
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
38761
38718
|
local sumArray = ____array.sumArray
|
|
38762
|
-
local ____rng = require("src.functions.rng")
|
|
38763
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
38764
38719
|
local ____types = require("src.functions.types")
|
|
38765
38720
|
local isPrimitive = ____types.isPrimitive
|
|
38766
38721
|
function ____exports.getSortedSetValues(self, set)
|
|
@@ -38810,9 +38765,6 @@ function ____exports.deleteSetsFromSet(self, mainSet, ...)
|
|
|
38810
38765
|
end
|
|
38811
38766
|
end
|
|
38812
38767
|
function ____exports.getRandomSetElement(self, set, seedOrRNG, exceptions)
|
|
38813
|
-
if seedOrRNG == nil then
|
|
38814
|
-
seedOrRNG = getRandomSeed(nil)
|
|
38815
|
-
end
|
|
38816
38768
|
if exceptions == nil then
|
|
38817
38769
|
exceptions = {}
|
|
38818
38770
|
end
|
|
@@ -39074,8 +39026,6 @@ local isHiddenCollectible = ____collectibles.isHiddenCollectible
|
|
|
39074
39026
|
local isPassiveOrFamiliarCollectible = ____collectibles.isPassiveOrFamiliarCollectible
|
|
39075
39027
|
local ____flag = require("src.functions.flag")
|
|
39076
39028
|
local getFlagName = ____flag.getFlagName
|
|
39077
|
-
local ____rng = require("src.functions.rng")
|
|
39078
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
39079
39029
|
local ____set = require("src.functions.set")
|
|
39080
39030
|
local copySet = ____set.copySet
|
|
39081
39031
|
local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
@@ -39622,9 +39572,6 @@ function ModdedElementSets.prototype.getEdenPassiveCollectibleTypes(self)
|
|
|
39622
39572
|
end
|
|
39623
39573
|
__TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getEdenPassiveCollectibleTypes", true)
|
|
39624
39574
|
function ModdedElementSets.prototype.getRandomEdenActiveCollectibleType(self, seedOrRNG, exceptions)
|
|
39625
|
-
if seedOrRNG == nil then
|
|
39626
|
-
seedOrRNG = getRandomSeed(nil)
|
|
39627
|
-
end
|
|
39628
39575
|
if exceptions == nil then
|
|
39629
39576
|
exceptions = {}
|
|
39630
39577
|
end
|
|
@@ -39633,9 +39580,6 @@ function ModdedElementSets.prototype.getRandomEdenActiveCollectibleType(self, se
|
|
|
39633
39580
|
end
|
|
39634
39581
|
__TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getRandomEdenActiveCollectibleType", true)
|
|
39635
39582
|
function ModdedElementSets.prototype.getRandomEdenPassiveCollectibleType(self, seedOrRNG, exceptions)
|
|
39636
|
-
if seedOrRNG == nil then
|
|
39637
|
-
seedOrRNG = getRandomSeed(nil)
|
|
39638
|
-
end
|
|
39639
39583
|
if exceptions == nil then
|
|
39640
39584
|
exceptions = {}
|
|
39641
39585
|
end
|
|
@@ -39689,9 +39633,6 @@ function ModdedElementSets.prototype.getCardTypesOfType(self, ...)
|
|
|
39689
39633
|
end
|
|
39690
39634
|
__TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getCardTypesOfType", true)
|
|
39691
39635
|
function ModdedElementSets.prototype.getRandomCardTypeOfType(self, itemConfigCardType, seedOrRNG, exceptions)
|
|
39692
|
-
if seedOrRNG == nil then
|
|
39693
|
-
seedOrRNG = getRandomSeed(nil)
|
|
39694
|
-
end
|
|
39695
39636
|
if exceptions == nil then
|
|
39696
39637
|
exceptions = {}
|
|
39697
39638
|
end
|
|
@@ -39700,9 +39641,6 @@ function ModdedElementSets.prototype.getRandomCardTypeOfType(self, itemConfigCar
|
|
|
39700
39641
|
end
|
|
39701
39642
|
__TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getRandomCardTypeOfType", true)
|
|
39702
39643
|
function ModdedElementSets.prototype.getRandomCard(self, seedOrRNG, exceptions)
|
|
39703
|
-
if seedOrRNG == nil then
|
|
39704
|
-
seedOrRNG = getRandomSeed(nil)
|
|
39705
|
-
end
|
|
39706
39644
|
if exceptions == nil then
|
|
39707
39645
|
exceptions = {}
|
|
39708
39646
|
end
|
|
@@ -39711,9 +39649,6 @@ function ModdedElementSets.prototype.getRandomCard(self, seedOrRNG, exceptions)
|
|
|
39711
39649
|
end
|
|
39712
39650
|
__TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getRandomCard", true)
|
|
39713
39651
|
function ModdedElementSets.prototype.getRandomRune(self, seedOrRNG, exceptions)
|
|
39714
|
-
if seedOrRNG == nil then
|
|
39715
|
-
seedOrRNG = getRandomSeed(nil)
|
|
39716
|
-
end
|
|
39717
39652
|
if exceptions == nil then
|
|
39718
39653
|
exceptions = {}
|
|
39719
39654
|
end
|
|
@@ -41132,14 +41067,9 @@ local ____array = require("src.functions.array")
|
|
|
41132
41067
|
local sumArray = ____array.sumArray
|
|
41133
41068
|
local ____random = require("src.functions.random")
|
|
41134
41069
|
local getRandomFloat = ____random.getRandomFloat
|
|
41135
|
-
local ____rng = require("src.functions.rng")
|
|
41136
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
41137
41070
|
local ____utils = require("src.functions.utils")
|
|
41138
41071
|
local assertDefined = ____utils.assertDefined
|
|
41139
41072
|
function ____exports.getRandomIndexFromWeightedArray(self, weightedArray, seedOrRNG)
|
|
41140
|
-
if seedOrRNG == nil then
|
|
41141
|
-
seedOrRNG = getRandomSeed(nil)
|
|
41142
|
-
end
|
|
41143
41073
|
if #weightedArray == 0 then
|
|
41144
41074
|
error("Failed to get a random index from a weighted array since the provided array was empty.")
|
|
41145
41075
|
end
|
|
@@ -41162,9 +41092,6 @@ function ____exports.getRandomIndexFromWeightedArray(self, weightedArray, seedOr
|
|
|
41162
41092
|
error("Failed to get a random index from a weighted array.")
|
|
41163
41093
|
end
|
|
41164
41094
|
function ____exports.getRandomFromWeightedArray(self, weightedArray, seedOrRNG)
|
|
41165
|
-
if seedOrRNG == nil then
|
|
41166
|
-
seedOrRNG = getRandomSeed(nil)
|
|
41167
|
-
end
|
|
41168
41095
|
local randomIndex = ____exports.getRandomIndexFromWeightedArray(nil, weightedArray, seedOrRNG)
|
|
41169
41096
|
local randomElement = weightedArray[randomIndex + 1]
|
|
41170
41097
|
assertDefined(
|
|
@@ -41194,8 +41121,6 @@ local ____array = require("src.functions.array")
|
|
|
41194
41121
|
local arrayRemoveIndexInPlace = ____array.arrayRemoveIndexInPlace
|
|
41195
41122
|
local ____map = require("src.functions.map")
|
|
41196
41123
|
local copyMap = ____map.copyMap
|
|
41197
|
-
local ____rng = require("src.functions.rng")
|
|
41198
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
41199
41124
|
local ____utils = require("src.functions.utils")
|
|
41200
41125
|
local assertDefined = ____utils.assertDefined
|
|
41201
41126
|
local ____weighted = require("src.functions.weighted")
|
|
@@ -41223,13 +41148,10 @@ function CustomItemPools.prototype.registerCustomItemPool(self, itemPoolTypeCust
|
|
|
41223
41148
|
customItemPoolMap:set(itemPoolTypeCustom, collectibles)
|
|
41224
41149
|
end
|
|
41225
41150
|
__TS__DecorateLegacy({Exported}, CustomItemPools.prototype, "registerCustomItemPool", true)
|
|
41226
|
-
function CustomItemPools.prototype.getCustomItemPoolCollectible(self, itemPoolTypeCustom,
|
|
41151
|
+
function CustomItemPools.prototype.getCustomItemPoolCollectible(self, itemPoolTypeCustom, seedOrRNG, decrease, defaultItem)
|
|
41227
41152
|
if decrease == nil then
|
|
41228
41153
|
decrease = false
|
|
41229
41154
|
end
|
|
41230
|
-
if seedOrRNG == nil then
|
|
41231
|
-
seedOrRNG = getRandomSeed(nil)
|
|
41232
|
-
end
|
|
41233
41155
|
if defaultItem == nil then
|
|
41234
41156
|
defaultItem = CollectibleType.NULL
|
|
41235
41157
|
end
|
|
@@ -44090,8 +44012,6 @@ local ____log = require("src.functions.log")
|
|
|
44090
44012
|
local log = ____log.log
|
|
44091
44013
|
local ____random = require("src.functions.random")
|
|
44092
44014
|
local getRandomFloat = ____random.getRandomFloat
|
|
44093
|
-
local ____rng = require("src.functions.rng")
|
|
44094
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
44095
44015
|
function getTotalWeightOfCustomStageRooms(self, roomsMetadata)
|
|
44096
44016
|
local weights = __TS__ArrayMap(
|
|
44097
44017
|
roomsMetadata,
|
|
@@ -44125,9 +44045,6 @@ function getBossEntryWithChosenWeight(self, bossPool, chosenWeight)
|
|
|
44125
44045
|
error("Failed to get a custom stage boss entry with chosen weight: " .. tostring(chosenWeight))
|
|
44126
44046
|
end
|
|
44127
44047
|
function ____exports.getRandomCustomStageRoom(self, roomsMetadata, seedOrRNG, verbose)
|
|
44128
|
-
if seedOrRNG == nil then
|
|
44129
|
-
seedOrRNG = getRandomSeed(nil)
|
|
44130
|
-
end
|
|
44131
44048
|
if verbose == nil then
|
|
44132
44049
|
verbose = false
|
|
44133
44050
|
end
|
|
@@ -44142,9 +44059,6 @@ function ____exports.getRandomCustomStageRoom(self, roomsMetadata, seedOrRNG, ve
|
|
|
44142
44059
|
return getCustomStageRoomWithChosenWeight(nil, roomsMetadata, chosenWeight)
|
|
44143
44060
|
end
|
|
44144
44061
|
function ____exports.getRandomBossRoomFromPool(self, roomsMetadata, bossPool, seedOrRNG, verbose)
|
|
44145
|
-
if seedOrRNG == nil then
|
|
44146
|
-
seedOrRNG = getRandomSeed(nil)
|
|
44147
|
-
end
|
|
44148
44062
|
if verbose == nil then
|
|
44149
44063
|
verbose = false
|
|
44150
44064
|
end
|
|
@@ -47601,8 +47515,6 @@ local ____log = require("src.functions.log")
|
|
|
47601
47515
|
local log = ____log.log
|
|
47602
47516
|
local ____random = require("src.functions.random")
|
|
47603
47517
|
local getRandomFloat = ____random.getRandomFloat
|
|
47604
|
-
local ____rng = require("src.functions.rng")
|
|
47605
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
47606
47518
|
local ____utils = require("src.functions.utils")
|
|
47607
47519
|
local assertDefined = ____utils.assertDefined
|
|
47608
47520
|
function getTotalWeightOfJSONObject(self, jsonOjectArray)
|
|
@@ -47702,9 +47614,6 @@ function ____exports.getJSONRoomsOfSubType(self, jsonRooms, subType)
|
|
|
47702
47614
|
)
|
|
47703
47615
|
end
|
|
47704
47616
|
function ____exports.getRandomJSONEntity(self, jsonEntities, seedOrRNG, verbose)
|
|
47705
|
-
if seedOrRNG == nil then
|
|
47706
|
-
seedOrRNG = getRandomSeed(nil)
|
|
47707
|
-
end
|
|
47708
47617
|
if verbose == nil then
|
|
47709
47618
|
verbose = false
|
|
47710
47619
|
end
|
|
@@ -47725,9 +47634,6 @@ function ____exports.getRandomJSONEntity(self, jsonEntities, seedOrRNG, verbose)
|
|
|
47725
47634
|
return randomJSONEntity
|
|
47726
47635
|
end
|
|
47727
47636
|
function ____exports.getRandomJSONRoom(self, jsonRooms, seedOrRNG, verbose)
|
|
47728
|
-
if seedOrRNG == nil then
|
|
47729
|
-
seedOrRNG = getRandomSeed(nil)
|
|
47730
|
-
end
|
|
47731
47637
|
if verbose == nil then
|
|
47732
47638
|
verbose = false
|
|
47733
47639
|
end
|
|
@@ -47997,15 +47903,15 @@ local ____rng = require("src.functions.rng")
|
|
|
47997
47903
|
local getRandomSeed = ____rng.getRandomSeed
|
|
47998
47904
|
local isRNG = ____rng.isRNG
|
|
47999
47905
|
function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
48000
|
-
if seedOrRNG == nil then
|
|
48001
|
-
seedOrRNG = getRandomSeed(nil)
|
|
48002
|
-
end
|
|
48003
47906
|
if options == nil then
|
|
48004
47907
|
options = false
|
|
48005
47908
|
end
|
|
48006
47909
|
if forceFreeItem == nil then
|
|
48007
47910
|
forceFreeItem = false
|
|
48008
47911
|
end
|
|
47912
|
+
if seedOrRNG == nil then
|
|
47913
|
+
seedOrRNG = getRandomSeed(nil)
|
|
47914
|
+
end
|
|
48009
47915
|
local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
|
|
48010
47916
|
local collectible = spawnPickupWithSeed(
|
|
48011
47917
|
nil,
|
|
@@ -48026,9 +47932,6 @@ function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGri
|
|
|
48026
47932
|
return collectible
|
|
48027
47933
|
end
|
|
48028
47934
|
function ____exports.spawnEmptyCollectible(self, positionOrGridIndex, seedOrRNG)
|
|
48029
|
-
if seedOrRNG == nil then
|
|
48030
|
-
seedOrRNG = getRandomSeed(nil)
|
|
48031
|
-
end
|
|
48032
47935
|
local collectible = ____exports.spawnCollectibleUnsafe(
|
|
48033
47936
|
nil,
|
|
48034
47937
|
CollectibleType.BROKEN_SHOVEL_1,
|
|
@@ -48170,8 +48073,6 @@ local ____ISCFeature = require("src.enums.ISCFeature")
|
|
|
48170
48073
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
48171
48074
|
local ____collectibleTag = require("src.functions.collectibleTag")
|
|
48172
48075
|
local isQuestCollectible = ____collectibleTag.isQuestCollectible
|
|
48173
|
-
local ____rng = require("src.functions.rng")
|
|
48174
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
48175
48076
|
local ____spawnCollectible = require("src.functions.spawnCollectible")
|
|
48176
48077
|
local spawnCollectibleUnsafe = ____spawnCollectible.spawnCollectibleUnsafe
|
|
48177
48078
|
local ____Feature = require("src.classes.private.Feature")
|
|
@@ -48186,9 +48087,6 @@ function SpawnCollectible.prototype.____constructor(self, preventCollectibleRota
|
|
|
48186
48087
|
self.preventCollectibleRotation = preventCollectibleRotation
|
|
48187
48088
|
end
|
|
48188
48089
|
function SpawnCollectible.prototype.spawnCollectible(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
48189
|
-
if seedOrRNG == nil then
|
|
48190
|
-
seedOrRNG = getRandomSeed(nil)
|
|
48191
|
-
end
|
|
48192
48090
|
if options == nil then
|
|
48193
48091
|
options = false
|
|
48194
48092
|
end
|
|
@@ -48211,9 +48109,6 @@ function SpawnCollectible.prototype.spawnCollectible(self, collectibleType, posi
|
|
|
48211
48109
|
end
|
|
48212
48110
|
__TS__DecorateLegacy({Exported}, SpawnCollectible.prototype, "spawnCollectible", true)
|
|
48213
48111
|
function SpawnCollectible.prototype.spawnCollectibleFromPool(self, itemPoolType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
48214
|
-
if seedOrRNG == nil then
|
|
48215
|
-
seedOrRNG = getRandomSeed(nil)
|
|
48216
|
-
end
|
|
48217
48112
|
if options == nil then
|
|
48218
48113
|
options = false
|
|
48219
48114
|
end
|
|
@@ -48274,7 +48169,6 @@ local getRandomJSONEntity = ____jsonRoom.getRandomJSONEntity
|
|
|
48274
48169
|
local ____log = require("src.functions.log")
|
|
48275
48170
|
local log = ____log.log
|
|
48276
48171
|
local ____rng = require("src.functions.rng")
|
|
48277
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
48278
48172
|
local isRNG = ____rng.isRNG
|
|
48279
48173
|
local newRNG = ____rng.newRNG
|
|
48280
48174
|
local ____roomGrid = require("src.functions.roomGrid")
|
|
@@ -48444,7 +48338,7 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
48444
48338
|
local yString = jsonSpawn["$"].y
|
|
48445
48339
|
local y = tonumber(yString)
|
|
48446
48340
|
assertDefined(nil, y, "Failed to convert the following y coordinate to a number (for a spawn): " .. yString)
|
|
48447
|
-
local jsonEntity = getRandomJSONEntity(nil, jsonSpawn.entity)
|
|
48341
|
+
local jsonEntity = getRandomJSONEntity(nil, jsonSpawn.entity, rng)
|
|
48448
48342
|
local entityTypeString = jsonEntity["$"].type
|
|
48449
48343
|
local entityTypeNumber = tonumber(entityTypeString)
|
|
48450
48344
|
assertDefined(nil, entityTypeNumber, "Failed to convert the entity type to a number: " .. entityTypeString)
|
|
@@ -48535,9 +48429,6 @@ function DeployJSONRoom.prototype.spawnNormalEntityForJSONRoom(self, entityType,
|
|
|
48535
48429
|
return entity
|
|
48536
48430
|
end
|
|
48537
48431
|
function DeployJSONRoom.prototype.deployJSONRoom(self, jsonRoom, seedOrRNG, verbose)
|
|
48538
|
-
if seedOrRNG == nil then
|
|
48539
|
-
seedOrRNG = getRandomSeed(nil)
|
|
48540
|
-
end
|
|
48541
48432
|
if verbose == nil then
|
|
48542
48433
|
verbose = false
|
|
48543
48434
|
end
|
|
@@ -49037,7 +48928,6 @@ local removeFlag = ____flag.removeFlag
|
|
|
49037
48928
|
local ____map = require("src.functions.map")
|
|
49038
48929
|
local copyMap = ____map.copyMap
|
|
49039
48930
|
local ____rng = require("src.functions.rng")
|
|
49040
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
49041
48931
|
local isRNG = ____rng.isRNG
|
|
49042
48932
|
local newRNG = ____rng.newRNG
|
|
49043
48933
|
local ____roomData = require("src.functions.roomData")
|
|
@@ -49211,9 +49101,6 @@ function ____exports.getAllRoomGridIndexes(self)
|
|
|
49211
49101
|
)
|
|
49212
49102
|
end
|
|
49213
49103
|
function ____exports.getNewRoomCandidate(self, seedOrRNG, ensureDeadEnd)
|
|
49214
|
-
if seedOrRNG == nil then
|
|
49215
|
-
seedOrRNG = getRandomSeed(nil)
|
|
49216
|
-
end
|
|
49217
49104
|
if ensureDeadEnd == nil then
|
|
49218
49105
|
ensureDeadEnd = true
|
|
49219
49106
|
end
|
|
@@ -51193,7 +51080,7 @@ function ____exports.spawnCollectible(self, params)
|
|
|
51193
51080
|
end
|
|
51194
51081
|
local roomClass = game:GetRoom()
|
|
51195
51082
|
local centerPos = roomClass:GetCenterPos()
|
|
51196
|
-
spawnCollectibleUnsafe(nil, collectibleType, centerPos)
|
|
51083
|
+
spawnCollectibleUnsafe(nil, collectibleType, centerPos, nil)
|
|
51197
51084
|
end
|
|
51198
51085
|
function ____exports.spawnGoldenTrinket(self, params)
|
|
51199
51086
|
____exports.spawnTrinket(nil, params, true)
|
|
@@ -52040,7 +51927,7 @@ function ____exports.spawnCollectibleAt(self, params)
|
|
|
52040
51927
|
return
|
|
52041
51928
|
end
|
|
52042
51929
|
local collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
52043
|
-
spawnCollectibleUnsafe(nil, collectibleType, gridIndex)
|
|
51930
|
+
spawnCollectibleUnsafe(nil, collectibleType, gridIndex, nil)
|
|
52044
51931
|
end
|
|
52045
51932
|
function ____exports.spawnGoldTrinket(self, params)
|
|
52046
51933
|
____exports.spawnGoldenTrinket(nil, params)
|
|
@@ -53170,7 +53057,6 @@ local fireProjectilesInCircle = ____projectiles.fireProjectilesInCircle
|
|
|
53170
53057
|
local ____random = require("src.functions.random")
|
|
53171
53058
|
local getRandom = ____random.getRandom
|
|
53172
53059
|
local ____rng = require("src.functions.rng")
|
|
53173
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
53174
53060
|
local isRNG = ____rng.isRNG
|
|
53175
53061
|
local newRNG = ____rng.newRNG
|
|
53176
53062
|
local ____spawnCollectible = require("src.functions.spawnCollectible")
|
|
@@ -53198,9 +53084,6 @@ function SpawnRockAltRewards.prototype.____constructor(self, itemPoolDetection)
|
|
|
53198
53084
|
self.itemPoolDetection = itemPoolDetection
|
|
53199
53085
|
end
|
|
53200
53086
|
function SpawnRockAltRewards.prototype.spawnRockAltReward(self, positionOrGridIndex, rockAltType, seedOrRNG)
|
|
53201
|
-
if seedOrRNG == nil then
|
|
53202
|
-
seedOrRNG = getRandomSeed(nil)
|
|
53203
|
-
end
|
|
53204
53087
|
local room = game:GetRoom()
|
|
53205
53088
|
local position = isVector(nil, positionOrGridIndex) and positionOrGridIndex or room:GetGridPosition(positionOrGridIndex)
|
|
53206
53089
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
@@ -55536,9 +55419,9 @@ __TS__SparseArrayPush(
|
|
|
55536
55419
|
table.unpack(FAKE_ITEM_POOL_TYPES)
|
|
55537
55420
|
)
|
|
55538
55421
|
local GREED_MODE_ITEM_POOL_TYPES = ____arrayRemove_3(__TS__SparseArraySpread(____array_2))
|
|
55539
|
-
function ____exports.getRandomItemPool(self)
|
|
55422
|
+
function ____exports.getRandomItemPool(self, seedOrRNG)
|
|
55540
55423
|
local itemPoolTypes = game:IsGreedMode() and GREED_MODE_ITEM_POOL_TYPES or NORMAL_MODE_ITEM_POOL_TYPES
|
|
55541
|
-
return getRandomArrayElement(nil, itemPoolTypes)
|
|
55424
|
+
return getRandomArrayElement(nil, itemPoolTypes, seedOrRNG)
|
|
55542
55425
|
end
|
|
55543
55426
|
function ____exports.removeCollectibleFromPools(self, ...)
|
|
55544
55427
|
local collectibleTypes = {...}
|
|
@@ -46,16 +46,20 @@ export declare class CustomItemPools extends Feature {
|
|
|
46
46
|
* By default, a collectible will not be removed from the pool once it is selected, unless the
|
|
47
47
|
* `decrease` argument is set to true (similar to how a vanilla item pool works).
|
|
48
48
|
*
|
|
49
|
+
* If you want to get an unseeded collectible type, you must explicitly pass `undefined` to the
|
|
50
|
+
* `seedOrRNG` parameter.
|
|
51
|
+
*
|
|
49
52
|
* In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
|
|
50
53
|
*
|
|
51
54
|
* @param itemPoolTypeCustom An integer representing the custom item pool to use.
|
|
55
|
+
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
56
|
+
* `RNG.Next` method will be called. If `undefined` is provided, it will default
|
|
57
|
+
* to a random seed.
|
|
52
58
|
* @param decrease Optional. Whether to remove the selected collectible from the item pool.
|
|
53
59
|
* Default is true.
|
|
54
|
-
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
55
|
-
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
56
60
|
* @param defaultItem Optional. The collectible to return if the item pool is depleted. Default is
|
|
57
61
|
* `CollectibleType.NULL`.
|
|
58
62
|
*/
|
|
59
|
-
getCustomItemPoolCollectible(itemPoolTypeCustom: ItemPoolType,
|
|
63
|
+
getCustomItemPoolCollectible(itemPoolTypeCustom: ItemPoolType, seedOrRNG: Seed | RNG | undefined, decrease?: boolean, defaultItem?: CollectibleType): CollectibleType;
|
|
60
64
|
}
|
|
61
65
|
//# sourceMappingURL=CustomItemPools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAahD,qBAAa,eAAgB,SAAQ,OAAO;IAmB1C,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAE5C;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IAEI,sBAAsB,CAC3B,kBAAkB,EAAE,YAAY,EAChC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,GAC3C,IAAI;IAUP;;;;;;;;;;;;;;;;;;;;;OAqBG;IAEI,4BAA4B,CACjC,kBAAkB,EAAE,YAAY,EAChC,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,EACjC,QAAQ,UAAQ,EAChB,WAAW,kBAAuB,GACjC,eAAe;CA2BnB"}
|
|
@@ -15,8 +15,6 @@ local ____array = require("src.functions.array")
|
|
|
15
15
|
local arrayRemoveIndexInPlace = ____array.arrayRemoveIndexInPlace
|
|
16
16
|
local ____map = require("src.functions.map")
|
|
17
17
|
local copyMap = ____map.copyMap
|
|
18
|
-
local ____rng = require("src.functions.rng")
|
|
19
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
20
18
|
local ____utils = require("src.functions.utils")
|
|
21
19
|
local assertDefined = ____utils.assertDefined
|
|
22
20
|
local ____weighted = require("src.functions.weighted")
|
|
@@ -44,13 +42,10 @@ function CustomItemPools.prototype.registerCustomItemPool(self, itemPoolTypeCust
|
|
|
44
42
|
customItemPoolMap:set(itemPoolTypeCustom, collectibles)
|
|
45
43
|
end
|
|
46
44
|
__TS__DecorateLegacy({Exported}, CustomItemPools.prototype, "registerCustomItemPool", true)
|
|
47
|
-
function CustomItemPools.prototype.getCustomItemPoolCollectible(self, itemPoolTypeCustom,
|
|
45
|
+
function CustomItemPools.prototype.getCustomItemPoolCollectible(self, itemPoolTypeCustom, seedOrRNG, decrease, defaultItem)
|
|
48
46
|
if decrease == nil then
|
|
49
47
|
decrease = false
|
|
50
48
|
end
|
|
51
|
-
if seedOrRNG == nil then
|
|
52
|
-
seedOrRNG = getRandomSeed(nil)
|
|
53
|
-
end
|
|
54
49
|
if defaultItem == nil then
|
|
55
50
|
defaultItem = CollectibleType.NULL
|
|
56
51
|
end
|
|
@@ -31,14 +31,18 @@ export declare class DeployJSONRoom extends Feature {
|
|
|
31
31
|
* }
|
|
32
32
|
* ```
|
|
33
33
|
*
|
|
34
|
+
* If you want to deploy an unseeded room, you must explicitly pass `undefined` to the `seedOrRNG`
|
|
35
|
+
* parameter.
|
|
36
|
+
*
|
|
34
37
|
* In order to use this function, you must upgrade your mod with `ISCFeature.DEPLOY_JSON_ROOM`.
|
|
35
38
|
*
|
|
36
39
|
* @param jsonRoom The JSON room to deploy.
|
|
37
|
-
* @param seedOrRNG
|
|
38
|
-
*
|
|
40
|
+
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
41
|
+
* `RNG.Next` method will be called. If `undefined` is provided, it will default
|
|
42
|
+
* to a random seed.
|
|
39
43
|
* @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
|
|
40
44
|
* what the function is doing. Default is false.
|
|
41
45
|
*/
|
|
42
|
-
deployJSONRoom(jsonRoom: JSONRoom | Readonly<JSONRoom>, seedOrRNG
|
|
46
|
+
deployJSONRoom(jsonRoom: JSONRoom | Readonly<JSONRoom>, seedOrRNG: Seed | RNG | undefined, verbose?: boolean): void;
|
|
43
47
|
}
|
|
44
48
|
//# sourceMappingURL=DeployJSONRoom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployJSONRoom.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DeployJSONRoom.ts"],"names":[],"mappings":";;AA+BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA2B;IACpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IAkBpD,OAAO,CAAC,gBAAgB;IA+FxB,OAAO,CAAC,4BAA4B;IAyCpC
|
|
1
|
+
{"version":3,"file":"DeployJSONRoom.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DeployJSONRoom.ts"],"names":[],"mappings":";;AA+BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA2B;IACpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IAkBpD,OAAO,CAAC,gBAAgB;IA+FxB,OAAO,CAAC,4BAA4B;IAyCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IAEI,cAAc,CACnB,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,EACvC,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,EACjC,OAAO,UAAQ,GACd,IAAI;CAwBR"}
|
|
@@ -37,7 +37,6 @@ local getRandomJSONEntity = ____jsonRoom.getRandomJSONEntity
|
|
|
37
37
|
local ____log = require("src.functions.log")
|
|
38
38
|
local log = ____log.log
|
|
39
39
|
local ____rng = require("src.functions.rng")
|
|
40
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
41
40
|
local isRNG = ____rng.isRNG
|
|
42
41
|
local newRNG = ____rng.newRNG
|
|
43
42
|
local ____roomGrid = require("src.functions.roomGrid")
|
|
@@ -207,7 +206,7 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
207
206
|
local yString = jsonSpawn["$"].y
|
|
208
207
|
local y = tonumber(yString)
|
|
209
208
|
assertDefined(nil, y, "Failed to convert the following y coordinate to a number (for a spawn): " .. yString)
|
|
210
|
-
local jsonEntity = getRandomJSONEntity(nil, jsonSpawn.entity)
|
|
209
|
+
local jsonEntity = getRandomJSONEntity(nil, jsonSpawn.entity, rng)
|
|
211
210
|
local entityTypeString = jsonEntity["$"].type
|
|
212
211
|
local entityTypeNumber = tonumber(entityTypeString)
|
|
213
212
|
assertDefined(nil, entityTypeNumber, "Failed to convert the entity type to a number: " .. entityTypeString)
|
|
@@ -298,9 +297,6 @@ function DeployJSONRoom.prototype.spawnNormalEntityForJSONRoom(self, entityType,
|
|
|
298
297
|
return entity
|
|
299
298
|
end
|
|
300
299
|
function DeployJSONRoom.prototype.deployJSONRoom(self, jsonRoom, seedOrRNG, verbose)
|
|
301
|
-
if seedOrRNG == nil then
|
|
302
|
-
seedOrRNG = getRandomSeed(nil)
|
|
303
|
-
end
|
|
304
300
|
if verbose == nil then
|
|
305
301
|
verbose = false
|
|
306
302
|
end
|