isaacscript-common 20.10.0 → 20.11.1
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 +39 -17
- package/dist/isaacscript-common.lua +216 -160
- package/dist/src/classes/ModFeature.d.ts +3 -5
- package/dist/src/classes/ModFeature.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/SlotDestroyedDetection.lua +3 -0
- package/dist/src/classes/features/other/RoomHistory.d.ts +4 -3
- package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomHistory.lua +3 -3
- package/dist/src/classes/features/other/RunInNFrames.d.ts +29 -6
- package/dist/src/classes/features/other/RunInNFrames.d.ts.map +1 -1
- package/dist/src/classes/features/other/RunInNFrames.lua +98 -45
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +1 -1
- package/dist/src/interfaces/CustomStageTSConfig.d.ts +4 -3
- package/dist/src/interfaces/CustomStageTSConfig.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/classes/ModFeature.ts +3 -5
- package/src/classes/features/callbackLogic/SlotDestroyedDetection.ts +3 -0
- package/src/classes/features/other/RoomHistory.ts +4 -4
- package/src/classes/features/other/RunInNFrames.ts +146 -53
- package/src/features.ts +2 -1
- package/src/interfaces/CustomStageTSConfig.ts +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAS/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,gCAAgC,sB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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotDestroyedDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotDestroyedDetection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlotDestroyedDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/SlotDestroyedDetection.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,qBAAa,sBAAuB,SAAQ,OAAO;IACjC,CAAC;;;;MAIf;IAEF,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,WAAW,CAAc;gBAErB,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW;IAwB1E,OAAO,CAAC,oBAAoB,CAc1B;IAEF,OAAO,CAAC,2BAA2B;IAInC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,cAAc,CASpB;IAEF;;;;;OAKG;IACH,OAAO,CAAC,gCAAgC;CAOzC"}
|
|
@@ -8,6 +8,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
8
8
|
local EntityGridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityGridCollisionClass
|
|
9
9
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
10
10
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
11
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
12
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
11
13
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
12
14
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
13
15
|
local ____SlotDestructionType = require("src.enums.SlotDestructionType")
|
|
@@ -42,6 +44,7 @@ function SlotDestroyedDetection.prototype.____constructor(self, postSlotDestroye
|
|
|
42
44
|
end
|
|
43
45
|
self:checkDestroyedFromCollisionClass(slot)
|
|
44
46
|
end
|
|
47
|
+
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
45
48
|
self.callbacksUsed = {{ModCallback.POST_ENTITY_REMOVE, self.postEntityRemoveSlot, {EntityType.SLOT}}}
|
|
46
49
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_SLOT_UPDATE, self.postSlotUpdate}}
|
|
47
50
|
self.postSlotDestroyed = postSlotDestroyed
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
1
2
|
import { RoomDescription } from "../../../interfaces/RoomDescription";
|
|
2
3
|
import { Feature } from "../../private/Feature";
|
|
3
4
|
export declare class RoomHistory extends Feature {
|
|
4
5
|
private postNewRoomEarly;
|
|
5
6
|
/**
|
|
6
|
-
* Helper function to get the total number of rooms that the player has
|
|
7
|
-
* run.
|
|
7
|
+
* Helper function to get the total number of rooms that the player has entered thus far on the
|
|
8
|
+
* run. (Re-entering the same room will increment the number returned.)
|
|
8
9
|
*
|
|
9
10
|
* In order to use this function, you must upgrade your mod with `ISCFeature.ROOM_HISTORY`.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
getNumRoomsEntered(): int;
|
|
12
13
|
/**
|
|
13
14
|
* Helper function to get information about all of the rooms that a player has visited thus far on
|
|
14
15
|
* this run.
|
|
@@ -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;AAEhD,qBAAa,WAAY,SAAQ,OAAO;IAkBtC,OAAO,CAAC,gBAAgB,CAgCtB;IAEF;;;;;OAKG;IAEI,kBAAkB,IAAI,
|
|
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;AAEhD,qBAAa,WAAY,SAAQ,OAAO;IAkBtC,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"}
|
|
@@ -65,8 +65,8 @@ function RoomHistory.prototype.____constructor(self)
|
|
|
65
65
|
end
|
|
66
66
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, self.postNewRoomEarly}}
|
|
67
67
|
end
|
|
68
|
-
function RoomHistory.prototype.
|
|
69
|
-
return self.v.run.roomHistory
|
|
68
|
+
function RoomHistory.prototype.getNumRoomsEntered(self)
|
|
69
|
+
return #self.v.run.roomHistory
|
|
70
70
|
end
|
|
71
71
|
function RoomHistory.prototype.getRoomHistory(self)
|
|
72
72
|
return self.v.run.roomHistory
|
|
@@ -99,7 +99,7 @@ function RoomHistory.prototype.isLeavingRoom(self)
|
|
|
99
99
|
end
|
|
100
100
|
return startSeedString ~= latestRoomDescription.startSeedString or stage ~= latestRoomDescription.stage or stageType ~= latestRoomDescription.stageType or roomListIndex ~= latestRoomDescription.roomListIndex or roomVisitedCount ~= latestRoomDescription.roomVisitedCount
|
|
101
101
|
end
|
|
102
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "
|
|
102
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
103
103
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
104
104
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
105
105
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
@@ -2,6 +2,7 @@ import { PlayerType } from "isaac-typescript-definitions";
|
|
|
2
2
|
import { Feature } from "../../private/Feature";
|
|
3
3
|
export declare class RunInNFrames extends Feature {
|
|
4
4
|
vConditionalFunc: () => boolean;
|
|
5
|
+
private roomHistory;
|
|
5
6
|
private postUpdate;
|
|
6
7
|
private postRender;
|
|
7
8
|
/**
|
|
@@ -25,8 +26,13 @@ export declare class RunInNFrames extends Feature {
|
|
|
25
26
|
* deferred functions manually using serializable data.
|
|
26
27
|
*
|
|
27
28
|
* In order to use this function, you must upgrade your mod with `ISCFeature.RUN_IN_N_FRAMES`.
|
|
29
|
+
*
|
|
30
|
+
* @param func The function to run.
|
|
31
|
+
* @param gameFrames The amount of game frames to wait before running the function.
|
|
32
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
33
|
+
* room is loaded in the interim. Default is false.
|
|
28
34
|
*/
|
|
29
|
-
runInNGameFrames(func: () => void, gameFrames: int): void;
|
|
35
|
+
runInNGameFrames(func: () => void, gameFrames: int, cancelIfRoomChanges?: boolean): void;
|
|
30
36
|
/**
|
|
31
37
|
* Supply a function to run N render frames from now in the `POST_RENDER` callback.
|
|
32
38
|
*
|
|
@@ -38,8 +44,13 @@ export declare class RunInNFrames extends Feature {
|
|
|
38
44
|
* deferred functions manually using serializable data.
|
|
39
45
|
*
|
|
40
46
|
* In order to use this function, you must upgrade your mod with `ISCFeature.RUN_IN_N_FRAMES`.
|
|
47
|
+
*
|
|
48
|
+
* @param func The function to run.
|
|
49
|
+
* @param renderFrames The amount of render frames to wait before running the function.
|
|
50
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
51
|
+
* room is loaded in the interim. Default is false.
|
|
41
52
|
*/
|
|
42
|
-
runInNRenderFrames(func: () => void, renderFrames: int): void;
|
|
53
|
+
runInNRenderFrames(func: () => void, renderFrames: int, cancelIfRoomChanges?: boolean): void;
|
|
43
54
|
/**
|
|
44
55
|
* Supply a function to run on the next `POST_UPDATE` callback.
|
|
45
56
|
*
|
|
@@ -69,8 +80,12 @@ export declare class RunInNFrames extends Feature {
|
|
|
69
80
|
* deferred functions manually using serializable data.
|
|
70
81
|
*
|
|
71
82
|
* In order to use this function, you must upgrade your mod with `ISCFeature.RUN_IN_N_FRAMES`.
|
|
83
|
+
*
|
|
84
|
+
* @param func The function to run.
|
|
85
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
86
|
+
* room is loaded in the interim. Default is false.
|
|
72
87
|
*/
|
|
73
|
-
runNextGameFrame(func: () => void): void;
|
|
88
|
+
runNextGameFrame(func: () => void, cancelIfRoomChanges?: boolean): void;
|
|
74
89
|
/**
|
|
75
90
|
* Supply a function to run on the next `POST_RENDER` callback.
|
|
76
91
|
*
|
|
@@ -80,8 +95,12 @@ export declare class RunInNFrames extends Feature {
|
|
|
80
95
|
* Note that this function will not handle saving and quitting.
|
|
81
96
|
*
|
|
82
97
|
* In order to use this function, you must upgrade your mod with `ISCFeature.RUN_IN_N_FRAMES`.
|
|
98
|
+
*
|
|
99
|
+
* @param func The function to run.
|
|
100
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
101
|
+
* room is loaded in the interim. Default is false.
|
|
83
102
|
*/
|
|
84
|
-
runNextRenderFrame(func: () => void): void;
|
|
103
|
+
runNextRenderFrame(func: () => void, cancelIfRoomChanges?: boolean): void;
|
|
85
104
|
/**
|
|
86
105
|
* Supply a function to be repeatedly run on an interval of N game frames in the `POST_UPDATE`
|
|
87
106
|
* callback. The function will continue to be fired until `false` is returned from the function.
|
|
@@ -99,8 +118,10 @@ export declare class RunInNFrames extends Feature {
|
|
|
99
118
|
* @param gameFrames The amount of game frames to wait between each run.
|
|
100
119
|
* @param runImmediately Whether or not to execute the function right now before waiting for the
|
|
101
120
|
* interval.
|
|
121
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
122
|
+
* room is loaded in the interim. Default is false.
|
|
102
123
|
*/
|
|
103
|
-
setIntervalGameFrames(func: () => boolean, gameFrames: int, runImmediately: boolean): void;
|
|
124
|
+
setIntervalGameFrames(func: () => boolean, gameFrames: int, runImmediately: boolean, cancelIfRoomChanges?: boolean): void;
|
|
104
125
|
/**
|
|
105
126
|
* Supply a function to be repeatedly run on an interval of N render frames in the `POST_RENDER`
|
|
106
127
|
* callback. The function will continue to be fired until `false` is returned from the function.
|
|
@@ -118,7 +139,9 @@ export declare class RunInNFrames extends Feature {
|
|
|
118
139
|
* @param renderFrames The amount of game frames to wait between each run.
|
|
119
140
|
* @param runImmediately Whether or not to execute the function right now before waiting for the
|
|
120
141
|
* interval.
|
|
142
|
+
* @param cancelIfRoomChanges Optional. Whether or not to cancel running the function if a new
|
|
143
|
+
* room is loaded in the interim. Default is false.
|
|
121
144
|
*/
|
|
122
|
-
setIntervalRenderFrames(func: () => boolean, renderFrames: int, runImmediately: boolean): void;
|
|
145
|
+
setIntervalRenderFrames(func: () => boolean, renderFrames: int, runImmediately: boolean, cancelIfRoomChanges?: boolean): void;
|
|
123
146
|
}
|
|
124
147
|
//# sourceMappingURL=RunInNFrames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunInNFrames.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RunInNFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"RunInNFrames.d.ts","sourceRoot":"","sources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|
@@ -11,44 +11,61 @@ local ____cachedClasses = require("src.core.cachedClasses")
|
|
|
11
11
|
local game = ____cachedClasses.game
|
|
12
12
|
local ____decorators = require("src.decorators")
|
|
13
13
|
local Exported = ____decorators.Exported
|
|
14
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
15
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
14
16
|
local ____array = require("src.functions.array")
|
|
15
17
|
local arrayRemoveInPlace = ____array.arrayRemoveInPlace
|
|
16
18
|
local ____run = require("src.functions.run")
|
|
17
19
|
local restart = ____run.restart
|
|
18
20
|
local ____Feature = require("src.classes.private.Feature")
|
|
19
21
|
local Feature = ____Feature.Feature
|
|
20
|
-
function checkExecuteQueuedFunctions(self, frameCount,
|
|
22
|
+
function checkExecuteQueuedFunctions(self, functionTuples, frameCount, newNumRoomsEntered)
|
|
21
23
|
local firingFunctions = __TS__ArrayFilter(
|
|
22
24
|
functionTuples,
|
|
23
25
|
function(____, ____bindingPattern0)
|
|
24
26
|
local frameCountToFire
|
|
25
|
-
frameCountToFire = ____bindingPattern0
|
|
27
|
+
frameCountToFire = ____bindingPattern0.frameCountToFire
|
|
26
28
|
return frameCount >= frameCountToFire
|
|
27
29
|
end
|
|
28
30
|
)
|
|
29
|
-
for ____,
|
|
30
|
-
local
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
for ____, firingFunction in ipairs(firingFunctions) do
|
|
32
|
+
local func = firingFunction.func
|
|
33
|
+
local cancelIfRoomChanges = firingFunction.cancelIfRoomChanges
|
|
34
|
+
local numRoomsEntered = firingFunction.numRoomsEntered
|
|
35
|
+
if not cancelIfRoomChanges or numRoomsEntered == newNumRoomsEntered then
|
|
36
|
+
func(nil)
|
|
37
|
+
end
|
|
38
|
+
arrayRemoveInPlace(nil, functionTuples, firingFunction)
|
|
33
39
|
end
|
|
34
40
|
end
|
|
35
|
-
function checkExecuteIntervalFunctions(self, frameCount,
|
|
41
|
+
function checkExecuteIntervalFunctions(self, functionTuples, frameCount, newNumRoomsEntered)
|
|
36
42
|
local firingFunctions = __TS__ArrayFilter(
|
|
37
43
|
functionTuples,
|
|
38
44
|
function(____, ____bindingPattern0)
|
|
39
45
|
local frameCountToFire
|
|
40
|
-
frameCountToFire = ____bindingPattern0
|
|
46
|
+
frameCountToFire = ____bindingPattern0.frameCountToFire
|
|
41
47
|
return frameCount >= frameCountToFire
|
|
42
48
|
end
|
|
43
49
|
)
|
|
44
|
-
for ____,
|
|
45
|
-
local
|
|
46
|
-
local
|
|
47
|
-
|
|
50
|
+
for ____, firingFunction in ipairs(firingFunctions) do
|
|
51
|
+
local func = firingFunction.func
|
|
52
|
+
local cancelIfRoomChanges = firingFunction.cancelIfRoomChanges
|
|
53
|
+
local numRoomsEntered = firingFunction.numRoomsEntered
|
|
54
|
+
local numIntervalFrames = firingFunction.numIntervalFrames
|
|
55
|
+
local returnValue = false
|
|
56
|
+
if not cancelIfRoomChanges or numRoomsEntered == newNumRoomsEntered then
|
|
57
|
+
returnValue = func(nil)
|
|
58
|
+
end
|
|
59
|
+
arrayRemoveInPlace(nil, functionTuples, firingFunction)
|
|
48
60
|
if returnValue then
|
|
49
|
-
local
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
local newIntervalFunction = {
|
|
62
|
+
func = func,
|
|
63
|
+
frameCountToFire = frameCount + numIntervalFrames,
|
|
64
|
+
numRoomsEntered = numRoomsEntered,
|
|
65
|
+
cancelIfRoomChanges = cancelIfRoomChanges,
|
|
66
|
+
numIntervalFrames = numIntervalFrames
|
|
67
|
+
}
|
|
68
|
+
functionTuples[#functionTuples + 1] = newIntervalFunction
|
|
52
69
|
end
|
|
53
70
|
end
|
|
54
71
|
end
|
|
@@ -56,63 +73,99 @@ ____exports.RunInNFrames = __TS__Class()
|
|
|
56
73
|
local RunInNFrames = ____exports.RunInNFrames
|
|
57
74
|
RunInNFrames.name = "RunInNFrames"
|
|
58
75
|
__TS__ClassExtends(RunInNFrames, Feature)
|
|
59
|
-
function RunInNFrames.prototype.____constructor(self)
|
|
76
|
+
function RunInNFrames.prototype.____constructor(self, roomHistory)
|
|
60
77
|
Feature.prototype.____constructor(self)
|
|
61
|
-
self.v = {run = {
|
|
78
|
+
self.v = {run = {queuedGameFunctions = {}, queuedRenderFunctions = {}, intervalGameFunctions = {}, intervalRenderFunctions = {}}}
|
|
62
79
|
self.vConditionalFunc = function() return false end
|
|
63
80
|
self.postUpdate = function()
|
|
64
81
|
local gameFrameCount = game:GetFrameCount()
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
83
|
+
checkExecuteQueuedFunctions(nil, self.v.run.queuedGameFunctions, gameFrameCount, numRoomsEntered)
|
|
84
|
+
checkExecuteIntervalFunctions(nil, self.v.run.intervalGameFunctions, gameFrameCount, numRoomsEntered)
|
|
67
85
|
end
|
|
68
86
|
self.postRender = function()
|
|
69
87
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
89
|
+
checkExecuteQueuedFunctions(nil, self.v.run.queuedRenderFunctions, renderFrameCount, numRoomsEntered)
|
|
90
|
+
checkExecuteIntervalFunctions(nil, self.v.run.intervalRenderFunctions, renderFrameCount, numRoomsEntered)
|
|
72
91
|
end
|
|
92
|
+
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
73
93
|
self.callbacksUsed = {{ModCallback.POST_UPDATE, self.postUpdate}, {ModCallback.POST_RENDER, self.postRender}}
|
|
94
|
+
self.roomHistory = roomHistory
|
|
74
95
|
end
|
|
75
96
|
function RunInNFrames.prototype.restartNextRenderFrame(self, character)
|
|
76
97
|
self:runNextRenderFrame(function()
|
|
77
98
|
restart(nil, character)
|
|
78
99
|
end)
|
|
79
100
|
end
|
|
80
|
-
function RunInNFrames.prototype.runInNGameFrames(self, func, gameFrames)
|
|
101
|
+
function RunInNFrames.prototype.runInNGameFrames(self, func, gameFrames, cancelIfRoomChanges)
|
|
102
|
+
if cancelIfRoomChanges == nil then
|
|
103
|
+
cancelIfRoomChanges = false
|
|
104
|
+
end
|
|
81
105
|
local gameFrameCount = game:GetFrameCount()
|
|
82
|
-
local
|
|
83
|
-
local
|
|
84
|
-
local
|
|
85
|
-
|
|
106
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
107
|
+
local frameCountToFire = gameFrameCount + gameFrames
|
|
108
|
+
local queuedFunction = {func = func, frameCountToFire = frameCountToFire, numRoomsEntered = numRoomsEntered, cancelIfRoomChanges = cancelIfRoomChanges}
|
|
109
|
+
local ____self_v_run_queuedGameFunctions_0 = self.v.run.queuedGameFunctions
|
|
110
|
+
____self_v_run_queuedGameFunctions_0[#____self_v_run_queuedGameFunctions_0 + 1] = queuedFunction
|
|
86
111
|
end
|
|
87
|
-
function RunInNFrames.prototype.runInNRenderFrames(self, func, renderFrames)
|
|
112
|
+
function RunInNFrames.prototype.runInNRenderFrames(self, func, renderFrames, cancelIfRoomChanges)
|
|
113
|
+
if cancelIfRoomChanges == nil then
|
|
114
|
+
cancelIfRoomChanges = false
|
|
115
|
+
end
|
|
88
116
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
89
|
-
local
|
|
90
|
-
local
|
|
91
|
-
local
|
|
92
|
-
|
|
117
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
118
|
+
local frameCountToFire = renderFrameCount + renderFrames
|
|
119
|
+
local queuedFunction = {func = func, frameCountToFire = frameCountToFire, numRoomsEntered = numRoomsEntered, cancelIfRoomChanges = cancelIfRoomChanges}
|
|
120
|
+
local ____self_v_run_queuedRenderFunctions_1 = self.v.run.queuedRenderFunctions
|
|
121
|
+
____self_v_run_queuedRenderFunctions_1[#____self_v_run_queuedRenderFunctions_1 + 1] = queuedFunction
|
|
93
122
|
end
|
|
94
|
-
function RunInNFrames.prototype.runNextGameFrame(self, func)
|
|
95
|
-
|
|
123
|
+
function RunInNFrames.prototype.runNextGameFrame(self, func, cancelIfRoomChanges)
|
|
124
|
+
if cancelIfRoomChanges == nil then
|
|
125
|
+
cancelIfRoomChanges = false
|
|
126
|
+
end
|
|
127
|
+
self:runInNGameFrames(func, 1, cancelIfRoomChanges)
|
|
96
128
|
end
|
|
97
|
-
function RunInNFrames.prototype.runNextRenderFrame(self, func)
|
|
98
|
-
|
|
129
|
+
function RunInNFrames.prototype.runNextRenderFrame(self, func, cancelIfRoomChanges)
|
|
130
|
+
if cancelIfRoomChanges == nil then
|
|
131
|
+
cancelIfRoomChanges = false
|
|
132
|
+
end
|
|
133
|
+
self:runInNRenderFrames(func, 1, cancelIfRoomChanges)
|
|
99
134
|
end
|
|
100
|
-
function RunInNFrames.prototype.setIntervalGameFrames(self, func, gameFrames, runImmediately)
|
|
135
|
+
function RunInNFrames.prototype.setIntervalGameFrames(self, func, gameFrames, runImmediately, cancelIfRoomChanges)
|
|
136
|
+
if cancelIfRoomChanges == nil then
|
|
137
|
+
cancelIfRoomChanges = false
|
|
138
|
+
end
|
|
101
139
|
local gameFrameCount = game:GetFrameCount()
|
|
102
|
-
local
|
|
103
|
-
local
|
|
104
|
-
|
|
105
|
-
|
|
140
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
141
|
+
local intervalFunction = {
|
|
142
|
+
func = func,
|
|
143
|
+
frameCountToFire = gameFrameCount + gameFrames,
|
|
144
|
+
numRoomsEntered = numRoomsEntered,
|
|
145
|
+
cancelIfRoomChanges = cancelIfRoomChanges,
|
|
146
|
+
numIntervalFrames = gameFrames
|
|
147
|
+
}
|
|
148
|
+
local ____self_v_run_intervalGameFunctions_2 = self.v.run.intervalGameFunctions
|
|
149
|
+
____self_v_run_intervalGameFunctions_2[#____self_v_run_intervalGameFunctions_2 + 1] = intervalFunction
|
|
106
150
|
if runImmediately then
|
|
107
151
|
func(nil)
|
|
108
152
|
end
|
|
109
153
|
end
|
|
110
|
-
function RunInNFrames.prototype.setIntervalRenderFrames(self, func, renderFrames, runImmediately)
|
|
154
|
+
function RunInNFrames.prototype.setIntervalRenderFrames(self, func, renderFrames, runImmediately, cancelIfRoomChanges)
|
|
155
|
+
if cancelIfRoomChanges == nil then
|
|
156
|
+
cancelIfRoomChanges = false
|
|
157
|
+
end
|
|
111
158
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
112
|
-
local
|
|
113
|
-
local
|
|
114
|
-
|
|
115
|
-
|
|
159
|
+
local numRoomsEntered = self.roomHistory:getNumRoomsEntered()
|
|
160
|
+
local intervalFunction = {
|
|
161
|
+
func = func,
|
|
162
|
+
frameCountToFire = renderFrameCount + renderFrames,
|
|
163
|
+
numRoomsEntered = numRoomsEntered,
|
|
164
|
+
cancelIfRoomChanges = cancelIfRoomChanges,
|
|
165
|
+
numIntervalFrames = renderFrames
|
|
166
|
+
}
|
|
167
|
+
local ____self_v_run_intervalGameFunctions_3 = self.v.run.intervalGameFunctions
|
|
168
|
+
____self_v_run_intervalGameFunctions_3[#____self_v_run_intervalGameFunctions_3 + 1] = intervalFunction
|
|
116
169
|
if runImmediately then
|
|
117
170
|
func(nil)
|
|
118
171
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,yBAAy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B,CAAC,EAAE,eAAe,CAAC;IAC/C,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,aAAa,CAAC;IAC3C,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACrC,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,oBAAoB,CAAC;IAC1D,CAAC,UAAU,CAAC,4BAA4B,CAAC,EAAE,0BAA0B,CAAC;IACtE,CAAC,UAAU,CAAC,2BAA2B,CAAC,EAAE,wBAAwB,CAAC;IACnE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAC9C,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IACvC,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC;IAC3C,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC;IACxC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,eAAe,CAAC;IAChD,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,mBAAmB,CAAC;IACzD,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;IACjD,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;IACzC,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IACvC,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,qBAAqB,CAAC;CAC7D;AAKD,wBAAgB,WAAW,CACzB,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4KpC"}
|
package/dist/src/features.lua
CHANGED
|
@@ -132,10 +132,10 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
132
132
|
local preventCollectibleRotation = __TS__New(PreventCollectibleRotation)
|
|
133
133
|
local roomClearFrame = __TS__New(RoomClearFrame)
|
|
134
134
|
local roomHistory = __TS__New(RoomHistory)
|
|
135
|
-
local runInNFrames = __TS__New(RunInNFrames)
|
|
136
135
|
local runNextRoom = __TS__New(RunNextRoom)
|
|
137
136
|
local saveDataManager = __TS__New(SaveDataManager, mod)
|
|
138
137
|
local stageHistory = __TS__New(StageHistory)
|
|
138
|
+
local runInNFrames = __TS__New(RunInNFrames, roomHistory)
|
|
139
139
|
local customGridEntities = __TS__New(CustomGridEntities, runInNFrames)
|
|
140
140
|
local moddedElementSets = __TS__New(ModdedElementSets, moddedElementDetection)
|
|
141
141
|
local itemPoolDetection = __TS__New(ItemPoolDetection, moddedElementSets)
|
|
@@ -22,11 +22,12 @@ export interface CustomStageTSConfig {
|
|
|
22
22
|
* Mandatory. An arbitrarily chosen prefix in the range of 101-999 that will be unique to this
|
|
23
23
|
* stage.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* Use a value of 100 when testing locally. When publishing to the workshop or otherwise
|
|
26
|
+
* distributing your mod, make sure that you have chosen a prefix that does not conflict with any
|
|
27
|
+
* other mods. You can find a list of registered room variant prefixes on the IsaacScript website:
|
|
27
28
|
* https://isaacscript.github.io/main/custom-stages
|
|
28
29
|
*
|
|
29
|
-
* @minimum
|
|
30
|
+
* @minimum 100
|
|
30
31
|
* @maximum 999
|
|
31
32
|
*/
|
|
32
33
|
roomVariantPrefix: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomStageTSConfig.d.ts","sourceRoot":"","sources":["../../../src/interfaces/CustomStageTSConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB
|
|
1
|
+
{"version":3,"file":"CustomStageTSConfig.d.ts","sourceRoot":"","sources":["../../../src/interfaces/CustomSt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 @@ export class ModFeature {
|
|
|
90
90
|
| null = null;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Whether or not the feature has registered its callbacks yet
|
|
94
|
-
* save data manager, if any).
|
|
93
|
+
* Whether or not the feature has registered its callbacks yet.
|
|
95
94
|
*
|
|
96
95
|
* This will almost always be equal to true unless you explicitly passed `false` to the second
|
|
97
96
|
* argument of the constructor.
|
|
@@ -108,7 +107,7 @@ export class ModFeature {
|
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* Runs the `Mod.AddCallback` and `ModUpgraded.AddCallbackCustom` methods for all of the decorated
|
|
111
|
-
* callbacks.
|
|
110
|
+
* callbacks.
|
|
112
111
|
*
|
|
113
112
|
* @param init Optional. Whether to initialize or uninitialize. Default is true.
|
|
114
113
|
*/
|
|
@@ -134,8 +133,7 @@ export class ModFeature {
|
|
|
134
133
|
|
|
135
134
|
/**
|
|
136
135
|
* Runs the `Mod.RemoveCallback` and `ModUpgraded.RemoveCallbackCustom` methods for all of the
|
|
137
|
-
* decorated callbacks.
|
|
138
|
-
* present.
|
|
136
|
+
* decorated callbacks.
|
|
139
137
|
*
|
|
140
138
|
* This is just an alias for `ModFeature.init(false)`.
|
|
141
139
|
*/
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
EntityType,
|
|
17
17
|
ModCallback,
|
|
18
18
|
} from "isaac-typescript-definitions";
|
|
19
|
+
import { ISCFeature } from "../../../enums/ISCFeature";
|
|
19
20
|
import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
20
21
|
import { SlotDestructionType } from "../../../enums/SlotDestructionType";
|
|
21
22
|
import { isSlotMachine } from "../../../functions/slots";
|
|
@@ -36,6 +37,8 @@ export class SlotDestroyedDetection extends Feature {
|
|
|
36
37
|
constructor(postSlotDestroyed: PostSlotDestroyed, roomHistory: RoomHistory) {
|
|
37
38
|
super();
|
|
38
39
|
|
|
40
|
+
this.featuresUsed = [ISCFeature.ROOM_HISTORY];
|
|
41
|
+
|
|
39
42
|
this.callbacksUsed = [
|
|
40
43
|
// 67
|
|
41
44
|
[
|
|
@@ -68,14 +68,14 @@ export class RoomHistory extends Feature {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* Helper function to get the total number of rooms that the player has
|
|
72
|
-
* run.
|
|
71
|
+
* Helper function to get the total number of rooms that the player has entered thus far on the
|
|
72
|
+
* run. (Re-entering the same room will increment the number returned.)
|
|
73
73
|
*
|
|
74
74
|
* In order to use this function, you must upgrade your mod with `ISCFeature.ROOM_HISTORY`.
|
|
75
75
|
*/
|
|
76
76
|
@Exported
|
|
77
|
-
public
|
|
78
|
-
return this.v.run.roomHistory;
|
|
77
|
+
public getNumRoomsEntered(): int {
|
|
78
|
+
return this.v.run.roomHistory.length;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|