isaacscript-common 13.3.4 → 14.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.d.ts +576 -401
- package/dist/isaacscript-common.lua +14654 -13908
- package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
- package/dist/src/callbacks/postAmbush.lua +7 -12
- package/dist/src/callbacks/postBombExploded.lua +3 -3
- package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
- package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
- package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
- package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
- package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
- package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
- package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
- package/dist/src/classes/ModUpgraded.d.ts +9 -5
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/src/classes/ModUpgraded.lua +101 -14
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
- package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts +15 -0
- package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +21 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +14 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
- package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
- package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
- package/dist/src/classes/private/CustomCallback.d.ts +32 -0
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
- package/dist/src/classes/private/CustomCallback.lua +53 -0
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +16 -0
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts +35 -0
- package/dist/src/enums/IsaacScriptCommonFeature.d.ts.map +1 -0
- package/dist/src/enums/IsaacScriptCommonFeature.lua +35 -0
- package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
- package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
- package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +85 -87
- package/dist/src/enums/ModCallbackCustom2.d.ts +17 -0
- package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
- package/dist/src/enums/ModCallbackCustom2.lua +30 -0
- package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
- package/dist/src/features/customHotkeys.d.ts.map +1 -0
- package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
- package/dist/src/features/customPickup.d.ts.map +1 -1
- package/dist/src/features/customPickup.lua +6 -2
- package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/src/features/customStage/backdrop.lua +3 -1
- package/dist/src/features/customStage/shadows.d.ts.map +1 -1
- package/dist/src/features/customStage/shadows.lua +3 -1
- package/dist/src/features/customTrapdoor/init.lua +1 -7
- package/dist/src/features/firstLast.d.ts.map +1 -1
- package/dist/src/features/firstLast.lua +3 -3
- package/dist/src/features/saveDataManager/main.d.ts +5 -2
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/main.lua +3 -5
- package/dist/src/functions/ambush.d.ts +6 -0
- package/dist/src/functions/ambush.d.ts.map +1 -1
- package/dist/src/functions/ambush.lua +31 -0
- package/dist/src/functions/minimap.d.ts +4 -0
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +4 -0
- package/dist/src/functions/roomTransition.d.ts +3 -4
- package/dist/src/functions/roomTransition.d.ts.map +1 -1
- package/dist/src/functions/roomTransition.lua +4 -32
- package/dist/src/functions/spawnCollectible.d.ts +24 -5
- package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/src/functions/spawnCollectible.lua +44 -4
- package/dist/src/functions/utils.d.ts +7 -2
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +7 -2
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +26 -10
- package/dist/src/initCustomCallbacks.d.ts.map +1 -1
- package/dist/src/initCustomCallbacks.lua +0 -3
- package/dist/src/initFeatures.lua +3 -3
- package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
- package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +0 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +55 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +4 -0
- package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
- package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
- package/dist/src/types/private/AllButFirst.d.ts +5 -0
- package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
- package/dist/src/types/private/AllButFirst.lua +2 -0
- package/dist/src/types/private/CallbackTuple.d.ts +20 -0
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
- package/dist/src/types/private/CallbackTuple.lua +2 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts +14 -0
- package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
- package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/postAmbush.ts +7 -14
- package/src/callbacks/postBombExploded.ts +1 -1
- package/src/callbacks/postBoneSwing.ts +2 -1
- package/src/callbacks/postCollectibleEmpty.ts +2 -0
- package/src/callbacks/postCollectibleInitFirst.ts +2 -0
- package/src/callbacks/postNewRoomEarly.ts +1 -1
- package/src/callbacks/postRoomClearChanged.ts +3 -7
- package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
- package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
- package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
- package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
- package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
- package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
- package/src/classes/ModUpgraded.ts +118 -27
- package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
- package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
- package/src/classes/callbacks/PostBombExploded.ts +21 -0
- package/src/classes/callbacks/PostBombInitLate.ts +28 -0
- package/src/classes/callbacks/PostBoneSwing.ts +58 -0
- package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
- package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
- package/src/classes/callbacks/PostCursedTeleport.ts +183 -0
- package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
- package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
- package/src/classes/callbacks/PostPitRender.ts +21 -0
- package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
- package/src/classes/callbacks/PostSpikesRender.ts +21 -0
- package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
- package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
- package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
- package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +37 -0
- package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
- package/src/classes/private/CustomCallback.ts +79 -0
- package/src/core/upgradeMod.ts +16 -2
- package/src/enums/IsaacScriptCommonFeature.ts +34 -0
- package/src/enums/LadderSubTypeCustom.ts +17 -0
- package/src/enums/ModCallbackCustom.ts +314 -243
- package/src/enums/ModCallbackCustom2.ts +17 -0
- package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
- package/src/features/customPickup.ts +4 -2
- package/src/features/customStage/backdrop.ts +2 -1
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/customTrapdoor/init.ts +0 -1
- package/src/features/firstLast.ts +3 -7
- package/src/features/saveDataManager/main.ts +32 -21
- package/src/functions/ambush.ts +26 -1
- package/src/functions/minimap.ts +4 -0
- package/src/functions/roomTransition.ts +3 -27
- package/src/functions/spawnCollectible.ts +44 -4
- package/src/functions/utils.ts +7 -2
- package/src/index.ts +4 -2
- package/src/initCustomCallbacks.ts +1 -2
- package/src/initFeatures.ts +2 -2
- package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +2 -24
- package/src/interfaces/private/AddCallbackParametersCustom2.ts +79 -0
- package/src/objects/callbackRegisterFunctions.ts +2 -4
- package/src/types/private/AllButFirst.ts +6 -0
- package/src/types/private/CallbackTuple.ts +21 -0
- package/src/types/private/MatchingCallbackCustom.ts +26 -0
- package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
- package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
- package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
- package/dist/src/classes/CustomCallback.d.ts +0 -8
- package/dist/src/classes/CustomCallback.d.ts.map +0 -1
- package/dist/src/classes/CustomCallback.lua +0 -28
- package/dist/src/features/customDoor.d.ts +0 -51
- package/dist/src/features/customDoor.d.ts.map +0 -1
- package/dist/src/features/customDoor.lua +0 -53
- package/dist/src/features/setHotkey.d.ts.map +0 -1
- package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
- package/src/callbacks/postCustomDoorEnter.ts +0 -250
- package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
- package/src/classes/CustomCallback.ts +0 -23
- package/src/features/customDoor.ts +0 -66
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Set = ____lualib.Set
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local ____CustomCallbackBomb = require("src.classes.callbacks.validation.CustomCallbackBomb")
|
|
10
|
+
local CustomCallbackBomb = ____CustomCallbackBomb.CustomCallbackBomb
|
|
11
|
+
____exports.PostBombInitLate = __TS__Class()
|
|
12
|
+
local PostBombInitLate = ____exports.PostBombInitLate
|
|
13
|
+
PostBombInitLate.name = "PostBombInitLate"
|
|
14
|
+
__TS__ClassExtends(PostBombInitLate, CustomCallbackBomb)
|
|
15
|
+
function PostBombInitLate.prototype.____constructor(self)
|
|
16
|
+
CustomCallbackBomb.prototype.____constructor(self)
|
|
17
|
+
self.v = {room = {firedSet = __TS__New(Set)}}
|
|
18
|
+
self.postBombUpdate = function(____, bomb)
|
|
19
|
+
local ptrHash = GetPtrHash(bomb)
|
|
20
|
+
if not self.v.room.firedSet:has(ptrHash) then
|
|
21
|
+
self.v.room.firedSet:add(ptrHash)
|
|
22
|
+
self:fire(bomb)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
self.otherCallbacksUsed = {{ModCallback.POST_BOMB_UPDATE, {self.postBombUpdate}}}
|
|
26
|
+
end
|
|
27
|
+
return ____exports
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
3
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
4
|
+
export declare class PostBoneSwing extends CustomCallback<ModCallbackCustom2.POST_BONE_SWING> {
|
|
5
|
+
v: {
|
|
6
|
+
room: {
|
|
7
|
+
boneClubAnimations: Map<PtrHash, string>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
constructor();
|
|
11
|
+
postKnifeRender: (knife: EntityKnife) => void;
|
|
12
|
+
postKnifeRenderBoneClub(knife: EntityKnife): void;
|
|
13
|
+
boneClubAnimationChanged(knife: EntityKnife, animation: string): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=PostBoneSwing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostBoneSwing.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostBoneSwing.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ3D,qBAAa,aAAc,SAAQ,cAAc,CAAC,kBAAkB,CAAC,eAAe,CAAC;IAC1E,CAAC;;;;MAIR;;IAWF,eAAe,UAAW,WAAW,KAAG,IAAI,CAM1C;IAIF,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAgBjD,wBAAwB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAKtE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Set = ____lualib.Set
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
6
|
+
local Map = ____lualib.Map
|
|
7
|
+
local ____exports = {}
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local KnifeVariant = ____isaac_2Dtypescript_2Ddefinitions.KnifeVariant
|
|
10
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
11
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
12
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
13
|
+
local BONE_SWING_ANIMATIONS = __TS__New(Set, {"Swing", "Swing2", "Spin"})
|
|
14
|
+
____exports.PostBoneSwing = __TS__Class()
|
|
15
|
+
local PostBoneSwing = ____exports.PostBoneSwing
|
|
16
|
+
PostBoneSwing.name = "PostBoneSwing"
|
|
17
|
+
__TS__ClassExtends(PostBoneSwing, CustomCallback)
|
|
18
|
+
function PostBoneSwing.prototype.____constructor(self)
|
|
19
|
+
CustomCallback.prototype.____constructor(self)
|
|
20
|
+
self.v = {room = {boneClubAnimations = __TS__New(Map)}}
|
|
21
|
+
self.postKnifeRender = function(____, knife)
|
|
22
|
+
if knife.Variant == KnifeVariant.BONE_CLUB then
|
|
23
|
+
self:postKnifeRenderBoneClub(knife)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
self.otherCallbacksUsed = {{ModCallback.POST_KNIFE_RENDER, {self.postKnifeRender}}}
|
|
27
|
+
end
|
|
28
|
+
function PostBoneSwing.prototype.postKnifeRenderBoneClub(self, knife)
|
|
29
|
+
local sprite = knife:GetSprite()
|
|
30
|
+
local animation = sprite:GetAnimation()
|
|
31
|
+
local ptrHash = GetPtrHash(knife)
|
|
32
|
+
local animationOnLastFrame = self.v.room.boneClubAnimations:get(ptrHash)
|
|
33
|
+
self.v.room.boneClubAnimations:set(ptrHash, animation)
|
|
34
|
+
if animationOnLastFrame ~= nil and animation ~= animationOnLastFrame then
|
|
35
|
+
self:boneClubAnimationChanged(knife, animation)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
function PostBoneSwing.prototype.boneClubAnimationChanged(self, knife, animation)
|
|
39
|
+
if BONE_SWING_ANIMATIONS:has(animation) then
|
|
40
|
+
self:fire(knife)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
return ____exports
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
3
|
+
import { CustomCallback, FireArgs, OptionalArgs } from "../private/CustomCallback";
|
|
4
|
+
declare type T = ModCallbackCustom2.POST_COLLECTIBLE_EMPTY;
|
|
5
|
+
export declare class PostCollectibleEmpty extends CustomCallback<T> {
|
|
6
|
+
v: {
|
|
7
|
+
room: {
|
|
8
|
+
collectibleTypeMap: Map<PtrHash, CollectibleType>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
constructor();
|
|
12
|
+
shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
13
|
+
postPickupUpdateCollectible: (pickup: EntityPickup) => void;
|
|
14
|
+
collectibleTypeChanged(collectible: EntityPickupCollectible, oldCollectibleType: CollectibleType): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=PostCollectibleEmpty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostCollectibleEmpty.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCollectibleEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,aAAK,CAAC,GAAG,kBAAkB,CAAC,sBAAsB,CAAC;AAEnD,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,CAAC,CAAC;IAChD,CAAC;;;;MAIR;;IAcO,UAAU,CACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAC5B,OAAO;IAYV,2BAA2B,WAAY,YAAY,KAAG,IAAI,CAaxD;IAEF,sBAAsB,CACpB,WAAW,EAAE,uBAAuB,EACpC,kBAAkB,EAAE,eAAe,GAClC,IAAI;CAKR"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Map = ____lualib.Map
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
9
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
10
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
11
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
12
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
13
|
+
____exports.PostCollectibleEmpty = __TS__Class()
|
|
14
|
+
local PostCollectibleEmpty = ____exports.PostCollectibleEmpty
|
|
15
|
+
PostCollectibleEmpty.name = "PostCollectibleEmpty"
|
|
16
|
+
__TS__ClassExtends(PostCollectibleEmpty, CustomCallback)
|
|
17
|
+
function PostCollectibleEmpty.prototype.____constructor(self)
|
|
18
|
+
CustomCallback.prototype.____constructor(self)
|
|
19
|
+
self.v = {room = {collectibleTypeMap = __TS__New(Map)}}
|
|
20
|
+
self.postPickupUpdateCollectible = function(____, pickup)
|
|
21
|
+
local collectible = pickup
|
|
22
|
+
local ptrHash = GetPtrHash(collectible)
|
|
23
|
+
local oldCollectibleType = self.v.room.collectibleTypeMap:get(ptrHash)
|
|
24
|
+
if oldCollectibleType == nil then
|
|
25
|
+
oldCollectibleType = collectible.SubType
|
|
26
|
+
end
|
|
27
|
+
self.v.room.collectibleTypeMap:set(ptrHash, collectible.SubType)
|
|
28
|
+
if oldCollectibleType ~= collectible.SubType then
|
|
29
|
+
self:collectibleTypeChanged(collectible, oldCollectibleType)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
self.otherCallbacksUsed = {{ModCallback.POST_PICKUP_UPDATE, {self.postPickupUpdateCollectible, PickupVariant.COLLECTIBLE}}}
|
|
33
|
+
end
|
|
34
|
+
function PostCollectibleEmpty.prototype.shouldFire(self, fireArgs, optionalArgs)
|
|
35
|
+
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
36
|
+
if callbackCollectibleType == nil then
|
|
37
|
+
return true
|
|
38
|
+
end
|
|
39
|
+
local _collectible, oldCollectibleType = table.unpack(fireArgs)
|
|
40
|
+
return oldCollectibleType == callbackCollectibleType
|
|
41
|
+
end
|
|
42
|
+
function PostCollectibleEmpty.prototype.collectibleTypeChanged(self, collectible, oldCollectibleType)
|
|
43
|
+
if collectible.SubType == CollectibleType.NULL then
|
|
44
|
+
self:fire(collectible, oldCollectibleType)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
return ____exports
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
2
|
+
import { CollectibleIndex } from "../../types/CollectibleIndex";
|
|
3
|
+
import { CustomCallbackCollectible } from "./validation/CustomCallbackCollectible";
|
|
4
|
+
export declare class PostCollectibleInitFirst extends CustomCallbackCollectible<ModCallbackCustom2.POST_COLLECTIBLE_INIT_FIRST> {
|
|
5
|
+
v: {
|
|
6
|
+
run: {
|
|
7
|
+
seenCollectibles: Set<CollectibleIndex>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
constructor();
|
|
11
|
+
postPickupInitCollectible: (pickup: EntityPickup) => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=PostCollectibleInitFirst.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostCollectibleInitFirst.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCollectibleInitFirst.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,qBAAa,wBAAyB,SAAQ,yBAAyB,CAAC,kBAAkB,CAAC,2BAA2B,CAAC;IAC5G,CAAC;;;;MAIR;;IAeF,yBAAyB,WAAY,YAAY,KAAG,IAAI,CAStD;CACH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Set = ____lualib.Set
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
10
|
+
local ____collectibles = require("src.functions.collectibles")
|
|
11
|
+
local getCollectibleIndex = ____collectibles.getCollectibleIndex
|
|
12
|
+
local ____CustomCallbackCollectible = require("src.classes.callbacks.validation.CustomCallbackCollectible")
|
|
13
|
+
local CustomCallbackCollectible = ____CustomCallbackCollectible.CustomCallbackCollectible
|
|
14
|
+
____exports.PostCollectibleInitFirst = __TS__Class()
|
|
15
|
+
local PostCollectibleInitFirst = ____exports.PostCollectibleInitFirst
|
|
16
|
+
PostCollectibleInitFirst.name = "PostCollectibleInitFirst"
|
|
17
|
+
__TS__ClassExtends(PostCollectibleInitFirst, CustomCallbackCollectible)
|
|
18
|
+
function PostCollectibleInitFirst.prototype.____constructor(self)
|
|
19
|
+
CustomCallbackCollectible.prototype.____constructor(self)
|
|
20
|
+
self.v = {run = {seenCollectibles = __TS__New(Set)}}
|
|
21
|
+
self.postPickupInitCollectible = function(____, pickup)
|
|
22
|
+
local collectible = pickup
|
|
23
|
+
local collectibleIndex = getCollectibleIndex(nil, collectible)
|
|
24
|
+
if self.v.run.seenCollectibles:has(collectibleIndex) then
|
|
25
|
+
return
|
|
26
|
+
end
|
|
27
|
+
self.v.run.seenCollectibles:add(collectibleIndex)
|
|
28
|
+
self:fire(collectible)
|
|
29
|
+
end
|
|
30
|
+
self.otherCallbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInitCollectible, PickupVariant.COLLECTIBLE}}}
|
|
31
|
+
end
|
|
32
|
+
return ____exports
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DamageFlag } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
3
|
+
import { PlayerIndex } from "../../types/PlayerIndex";
|
|
4
|
+
import { CustomCallbackPlayer } from "./validation/CustomCallbackPlayer";
|
|
5
|
+
export declare class PostCursedTeleport extends CustomCallbackPlayer<ModCallbackCustom2.POST_CURSED_TELEPORT> {
|
|
6
|
+
v: {
|
|
7
|
+
run: {
|
|
8
|
+
playersDamageFrameMap: Map<PlayerIndex, [lastDamageFrame: number, callbackFiredOnThisFrame: boolean]>;
|
|
9
|
+
};
|
|
10
|
+
level: {
|
|
11
|
+
numSacrifices: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
constructor();
|
|
15
|
+
entityTakeDmgPlayer: (entity: Entity, _amount: float, damageFlags: BitFlags<DamageFlag>, _source: EntityRef, _countdownFrames: int) => boolean | undefined;
|
|
16
|
+
setDamageFrame(entity: Entity, damageFlags: BitFlags<DamageFlag>): void;
|
|
17
|
+
isPotentialNaturalTeleportFromSacrificeRoom(damageFlags: BitFlags<DamageFlag>): boolean;
|
|
18
|
+
incrementNumSacrifices(damageFlags: BitFlags<DamageFlag>): void;
|
|
19
|
+
postPlayerRenderPlayer: (player: EntityPlayer, _renderOffset: Vector) => void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=PostCursedTeleport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostCursedTeleport.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCursedTeleport.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAMX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAOpE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,qBAAa,kBAAmB,SAAQ,oBAAoB,CAAC,kBAAkB,CAAC,oBAAoB,CAAC;IAC1F,CAAC;;;;;;;MAWR;;IAoBF,mBAAmB,WACT,MAAM,WACL,KAAK,eACD,SAAS,UAAU,CAAC,WACxB,SAAS,oBACA,GAAG,KACpB,OAAO,GAAG,SAAS,CAKpB;IAEF,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI;IA6BvE,2CAA2C,CACzC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,GAChC,OAAO;IAcV,sBAAsB,CAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI;IAY/D,sBAAsB,WACZ,YAAY,iBACL,MAAM,KACpB,IAAI,CAyBL;CACH"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Map = ____lualib.Map
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local playerIsTeleportingFromCursedTeleport
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
|
+
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
11
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
12
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
13
|
+
local PlayerVariant = ____isaac_2Dtypescript_2Ddefinitions.PlayerVariant
|
|
14
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
15
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
16
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
17
|
+
local game = ____cachedClasses.game
|
|
18
|
+
local ____flag = require("src.functions.flag")
|
|
19
|
+
local hasFlag = ____flag.hasFlag
|
|
20
|
+
local ____playerDataStructures = require("src.functions.playerDataStructures")
|
|
21
|
+
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
22
|
+
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
23
|
+
local ____players = require("src.functions.players")
|
|
24
|
+
local getPlayerNumHitsRemaining = ____players.getPlayerNumHitsRemaining
|
|
25
|
+
local ____CustomCallbackPlayer = require("src.classes.callbacks.validation.CustomCallbackPlayer")
|
|
26
|
+
local CustomCallbackPlayer = ____CustomCallbackPlayer.CustomCallbackPlayer
|
|
27
|
+
function playerIsTeleportingFromCursedTeleport(self, player, lastDamageFrame)
|
|
28
|
+
local gameFrameCount = game:GetFrameCount()
|
|
29
|
+
if gameFrameCount ~= lastDamageFrame then
|
|
30
|
+
return false
|
|
31
|
+
end
|
|
32
|
+
local sprite = player:GetSprite()
|
|
33
|
+
if not sprite:IsPlaying("TeleportUp") or sprite:GetFrame() ~= 1 then
|
|
34
|
+
return false
|
|
35
|
+
end
|
|
36
|
+
if player:HasCollectible(CollectibleType.CURSED_EYE) then
|
|
37
|
+
return true
|
|
38
|
+
end
|
|
39
|
+
local numHitsRemaining = getPlayerNumHitsRemaining(nil, player)
|
|
40
|
+
if player:HasTrinket(TrinketType.CURSED_SKULL) and numHitsRemaining == 1 then
|
|
41
|
+
return true
|
|
42
|
+
end
|
|
43
|
+
return false
|
|
44
|
+
end
|
|
45
|
+
____exports.PostCursedTeleport = __TS__Class()
|
|
46
|
+
local PostCursedTeleport = ____exports.PostCursedTeleport
|
|
47
|
+
PostCursedTeleport.name = "PostCursedTeleport"
|
|
48
|
+
__TS__ClassExtends(PostCursedTeleport, CustomCallbackPlayer)
|
|
49
|
+
function PostCursedTeleport.prototype.____constructor(self)
|
|
50
|
+
CustomCallbackPlayer.prototype.____constructor(self)
|
|
51
|
+
self.v = {
|
|
52
|
+
run = {playersDamageFrameMap = __TS__New(Map)},
|
|
53
|
+
level = {numSacrifices = 0}
|
|
54
|
+
}
|
|
55
|
+
self.entityTakeDmgPlayer = function(____, entity, _amount, damageFlags, _source, _countdownFrames)
|
|
56
|
+
self:incrementNumSacrifices(damageFlags)
|
|
57
|
+
self:setDamageFrame(entity, damageFlags)
|
|
58
|
+
return nil
|
|
59
|
+
end
|
|
60
|
+
self.postPlayerRenderPlayer = function(____, player, _renderOffset)
|
|
61
|
+
local trackingArray = mapGetPlayer(nil, self.v.run.playersDamageFrameMap, player)
|
|
62
|
+
if trackingArray == nil then
|
|
63
|
+
return
|
|
64
|
+
end
|
|
65
|
+
local lastDamageFrame, callbackActivatedOnThisFrame = table.unpack(trackingArray)
|
|
66
|
+
if not playerIsTeleportingFromCursedTeleport(nil, player, lastDamageFrame) then
|
|
67
|
+
return
|
|
68
|
+
end
|
|
69
|
+
if callbackActivatedOnThisFrame then
|
|
70
|
+
return
|
|
71
|
+
end
|
|
72
|
+
local gameFrameCount = game:GetFrameCount()
|
|
73
|
+
local newTrackingArray = {gameFrameCount, true}
|
|
74
|
+
mapSetPlayer(nil, self.v.run.playersDamageFrameMap, player, newTrackingArray)
|
|
75
|
+
self:fire(player)
|
|
76
|
+
end
|
|
77
|
+
self.otherCallbacksUsed = {{ModCallback.ENTITY_TAKE_DMG, {self.entityTakeDmgPlayer, EntityType.PLAYER}}, {ModCallback.POST_PLAYER_RENDER, {self.postPlayerRenderPlayer, PlayerVariant.PLAYER}}}
|
|
78
|
+
end
|
|
79
|
+
function PostCursedTeleport.prototype.setDamageFrame(self, entity, damageFlags)
|
|
80
|
+
local gameFrameCount = game:GetFrameCount()
|
|
81
|
+
local player = entity:ToPlayer()
|
|
82
|
+
if player == nil then
|
|
83
|
+
return
|
|
84
|
+
end
|
|
85
|
+
local trackingArray = mapGetPlayer(nil, self.v.run.playersDamageFrameMap, player)
|
|
86
|
+
if trackingArray ~= nil then
|
|
87
|
+
local lastDamageFrame, callbackFiredOnThisFrame = table.unpack(trackingArray)
|
|
88
|
+
if lastDamageFrame == gameFrameCount and callbackFiredOnThisFrame then
|
|
89
|
+
return
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
if self:isPotentialNaturalTeleportFromSacrificeRoom(damageFlags) then
|
|
93
|
+
return
|
|
94
|
+
end
|
|
95
|
+
local newTrackingArray = {gameFrameCount, false}
|
|
96
|
+
mapSetPlayer(nil, self.v.run.playersDamageFrameMap, player, newTrackingArray)
|
|
97
|
+
end
|
|
98
|
+
function PostCursedTeleport.prototype.isPotentialNaturalTeleportFromSacrificeRoom(self, damageFlags)
|
|
99
|
+
local room = game:GetRoom()
|
|
100
|
+
local roomType = room:GetType()
|
|
101
|
+
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
|
|
102
|
+
return roomType == RoomType.SACRIFICE and isSpikeDamage and (self.v.level.numSacrifices == 6 or self.v.level.numSacrifices >= 12)
|
|
103
|
+
end
|
|
104
|
+
function PostCursedTeleport.prototype.incrementNumSacrifices(self, damageFlags)
|
|
105
|
+
local room = game:GetRoom()
|
|
106
|
+
local roomType = room:GetType()
|
|
107
|
+
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
|
|
108
|
+
if roomType == RoomType.SACRIFICE and isSpikeDamage then
|
|
109
|
+
local ____self_v_level_0, ____numSacrifices_1 = self.v.level, "numSacrifices"
|
|
110
|
+
____self_v_level_0[____numSacrifices_1] = ____self_v_level_0[____numSacrifices_1] + 1
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
return ____exports
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
2
|
+
import { CustomCallbackKnife } from "./validation/CustomCallbackKnife";
|
|
3
|
+
export declare class PostKnifeInitLate extends CustomCallbackKnife<ModCallbackCustom2.POST_KNIFE_INIT_LATE> {
|
|
4
|
+
v: {
|
|
5
|
+
room: {
|
|
6
|
+
firedSet: Set<PtrHash>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
constructor();
|
|
10
|
+
postKnifeUpdate: (knife: EntityKnife) => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=PostKnifeInitLate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostKnifeInitLate.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostKnifeInitLate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,qBAAa,iBAAkB,SAAQ,mBAAmB,CAAC,kBAAkB,CAAC,oBAAoB,CAAC;IACxF,CAAC;;;;MAIR;;IAWF,eAAe,UAAW,WAAW,KAAG,IAAI,CAM1C;CACH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local Set = ____lualib.Set
|
|
5
|
+
local __TS__New = ____lualib.__TS__New
|
|
6
|
+
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local ____CustomCallbackKnife = require("src.classes.callbacks.validation.CustomCallbackKnife")
|
|
10
|
+
local CustomCallbackKnife = ____CustomCallbackKnife.CustomCallbackKnife
|
|
11
|
+
____exports.PostKnifeInitLate = __TS__Class()
|
|
12
|
+
local PostKnifeInitLate = ____exports.PostKnifeInitLate
|
|
13
|
+
PostKnifeInitLate.name = "PostKnifeInitLate"
|
|
14
|
+
__TS__ClassExtends(PostKnifeInitLate, CustomCallbackKnife)
|
|
15
|
+
function PostKnifeInitLate.prototype.____constructor(self)
|
|
16
|
+
CustomCallbackKnife.prototype.____constructor(self)
|
|
17
|
+
self.v = {room = {firedSet = __TS__New(Set)}}
|
|
18
|
+
self.postKnifeUpdate = function(____, knife)
|
|
19
|
+
local ptrHash = GetPtrHash(knife)
|
|
20
|
+
if not self.v.room.firedSet:has(ptrHash) then
|
|
21
|
+
self.v.room.firedSet:add(ptrHash)
|
|
22
|
+
self:fire(knife)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
self.otherCallbacksUsed = {{ModCallback.POST_KNIFE_UPDATE, {self.postKnifeUpdate}}}
|
|
26
|
+
end
|
|
27
|
+
return ____exports
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EntityType } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
3
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
4
|
+
export declare class PostNewRoomEarly extends CustomCallback<ModCallbackCustom2.POST_NEW_ROOM_EARLY> {
|
|
5
|
+
currentRoomTopLeftWallPtrHash: PtrHash | null;
|
|
6
|
+
/** The wall entity directly to the right of the top-left wall. */
|
|
7
|
+
currentRoomTopLeftWallPtrHash2: PtrHash | null;
|
|
8
|
+
constructor();
|
|
9
|
+
postNewRoom: () => void;
|
|
10
|
+
preEntitySpawn: () => [EntityType, int, int, int] | undefined;
|
|
11
|
+
checkRoomChanged(): void;
|
|
12
|
+
isNewRoom(): boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=PostNewRoomEarly.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostNewRoomEarly.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostNewRoomEarly.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAGX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,kBAAkB,CAAC,mBAAmB,CAAC;IAC1F,6BAA6B,EAAE,OAAO,GAAG,IAAI,CAAQ;IAErD,kEAAkE;IAClE,8BAA8B,EAAE,OAAO,GAAG,IAAI,CAAQ;;IAYtD,WAAW,QAAO,IAAI,CAEpB;IAGF,cAAc,QAAO,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAG1D;IAEF,gBAAgB,IAAI,IAAI;IAMxB,SAAS,IAAI,OAAO;CA8CrB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
9
|
+
local game = ____cachedClasses.game
|
|
10
|
+
local ____gridEntities = require("src.functions.gridEntities")
|
|
11
|
+
local getTopLeftWallGridIndex = ____gridEntities.getTopLeftWallGridIndex
|
|
12
|
+
local spawnGridEntity = ____gridEntities.spawnGridEntity
|
|
13
|
+
local ____logMisc = require("src.functions.logMisc")
|
|
14
|
+
local logError = ____logMisc.logError
|
|
15
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
16
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
17
|
+
____exports.PostNewRoomEarly = __TS__Class()
|
|
18
|
+
local PostNewRoomEarly = ____exports.PostNewRoomEarly
|
|
19
|
+
PostNewRoomEarly.name = "PostNewRoomEarly"
|
|
20
|
+
__TS__ClassExtends(PostNewRoomEarly, CustomCallback)
|
|
21
|
+
function PostNewRoomEarly.prototype.____constructor(self)
|
|
22
|
+
CustomCallback.prototype.____constructor(self)
|
|
23
|
+
self.currentRoomTopLeftWallPtrHash = nil
|
|
24
|
+
self.currentRoomTopLeftWallPtrHash2 = nil
|
|
25
|
+
self.postNewRoom = function()
|
|
26
|
+
self:checkRoomChanged()
|
|
27
|
+
end
|
|
28
|
+
self.preEntitySpawn = function()
|
|
29
|
+
self:checkRoomChanged()
|
|
30
|
+
return nil
|
|
31
|
+
end
|
|
32
|
+
self.otherCallbacksUsed = {{ModCallback.POST_NEW_ROOM, {self.postNewRoom}}, {ModCallback.PRE_ENTITY_SPAWN, {self.preEntitySpawn}}}
|
|
33
|
+
end
|
|
34
|
+
function PostNewRoomEarly.prototype.checkRoomChanged(self)
|
|
35
|
+
if self:isNewRoom() then
|
|
36
|
+
self:fire()
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
function PostNewRoomEarly.prototype.isNewRoom(self)
|
|
40
|
+
local room = game:GetRoom()
|
|
41
|
+
local topLeftWallGridIndex = getTopLeftWallGridIndex(nil)
|
|
42
|
+
local rightOfTopWallGridIndex = topLeftWallGridIndex + 1
|
|
43
|
+
local topLeftWall = room:GetGridEntity(topLeftWallGridIndex)
|
|
44
|
+
local topLeftWall2 = room:GetGridEntity(rightOfTopWallGridIndex)
|
|
45
|
+
if topLeftWall == nil then
|
|
46
|
+
topLeftWall = spawnGridEntity(nil, GridEntityType.WALL, topLeftWallGridIndex)
|
|
47
|
+
if topLeftWall == nil then
|
|
48
|
+
logError(nil, "Failed to spawn a new wall (1) for the POST_NEW_ROOM_EARLY callback.")
|
|
49
|
+
return false
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
if topLeftWall2 == nil then
|
|
53
|
+
topLeftWall2 = spawnGridEntity(nil, GridEntityType.WALL, rightOfTopWallGridIndex)
|
|
54
|
+
if topLeftWall2 == nil then
|
|
55
|
+
logError(nil, "Failed to spawn a new wall (2) for the POST_NEW_ROOM_EARLY callback.")
|
|
56
|
+
return false
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
local oldTopLeftWallPtrHash = self.currentRoomTopLeftWallPtrHash
|
|
60
|
+
local oldTopLeftWallPtrHash2 = self.currentRoomTopLeftWallPtrHash2
|
|
61
|
+
self.currentRoomTopLeftWallPtrHash = GetPtrHash(topLeftWall)
|
|
62
|
+
self.currentRoomTopLeftWallPtrHash2 = GetPtrHash(topLeftWall2)
|
|
63
|
+
return oldTopLeftWallPtrHash ~= self.currentRoomTopLeftWallPtrHash or oldTopLeftWallPtrHash2 ~= self.currentRoomTopLeftWallPtrHash2
|
|
64
|
+
end
|
|
65
|
+
return ____exports
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
2
|
+
import { CustomCallbackPit } from "./validation/CustomCallbackPit";
|
|
3
|
+
export declare class PostPitRender extends CustomCallbackPit<ModCallbackCustom2.POST_PIT_RENDER> {
|
|
4
|
+
constructor();
|
|
5
|
+
postRender: () => void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=PostPitRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostPitRender.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPitRender.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,qBAAa,aAAc,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC;;IAUtF,UAAU,QAAO,IAAI,CAInB;CACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local ____gridEntitiesSpecific = require("src.functions.gridEntitiesSpecific")
|
|
8
|
+
local getPits = ____gridEntitiesSpecific.getPits
|
|
9
|
+
local ____CustomCallbackPit = require("src.classes.callbacks.validation.CustomCallbackPit")
|
|
10
|
+
local CustomCallbackPit = ____CustomCallbackPit.CustomCallbackPit
|
|
11
|
+
____exports.PostPitRender = __TS__Class()
|
|
12
|
+
local PostPitRender = ____exports.PostPitRender
|
|
13
|
+
PostPitRender.name = "PostPitRender"
|
|
14
|
+
__TS__ClassExtends(PostPitRender, CustomCallbackPit)
|
|
15
|
+
function PostPitRender.prototype.____constructor(self)
|
|
16
|
+
CustomCallbackPit.prototype.____constructor(self)
|
|
17
|
+
self.postRender = function()
|
|
18
|
+
for ____, pit in ipairs(getPits(nil)) do
|
|
19
|
+
self:fire(pit)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
self.otherCallbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
2
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
3
|
+
export declare class PostRoomClearChanged extends CustomCallback<ModCallbackCustom2.POST_ROOM_CLEAR_CHANGED> {
|
|
4
|
+
v: {
|
|
5
|
+
room: {
|
|
6
|
+
cleared: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
constructor();
|
|
10
|
+
postUpdate: () => void;
|
|
11
|
+
postNewRoom: () => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=PostRoomClearChanged.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostRoomClearChanged.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostRoomClearChanged.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,kBAAkB,CAAC,uBAAuB,CAAC;IACzF,CAAC;;;;MAIR;;IAYF,UAAU,QAAO,IAAI,CAQnB;IAGF,WAAW,QAAO,IAAI,CAKpB;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
8
|
+
local game = ____cachedClasses.game
|
|
9
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
10
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
11
|
+
____exports.PostRoomClearChanged = __TS__Class()
|
|
12
|
+
local PostRoomClearChanged = ____exports.PostRoomClearChanged
|
|
13
|
+
PostRoomClearChanged.name = "PostRoomClearChanged"
|
|
14
|
+
__TS__ClassExtends(PostRoomClearChanged, CustomCallback)
|
|
15
|
+
function PostRoomClearChanged.prototype.____constructor(self)
|
|
16
|
+
CustomCallback.prototype.____constructor(self)
|
|
17
|
+
self.v = {room = {cleared = false}}
|
|
18
|
+
self.postUpdate = function()
|
|
19
|
+
local room = game:GetRoom()
|
|
20
|
+
local roomClear = room:IsClear()
|
|
21
|
+
if roomClear ~= self.v.room.cleared then
|
|
22
|
+
self.v.room.cleared = roomClear
|
|
23
|
+
self:fire(roomClear)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
self.postNewRoom = function()
|
|
27
|
+
local room = game:GetRoom()
|
|
28
|
+
local roomClear = room:IsClear()
|
|
29
|
+
self.v.room.cleared = roomClear
|
|
30
|
+
end
|
|
31
|
+
self.otherCallbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}, {ModCallback.POST_NEW_ROOM, {self.postNewRoom}}}
|
|
32
|
+
end
|
|
33
|
+
return ____exports
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModCallbackCustom2 } from "../../enums/ModCallbackCustom2";
|
|
2
|
+
import { CustomCallbackSpikes } from "./validation/CustomCallbackSpikes";
|
|
3
|
+
export declare class PostSpikesRender extends CustomCallbackSpikes<ModCallbackCustom2.POST_SPIKES_RENDER> {
|
|
4
|
+
constructor();
|
|
5
|
+
postRender: () => void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=PostSpikesRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostSpikesRender.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostSpikesRender.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,qBAAa,gBAAiB,SAAQ,oBAAoB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;;IAU/F,UAAU,QAAO,IAAI,CAInB;CACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local ____gridEntitiesSpecific = require("src.functions.gridEntitiesSpecific")
|
|
8
|
+
local getSpikes = ____gridEntitiesSpecific.getSpikes
|
|
9
|
+
local ____CustomCallbackSpikes = require("src.classes.callbacks.validation.CustomCallbackSpikes")
|
|
10
|
+
local CustomCallbackSpikes = ____CustomCallbackSpikes.CustomCallbackSpikes
|
|
11
|
+
____exports.PostSpikesRender = __TS__Class()
|
|
12
|
+
local PostSpikesRender = ____exports.PostSpikesRender
|
|
13
|
+
PostSpikesRender.name = "PostSpikesRender"
|
|
14
|
+
__TS__ClassExtends(PostSpikesRender, CustomCallbackSpikes)
|
|
15
|
+
function PostSpikesRender.prototype.____constructor(self)
|
|
16
|
+
CustomCallbackSpikes.prototype.____constructor(self)
|
|
17
|
+
self.postRender = function()
|
|
18
|
+
for ____, spikes in ipairs(getSpikes(nil)) do
|
|
19
|
+
self:fire(spikes)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
self.otherCallbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}}
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AmbushType } from "packages/isaacscript-common/src/enums/AmbushType";
|
|
2
|
+
import { MatchingCallbackCustom } from "packages/isaacscript-common/src/types/private/MatchingCallbackCustom";
|
|
3
|
+
import { CustomCallback, FireArgs, OptionalArgs } from "../../private/CustomCallback";
|
|
4
|
+
declare type CallbackSignatureAmbush = (ambushType: AmbushType) => void;
|
|
5
|
+
declare type ModCallbackCustomAmbush = MatchingCallbackCustom<CallbackSignatureAmbush>;
|
|
6
|
+
export declare class CustomCallbackAmbush<T extends ModCallbackCustomAmbush> extends CustomCallback<T> {
|
|
7
|
+
shouldFire(fireArgs: FireArgs<T>, optionalArgs: OptionalArgs<T>): boolean;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=CustomCallbackAmbush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomCallbackAmbush.d.ts","sourceRoot":"","sources":["../../../../../src/classes/callbacks/validation/CustomCallbackAmbush.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACb,MAAM,8BAA8B,CAAC;AAEtC,aAAK,uBAAuB,GAAG,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;AAChE,aAAK,uBAAuB,GAAG,sBAAsB,CAAC,uBAAuB,CAAC,CAAC;AAE/E,qBAAa,oBAAoB,CAC/B,CAAC,SAAS,uBAAuB,CACjC,SAAQ,cAAc,CAAC,CAAC,CAAC;IAEhB,UAAU,CACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,GAC5B,OAAO;CASX"}
|