isaacscript-common 16.1.4 → 16.1.6
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/isaacscript-common.lua +5 -4
- package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
- package/dist/src/classes/features/other/DisableInputs.lua +1 -0
- package/dist/src/functions/doors.d.ts.map +1 -1
- package/dist/src/functions/doors.lua +3 -3
- package/package.json +1 -1
- package/src/classes/features/other/DisableInputs.ts +7 -0
- package/src/functions/doors.ts +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 16.1.
|
|
3
|
+
isaacscript-common 16.1.6
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -20041,9 +20041,8 @@ local Set = ____lualib.Set
|
|
|
20041
20041
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
20042
20042
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
20043
20043
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
20044
|
-
local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
|
|
20045
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
20046
20044
|
local __TS__New = ____lualib.__TS__New
|
|
20045
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
20047
20046
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
20048
20047
|
local ____exports = {}
|
|
20049
20048
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
@@ -20099,6 +20098,7 @@ function ____exports.getDoors(self, ...)
|
|
|
20099
20098
|
local roomTypes = {...}
|
|
20100
20099
|
local room = game:GetRoom()
|
|
20101
20100
|
local roomShape = room:GetRoomShape()
|
|
20101
|
+
local roomTypesSet = __TS__New(Set, roomTypes)
|
|
20102
20102
|
local possibleDoorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
20103
20103
|
local doors = {}
|
|
20104
20104
|
for ____, doorSlot in __TS__Iterator(possibleDoorSlots) do
|
|
@@ -20111,7 +20111,7 @@ function ____exports.getDoors(self, ...)
|
|
|
20111
20111
|
if gridEntityType ~= GridEntityType.DOOR then
|
|
20112
20112
|
goto __continue25
|
|
20113
20113
|
end
|
|
20114
|
-
if
|
|
20114
|
+
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
20115
20115
|
doors[#doors + 1] = door
|
|
20116
20116
|
end
|
|
20117
20117
|
end
|
|
@@ -35357,6 +35357,7 @@ __TS__ClassExtends(DisableInputs, Feature)
|
|
|
35357
35357
|
function DisableInputs.prototype.____constructor(self)
|
|
35358
35358
|
Feature.prototype.____constructor(self)
|
|
35359
35359
|
self.v = {run = {
|
|
35360
|
+
__ignoreGlowingHourGlass = true,
|
|
35360
35361
|
disableInputs = __TS__New(Map),
|
|
35361
35362
|
enableAllInputsWithBlacklistMap = __TS__New(Map),
|
|
35362
35363
|
disableAllInputsWithWhitelistMap = __TS__New(Map)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IAiDxC,OAAO,CAAC,eAAe,CAIsB;IAG7C,OAAO,CAAC,iBAAiB,CAIoB;IAG7C,OAAO,CAAC,cAAc,CAIwB;IAE9C,OAAO,CAAC,cAAc;IAwBtB;;;;;;;;OAQG;IAEI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzC;;;;;;;;;;;;;OAaG;IAEI,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;IAKzE;;;;;;;;;;OAUG;IAEI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;;;;;;;;OAWG;IAEI,wBAAwB,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,yBAAyB,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;;;;;;;OAUG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAIhD"}
|
|
@@ -24,6 +24,7 @@ __TS__ClassExtends(DisableInputs, Feature)
|
|
|
24
24
|
function DisableInputs.prototype.____constructor(self)
|
|
25
25
|
Feature.prototype.____constructor(self)
|
|
26
26
|
self.v = {run = {
|
|
27
|
+
__ignoreGlowingHourGlass = true,
|
|
27
28
|
disableInputs = __TS__New(Map),
|
|
28
29
|
enableAllInputsWithBlacklistMap = __TS__New(Map),
|
|
29
30
|
disableAllInputsWithWhitelistMap = __TS__New(Map)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,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KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
|
|
@@ -3,9 +3,8 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
4
4
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
5
5
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
6
|
-
local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
|
|
7
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
8
6
|
local __TS__New = ____lualib.__TS__New
|
|
7
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
9
8
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
10
9
|
local ____exports = {}
|
|
11
10
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
@@ -70,6 +69,7 @@ function ____exports.getDoors(self, ...)
|
|
|
70
69
|
local roomTypes = {...}
|
|
71
70
|
local room = game:GetRoom()
|
|
72
71
|
local roomShape = room:GetRoomShape()
|
|
72
|
+
local roomTypesSet = __TS__New(Set, roomTypes)
|
|
73
73
|
local possibleDoorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
74
74
|
local doors = {}
|
|
75
75
|
for ____, doorSlot in __TS__Iterator(possibleDoorSlots) do
|
|
@@ -82,7 +82,7 @@ function ____exports.getDoors(self, ...)
|
|
|
82
82
|
if gridEntityType ~= GridEntityType.DOOR then
|
|
83
83
|
goto __continue25
|
|
84
84
|
end
|
|
85
|
-
if
|
|
85
|
+
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
86
86
|
doors[#doors + 1] = door
|
|
87
87
|
end
|
|
88
88
|
end
|
package/package.json
CHANGED
|
@@ -11,6 +11,13 @@ export class DisableInputs extends Feature {
|
|
|
11
11
|
/** @internal */
|
|
12
12
|
public override v = {
|
|
13
13
|
run: {
|
|
14
|
+
/**
|
|
15
|
+
* Glowing Hour Glass support is disabled by default since it can cause bugs with
|
|
16
|
+
* extra-gameplay features. (For example, whether the player should be able to move or not
|
|
17
|
+
* should often not be reset by the Glowing Hour Glass.)
|
|
18
|
+
*/
|
|
19
|
+
__ignoreGlowingHourGlass: true,
|
|
20
|
+
|
|
14
21
|
/** Indexed by the requesting feature key. */
|
|
15
22
|
disableInputs: new Map<string, ReadonlySet<ButtonAction>>(),
|
|
16
23
|
|
package/src/functions/doors.ts
CHANGED
|
@@ -186,6 +186,10 @@ export function getDoorSlotsForRoomShape(
|
|
|
186
186
|
export function getDoors(...roomTypes: RoomType[]): GridEntityDoor[] {
|
|
187
187
|
const room = game.GetRoom();
|
|
188
188
|
const roomShape = room.GetRoomShape();
|
|
189
|
+
const roomTypesSet = new Set(roomTypes);
|
|
190
|
+
|
|
191
|
+
// We iterate over the possible door slots for this room shape instead of all door slots in order
|
|
192
|
+
// to prevent crashes from accessing invalid memory.
|
|
189
193
|
const possibleDoorSlots = getDoorSlotsForRoomShape(roomShape);
|
|
190
194
|
|
|
191
195
|
const doors: GridEntityDoor[] = [];
|
|
@@ -201,7 +205,7 @@ export function getDoors(...roomTypes: RoomType[]): GridEntityDoor[] {
|
|
|
201
205
|
continue;
|
|
202
206
|
}
|
|
203
207
|
|
|
204
|
-
if (
|
|
208
|
+
if (roomTypesSet.size === 0 || roomTypesSet.has(door.TargetRoomType)) {
|
|
205
209
|
doors.push(door);
|
|
206
210
|
}
|
|
207
211
|
}
|