isaacscript-common 1.0.573 → 1.0.577
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/callbacks/itemPickup.lua +2 -6
- package/dist/callbacks/postBombInitLate.lua +1 -5
- package/dist/callbacks/postCursedTeleport.lua +8 -10
- package/dist/callbacks/postEffectInitLate.lua +1 -5
- package/dist/callbacks/postEsauJr.lua +2 -4
- package/dist/callbacks/postFamiliarInitLate.lua +1 -5
- package/dist/callbacks/postFlip.lua +2 -4
- package/dist/callbacks/postGridEntity.lua +8 -20
- package/dist/callbacks/postKnifeInitLate.lua +1 -5
- package/dist/callbacks/postLaserInitLate.lua +1 -5
- package/dist/callbacks/postNPCInitLate.lua +1 -5
- package/dist/callbacks/postPickupCollect.lua +1 -5
- package/dist/callbacks/postPickupInitLate.lua +1 -5
- package/dist/callbacks/postPlayerChangeHealth.lua +19 -23
- package/dist/callbacks/postPlayerChangeType.lua +1 -5
- package/dist/callbacks/postPlayerFatalDamage.lua +5 -9
- package/dist/callbacks/postPlayerInitLate.lua +1 -5
- package/dist/callbacks/postPlayerReordered.lua +8 -2
- package/dist/callbacks/postProjectileInitLate.lua +1 -5
- package/dist/callbacks/postPurchase.lua +19 -19
- package/dist/callbacks/postSacrifice.lua +3 -3
- package/dist/callbacks/postSlotInitUpdate.lua +3 -11
- package/dist/callbacks/postSlotRenderBroken.lua +2 -8
- package/dist/callbacks/postTearInitLate.lua +1 -5
- package/dist/callbacks/postTearInitVeryLate.lua +1 -5
- package/dist/callbacks/postTransformation.lua +1 -5
- package/dist/callbacks/postTrinketBreak.lua +5 -9
- package/dist/callbacks/preNewLevel.lua +1 -1
- package/dist/callbacks/reorderedCallbacks.lua +4 -4
- package/dist/callbacks/subscriptions/PreNewLevel.lua +1 -2
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +1 -2
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -5
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postEsauJr.lua +1 -2
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +1 -2
- package/dist/callbacks/subscriptions/postFirstFlip.lua +1 -2
- package/dist/callbacks/subscriptions/postFlip.lua +1 -2
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -5
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -5
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -5
- package/dist/callbacks/subscriptions/postItemPickup.lua +5 -8
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +1 -2
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -5
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +1 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPurchase.lua +8 -3
- package/dist/callbacks/subscriptions/postSacrifice.lua +1 -2
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -5
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -5
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -5
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -5
- package/dist/callbacks/subscriptions/preCustomRevive.lua +1 -2
- package/dist/callbacks/subscriptions/preItemPickup.lua +5 -8
- package/dist/constants.lua +57 -6
- package/dist/features/deployJSONRoom.lua +95 -68
- package/dist/features/disableInputs.lua +9 -3
- package/dist/features/forgottenSwitch.lua +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +4 -10
- package/dist/features/preventCollectibleRotate.lua +3 -9
- package/dist/features/saveDataManager/load.lua +2 -6
- package/dist/features/saveDataManager/main.lua +1 -1
- package/dist/features/saveDataManager/merge.lua +2 -4
- package/dist/features/sirenHelpers.lua +5 -7
- package/dist/functions/array.lua +6 -10
- package/dist/functions/bitwise.lua +1 -1
- package/dist/functions/challenges.lua +1 -1
- package/dist/functions/charge.lua +10 -12
- package/dist/functions/collectibles.lua +18 -23
- package/dist/functions/color.lua +9 -1
- package/dist/functions/deepCopy.lua +46 -28
- package/dist/functions/deepCopyTests.lua +12 -20
- package/dist/functions/doors.d.ts +10 -0
- package/dist/functions/doors.lua +19 -21
- package/dist/functions/entity.lua +8 -2
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/gridEntity.lua +14 -9
- package/dist/functions/input.lua +17 -27
- package/dist/functions/jsonRoom.lua +3 -9
- package/dist/functions/language.lua +9 -1
- package/dist/functions/log.lua +33 -85
- package/dist/functions/math.lua +15 -17
- package/dist/functions/npc.lua +15 -17
- package/dist/functions/pickups.lua +14 -1
- package/dist/functions/player.lua +38 -60
- package/dist/functions/playerHealth.lua +19 -9
- package/dist/functions/pocketItems.lua +4 -4
- package/dist/functions/random.lua +2 -2
- package/dist/functions/revive.lua +4 -4
- package/dist/functions/rooms.d.ts +1 -1
- package/dist/functions/rooms.lua +42 -41
- package/dist/functions/spawnCollectible.lua +10 -2
- package/dist/functions/sprite.lua +2 -2
- package/dist/functions/stage.lua +11 -11
- package/dist/functions/tears.lua +1 -1
- package/dist/functions/transformations.lua +4 -10
- package/dist/functions/trinketGive.lua +3 -3
- package/dist/functions/trinkets.lua +10 -6
- package/dist/functions/ui.lua +3 -3
- package/dist/functions/util.lua +6 -14
- package/dist/functions/vector.lua +8 -8
- package/dist/lualib_bundle.lua +795 -735
- package/dist/maps/cardDescriptionMap.lua +99 -1
- package/dist/maps/cardNameMap.lua +99 -1
- package/dist/maps/challengeNameMap.lua +47 -1
- package/dist/maps/collectibleDescriptionMap.lua +722 -1
- package/dist/maps/collectibleNameMap.lua +722 -1
- package/dist/maps/gridEntityXMLMap.lua +36 -1
- package/dist/maps/pillEffectNameMap.lua +52 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -1
- package/dist/maps/transformationMaps.lua +21 -16
- package/dist/maps/transformationNameMap.lua +17 -1
- package/dist/maps/trinketDescriptionMap.lua +190 -1
- package/dist/maps/trinketNameMap.lua +190 -1
- package/dist/sets/cards.lua +98 -2
- package/dist/types/ModUpgraded.lua +95 -105
- package/package.json +5 -5
|
@@ -10,12 +10,10 @@ function ____exports.postSlotInitRegister(self, callback, slotVariant)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postSlotInitFire(self, slot)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local slotVariant
|
|
16
|
-
slotVariant = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local slotVariant = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if slotVariant ~= nil and slotVariant ~= slot.Variant then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, slot)
|
|
@@ -10,12 +10,10 @@ function ____exports.postSlotRenderRegister(self, callback, slotVariant)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postSlotRenderFire(self, slot)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local slotVariant
|
|
16
|
-
slotVariant = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local slotVariant = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if slotVariant ~= nil and slotVariant ~= slot.Variant then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, slot)
|
|
@@ -10,12 +10,10 @@ function ____exports.postSlotUpdateRegister(self, callback, slotVariant)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postSlotUpdateFire(self, slot)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local slotVariant
|
|
16
|
-
slotVariant = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local slotVariant = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if slotVariant ~= nil and slotVariant ~= slot.Variant then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, slot)
|
|
@@ -10,12 +10,10 @@ function ____exports.postTearInitLateRegister(self, callback, tearVariant)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postTearInitLateFire(self, tear)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local tearVariant
|
|
16
|
-
tearVariant = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local tearVariant = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if tearVariant ~= nil and tearVariant ~= tear.Variant then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, tear)
|
|
@@ -10,12 +10,10 @@ function ____exports.postTearInitVeryLateRegister(self, callback, tearVariant)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postTearInitVeryLateFire(self, tear)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local tearVariant
|
|
16
|
-
tearVariant = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local tearVariant = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if tearVariant ~= nil and tearVariant ~= tear.Variant then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, tear)
|
|
@@ -10,12 +10,10 @@ function ____exports.postTransformationRegister(self, callback, playerForm)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postTransformationFire(self, player, playerForm, hasForm)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local callbackPlayerForm
|
|
16
|
-
callbackPlayerForm = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackPlayerForm = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if callbackPlayerForm ~= nil and callbackPlayerForm ~= playerForm then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, player, playerForm, hasForm)
|
|
@@ -10,12 +10,10 @@ function ____exports.postTrinketBreakRegister(self, callback, trinketType)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.postTrinketBreakFire(self, player, trinketType)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local callbackTrinketType
|
|
16
|
-
callbackTrinketType = ____value[2]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackTrinketType = ____value[2]
|
|
17
15
|
do
|
|
18
|
-
if
|
|
16
|
+
if callbackTrinketType ~= nil and callbackTrinketType ~= trinketType then
|
|
19
17
|
goto __continue5
|
|
20
18
|
end
|
|
21
19
|
callback(nil, player, trinketType)
|
|
@@ -10,8 +10,7 @@ function ____exports.preCustomReviveRegister(self, callback)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.preCustomReviveFire(self, player)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
callback = ____value[1]
|
|
13
|
+
local callback = ____value[1]
|
|
15
14
|
local revivalType = callback(nil, player)
|
|
16
15
|
if revivalType ~= nil then
|
|
17
16
|
return revivalType
|
|
@@ -10,17 +10,14 @@ function ____exports.preItemPickupRegister(self, callback, itemType, itemID)
|
|
|
10
10
|
end
|
|
11
11
|
function ____exports.preItemPickupFire(self, player, pickingUpItem)
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
|
-
|
|
15
|
-
local
|
|
16
|
-
itemType = ____value[2]
|
|
17
|
-
local itemID
|
|
18
|
-
itemID = ____value[3]
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local itemType = ____value[2]
|
|
15
|
+
local itemID = ____value[3]
|
|
19
16
|
do
|
|
20
|
-
if
|
|
17
|
+
if itemType ~= nil and itemType ~= pickingUpItem.type then
|
|
21
18
|
goto __continue5
|
|
22
19
|
end
|
|
23
|
-
if
|
|
20
|
+
if itemID ~= nil and itemID ~= pickingUpItem.id then
|
|
24
21
|
goto __continue5
|
|
25
22
|
end
|
|
26
23
|
callback(nil, player, pickingUpItem)
|
package/dist/constants.lua
CHANGED
|
@@ -4,10 +4,37 @@ local ____exports = {}
|
|
|
4
4
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
5
5
|
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
6
6
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
7
|
-
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {
|
|
7
|
+
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {
|
|
8
|
+
PlayerType.PLAYER_ISAAC,
|
|
9
|
+
PlayerType.PLAYER_MAGDALENE,
|
|
10
|
+
PlayerType.PLAYER_JUDAS,
|
|
11
|
+
PlayerType.PLAYER_BLUEBABY,
|
|
12
|
+
PlayerType.PLAYER_EVE,
|
|
13
|
+
PlayerType.PLAYER_EDEN,
|
|
14
|
+
PlayerType.PLAYER_THELOST,
|
|
15
|
+
PlayerType.PLAYER_LILITH,
|
|
16
|
+
PlayerType.PLAYER_KEEPER,
|
|
17
|
+
PlayerType.PLAYER_APOLLYON,
|
|
18
|
+
PlayerType.PLAYER_EDEN_B
|
|
19
|
+
})
|
|
8
20
|
____exports.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART = __TS__New(Set, {PlayerType.PLAYER_BLACKJUDAS, PlayerType.PLAYER_JUDAS_B})
|
|
9
|
-
____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {
|
|
10
|
-
|
|
21
|
+
____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {
|
|
22
|
+
PlayerType.PLAYER_BLUEBABY,
|
|
23
|
+
PlayerType.PLAYER_THELOST,
|
|
24
|
+
PlayerType.PLAYER_BLACKJUDAS,
|
|
25
|
+
PlayerType.PLAYER_JUDAS_B,
|
|
26
|
+
PlayerType.PLAYER_BLUEBABY_B,
|
|
27
|
+
PlayerType.PLAYER_THELOST_B,
|
|
28
|
+
PlayerType.PLAYER_THEFORGOTTEN_B,
|
|
29
|
+
PlayerType.PLAYER_BETHANY_B
|
|
30
|
+
})
|
|
31
|
+
____exports.CHARACTERS_WITH_NO_SOUL_HEARTS = __TS__New(Set, {
|
|
32
|
+
PlayerType.PLAYER_THELOST,
|
|
33
|
+
PlayerType.PLAYER_KEEPER,
|
|
34
|
+
PlayerType.PLAYER_BETHANY,
|
|
35
|
+
PlayerType.PLAYER_THELOST_B,
|
|
36
|
+
PlayerType.PLAYER_KEEPER_B
|
|
37
|
+
})
|
|
11
38
|
____exports.COLORS = {
|
|
12
39
|
Black = Color(1, 1, 1),
|
|
13
40
|
Red = Color(1, 0, 0),
|
|
@@ -23,7 +50,16 @@ ____exports.DISTANCE_OF_GRID_TILE = 40
|
|
|
23
50
|
____exports.DOOR_HITBOX_DISTANCE = 11
|
|
24
51
|
____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
|
|
25
52
|
____exports.EMPTY_PNG_PATH = "gfx/none.png"
|
|
26
|
-
____exports.FAMILIARS_THAT_SHOOT_PLAYER_TEARS = __TS__New(Set, {
|
|
53
|
+
____exports.FAMILIARS_THAT_SHOOT_PLAYER_TEARS = __TS__New(Set, {
|
|
54
|
+
FamiliarVariant.SCISSORS,
|
|
55
|
+
FamiliarVariant.INCUBUS,
|
|
56
|
+
FamiliarVariant.FATES_REWARD,
|
|
57
|
+
FamiliarVariant.SPRINKLER,
|
|
58
|
+
FamiliarVariant.LOST_SOUL,
|
|
59
|
+
FamiliarVariant.TWISTED_BABY,
|
|
60
|
+
FamiliarVariant.BLOOD_BABY,
|
|
61
|
+
FamiliarVariant.DECAP_ATTACK
|
|
62
|
+
})
|
|
27
63
|
____exports.FINAL_STAGE = LevelStage.NUM_STAGES - 1
|
|
28
64
|
____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
|
|
29
65
|
____exports.GENESIS_ROOM_VARIANT = -1
|
|
@@ -32,7 +68,13 @@ ____exports.GOLDEN_TRINKET_SHIFT = 1 << 15
|
|
|
32
68
|
____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
|
|
33
69
|
____exports.GAME_FRAMES_PER_SECOND = 30
|
|
34
70
|
____exports.ISAAC_FRAMES_PER_SECOND = 60
|
|
35
|
-
____exports.LOST_STYLE_PLAYER_TYPES = __TS__New(Set, {
|
|
71
|
+
____exports.LOST_STYLE_PLAYER_TYPES = __TS__New(Set, {
|
|
72
|
+
PlayerType.PLAYER_THELOST,
|
|
73
|
+
PlayerType.PLAYER_THESOUL,
|
|
74
|
+
PlayerType.PLAYER_THELOST_B,
|
|
75
|
+
PlayerType.PLAYER_JACOB2_B,
|
|
76
|
+
PlayerType.PLAYER_THESOUL_B
|
|
77
|
+
})
|
|
36
78
|
____exports.MAX_NUM_DOORS = 8
|
|
37
79
|
____exports.MAX_NUM_FAMILIARS = 64
|
|
38
80
|
____exports.MAX_NUM_INPUTS = 4
|
|
@@ -44,7 +86,16 @@ ____exports.MAX_ROOM_INDEX = 168
|
|
|
44
86
|
____exports.MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.COLLECTIBLE_MOMS_RING
|
|
45
87
|
____exports.MOVEMENT_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_LEFT, ButtonAction.ACTION_RIGHT, ButtonAction.ACTION_UP, ButtonAction.ACTION_DOWN})
|
|
46
88
|
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
47
|
-
____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = __TS__New(Set, {
|
|
89
|
+
____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = __TS__New(Set, {
|
|
90
|
+
CollectibleType.COLLECTIBLE_FORGET_ME_NOW,
|
|
91
|
+
CollectibleType.COLLECTIBLE_EDENS_SOUL,
|
|
92
|
+
CollectibleType.COLLECTIBLE_ALABASTER_BOX,
|
|
93
|
+
CollectibleType.COLLECTIBLE_PLAN_C,
|
|
94
|
+
CollectibleType.COLLECTIBLE_MAMA_MEGA,
|
|
95
|
+
CollectibleType.COLLECTIBLE_SACRIFICIAL_ALTAR,
|
|
96
|
+
CollectibleType.COLLECTIBLE_DEATH_CERTIFICATE,
|
|
97
|
+
CollectibleType.COLLECTIBLE_R_KEY
|
|
98
|
+
})
|
|
48
99
|
____exports.SHOOTING_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_SHOOTLEFT, ButtonAction.ACTION_SHOOTRIGHT, ButtonAction.ACTION_SHOOTUP, ButtonAction.ACTION_SHOOTDOWN})
|
|
49
100
|
____exports.UI_HEART_WIDTH = 12
|
|
50
101
|
return ____exports
|
|
@@ -63,7 +63,14 @@ function respawnPersistentEntities(self)
|
|
|
63
63
|
end
|
|
64
64
|
for ____, persistentEntity in ipairs(persistentEntities) do
|
|
65
65
|
local position = room:GetGridPosition(persistentEntity.gridIndex)
|
|
66
|
-
Isaac.Spawn(
|
|
66
|
+
Isaac.Spawn(
|
|
67
|
+
persistentEntity.type,
|
|
68
|
+
persistentEntity.variant,
|
|
69
|
+
persistentEntity.subType,
|
|
70
|
+
position,
|
|
71
|
+
Vector.Zero,
|
|
72
|
+
nil
|
|
73
|
+
)
|
|
67
74
|
end
|
|
68
75
|
end
|
|
69
76
|
function ____exports.emptyRoom(self, fillWithDecorations)
|
|
@@ -88,15 +95,13 @@ end
|
|
|
88
95
|
function removeSpecificNPCs(self)
|
|
89
96
|
local game = Game()
|
|
90
97
|
local room = game:GetRoom()
|
|
91
|
-
for ____, npc in ipairs(
|
|
92
|
-
getNPCs(nil)
|
|
93
|
-
) do
|
|
98
|
+
for ____, npc in ipairs(getNPCs(nil)) do
|
|
94
99
|
do
|
|
95
100
|
if NPC_TYPES_TO_NOT_REMOVE:has(npc.Type) then
|
|
96
|
-
goto
|
|
101
|
+
goto __continue27
|
|
97
102
|
end
|
|
98
|
-
if
|
|
99
|
-
goto
|
|
103
|
+
if npc:HasEntityFlags(EntityFlag.FLAG_CHARM) or npc:HasEntityFlags(EntityFlag.FLAG_FRIENDLY) or npc:HasEntityFlags(EntityFlag.FLAG_PERSISTENT) then
|
|
104
|
+
goto __continue27
|
|
100
105
|
end
|
|
101
106
|
npc:ClearEntityFlags(EntityFlag.FLAG_APPEAR)
|
|
102
107
|
npc:Remove()
|
|
@@ -105,7 +110,7 @@ function removeSpecificNPCs(self)
|
|
|
105
110
|
room:SetGridPath(gridIndex, 0)
|
|
106
111
|
end
|
|
107
112
|
end
|
|
108
|
-
::
|
|
113
|
+
::__continue27::
|
|
109
114
|
end
|
|
110
115
|
end
|
|
111
116
|
function fillRoomWithDecorations(self)
|
|
@@ -124,14 +129,14 @@ function fillRoomWithDecorations(self)
|
|
|
124
129
|
do
|
|
125
130
|
local existingGridEntity = room:GetGridEntity(gridIndex)
|
|
126
131
|
if existingGridEntity ~= nil then
|
|
127
|
-
goto
|
|
132
|
+
goto __continue34
|
|
128
133
|
end
|
|
129
134
|
local position = room:GetGridPosition(gridIndex)
|
|
130
135
|
local decoration = Isaac.GridSpawn(GridEntityType.GRID_DECORATION, 0, position, true)
|
|
131
136
|
setGridEntityInvisible(nil, decoration)
|
|
132
137
|
__TS__ArrayPush(decorationGridIndexes, gridIndex)
|
|
133
138
|
end
|
|
134
|
-
::
|
|
139
|
+
::__continue34::
|
|
135
140
|
gridIndex = gridIndex + 1
|
|
136
141
|
end
|
|
137
142
|
end
|
|
@@ -164,34 +169,40 @@ function spawnAllEntities(self, jsonRoom, seed, verbose)
|
|
|
164
169
|
local variantString = xmlEntity["$"].variant
|
|
165
170
|
local variant = tonumber(variantString)
|
|
166
171
|
if variant == nil then
|
|
167
|
-
error(
|
|
168
|
-
"Failed to convert the entity variant to a number: " .. tostring(variant)
|
|
169
|
-
)
|
|
172
|
+
error("Failed to convert the entity variant to a number: " .. tostring(variant))
|
|
170
173
|
end
|
|
171
174
|
local subTypeString = xmlEntity["$"].subtype
|
|
172
175
|
local subType = tonumber(subTypeString)
|
|
173
176
|
if subType == nil then
|
|
174
|
-
error(
|
|
175
|
-
"Failed to convert the entity sub-type to a number: " .. tostring(subType)
|
|
176
|
-
)
|
|
177
|
+
error("Failed to convert the entity sub-type to a number: " .. tostring(subType))
|
|
177
178
|
end
|
|
178
179
|
if entityType >= 1000 then
|
|
179
180
|
if verbose then
|
|
180
|
-
log(
|
|
181
|
-
((((((("Spawning grid entity " .. tostring(entityType)) .. ".") .. tostring(variant)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")"
|
|
182
|
-
)
|
|
181
|
+
log(((((((("Spawning grid entity " .. tostring(entityType)) .. ".") .. tostring(variant)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
183
182
|
end
|
|
184
|
-
spawnGridEntity(
|
|
183
|
+
spawnGridEntity(
|
|
184
|
+
nil,
|
|
185
|
+
entityType,
|
|
186
|
+
variant,
|
|
187
|
+
x,
|
|
188
|
+
y
|
|
189
|
+
)
|
|
185
190
|
else
|
|
186
191
|
seed = nextSeed(nil, seed)
|
|
187
192
|
if verbose then
|
|
188
|
-
log(
|
|
189
|
-
((((((((("Spawning normal entity " .. tostring(entityType)) .. ".") .. tostring(variant)) .. ".") .. tostring(subType)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")"
|
|
190
|
-
)
|
|
193
|
+
log(((((((((("Spawning normal entity " .. tostring(entityType)) .. ".") .. tostring(variant)) .. ".") .. tostring(subType)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
191
194
|
end
|
|
192
|
-
local entity = spawnNormalEntity(
|
|
195
|
+
local entity = spawnNormalEntity(
|
|
196
|
+
nil,
|
|
197
|
+
entityType,
|
|
198
|
+
variant,
|
|
199
|
+
subType,
|
|
200
|
+
x,
|
|
201
|
+
y,
|
|
202
|
+
seed
|
|
203
|
+
)
|
|
193
204
|
local npc = entity:ToNPC()
|
|
194
|
-
if
|
|
205
|
+
if npc ~= nil and npc.CanShutDoors then
|
|
195
206
|
shouldUnclearRoom = true
|
|
196
207
|
end
|
|
197
208
|
end
|
|
@@ -233,13 +244,27 @@ function spawnNormalEntity(self, entityType, variant, subType, x, y, seed)
|
|
|
233
244
|
local roomType = room:GetType()
|
|
234
245
|
local position = gridToPos(nil, x, y)
|
|
235
246
|
local entity
|
|
236
|
-
if
|
|
247
|
+
if entityType == EntityType.ENTITY_PICKUP and variant == PickupVariant.PICKUP_COLLECTIBLE then
|
|
237
248
|
local options = roomType == RoomType.ROOM_ANGEL
|
|
238
|
-
entity = spawnCollectible(
|
|
249
|
+
entity = spawnCollectible(
|
|
250
|
+
nil,
|
|
251
|
+
subType,
|
|
252
|
+
position,
|
|
253
|
+
seed,
|
|
254
|
+
options
|
|
255
|
+
)
|
|
239
256
|
else
|
|
240
|
-
entity = game:Spawn(
|
|
241
|
-
|
|
242
|
-
|
|
257
|
+
entity = game:Spawn(
|
|
258
|
+
entityType,
|
|
259
|
+
variant,
|
|
260
|
+
position,
|
|
261
|
+
Vector.Zero,
|
|
262
|
+
nil,
|
|
263
|
+
subType,
|
|
264
|
+
seed
|
|
265
|
+
)
|
|
266
|
+
end
|
|
267
|
+
if entityType == EntityType.ENTITY_PITFALL and variant == 0 then
|
|
243
268
|
entity.EntityCollisionClass = EntityCollisionClass.ENTCOLL_ENEMIES
|
|
244
269
|
entity.GridCollisionClass = EntityGridCollisionClass.GRIDCOLL_WALLS
|
|
245
270
|
end
|
|
@@ -267,13 +292,9 @@ function fixPitGraphics(self)
|
|
|
267
292
|
local room = game:GetRoom()
|
|
268
293
|
local gridWidth = room:GetGridWidth()
|
|
269
294
|
local pitMap = getPitMap(nil)
|
|
270
|
-
for ____, ____value in __TS__Iterator(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
local gridIndex
|
|
274
|
-
gridIndex = ____value[1]
|
|
275
|
-
local gridEntity
|
|
276
|
-
gridEntity = ____value[2]
|
|
295
|
+
for ____, ____value in __TS__Iterator(pitMap:entries()) do
|
|
296
|
+
local gridIndex = ____value[1]
|
|
297
|
+
local gridEntity = ____value[2]
|
|
277
298
|
local gridIndexLeft = gridIndex - 1
|
|
278
299
|
local L = pitMap:has(gridIndexLeft)
|
|
279
300
|
local gridIndexRight = gridIndex + 1
|
|
@@ -282,24 +303,32 @@ function fixPitGraphics(self)
|
|
|
282
303
|
local U = pitMap:has(gridIndexUp)
|
|
283
304
|
local gridIndexDown = gridIndex + gridWidth
|
|
284
305
|
local D = pitMap:has(gridIndexDown)
|
|
285
|
-
local gridIndexUpLeft =
|
|
306
|
+
local gridIndexUpLeft = gridIndex - gridWidth - 1
|
|
286
307
|
local UL = pitMap:has(gridIndexUpLeft)
|
|
287
|
-
local gridIndexUpRight =
|
|
308
|
+
local gridIndexUpRight = gridIndex - gridWidth + 1
|
|
288
309
|
local UR = pitMap:has(gridIndexUpRight)
|
|
289
|
-
local gridIndexDownLeft =
|
|
310
|
+
local gridIndexDownLeft = gridIndex + gridWidth - 1
|
|
290
311
|
local DL = pitMap:has(gridIndexDownLeft)
|
|
291
|
-
local gridIndexDownRight =
|
|
312
|
+
local gridIndexDownRight = gridIndex + gridWidth + 1
|
|
292
313
|
local DR = pitMap:has(gridIndexDownRight)
|
|
293
|
-
local pitFrame = getPitFrame(
|
|
314
|
+
local pitFrame = getPitFrame(
|
|
315
|
+
nil,
|
|
316
|
+
L,
|
|
317
|
+
R,
|
|
318
|
+
U,
|
|
319
|
+
D,
|
|
320
|
+
UL,
|
|
321
|
+
UR,
|
|
322
|
+
DL,
|
|
323
|
+
DR
|
|
324
|
+
)
|
|
294
325
|
local sprite = gridEntity:GetSprite()
|
|
295
326
|
sprite:SetFrame(pitFrame)
|
|
296
327
|
end
|
|
297
328
|
end
|
|
298
329
|
function getPitMap(self)
|
|
299
330
|
local pitMap = __TS__New(Map)
|
|
300
|
-
for ____, gridEntity in ipairs(
|
|
301
|
-
getGridEntities(nil, GridEntityType.GRID_PIT)
|
|
302
|
-
) do
|
|
331
|
+
for ____, gridEntity in ipairs(getGridEntities(nil, GridEntityType.GRID_PIT)) do
|
|
303
332
|
local gridIndex = gridEntity:GetGridIndex()
|
|
304
333
|
pitMap:set(gridIndex, gridEntity)
|
|
305
334
|
end
|
|
@@ -319,52 +348,52 @@ function getPitFrame(self, L, R, U, D, UL, UR, DL, DR)
|
|
|
319
348
|
if D then
|
|
320
349
|
F = F | 8
|
|
321
350
|
end
|
|
322
|
-
if
|
|
351
|
+
if U and L and not UL and not R and not D then
|
|
323
352
|
F = 17
|
|
324
353
|
end
|
|
325
|
-
if
|
|
354
|
+
if U and R and not UR and not L and not D then
|
|
326
355
|
F = 18
|
|
327
356
|
end
|
|
328
|
-
if
|
|
357
|
+
if L and D and not DL and not U and not R then
|
|
329
358
|
F = 19
|
|
330
359
|
end
|
|
331
|
-
if
|
|
360
|
+
if R and D and not DR and not L and not U then
|
|
332
361
|
F = 20
|
|
333
362
|
end
|
|
334
|
-
if
|
|
363
|
+
if L and U and R and D and not UL then
|
|
335
364
|
F = 21
|
|
336
365
|
end
|
|
337
|
-
if
|
|
366
|
+
if L and U and R and D and not UR then
|
|
338
367
|
F = 22
|
|
339
368
|
end
|
|
340
|
-
if
|
|
369
|
+
if U and R and D and not L and not UR then
|
|
341
370
|
F = 25
|
|
342
371
|
end
|
|
343
|
-
if
|
|
372
|
+
if L and U and D and not R and not UL then
|
|
344
373
|
F = 26
|
|
345
374
|
end
|
|
346
|
-
if
|
|
375
|
+
if L and U and R and D and not DL and not DR then
|
|
347
376
|
F = 24
|
|
348
377
|
end
|
|
349
|
-
if
|
|
378
|
+
if L and U and R and D and not UR and not UL then
|
|
350
379
|
F = 23
|
|
351
380
|
end
|
|
352
|
-
if
|
|
381
|
+
if L and U and R and UL and not UR and not D then
|
|
353
382
|
F = 27
|
|
354
383
|
end
|
|
355
|
-
if
|
|
384
|
+
if L and U and R and UR and not UL and not D then
|
|
356
385
|
F = 28
|
|
357
386
|
end
|
|
358
|
-
if
|
|
387
|
+
if L and U and R and not D and not UR and not UL then
|
|
359
388
|
F = 29
|
|
360
389
|
end
|
|
361
|
-
if
|
|
390
|
+
if L and R and D and DL and not U and not DR then
|
|
362
391
|
F = 30
|
|
363
392
|
end
|
|
364
|
-
if
|
|
393
|
+
if L and R and D and DR and not U and not DL then
|
|
365
394
|
F = 31
|
|
366
395
|
end
|
|
367
|
-
if
|
|
396
|
+
if L and R and D and not U and not DL and not DR then
|
|
368
397
|
F = 32
|
|
369
398
|
end
|
|
370
399
|
return F
|
|
@@ -373,13 +402,11 @@ FEATURE_NAME = "JSON room deployer"
|
|
|
373
402
|
NPC_TYPES_TO_NOT_REMOVE = __TS__New(Set, {EntityType.ENTITY_DARK_ESAU})
|
|
374
403
|
PERSISTENT_ENTITY_TYPES = __TS__New(Set, {EntityType.ENTITY_WALL_HUGGER})
|
|
375
404
|
initialized = false
|
|
376
|
-
v = {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
}
|
|
405
|
+
v = {level = {
|
|
406
|
+
deployedRoomListIndexes = __TS__New(Set),
|
|
407
|
+
persistentEntities = __TS__New(Map),
|
|
408
|
+
decorationGridIndexes = __TS__New(Map)
|
|
409
|
+
}}
|
|
383
410
|
function ____exports.deployJSONRoomInit(self, mod)
|
|
384
411
|
initialized = true
|
|
385
412
|
saveDataManager(nil, "deployJSONRoom", v)
|
|
@@ -18,14 +18,20 @@ function getActionValue(self, _entity, _inputHook, buttonAction)
|
|
|
18
18
|
return getReturnValue(nil, buttonAction, false)
|
|
19
19
|
end
|
|
20
20
|
function getReturnValue(self, buttonAction, booleanCallback)
|
|
21
|
-
local
|
|
21
|
+
local ____booleanCallback_0
|
|
22
|
+
if booleanCallback then
|
|
23
|
+
____booleanCallback_0 = false
|
|
24
|
+
else
|
|
25
|
+
____booleanCallback_0 = 0
|
|
26
|
+
end
|
|
27
|
+
local disableValue = ____booleanCallback_0
|
|
22
28
|
if not v.run.enableSomeInputs then
|
|
23
29
|
return disableValue
|
|
24
30
|
end
|
|
25
|
-
if
|
|
31
|
+
if v.run.whitelist ~= nil and not v.run.whitelist:has(buttonAction) then
|
|
26
32
|
return disableValue
|
|
27
33
|
end
|
|
28
|
-
if
|
|
34
|
+
if v.run.blacklist ~= nil and v.run.blacklist:has(buttonAction) then
|
|
29
35
|
return disableValue
|
|
30
36
|
end
|
|
31
37
|
return nil
|
|
@@ -6,7 +6,7 @@ local getUpgradeErrorMsg = ____errors.getUpgradeErrorMsg
|
|
|
6
6
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
7
|
local saveDataManager = ____exports.saveDataManager
|
|
8
8
|
function isActionTriggered(self, _entity, _inputHook, buttonAction)
|
|
9
|
-
if
|
|
9
|
+
if buttonAction == ButtonAction.ACTION_DROP and v.run.shouldSwitch then
|
|
10
10
|
v.run.shouldSwitch = false
|
|
11
11
|
return true
|
|
12
12
|
end
|
|
@@ -17,11 +17,7 @@ function postPickupInitCollectible(self, pickup)
|
|
|
17
17
|
end
|
|
18
18
|
local FEATURE_NAME = "get collectible item pool type"
|
|
19
19
|
local initialized = false
|
|
20
|
-
v = {
|
|
21
|
-
run = {
|
|
22
|
-
collectibleItemPoolTypeMap = __TS__New(Map)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
20
|
+
v = {run = {collectibleItemPoolTypeMap = __TS__New(Map)}}
|
|
25
21
|
function ____exports.getCollectibleItemPoolTypeInit(self, mod)
|
|
26
22
|
initialized = true
|
|
27
23
|
saveDataManager(nil, "getCollectibleItemPoolType", v)
|
|
@@ -32,13 +28,11 @@ function ____exports.getCollectibleItemPoolType(self, collectible)
|
|
|
32
28
|
local msg = getUpgradeErrorMsg(nil, FEATURE_NAME)
|
|
33
29
|
error(msg)
|
|
34
30
|
end
|
|
35
|
-
if
|
|
36
|
-
error(
|
|
37
|
-
(((("The \"getCollectibleItemPoolType()\" function was given a non-collectible: " .. tostring(collectible.Type)) .. ".") .. tostring(collectible.Variant)) .. ".") .. tostring(collectible.SubType)
|
|
38
|
-
)
|
|
31
|
+
if collectible.Type ~= EntityType.ENTITY_PICKUP or collectible.Variant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
|
32
|
+
error((((("The \"getCollectibleItemPoolType()\" function was given a non-collectible: " .. tostring(collectible.Type)) .. ".") .. tostring(collectible.Variant)) .. ".") .. tostring(collectible.SubType))
|
|
39
33
|
end
|
|
40
34
|
local ptrHash = GetPtrHash(collectible)
|
|
41
35
|
local itemPoolType = v.run.collectibleItemPoolTypeMap:get(ptrHash)
|
|
42
|
-
return
|
|
36
|
+
return itemPoolType == nil and getRoomItemPoolType(nil) or itemPoolType
|
|
43
37
|
end
|
|
44
38
|
return ____exports
|
|
@@ -16,17 +16,13 @@ function postPickupUpdateCollectible(self, pickup)
|
|
|
16
16
|
return
|
|
17
17
|
end
|
|
18
18
|
local trackedCollectibleType = v.room.trackedItems:get(pickup.InitSeed)
|
|
19
|
-
if
|
|
19
|
+
if trackedCollectibleType ~= nil and pickup.SubType ~= trackedCollectibleType then
|
|
20
20
|
setCollectibleSubType(nil, pickup, trackedCollectibleType)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
local FEATURE_NAME = "prevent collectible rotation"
|
|
24
24
|
local initialized = false
|
|
25
|
-
v = {
|
|
26
|
-
room = {
|
|
27
|
-
trackedItems = __TS__New(Map)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
25
|
+
v = {room = {trackedItems = __TS__New(Map)}}
|
|
30
26
|
function ____exports.preventCollectibleRotateInit(self, mod)
|
|
31
27
|
initialized = true
|
|
32
28
|
saveDataManager(nil, "preventCollectibleRotate", v)
|
|
@@ -39,9 +35,7 @@ function ____exports.preventCollectibleRotate(self, collectible, collectibleType
|
|
|
39
35
|
error(msg)
|
|
40
36
|
end
|
|
41
37
|
if collectible.Variant ~= PickupVariant.PICKUP_COLLECTIBLE then
|
|
42
|
-
error(
|
|
43
|
-
"You cannot prevent the rotation for pickups of variant: " .. tostring(collectible.Variant)
|
|
44
|
-
)
|
|
38
|
+
error("You cannot prevent the rotation for pickups of variant: " .. tostring(collectible.Variant))
|
|
45
39
|
end
|
|
46
40
|
v.room.trackedItems:set(collectible.InitSeed, collectibleType)
|
|
47
41
|
postPickupUpdateCollectible(nil, collectible)
|
|
@@ -14,9 +14,7 @@ function readSaveDatFile(self, mod)
|
|
|
14
14
|
local isaacFrameCount = Isaac.GetFrameCount()
|
|
15
15
|
local ok, jsonStringOrErrMsg = pcall(tryLoadModData, mod)
|
|
16
16
|
if not ok then
|
|
17
|
-
log(
|
|
18
|
-
(("Failed to read from the \"save#.dat\" file on Isaac frame " .. tostring(isaacFrameCount)) .. ": ") .. jsonStringOrErrMsg
|
|
19
|
-
)
|
|
17
|
+
log((("Failed to read from the \"save#.dat\" file on Isaac frame " .. tostring(isaacFrameCount)) .. ": ") .. jsonStringOrErrMsg)
|
|
20
18
|
return DEFAULT_MOD_DATA
|
|
21
19
|
end
|
|
22
20
|
if jsonStringOrErrMsg == nil then
|
|
@@ -56,9 +54,7 @@ function ____exports.loadFromDisk(self, mod, oldSaveData)
|
|
|
56
54
|
goto __continue5
|
|
57
55
|
end
|
|
58
56
|
if DEBUG then
|
|
59
|
-
log(
|
|
60
|
-
"Merging in stored data for feature: " .. tostring(key)
|
|
61
|
-
)
|
|
57
|
+
log("Merging in stored data for feature: " .. tostring(key))
|
|
62
58
|
end
|
|
63
59
|
merge(nil, oldSaveDataForSubscriber, value, key)
|
|
64
60
|
end
|