isaacscript-common 26.3.1 → 26.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +118 -93
- package/dist/isaacscript-common.lua +131 -94
- package/dist/src/callbackClasses.d.ts +1 -0
- package/dist/src/callbackClasses.d.ts.map +1 -1
- package/dist/src/callbackClasses.lua +5 -0
- package/dist/src/callbacks.d.ts +94 -93
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/callbacks.lua +1 -0
- package/dist/src/classes/callbacks/PostEntityKillFilter.d.ts +9 -0
- package/dist/src/classes/callbacks/PostEntityKillFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostEntityKillFilter.lua +23 -0
- package/dist/src/classes/features/other/RoomHistory.d.ts +2 -0
- package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomHistory.lua +4 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +110 -93
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +95 -93
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +6 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbackClasses.ts +1 -0
- package/src/callbacks.ts +1 -0
- package/src/classes/callbacks/PostEntityKillFilter.ts +22 -0
- package/src/classes/features/other/RoomHistory.ts +6 -0
- package/src/enums/ModCallbackCustom.ts +18 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +7 -0
package/dist/src/callbacks.lua
CHANGED
|
@@ -25,6 +25,7 @@ local MOD_CALLBACK_CUSTOM_TO_CLASS = {
|
|
|
25
25
|
[ModCallbackCustom.POST_DOOR_UPDATE] = cc.PostDoorUpdate,
|
|
26
26
|
[ModCallbackCustom.POST_EFFECT_INIT_LATE] = cc.PostEffectInitLate,
|
|
27
27
|
[ModCallbackCustom.POST_EFFECT_STATE_CHANGED] = cc.PostEffectStateChanged,
|
|
28
|
+
[ModCallbackCustom.POST_ENTITY_KILL_FILTER] = cc.PostEntityKillFilter,
|
|
28
29
|
[ModCallbackCustom.POST_ESAU_JR] = cc.PostEsauJr,
|
|
29
30
|
[ModCallbackCustom.POST_FAMILIAR_INIT_LATE] = cc.PostFamiliarInitLate,
|
|
30
31
|
[ModCallbackCustom.POST_FAMILIAR_STATE_CHANGED] = cc.PostFamiliarStateChanged,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
2
|
+
import { shouldFireEntity } from "../../shouldFire";
|
|
3
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
4
|
+
export declare class PostEntityKillFilter extends CustomCallback<ModCallbackCustom.POST_ENTITY_KILL_FILTER> {
|
|
5
|
+
constructor();
|
|
6
|
+
protected shouldFire: typeof shouldFireEntity;
|
|
7
|
+
private postEntityKill;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=PostEntityKillFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostEntityKillFilter.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostEntityKillFilter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,uBAAuB,CAAC;;IAUjG,UAAmB,UAAU,0BAAoB;IAGjD,OAAO,CAAC,cAAc,CAEpB;CACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 ____shouldFire = require("src.shouldFire")
|
|
8
|
+
local shouldFireEntity = ____shouldFire.shouldFireEntity
|
|
9
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
10
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
11
|
+
____exports.PostEntityKillFilter = __TS__Class()
|
|
12
|
+
local PostEntityKillFilter = ____exports.PostEntityKillFilter
|
|
13
|
+
PostEntityKillFilter.name = "PostEntityKillFilter"
|
|
14
|
+
__TS__ClassExtends(PostEntityKillFilter, CustomCallback)
|
|
15
|
+
function PostEntityKillFilter.prototype.____constructor(self)
|
|
16
|
+
CustomCallback.prototype.____constructor(self)
|
|
17
|
+
self.shouldFire = shouldFireEntity
|
|
18
|
+
self.postEntityKill = function(____, entity)
|
|
19
|
+
self:fire(entity)
|
|
20
|
+
end
|
|
21
|
+
self.callbacksUsed = {{ModCallback.POST_ENTITY_KILL, self.postEntityKill}}
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -38,6 +38,8 @@ export declare class RoomHistory extends Feature {
|
|
|
38
38
|
* In order to use this function, you must upgrade your mod with `ISCFeature.ROOM_HISTORY`.
|
|
39
39
|
*/
|
|
40
40
|
getLatestRoomDescription(): Readonly<RoomDescription> | undefined;
|
|
41
|
+
/** Helper function to detect if the player is on the first room of the room. */
|
|
42
|
+
isFirstRoom(): boolean;
|
|
41
43
|
/**
|
|
42
44
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
43
45
|
* room, but the entities from the previous room are currently in the process of despawning. (At
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RoomHistory.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,WAAY,SAAQ,OAAO;IActC,OAAO,CAAC,gBAAgB,CAgCtB;IAEF;;;;;OAKG;IAEI,kBAAkB,IAAI,GAAG;IAIhC;;;;;OAKG;IAEI,cAAc,IAAI,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAIjE;;;;;;;OAOG;IAEI,0BAA0B,IAAI,QAAQ,CAAC,eAAe,CAAC;IAiB9D;;;;;;;;;;OAUG;IAEI,wBAAwB,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,SAAS;IAIxE;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,OAAO;CAwBhC"}
|
|
1
|
+
{"version":3,"file":"RoomHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RoomHistory.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,WAAY,SAAQ,OAAO;IActC,OAAO,CAAC,gBAAgB,CAgCtB;IAEF;;;;;OAKG;IAEI,kBAAkB,IAAI,GAAG;IAIhC;;;;;OAKG;IAEI,cAAc,IAAI,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAIjE;;;;;;;OAOG;IAEI,0BAA0B,IAAI,QAAQ,CAAC,eAAe,CAAC;IAiB9D;;;;;;;;;;OAUG;IAEI,wBAAwB,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,SAAS;IAIxE,gFAAgF;IAEzE,WAAW,IAAI,OAAO;IAI7B;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,OAAO;CAwBhC"}
|
|
@@ -86,6 +86,9 @@ end
|
|
|
86
86
|
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
87
87
|
return getLastElement(nil, v.run.roomHistory)
|
|
88
88
|
end
|
|
89
|
+
function RoomHistory.prototype.isFirstRoom(self)
|
|
90
|
+
return #v.run.roomHistory == 1
|
|
91
|
+
end
|
|
89
92
|
function RoomHistory.prototype.isLeavingRoom(self)
|
|
90
93
|
local level = game:GetLevel()
|
|
91
94
|
local stage = level:GetStage()
|
|
@@ -104,5 +107,6 @@ __TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
|
104
107
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
105
108
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
106
109
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
110
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "isFirstRoom", true)
|
|
107
111
|
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
108
112
|
return ____exports
|