isaacscript-common 12.6.1 → 13.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 +18 -18
- package/dist/isaacscript-common.lua +19 -19
- package/dist/src/features/{registerHotkey.d.ts → setHotkey.d.ts} +4 -4
- package/dist/src/features/setHotkey.d.ts.map +1 -0
- package/dist/src/features/{registerHotkey.lua → setHotkey.lua} +5 -5
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +5 -5
- package/dist/src/initFeatures.lua +3 -3
- package/package.json +1 -1
- package/src/features/{registerHotkey.ts → setHotkey.ts} +5 -5
- package/src/index.ts +1 -1
- package/src/initFeatures.ts +2 -2
- package/dist/src/features/registerHotkey.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -9489,22 +9489,6 @@ export declare function registerCharacterStats(playerType: PlayerType, statMap:
|
|
|
9489
9489
|
*/
|
|
9490
9490
|
export declare function registerCustomPickup(pickupVariantCustom: PickupVariant, subType: int, collectFunc: (this: void, player: EntityPlayer) => void, collisionFunc?: (this: void, player: EntityPlayer) => boolean): void;
|
|
9491
9491
|
|
|
9492
|
-
/**
|
|
9493
|
-
* Helper function to run arbitrary code when you press and release a specific keyboard key.
|
|
9494
|
-
*
|
|
9495
|
-
* This can be used to easily set up custom hotkeys to facilitate custom game features or to assist
|
|
9496
|
-
* in debugging.
|
|
9497
|
-
*
|
|
9498
|
-
* @param keyboardOrFunc Either the key that you want to trigger the hotkey or a function that
|
|
9499
|
-
* returns the key that will trigger the hotkey. Normally, you would just
|
|
9500
|
-
* specify the key directly, but you can use a function for situations where
|
|
9501
|
-
* the key can change (like if end-users can specify a custom hotkey using Mod
|
|
9502
|
-
* Config Menu).
|
|
9503
|
-
* @param triggerFunc A function containing the arbitrary code that you want to execute when the
|
|
9504
|
-
* hotkey is triggered.
|
|
9505
|
-
*/
|
|
9506
|
-
export declare function registerHotkey(keyboardOrFunc: Keyboard | (() => Keyboard | undefined), triggerFunc: () => void): void;
|
|
9507
|
-
|
|
9508
9492
|
/**
|
|
9509
9493
|
* Helper function to reload the current room using `Game.StartRoomTransition`.
|
|
9510
9494
|
*
|
|
@@ -10887,6 +10871,22 @@ export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
|
|
|
10887
10871
|
*/
|
|
10888
10872
|
export declare function setHasPlayer(set: Set<PlayerIndex>, player: EntityPlayer): boolean;
|
|
10889
10873
|
|
|
10874
|
+
/**
|
|
10875
|
+
* Helper function to run arbitrary code when you press and release a specific keyboard key.
|
|
10876
|
+
*
|
|
10877
|
+
* This can be used to easily set up custom hotkeys to facilitate custom game features or to assist
|
|
10878
|
+
* in debugging.
|
|
10879
|
+
*
|
|
10880
|
+
* @param keyboardOrFunc Either the key that you want to trigger the hotkey or a function that
|
|
10881
|
+
* returns the key that will trigger the hotkey. Normally, you would just
|
|
10882
|
+
* specify the key directly, but you can use a function for situations where
|
|
10883
|
+
* the key can change (like if end-users can specify a custom hotkey using Mod
|
|
10884
|
+
* Config Menu).
|
|
10885
|
+
* @param triggerFunc A function containing the arbitrary code that you want to execute when the
|
|
10886
|
+
* hotkey is triggered.
|
|
10887
|
+
*/
|
|
10888
|
+
export declare function setHotkey(keyboardOrFunc: Keyboard | (() => Keyboard | undefined), triggerFunc: () => void): void;
|
|
10889
|
+
|
|
10890
10890
|
/**
|
|
10891
10891
|
* Supply a function to be repeatedly run on an interval of N game frames in the `POST_UPDATE`
|
|
10892
10892
|
* callback. The function will continue to be fired until `false` is returned from the function.
|
|
@@ -12123,11 +12123,11 @@ export declare const UI_HEART_WIDTH = 12;
|
|
|
12123
12123
|
export declare function unpause(): void;
|
|
12124
12124
|
|
|
12125
12125
|
/**
|
|
12126
|
-
* Helper function to remove a hotkey created with the `
|
|
12126
|
+
* Helper function to remove a hotkey created with the `setHotkey` function.
|
|
12127
12127
|
*
|
|
12128
12128
|
* @param keyboardOrFunc Equal to the value that you passed when initially registering the hotkey.
|
|
12129
12129
|
*/
|
|
12130
|
-
export declare function
|
|
12130
|
+
export declare function unsetHotkey(keyboardOrFunc: Keyboard | (() => Keyboard | undefined)): void;
|
|
12131
12131
|
|
|
12132
12132
|
/**
|
|
12133
12133
|
* Use this function to enable the custom callbacks and other optional features provided by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 13.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -42522,7 +42522,7 @@ function ____exports.preventChildEntities(self, entity)
|
|
|
42522
42522
|
end
|
|
42523
42523
|
return ____exports
|
|
42524
42524
|
end,
|
|
42525
|
-
["src.features.
|
|
42525
|
+
["src.features.setHotkey"] = function(...)
|
|
42526
42526
|
local ____lualib = require("lualib_bundle")
|
|
42527
42527
|
local Map = ____lualib.Map
|
|
42528
42528
|
local __TS__New = ____lualib.__TS__New
|
|
@@ -42563,14 +42563,14 @@ function checkIfTriggered(self, keyboard, triggerFunc)
|
|
|
42563
42563
|
triggerFunc(nil)
|
|
42564
42564
|
end
|
|
42565
42565
|
end
|
|
42566
|
-
local FEATURE_NAME = "
|
|
42566
|
+
local FEATURE_NAME = "setHotkey"
|
|
42567
42567
|
staticHotkeyFunctionMap = __TS__New(Map)
|
|
42568
42568
|
dynamicHotkeyFunctionMap = __TS__New(Map)
|
|
42569
42569
|
keyPressedMap = __TS__New(DefaultMap, false)
|
|
42570
|
-
function ____exports.
|
|
42570
|
+
function ____exports.setHotkeyInit(self, mod)
|
|
42571
42571
|
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
42572
42572
|
end
|
|
42573
|
-
function ____exports.
|
|
42573
|
+
function ____exports.setHotkey(self, keyboardOrFunc, triggerFunc)
|
|
42574
42574
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42575
42575
|
if isFunction(nil, keyboardOrFunc) then
|
|
42576
42576
|
if dynamicHotkeyFunctionMap:has(keyboardOrFunc) then
|
|
@@ -42584,7 +42584,7 @@ function ____exports.registerHotkey(self, keyboardOrFunc, triggerFunc)
|
|
|
42584
42584
|
staticHotkeyFunctionMap:set(keyboardOrFunc, triggerFunc)
|
|
42585
42585
|
end
|
|
42586
42586
|
end
|
|
42587
|
-
function ____exports.
|
|
42587
|
+
function ____exports.unsetHotkey(self, keyboardOrFunc)
|
|
42588
42588
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42589
42589
|
if isFunction(nil, keyboardOrFunc) then
|
|
42590
42590
|
if not dynamicHotkeyFunctionMap:has(keyboardOrFunc) then
|
|
@@ -42779,8 +42779,6 @@ local ____preventChildEntities = require("src.features.preventChildEntities")
|
|
|
42779
42779
|
local preventChildEntitiesInit = ____preventChildEntities.preventChildEntitiesInit
|
|
42780
42780
|
local ____preventCollectibleRotation = require("src.features.preventCollectibleRotation")
|
|
42781
42781
|
local preventCollectibleRotationInit = ____preventCollectibleRotation.preventCollectibleRotationInit
|
|
42782
|
-
local ____registerHotkey = require("src.features.registerHotkey")
|
|
42783
|
-
local registerHotkeyInit = ____registerHotkey.registerHotkeyInit
|
|
42784
42782
|
local ____roomClearFrame = require("src.features.roomClearFrame")
|
|
42785
42783
|
local roomClearFrameInit = ____roomClearFrame.roomClearFrameInit
|
|
42786
42784
|
local ____roomHistory = require("src.features.roomHistory")
|
|
@@ -42789,6 +42787,8 @@ local ____runInNFrames = require("src.features.runInNFrames")
|
|
|
42789
42787
|
local runInNFramesInit = ____runInNFrames.runInNFramesInit
|
|
42790
42788
|
local ____runNextRoom = require("src.features.runNextRoom")
|
|
42791
42789
|
local runNextRoomInit = ____runNextRoom.runNextRoomInit
|
|
42790
|
+
local ____setHotkey = require("src.features.setHotkey")
|
|
42791
|
+
local setHotkeyInit = ____setHotkey.setHotkeyInit
|
|
42792
42792
|
local ____sirenHelpers = require("src.features.sirenHelpers")
|
|
42793
42793
|
local sirenHelpersInit = ____sirenHelpers.sirenHelpersInit
|
|
42794
42794
|
local ____stageHistory = require("src.features.stageHistory")
|
|
@@ -42820,10 +42820,10 @@ function initFeaturesMinor(self, mod)
|
|
|
42820
42820
|
ponyDetectionInit(nil, mod)
|
|
42821
42821
|
preventChildEntitiesInit(nil, mod)
|
|
42822
42822
|
preventCollectibleRotationInit(nil, mod)
|
|
42823
|
-
registerHotkeyInit(nil, mod)
|
|
42824
42823
|
roomClearFrameInit(nil, mod)
|
|
42825
42824
|
roomHistoryInit(nil, mod)
|
|
42826
42825
|
runNextRoomInit(nil, mod)
|
|
42826
|
+
setHotkeyInit(nil, mod)
|
|
42827
42827
|
sirenHelpersInit(nil, mod)
|
|
42828
42828
|
stageHistoryInit(nil, mod)
|
|
42829
42829
|
taintedLazarusPlayersInit(nil, mod)
|
|
@@ -50121,7 +50121,7 @@ do
|
|
|
50121
50121
|
end
|
|
50122
50122
|
end
|
|
50123
50123
|
do
|
|
50124
|
-
local ____export = require("src.features.
|
|
50124
|
+
local ____export = require("src.features.roomClearFrame")
|
|
50125
50125
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50126
50126
|
if ____exportKey ~= "default" then
|
|
50127
50127
|
____exports[____exportKey] = ____exportValue
|
|
@@ -50129,7 +50129,7 @@ do
|
|
|
50129
50129
|
end
|
|
50130
50130
|
end
|
|
50131
50131
|
do
|
|
50132
|
-
local ____export = require("src.features.
|
|
50132
|
+
local ____export = require("src.features.roomHistory")
|
|
50133
50133
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50134
50134
|
if ____exportKey ~= "default" then
|
|
50135
50135
|
____exports[____exportKey] = ____exportValue
|
|
@@ -50137,7 +50137,7 @@ do
|
|
|
50137
50137
|
end
|
|
50138
50138
|
end
|
|
50139
50139
|
do
|
|
50140
|
-
local ____export = require("src.features.
|
|
50140
|
+
local ____export = require("src.features.runInNFrames")
|
|
50141
50141
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50142
50142
|
if ____exportKey ~= "default" then
|
|
50143
50143
|
____exports[____exportKey] = ____exportValue
|
|
@@ -50145,7 +50145,7 @@ do
|
|
|
50145
50145
|
end
|
|
50146
50146
|
end
|
|
50147
50147
|
do
|
|
50148
|
-
local ____export = require("src.features.
|
|
50148
|
+
local ____export = require("src.features.saveDataManager.exports")
|
|
50149
50149
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50150
50150
|
if ____exportKey ~= "default" then
|
|
50151
50151
|
____exports[____exportKey] = ____exportValue
|
|
@@ -50153,7 +50153,7 @@ do
|
|
|
50153
50153
|
end
|
|
50154
50154
|
end
|
|
50155
50155
|
do
|
|
50156
|
-
local ____export = require("src.features.
|
|
50156
|
+
local ____export = require("src.features.setHotkey")
|
|
50157
50157
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50158
50158
|
if ____exportKey ~= "default" then
|
|
50159
50159
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51397,7 +51397,7 @@ do
|
|
|
51397
51397
|
end
|
|
51398
51398
|
end
|
|
51399
51399
|
do
|
|
51400
|
-
local ____export = require("src.features.
|
|
51400
|
+
local ____export = require("src.features.roomClearFrame")
|
|
51401
51401
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51402
51402
|
if ____exportKey ~= "default" then
|
|
51403
51403
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51405,7 +51405,7 @@ do
|
|
|
51405
51405
|
end
|
|
51406
51406
|
end
|
|
51407
51407
|
do
|
|
51408
|
-
local ____export = require("src.features.
|
|
51408
|
+
local ____export = require("src.features.roomHistory")
|
|
51409
51409
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51410
51410
|
if ____exportKey ~= "default" then
|
|
51411
51411
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51413,7 +51413,7 @@ do
|
|
|
51413
51413
|
end
|
|
51414
51414
|
end
|
|
51415
51415
|
do
|
|
51416
|
-
local ____export = require("src.features.
|
|
51416
|
+
local ____export = require("src.features.runInNFrames")
|
|
51417
51417
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51418
51418
|
if ____exportKey ~= "default" then
|
|
51419
51419
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51421,7 +51421,7 @@ do
|
|
|
51421
51421
|
end
|
|
51422
51422
|
end
|
|
51423
51423
|
do
|
|
51424
|
-
local ____export = require("src.features.
|
|
51424
|
+
local ____export = require("src.features.saveDataManager.exports")
|
|
51425
51425
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51426
51426
|
if ____exportKey ~= "default" then
|
|
51427
51427
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51429,7 +51429,7 @@ do
|
|
|
51429
51429
|
end
|
|
51430
51430
|
end
|
|
51431
51431
|
do
|
|
51432
|
-
local ____export = require("src.features.
|
|
51432
|
+
local ____export = require("src.features.setHotkey")
|
|
51433
51433
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51434
51434
|
if ____exportKey ~= "default" then
|
|
51435
51435
|
____exports[____exportKey] = ____exportValue
|
|
@@ -13,11 +13,11 @@ import { Keyboard } from "isaac-typescript-definitions";
|
|
|
13
13
|
* @param triggerFunc A function containing the arbitrary code that you want to execute when the
|
|
14
14
|
* hotkey is triggered.
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function setHotkey(keyboardOrFunc: Keyboard | (() => Keyboard | undefined), triggerFunc: () => void): void;
|
|
17
17
|
/**
|
|
18
|
-
* Helper function to remove a hotkey created with the `
|
|
18
|
+
* Helper function to remove a hotkey created with the `setHotkey` function.
|
|
19
19
|
*
|
|
20
20
|
* @param keyboardOrFunc Equal to the value that you passed when initially registering the hotkey.
|
|
21
21
|
*/
|
|
22
|
-
export declare function
|
|
23
|
-
//# sourceMappingURL=
|
|
22
|
+
export declare function unsetHotkey(keyboardOrFunc: Keyboard | (() => Keyboard | undefined)): void;
|
|
23
|
+
//# sourceMappingURL=setHotkey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setHotkey.d.ts","sourceRoot":"","sources":["../../../src/features/setHotkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,8BAA8B,CAAC;AAyDrE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,EACvD,WAAW,EAAE,MAAM,IAAI,GACtB,IAAI,CAoBN;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,GACtD,IAAI,CAoBN"}
|
|
@@ -38,13 +38,13 @@ function checkIfTriggered(self, keyboard, triggerFunc)
|
|
|
38
38
|
triggerFunc(nil)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
-
local FEATURE_NAME = "
|
|
41
|
+
local FEATURE_NAME = "setHotkey"
|
|
42
42
|
staticHotkeyFunctionMap = __TS__New(Map)
|
|
43
43
|
dynamicHotkeyFunctionMap = __TS__New(Map)
|
|
44
44
|
keyPressedMap = __TS__New(DefaultMap, false)
|
|
45
45
|
---
|
|
46
46
|
-- @internal
|
|
47
|
-
function ____exports.
|
|
47
|
+
function ____exports.setHotkeyInit(self, mod)
|
|
48
48
|
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
49
49
|
end
|
|
50
50
|
--- Helper function to run arbitrary code when you press and release a specific keyboard key.
|
|
@@ -59,7 +59,7 @@ end
|
|
|
59
59
|
-- Config Menu).
|
|
60
60
|
-- @param triggerFunc A function containing the arbitrary code that you want to execute when the
|
|
61
61
|
-- hotkey is triggered.
|
|
62
|
-
function ____exports.
|
|
62
|
+
function ____exports.setHotkey(self, keyboardOrFunc, triggerFunc)
|
|
63
63
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
64
64
|
if isFunction(nil, keyboardOrFunc) then
|
|
65
65
|
if dynamicHotkeyFunctionMap:has(keyboardOrFunc) then
|
|
@@ -73,10 +73,10 @@ function ____exports.registerHotkey(self, keyboardOrFunc, triggerFunc)
|
|
|
73
73
|
staticHotkeyFunctionMap:set(keyboardOrFunc, triggerFunc)
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
|
-
--- Helper function to remove a hotkey created with the `
|
|
76
|
+
--- Helper function to remove a hotkey created with the `setHotkey` function.
|
|
77
77
|
--
|
|
78
78
|
-- @param keyboardOrFunc Equal to the value that you passed when initially registering the hotkey.
|
|
79
|
-
function ____exports.
|
|
79
|
+
function ____exports.unsetHotkey(self, keyboardOrFunc)
|
|
80
80
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
81
81
|
if isFunction(nil, keyboardOrFunc) then
|
|
82
82
|
if not dynamicHotkeyFunctionMap:has(keyboardOrFunc) then
|
package/dist/src/index.d.ts
CHANGED
|
@@ -38,11 +38,11 @@ export * from "./features/playerInventory";
|
|
|
38
38
|
export * from "./features/ponyDetection";
|
|
39
39
|
export * from "./features/preventChildEntities";
|
|
40
40
|
export * from "./features/preventCollectibleRotation";
|
|
41
|
-
export * from "./features/registerHotkey";
|
|
42
41
|
export * from "./features/roomClearFrame";
|
|
43
42
|
export * from "./features/roomHistory";
|
|
44
43
|
export * from "./features/runInNFrames";
|
|
45
44
|
export * from "./features/saveDataManager/exports";
|
|
45
|
+
export * from "./features/setHotkey";
|
|
46
46
|
export * from "./features/sirenHelpers";
|
|
47
47
|
export * from "./features/stageHistory";
|
|
48
48
|
export * from "./features/taintedLazarusPlayers";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CA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C;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
package/dist/src/index.lua
CHANGED
|
@@ -320,7 +320,7 @@ do
|
|
|
320
320
|
end
|
|
321
321
|
end
|
|
322
322
|
do
|
|
323
|
-
local ____export = require("src.features.
|
|
323
|
+
local ____export = require("src.features.roomClearFrame")
|
|
324
324
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
325
325
|
if ____exportKey ~= "default" then
|
|
326
326
|
____exports[____exportKey] = ____exportValue
|
|
@@ -328,7 +328,7 @@ do
|
|
|
328
328
|
end
|
|
329
329
|
end
|
|
330
330
|
do
|
|
331
|
-
local ____export = require("src.features.
|
|
331
|
+
local ____export = require("src.features.roomHistory")
|
|
332
332
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
333
333
|
if ____exportKey ~= "default" then
|
|
334
334
|
____exports[____exportKey] = ____exportValue
|
|
@@ -336,7 +336,7 @@ do
|
|
|
336
336
|
end
|
|
337
337
|
end
|
|
338
338
|
do
|
|
339
|
-
local ____export = require("src.features.
|
|
339
|
+
local ____export = require("src.features.runInNFrames")
|
|
340
340
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
341
341
|
if ____exportKey ~= "default" then
|
|
342
342
|
____exports[____exportKey] = ____exportValue
|
|
@@ -344,7 +344,7 @@ do
|
|
|
344
344
|
end
|
|
345
345
|
end
|
|
346
346
|
do
|
|
347
|
-
local ____export = require("src.features.
|
|
347
|
+
local ____export = require("src.features.saveDataManager.exports")
|
|
348
348
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
349
349
|
if ____exportKey ~= "default" then
|
|
350
350
|
____exports[____exportKey] = ____exportValue
|
|
@@ -352,7 +352,7 @@ do
|
|
|
352
352
|
end
|
|
353
353
|
end
|
|
354
354
|
do
|
|
355
|
-
local ____export = require("src.features.
|
|
355
|
+
local ____export = require("src.features.setHotkey")
|
|
356
356
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
357
357
|
if ____exportKey ~= "default" then
|
|
358
358
|
____exports[____exportKey] = ____exportValue
|
|
@@ -42,8 +42,6 @@ local ____preventChildEntities = require("src.features.preventChildEntities")
|
|
|
42
42
|
local preventChildEntitiesInit = ____preventChildEntities.preventChildEntitiesInit
|
|
43
43
|
local ____preventCollectibleRotation = require("src.features.preventCollectibleRotation")
|
|
44
44
|
local preventCollectibleRotationInit = ____preventCollectibleRotation.preventCollectibleRotationInit
|
|
45
|
-
local ____registerHotkey = require("src.features.registerHotkey")
|
|
46
|
-
local registerHotkeyInit = ____registerHotkey.registerHotkeyInit
|
|
47
45
|
local ____roomClearFrame = require("src.features.roomClearFrame")
|
|
48
46
|
local roomClearFrameInit = ____roomClearFrame.roomClearFrameInit
|
|
49
47
|
local ____roomHistory = require("src.features.roomHistory")
|
|
@@ -52,6 +50,8 @@ local ____runInNFrames = require("src.features.runInNFrames")
|
|
|
52
50
|
local runInNFramesInit = ____runInNFrames.runInNFramesInit
|
|
53
51
|
local ____runNextRoom = require("src.features.runNextRoom")
|
|
54
52
|
local runNextRoomInit = ____runNextRoom.runNextRoomInit
|
|
53
|
+
local ____setHotkey = require("src.features.setHotkey")
|
|
54
|
+
local setHotkeyInit = ____setHotkey.setHotkeyInit
|
|
55
55
|
local ____sirenHelpers = require("src.features.sirenHelpers")
|
|
56
56
|
local sirenHelpersInit = ____sirenHelpers.sirenHelpersInit
|
|
57
57
|
local ____stageHistory = require("src.features.stageHistory")
|
|
@@ -83,10 +83,10 @@ function initFeaturesMinor(self, mod)
|
|
|
83
83
|
ponyDetectionInit(nil, mod)
|
|
84
84
|
preventChildEntitiesInit(nil, mod)
|
|
85
85
|
preventCollectibleRotationInit(nil, mod)
|
|
86
|
-
registerHotkeyInit(nil, mod)
|
|
87
86
|
roomClearFrameInit(nil, mod)
|
|
88
87
|
roomHistoryInit(nil, mod)
|
|
89
88
|
runNextRoomInit(nil, mod)
|
|
89
|
+
setHotkeyInit(nil, mod)
|
|
90
90
|
sirenHelpersInit(nil, mod)
|
|
91
91
|
stageHistoryInit(nil, mod)
|
|
92
92
|
taintedLazarusPlayersInit(nil, mod)
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
|
4
4
|
import { isKeyboardPressed } from "../functions/input";
|
|
5
5
|
import { isFunction } from "../functions/types";
|
|
6
6
|
|
|
7
|
-
const FEATURE_NAME = "
|
|
7
|
+
const FEATURE_NAME = "setHotkey";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The keys are the keyboard keys that trigger the hotkey. The values are the functions that contain
|
|
@@ -24,7 +24,7 @@ const dynamicHotkeyFunctionMap = new Map<
|
|
|
24
24
|
const keyPressedMap = new DefaultMap<Keyboard, boolean>(false);
|
|
25
25
|
|
|
26
26
|
/** @internal */
|
|
27
|
-
export function
|
|
27
|
+
export function setHotkeyInit(mod: Mod): void {
|
|
28
28
|
mod.AddCallback(ModCallback.POST_RENDER, postRender); // 2
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -69,7 +69,7 @@ function checkIfTriggered(keyboard: Keyboard, triggerFunc: () => void) {
|
|
|
69
69
|
* @param triggerFunc A function containing the arbitrary code that you want to execute when the
|
|
70
70
|
* hotkey is triggered.
|
|
71
71
|
*/
|
|
72
|
-
export function
|
|
72
|
+
export function setHotkey(
|
|
73
73
|
keyboardOrFunc: Keyboard | (() => Keyboard | undefined),
|
|
74
74
|
triggerFunc: () => void,
|
|
75
75
|
): void {
|
|
@@ -95,11 +95,11 @@ export function registerHotkey(
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* Helper function to remove a hotkey created with the `
|
|
98
|
+
* Helper function to remove a hotkey created with the `setHotkey` function.
|
|
99
99
|
*
|
|
100
100
|
* @param keyboardOrFunc Equal to the value that you passed when initially registering the hotkey.
|
|
101
101
|
*/
|
|
102
|
-
export function
|
|
102
|
+
export function unsetHotkey(
|
|
103
103
|
keyboardOrFunc: Keyboard | (() => Keyboard | undefined),
|
|
104
104
|
): void {
|
|
105
105
|
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
package/src/index.ts
CHANGED
|
@@ -38,11 +38,11 @@ export * from "./features/playerInventory";
|
|
|
38
38
|
export * from "./features/ponyDetection";
|
|
39
39
|
export * from "./features/preventChildEntities";
|
|
40
40
|
export * from "./features/preventCollectibleRotation";
|
|
41
|
-
export * from "./features/registerHotkey";
|
|
42
41
|
export * from "./features/roomClearFrame";
|
|
43
42
|
export * from "./features/roomHistory";
|
|
44
43
|
export * from "./features/runInNFrames";
|
|
45
44
|
export * from "./features/saveDataManager/exports";
|
|
45
|
+
export * from "./features/setHotkey";
|
|
46
46
|
export * from "./features/sirenHelpers";
|
|
47
47
|
export * from "./features/stageHistory";
|
|
48
48
|
export * from "./features/taintedLazarusPlayers";
|
package/src/initFeatures.ts
CHANGED
|
@@ -20,11 +20,11 @@ import { playerInventoryInit } from "./features/playerInventory";
|
|
|
20
20
|
import { ponyDetectionInit } from "./features/ponyDetection";
|
|
21
21
|
import { preventChildEntitiesInit } from "./features/preventChildEntities";
|
|
22
22
|
import { preventCollectibleRotationInit } from "./features/preventCollectibleRotation";
|
|
23
|
-
import { registerHotkeyInit } from "./features/registerHotkey";
|
|
24
23
|
import { roomClearFrameInit } from "./features/roomClearFrame";
|
|
25
24
|
import { roomHistoryInit } from "./features/roomHistory";
|
|
26
25
|
import { runInNFramesInit } from "./features/runInNFrames";
|
|
27
26
|
import { runNextRoomInit } from "./features/runNextRoom";
|
|
27
|
+
import { setHotkeyInit } from "./features/setHotkey";
|
|
28
28
|
import { sirenHelpersInit } from "./features/sirenHelpers";
|
|
29
29
|
import { stageHistoryInit } from "./features/stageHistory";
|
|
30
30
|
import { taintedLazarusPlayersInit } from "./features/taintedLazarusPlayers";
|
|
@@ -60,10 +60,10 @@ function initFeaturesMinor(mod: ModUpgraded) {
|
|
|
60
60
|
ponyDetectionInit(mod);
|
|
61
61
|
preventChildEntitiesInit(mod);
|
|
62
62
|
preventCollectibleRotationInit(mod);
|
|
63
|
-
registerHotkeyInit(mod);
|
|
64
63
|
roomClearFrameInit(mod);
|
|
65
64
|
roomHistoryInit(mod);
|
|
66
65
|
runNextRoomInit(mod);
|
|
66
|
+
setHotkeyInit(mod);
|
|
67
67
|
sirenHelpersInit(mod);
|
|
68
68
|
stageHistoryInit(mod);
|
|
69
69
|
taintedLazarusPlayersInit(mod);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerHotkey.d.ts","sourceRoot":"","sources":["../../../src/features/registerHotkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,8BAA8B,CAAC;AAyDrE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,EACvD,WAAW,EAAE,MAAM,IAAI,GACtB,IAAI,CAoBN;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,QAAQ,GAAG,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,GACtD,IAAI,CAoBN"}
|