isaacscript-common 1.0.488 → 1.0.492
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/README.md +2 -0
- package/dist/callbacks/itemPickup.lua +2 -6
- package/dist/callbacks/postBombInitLate.lua +6 -8
- package/dist/callbacks/postCursedTeleport.lua +8 -10
- package/dist/callbacks/postEffectInitLate.lua +6 -8
- package/dist/callbacks/postEsauJr.lua +2 -4
- package/dist/callbacks/postFamiliarInitLate.lua +6 -8
- package/dist/callbacks/postFlip.lua +2 -4
- package/dist/callbacks/postGridEntity.lua +8 -18
- package/dist/callbacks/postKnifeInitLate.lua +6 -8
- package/dist/callbacks/postLaserInitLate.lua +6 -8
- package/dist/callbacks/postNPCInitLate.lua +6 -8
- package/dist/callbacks/postPickupCollect.lua +1 -5
- package/dist/callbacks/postPickupInitLate.lua +6 -8
- package/dist/callbacks/postPlayerChangeHealth.lua +9 -13
- package/dist/callbacks/postPlayerChangeType.lua +1 -5
- package/dist/callbacks/postPlayerFatalDamage.lua +2 -2
- package/dist/callbacks/postPlayerInitLate.lua +1 -5
- package/dist/callbacks/postPlayerReordered.lua +1 -1
- package/dist/callbacks/postProjectileInitLate.lua +6 -8
- package/dist/callbacks/postPurchase.lua +10 -14
- 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 +6 -8
- package/dist/callbacks/postTransformation.lua +1 -5
- package/dist/callbacks/reorderedCallbacks.lua +4 -4
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +1 -1
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.lua +1 -1
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +1 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +1 -1
- package/dist/callbacks/subscriptions/postFlip.lua +1 -1
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +1 -1
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.lua +5 -5
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +1 -1
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +1 -1
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +1 -1
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.lua +8 -2
- package/dist/callbacks/subscriptions/postSacrifice.lua +1 -1
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.lua +1 -1
- package/dist/callbacks/subscriptions/preItemPickup.lua +5 -5
- package/dist/constants.d.ts +9 -0
- package/dist/constants.lua +41 -4
- package/dist/features/deployJSONRoom.lua +90 -61
- package/dist/features/disableInputs.lua +9 -3
- package/dist/features/forgottenSwitch.lua +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +10 -14
- 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 -5
- package/dist/functions/array.lua +5 -7
- package/dist/functions/bitwise.lua +1 -1
- package/dist/functions/cards.d.ts +2 -2
- package/dist/functions/charge.lua +10 -12
- package/dist/functions/collectibles.d.ts +23 -2
- package/dist/functions/collectibles.lua +26 -21
- package/dist/functions/color.lua +9 -1
- package/dist/functions/deepCopy.lua +45 -25
- package/dist/functions/deepCopyTests.lua +12 -20
- package/dist/functions/doors.lua +7 -19
- package/dist/functions/entity.lua +7 -1
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/gridEntity.lua +13 -8
- package/dist/functions/input.lua +14 -18
- package/dist/functions/jsonRoom.lua +3 -9
- package/dist/functions/language.lua +9 -1
- package/dist/functions/log.lua +18 -46
- package/dist/functions/math.lua +15 -17
- package/dist/functions/npc.lua +15 -17
- package/dist/functions/pickups.lua +14 -1
- package/dist/functions/pills.d.ts +1 -1
- package/dist/functions/player.d.ts +12 -0
- package/dist/functions/player.lua +45 -59
- 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.lua +13 -17
- package/dist/functions/spawnCollectible.lua +10 -2
- package/dist/functions/sprite.lua +2 -2
- package/dist/functions/stage.lua +6 -6
- package/dist/functions/tears.lua +1 -1
- package/dist/functions/transformations.lua +4 -10
- package/dist/functions/trinketGive.lua +2 -2
- package/dist/functions/trinkets.d.ts +6 -2
- package/dist/functions/trinkets.lua +3 -5
- package/dist/functions/ui.lua +3 -3
- package/dist/functions/util.lua +4 -8
- package/dist/functions/vector.lua +8 -8
- package/dist/lualib_bundle.lua +603 -555
- package/dist/maps/cardDescriptionMap.lua +99 -1
- package/dist/maps/cardNameMap.lua +99 -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/roomTypeToItemPoolMap.lua +15 -1
- package/dist/maps/transformationMap.lua +19 -12
- 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 +82 -166
- package/package.json +5 -5
|
@@ -15,9 +15,7 @@ function postUpdate(self)
|
|
|
15
15
|
if not hasSubscriptions(nil) then
|
|
16
16
|
return
|
|
17
17
|
end
|
|
18
|
-
for ____, slot in ipairs(
|
|
19
|
-
getSlots(nil)
|
|
20
|
-
) do
|
|
18
|
+
for ____, slot in ipairs(getSlots(nil)) do
|
|
21
19
|
checkNewEntity(nil, slot)
|
|
22
20
|
postSlotUpdate:fire(slot)
|
|
23
21
|
end
|
|
@@ -26,9 +24,7 @@ function postNewRoom(self)
|
|
|
26
24
|
if not hasSubscriptions(nil) then
|
|
27
25
|
return
|
|
28
26
|
end
|
|
29
|
-
for ____, slot in ipairs(
|
|
30
|
-
getSlots(nil)
|
|
31
|
-
) do
|
|
27
|
+
for ____, slot in ipairs(getSlots(nil)) do
|
|
32
28
|
checkNewEntity(nil, slot)
|
|
33
29
|
end
|
|
34
30
|
end
|
|
@@ -39,11 +35,7 @@ function checkNewEntity(self, slot)
|
|
|
39
35
|
postSlotInit:fire(slot)
|
|
40
36
|
end
|
|
41
37
|
end
|
|
42
|
-
v = {
|
|
43
|
-
room = {
|
|
44
|
-
initializedSlots = __TS__New(Set)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
38
|
+
v = {room = {initializedSlots = __TS__New(Set)}}
|
|
47
39
|
function ____exports.postSlotInitUpdateCallbacksInit(self, mod)
|
|
48
40
|
saveDataManager(nil, "postSlotInitUpdate", v, hasSubscriptions)
|
|
49
41
|
mod:AddCallback(ModCallbacks.MC_POST_UPDATE, postUpdate)
|
|
@@ -15,9 +15,7 @@ function postRender(self)
|
|
|
15
15
|
if not hasSubscriptions(nil) then
|
|
16
16
|
return
|
|
17
17
|
end
|
|
18
|
-
for ____, slot in ipairs(
|
|
19
|
-
getSlots(nil)
|
|
20
|
-
) do
|
|
18
|
+
for ____, slot in ipairs(getSlots(nil)) do
|
|
21
19
|
postSlotRender:fire(slot)
|
|
22
20
|
checkSlotBroken(nil, slot)
|
|
23
21
|
end
|
|
@@ -36,11 +34,7 @@ function checkSlotBroken(self, slot)
|
|
|
36
34
|
end
|
|
37
35
|
end
|
|
38
36
|
BROKEN_ANIMATIONS = __TS__New(Set, {"Broken", "Death"})
|
|
39
|
-
v = {
|
|
40
|
-
room = {
|
|
41
|
-
brokenSlots = __TS__New(Set)
|
|
42
|
-
}
|
|
43
|
-
}
|
|
37
|
+
v = {room = {brokenSlots = __TS__New(Set)}}
|
|
44
38
|
function ____exports.postSlotRenderBrokenCallbacksInit(self, mod)
|
|
45
39
|
saveDataManager(nil, "postSlotRenderBroken", v, hasSubscriptions)
|
|
46
40
|
mod:AddCallback(ModCallbacks.MC_POST_RENDER, postRender)
|
|
@@ -17,7 +17,7 @@ function postTearUpdate(self, tear)
|
|
|
17
17
|
end
|
|
18
18
|
local roomIndex = getRoomIndex(nil)
|
|
19
19
|
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
20
|
-
if
|
|
20
|
+
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
21
21
|
v.run.currentRoomIndex = roomIndex
|
|
22
22
|
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
23
23
|
v.run.firedSet:clear()
|
|
@@ -28,13 +28,11 @@ function postTearUpdate(self, tear)
|
|
|
28
28
|
postTearInitLate:fire(tear)
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
|
-
v = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
}
|
|
31
|
+
v = {run = {
|
|
32
|
+
firedSet = __TS__New(Set),
|
|
33
|
+
currentRoomIndex = nil,
|
|
34
|
+
currentRoomVisitedCount = nil
|
|
35
|
+
}}
|
|
38
36
|
function ____exports.postTearInitLateCallbackInit(self, mod)
|
|
39
37
|
saveDataManager(nil, "postTearInitLate", v, hasSubscriptions)
|
|
40
38
|
mod:AddCallback(ModCallbacks.MC_POST_TEAR_UPDATE, postTearUpdate)
|
|
@@ -37,11 +37,7 @@ function postPlayerUpdateReorderedPlayer(self, player)
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
|
-
v = {
|
|
41
|
-
run = {
|
|
42
|
-
transformations = __TS__New(Map)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
40
|
+
v = {run = {transformations = __TS__New(Map)}}
|
|
45
41
|
function ____exports.postTransformationCallbackInit(self, mod)
|
|
46
42
|
saveDataManager(nil, "postTransformation", v, hasSubscriptions)
|
|
47
43
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PLAYER_UPDATE_REORDERED, postPlayerUpdateReorderedPlayer, 0)
|
|
@@ -5,7 +5,7 @@ local postGameStartedReordered = require("callbacks.subscriptions.postGameStarte
|
|
|
5
5
|
local postNewLevelReordered = require("callbacks.subscriptions.postNewLevelReordered")
|
|
6
6
|
local postNewRoomReordered = require("callbacks.subscriptions.postNewRoomReordered")
|
|
7
7
|
function hasSubscriptions(self)
|
|
8
|
-
return
|
|
8
|
+
return postGameStartedReordered:hasSubscriptions() or postNewLevelReordered:hasSubscriptions() or postNewRoomReordered:hasSubscriptions()
|
|
9
9
|
end
|
|
10
10
|
function useItemGlowingHourGlass(self)
|
|
11
11
|
usedGlowingHourGlass = true
|
|
@@ -25,7 +25,7 @@ function postNewLevelVanilla(self)
|
|
|
25
25
|
end
|
|
26
26
|
local game = Game()
|
|
27
27
|
local gameFrameCount = game:GetFrameCount()
|
|
28
|
-
if
|
|
28
|
+
if gameFrameCount == 0 and not forceNewLevel then
|
|
29
29
|
return
|
|
30
30
|
end
|
|
31
31
|
forceNewLevel = false
|
|
@@ -44,14 +44,14 @@ function postNewRoomVanilla(self)
|
|
|
44
44
|
local stageType = level:GetStageType()
|
|
45
45
|
if usedGlowingHourGlass then
|
|
46
46
|
usedGlowingHourGlass = false
|
|
47
|
-
if
|
|
47
|
+
if currentStage ~= stage or currentStageType ~= stageType then
|
|
48
48
|
recordCurrentStage(nil)
|
|
49
49
|
postNewLevelReordered:fire()
|
|
50
50
|
postNewRoomReordered:fire()
|
|
51
51
|
return
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
|
-
if (
|
|
54
|
+
if (gameFrameCount == 0 or currentStage ~= stage or currentStageType ~= stageType) and not forceNewRoom then
|
|
55
55
|
return
|
|
56
56
|
end
|
|
57
57
|
forceNewRoom = false
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, bombVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, bombVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, bomb)
|
|
12
|
+
local bombVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local bombVariant
|
|
16
16
|
bombVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if bombVariant ~= nil and bombVariant ~= bomb.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, bomb)
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, revivalType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, revivalType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player, revivalType)
|
|
12
|
+
local callbackRevivalType
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local callbackRevivalType
|
|
16
16
|
callbackRevivalType = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if callbackRevivalType ~= nil and callbackRevivalType ~= revivalType then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player, revivalType)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, effectVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, effectVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, effect)
|
|
12
|
+
local effectVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local effectVariant
|
|
16
16
|
effectVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if effectVariant ~= nil and effectVariant ~= effect.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, effect)
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, familiarVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, familiarVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, familiar)
|
|
12
|
+
local familiarVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local familiarVariant
|
|
16
16
|
familiarVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if familiarVariant ~= nil and familiarVariant ~= familiar.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, familiar)
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, isContinued)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, isContinued)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, gridEntityType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, gridEntityType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, gridEntity)
|
|
12
|
+
local gridEntityType
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local gridEntityType
|
|
16
16
|
gridEntityType = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, gridEntity)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, gridEntityType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, gridEntityType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, gridIndex, gridEntityType)
|
|
12
|
+
local callbackGridEntityType
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local callbackGridEntityType
|
|
16
16
|
callbackGridEntityType = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, gridIndex, gridEntityType)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, gridEntityType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, gridEntityType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, gridEntity)
|
|
12
|
+
local gridEntityType
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local gridEntityType
|
|
16
16
|
gridEntityType = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if gridEntityType ~= nil and gridEntityType ~= gridEntity:GetType() then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, gridEntity)
|
|
@@ -9,18 +9,18 @@ function ____exports.register(self, callback, itemType, itemID)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, itemType, itemID})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player, pickingUpItem)
|
|
12
|
+
local itemID
|
|
13
|
+
local itemType
|
|
14
|
+
local callback
|
|
12
15
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
16
|
callback = ____value[1]
|
|
15
|
-
local itemType
|
|
16
17
|
itemType = ____value[2]
|
|
17
|
-
local itemID
|
|
18
18
|
itemID = ____value[3]
|
|
19
19
|
do
|
|
20
|
-
if
|
|
20
|
+
if itemType ~= nil and itemType ~= pickingUpItem.type then
|
|
21
21
|
goto __continue5
|
|
22
22
|
end
|
|
23
|
-
if
|
|
23
|
+
if itemID ~= nil and itemID ~= pickingUpItem.id then
|
|
24
24
|
goto __continue5
|
|
25
25
|
end
|
|
26
26
|
callback(nil, player, pickingUpItem)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, knifeVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, knifeVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, knife)
|
|
12
|
+
local knifeVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local knifeVariant
|
|
16
16
|
knifeVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if knifeVariant ~= nil and knifeVariant ~= knife.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, knife)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, laserVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, laserVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, laser)
|
|
12
|
+
local laserVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local laserVariant
|
|
16
16
|
laserVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if laserVariant ~= nil and laserVariant ~= laser.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, laser)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, entityType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, entityType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, npc)
|
|
12
|
+
local entityType
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local entityType
|
|
16
16
|
entityType = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if entityType ~= nil and entityType ~= npc.Type then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, npc)
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil)
|
|
16
16
|
end
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, pickupVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, pickupVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, pickup, player)
|
|
12
|
+
local pickupVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local pickupVariant
|
|
16
16
|
pickupVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if pickupVariant ~= nil and pickupVariant ~= pickup.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, pickup, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, pickupVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, pickupVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, pickup)
|
|
12
|
+
local pickupVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local pickupVariant
|
|
16
16
|
pickupVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if pickupVariant ~= nil and pickupVariant ~= pickup.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, pickup)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player, healthType, amount)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player, healthType, amount)
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
local shouldSustainDeath = callback(nil, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, playerVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player)
|
|
12
|
+
local playerVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local playerVariant
|
|
16
16
|
playerVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, player)
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, projectileVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, projectileVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, projectile)
|
|
12
|
+
local projectileVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local projectileVariant
|
|
16
16
|
projectileVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if projectileVariant ~= nil and projectileVariant ~= projectile.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, projectile)
|
|
@@ -9,10 +9,16 @@ function ____exports.register(self, callback, pickupVariant, pickupSubType)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, pickupVariant, pickupSubType})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player, pickupVariant, pickupSubType, pickupPrice)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
|
-
callback(
|
|
15
|
+
callback(
|
|
16
|
+
nil,
|
|
17
|
+
player,
|
|
18
|
+
pickupVariant,
|
|
19
|
+
pickupSubType,
|
|
20
|
+
pickupPrice
|
|
21
|
+
)
|
|
16
22
|
end
|
|
17
23
|
end
|
|
18
24
|
return ____exports
|
|
@@ -9,8 +9,8 @@ function ____exports.register(self, callback)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, player, numSacrifices)
|
|
12
|
+
local callback
|
|
12
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
14
|
callback = ____value[1]
|
|
15
15
|
callback(nil, player, numSacrifices)
|
|
16
16
|
end
|
|
@@ -9,13 +9,13 @@ function ____exports.register(self, callback, slotVariant)
|
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, slotVariant})
|
|
10
10
|
end
|
|
11
11
|
function ____exports.fire(self, slot)
|
|
12
|
+
local slotVariant
|
|
13
|
+
local callback
|
|
12
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
-
local callback
|
|
14
15
|
callback = ____value[1]
|
|
15
|
-
local slotVariant
|
|
16
16
|
slotVariant = ____value[2]
|
|
17
17
|
do
|
|
18
|
-
if
|
|
18
|
+
if slotVariant ~= nil and slotVariant ~= slot.Variant then
|
|
19
19
|
goto __continue5
|
|
20
20
|
end
|
|
21
21
|
callback(nil, slot)
|