isaacscript-common 87.7.0 → 87.8.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/classes/ModUpgraded.lua +4 -4
- package/dist/classes/callbacks/InputActionFilter.lua +2 -2
- package/dist/classes/callbacks/InputActionPlayer.lua +2 -2
- package/dist/classes/callbacks/PostCollectibleEmpty.lua +2 -2
- package/dist/classes/callbacks/PostCursedTeleport.lua +2 -2
- package/dist/classes/callbacks/PostCustomRevive.lua +2 -2
- package/dist/classes/callbacks/PostDiceRoomActivated.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCollision.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCustomCollision.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCustomRemove.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityRemove.lua +2 -2
- package/dist/classes/callbacks/PostItemDischarge.lua +2 -2
- package/dist/classes/callbacks/PostKeyboardChanged.lua +2 -2
- package/dist/classes/callbacks/PostPickupSelectionFilter.lua +2 -2
- package/dist/classes/callbacks/PostPurchase.lua +2 -2
- package/dist/classes/callbacks/PostRoomClearChanged.lua +2 -2
- package/dist/classes/callbacks/PostTransformation.lua +2 -2
- package/dist/classes/callbacks/PreEntitySpawnFilter.lua +2 -2
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.lua +2 -2
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.lua +2 -2
- package/dist/classes/features/other/DeployJSONRoom.lua +1 -1
- package/dist/classes/features/other/ExtraConsoleCommands.lua +1 -1
- package/dist/classes/features/other/NoSirenSteal.lua +1 -1
- package/dist/classes/features/other/PersistentEntities.lua +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +5 -5
- package/dist/functions/array.js +1 -1
- package/dist/functions/array.lua +2 -2
- package/dist/functions/bitSet128.lua +10 -6
- package/dist/functions/color.lua +10 -6
- package/dist/functions/doors.lua +1 -1
- package/dist/functions/entities.lua +8 -4
- package/dist/functions/globals.lua +1 -1
- package/dist/functions/gridEntities.lua +1 -1
- package/dist/functions/input.lua +1 -1
- package/dist/functions/kColor.lua +10 -6
- package/dist/functions/rng.lua +10 -6
- package/dist/functions/roomShapeWalls.lua +5 -5
- package/dist/functions/vector.lua +10 -6
- package/dist/functions/weighted.lua +1 -1
- package/dist/isaacscript-common.lua +179 -155
- package/dist/maps/entityTypeVariantToBossIDMap.lua +1 -1
- package/dist/shouldFire.lua +56 -56
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +7 -10
- package/src/functions/array.ts +1 -1
|
@@ -17,7 +17,7 @@ ____exports.ENTITY_TYPE_VARIANT_TO_BOSS_ID_MAP = __TS__New(
|
|
|
17
17
|
bossIDRaw = ____bindingPattern0[1]
|
|
18
18
|
entityTypeVariant = ____bindingPattern0[2]
|
|
19
19
|
local bossID = bossIDRaw
|
|
20
|
-
local entityType, variant = table.unpack(entityTypeVariant)
|
|
20
|
+
local entityType, variant = table.unpack(entityTypeVariant, 1, 2)
|
|
21
21
|
local entityTypeVariantString = (tostring(entityType) .. ".") .. tostring(variant)
|
|
22
22
|
return {entityTypeVariantString, bossID}
|
|
23
23
|
end
|
package/dist/shouldFire.lua
CHANGED
|
@@ -1,153 +1,153 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
function ____exports.shouldFireAmbush(self, fireArgs, optionalArgs)
|
|
3
|
-
local ambushType = table.unpack(fireArgs)
|
|
4
|
-
local callbackAmbushType = table.unpack(optionalArgs)
|
|
3
|
+
local ambushType = table.unpack(fireArgs, 1, 1)
|
|
4
|
+
local callbackAmbushType = table.unpack(optionalArgs, 1, 1)
|
|
5
5
|
return callbackAmbushType == nil or callbackAmbushType == ambushType
|
|
6
6
|
end
|
|
7
7
|
function ____exports.shouldFireBomb(self, fireArgs, optionalArgs)
|
|
8
|
-
local bomb = table.unpack(fireArgs)
|
|
9
|
-
local callbackBombVariant, callbackSubType = table.unpack(optionalArgs)
|
|
8
|
+
local bomb = table.unpack(fireArgs, 1, 1)
|
|
9
|
+
local callbackBombVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
10
10
|
return (callbackBombVariant == nil or callbackBombVariant == bomb.Variant) and (callbackSubType == nil or callbackSubType == bomb.SubType)
|
|
11
11
|
end
|
|
12
12
|
function ____exports.shouldFireBoolean(self, fireArgs, optionalArgs)
|
|
13
|
-
local fireArg = table.unpack(fireArgs)
|
|
14
|
-
local optionalArg = table.unpack(optionalArgs)
|
|
13
|
+
local fireArg = table.unpack(fireArgs, 1, 1)
|
|
14
|
+
local optionalArg = table.unpack(optionalArgs, 1, 1)
|
|
15
15
|
return optionalArg == nil or optionalArg == fireArg
|
|
16
16
|
end
|
|
17
17
|
function ____exports.shouldFireCollectibleType(self, fireArgs, optionalArgs)
|
|
18
|
-
local _player, collectibleType = table.unpack(fireArgs)
|
|
19
|
-
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
18
|
+
local _player, collectibleType = table.unpack(fireArgs, 1, 2)
|
|
19
|
+
local callbackCollectibleType = table.unpack(optionalArgs, 1, 1)
|
|
20
20
|
return callbackCollectibleType == nil or callbackCollectibleType == collectibleType
|
|
21
21
|
end
|
|
22
22
|
function ____exports.shouldFireDoor(self, fireArgs, optionalArgs)
|
|
23
|
-
local door = table.unpack(fireArgs)
|
|
24
|
-
local callbackDoorVariant = table.unpack(optionalArgs)
|
|
23
|
+
local door = table.unpack(fireArgs, 1, 1)
|
|
24
|
+
local callbackDoorVariant = table.unpack(optionalArgs, 1, 1)
|
|
25
25
|
local doorVariant = door:GetVariant()
|
|
26
26
|
return callbackDoorVariant == nil or callbackDoorVariant == doorVariant
|
|
27
27
|
end
|
|
28
28
|
function ____exports.shouldFireEffect(self, fireArgs, optionalArgs)
|
|
29
|
-
local effect = table.unpack(fireArgs)
|
|
30
|
-
local callbackEffectVariant, callbackSubType = table.unpack(optionalArgs)
|
|
29
|
+
local effect = table.unpack(fireArgs, 1, 1)
|
|
30
|
+
local callbackEffectVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
31
31
|
return (callbackEffectVariant == nil or callbackEffectVariant == effect.Variant) and (callbackSubType == nil or callbackSubType == effect.SubType)
|
|
32
32
|
end
|
|
33
33
|
function ____exports.shouldFireEntity(self, fireArgs, optionalArgs)
|
|
34
|
-
local entity = table.unpack(fireArgs)
|
|
35
|
-
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
34
|
+
local entity = table.unpack(fireArgs, 1, 1)
|
|
35
|
+
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs, 1, 3)
|
|
36
36
|
return (callbackEntityType == nil or callbackEntityType == entity.Type) and (callbackVariant == nil or callbackVariant == entity.Variant) and (callbackSubType == nil or callbackSubType == entity.SubType)
|
|
37
37
|
end
|
|
38
38
|
function ____exports.shouldFireFamiliar(self, fireArgs, optionalArgs)
|
|
39
|
-
local familiar = table.unpack(fireArgs)
|
|
40
|
-
local callbackFamiliarVariant, callbackSubType = table.unpack(optionalArgs)
|
|
39
|
+
local familiar = table.unpack(fireArgs, 1, 1)
|
|
40
|
+
local callbackFamiliarVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
41
41
|
return (callbackFamiliarVariant == nil or callbackFamiliarVariant == familiar.Variant) and (callbackSubType == nil or callbackSubType == familiar.SubType)
|
|
42
42
|
end
|
|
43
43
|
function ____exports.shouldFireGridEntity(self, fireArgs, optionalArgs)
|
|
44
|
-
local gridEntity = table.unpack(fireArgs)
|
|
45
|
-
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs)
|
|
44
|
+
local gridEntity = table.unpack(fireArgs, 1, 1)
|
|
45
|
+
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs, 1, 2)
|
|
46
46
|
local gridEntityType = gridEntity:GetType()
|
|
47
47
|
local variant = gridEntity:GetVariant()
|
|
48
48
|
return (callbackGridEntityType == nil or callbackGridEntityType == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
49
49
|
end
|
|
50
50
|
function ____exports.shouldFireGridEntityCustom(self, fireArgs, optionalArgs)
|
|
51
|
-
local _gridEntity, gridEntityTypeCustom = table.unpack(fireArgs)
|
|
52
|
-
local callbackGridEntityTypeCustom = table.unpack(optionalArgs)
|
|
51
|
+
local _gridEntity, gridEntityTypeCustom = table.unpack(fireArgs, 1, 2)
|
|
52
|
+
local callbackGridEntityTypeCustom = table.unpack(optionalArgs, 1, 1)
|
|
53
53
|
return callbackGridEntityTypeCustom == nil or callbackGridEntityTypeCustom == gridEntityTypeCustom
|
|
54
54
|
end
|
|
55
55
|
function ____exports.shouldFireItemPickup(self, fireArgs, optionalArgs)
|
|
56
|
-
local _player, pickingUpItem = table.unpack(fireArgs)
|
|
57
|
-
local callbackItemType, callbackSubtype = table.unpack(optionalArgs)
|
|
56
|
+
local _player, pickingUpItem = table.unpack(fireArgs, 1, 2)
|
|
57
|
+
local callbackItemType, callbackSubtype = table.unpack(optionalArgs, 1, 2)
|
|
58
58
|
return (callbackItemType == nil or callbackItemType == pickingUpItem.itemType) and (callbackSubtype == nil or callbackSubtype == pickingUpItem.subType)
|
|
59
59
|
end
|
|
60
60
|
function ____exports.shouldFireKnife(self, fireArgs, optionalArgs)
|
|
61
|
-
local knife = table.unpack(fireArgs)
|
|
62
|
-
local callbackKnifeVariant, callbackSubType = table.unpack(optionalArgs)
|
|
61
|
+
local knife = table.unpack(fireArgs, 1, 1)
|
|
62
|
+
local callbackKnifeVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
63
63
|
return (callbackKnifeVariant == nil or callbackKnifeVariant == knife.Variant) and (callbackSubType == nil or callbackSubType == knife.SubType)
|
|
64
64
|
end
|
|
65
65
|
function ____exports.shouldFireLaser(self, fireArgs, optionalArgs)
|
|
66
|
-
local laser = table.unpack(fireArgs)
|
|
67
|
-
local callbackLaserVariant, callbackSubType = table.unpack(optionalArgs)
|
|
66
|
+
local laser = table.unpack(fireArgs, 1, 1)
|
|
67
|
+
local callbackLaserVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
68
68
|
return (callbackLaserVariant == nil or callbackLaserVariant == laser.Variant) and (callbackSubType == nil or callbackSubType == laser.SubType)
|
|
69
69
|
end
|
|
70
70
|
function ____exports.shouldFireLevel(self, fireArgs, optionalArgs)
|
|
71
|
-
local stage, stageType = table.unpack(fireArgs)
|
|
72
|
-
local callbackStage, callbackStageType = table.unpack(optionalArgs)
|
|
71
|
+
local stage, stageType = table.unpack(fireArgs, 1, 2)
|
|
72
|
+
local callbackStage, callbackStageType = table.unpack(optionalArgs, 1, 2)
|
|
73
73
|
return (callbackStage == nil or callbackStage == stage) and (callbackStageType == nil or callbackStageType == stageType)
|
|
74
74
|
end
|
|
75
75
|
function ____exports.shouldFireNPC(self, fireArgs, optionalArgs)
|
|
76
|
-
local npc = table.unpack(fireArgs)
|
|
77
|
-
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
76
|
+
local npc = table.unpack(fireArgs, 1, 1)
|
|
77
|
+
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs, 1, 3)
|
|
78
78
|
return (callbackEntityType == nil or callbackEntityType == npc.Type) and (callbackVariant == nil or callbackVariant == npc.Variant) and (callbackSubType == nil or callbackSubType == npc.SubType)
|
|
79
79
|
end
|
|
80
80
|
function ____exports.shouldFirePickup(self, fireArgs, optionalArgs)
|
|
81
|
-
local pickup = table.unpack(fireArgs)
|
|
82
|
-
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs)
|
|
81
|
+
local pickup = table.unpack(fireArgs, 1, 1)
|
|
82
|
+
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs, 1, 2)
|
|
83
83
|
return (callbackPickupVariant == nil or callbackPickupVariant == pickup.Variant) and (callbackPickupSubType == nil or callbackPickupSubType == pickup.SubType)
|
|
84
84
|
end
|
|
85
85
|
function ____exports.shouldFirePit(self, fireArgs, optionalArgs)
|
|
86
|
-
local pit = table.unpack(fireArgs)
|
|
87
|
-
local callbackPitVariant = table.unpack(optionalArgs)
|
|
86
|
+
local pit = table.unpack(fireArgs, 1, 1)
|
|
87
|
+
local callbackPitVariant = table.unpack(optionalArgs, 1, 1)
|
|
88
88
|
local pitVariant = pit:GetVariant()
|
|
89
89
|
return callbackPitVariant == nil or callbackPitVariant == pitVariant
|
|
90
90
|
end
|
|
91
91
|
function ____exports.shouldFirePlayer(self, fireArgs, optionalArgs)
|
|
92
|
-
local player = table.unpack(fireArgs)
|
|
93
|
-
local callbackPlayerVariant, callbackCharacter = table.unpack(optionalArgs)
|
|
92
|
+
local player = table.unpack(fireArgs, 1, 1)
|
|
93
|
+
local callbackPlayerVariant, callbackCharacter = table.unpack(optionalArgs, 1, 2)
|
|
94
94
|
local character = player:GetPlayerType()
|
|
95
95
|
return (callbackPlayerVariant == nil or callbackPlayerVariant == player.Variant) and (callbackCharacter == nil or callbackCharacter == character)
|
|
96
96
|
end
|
|
97
97
|
function ____exports.shouldFirePoop(self, fireArgs, optionalArgs)
|
|
98
|
-
local poop = table.unpack(fireArgs)
|
|
99
|
-
local callbackPoopGridEntityVariant = table.unpack(optionalArgs)
|
|
98
|
+
local poop = table.unpack(fireArgs, 1, 1)
|
|
99
|
+
local callbackPoopGridEntityVariant = table.unpack(optionalArgs, 1, 1)
|
|
100
100
|
local poopGridEntityVariant = poop:GetVariant()
|
|
101
101
|
return callbackPoopGridEntityVariant == nil or callbackPoopGridEntityVariant == poopGridEntityVariant
|
|
102
102
|
end
|
|
103
103
|
function ____exports.shouldFirePressurePlate(self, fireArgs, optionalArgs)
|
|
104
|
-
local pressurePlate = table.unpack(fireArgs)
|
|
105
|
-
local callbackPressurePlateVariant = table.unpack(optionalArgs)
|
|
104
|
+
local pressurePlate = table.unpack(fireArgs, 1, 1)
|
|
105
|
+
local callbackPressurePlateVariant = table.unpack(optionalArgs, 1, 1)
|
|
106
106
|
local pressurePlateVariant = pressurePlate:GetVariant()
|
|
107
107
|
return callbackPressurePlateVariant == nil or callbackPressurePlateVariant == pressurePlateVariant
|
|
108
108
|
end
|
|
109
109
|
function ____exports.shouldFireProjectile(self, fireArgs, optionalArgs)
|
|
110
|
-
local projectile = table.unpack(fireArgs)
|
|
111
|
-
local callbackProjectileVariant, callbackSubType = table.unpack(optionalArgs)
|
|
110
|
+
local projectile = table.unpack(fireArgs, 1, 1)
|
|
111
|
+
local callbackProjectileVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
112
112
|
return (callbackProjectileVariant == nil or callbackProjectileVariant == projectile.Variant) and (callbackSubType == nil or callbackSubType == projectile.SubType)
|
|
113
113
|
end
|
|
114
114
|
function ____exports.shouldFireRock(self, fireArgs, optionalArgs)
|
|
115
|
-
local rock = table.unpack(fireArgs)
|
|
116
|
-
local callbackGridEntity, callbackVariant = table.unpack(optionalArgs)
|
|
115
|
+
local rock = table.unpack(fireArgs, 1, 1)
|
|
116
|
+
local callbackGridEntity, callbackVariant = table.unpack(optionalArgs, 1, 2)
|
|
117
117
|
local gridEntityType = rock:GetType()
|
|
118
118
|
local variant = rock:GetVariant()
|
|
119
119
|
return (callbackGridEntity == nil or callbackGridEntity == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
120
120
|
end
|
|
121
121
|
function ____exports.shouldFireRoom(self, fireArgs, optionalArgs)
|
|
122
|
-
local roomType = table.unpack(fireArgs)
|
|
123
|
-
local callbackRoomType = table.unpack(optionalArgs)
|
|
122
|
+
local roomType = table.unpack(fireArgs, 1, 1)
|
|
123
|
+
local callbackRoomType = table.unpack(optionalArgs, 1, 1)
|
|
124
124
|
return callbackRoomType == nil or callbackRoomType == roomType
|
|
125
125
|
end
|
|
126
126
|
function ____exports.shouldFireSlot(self, fireArgs, optionalArgs)
|
|
127
|
-
local slot = table.unpack(fireArgs)
|
|
128
|
-
local callbackSlotVariant, callbackSubType = table.unpack(optionalArgs)
|
|
127
|
+
local slot = table.unpack(fireArgs, 1, 1)
|
|
128
|
+
local callbackSlotVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
129
129
|
return (callbackSlotVariant == nil or callbackSlotVariant == slot.Variant) and (callbackSubType == nil or callbackSubType == slot.SubType)
|
|
130
130
|
end
|
|
131
131
|
function ____exports.shouldFireSpikes(self, fireArgs, optionalArgs)
|
|
132
|
-
local spikes = table.unpack(fireArgs)
|
|
133
|
-
local callbackVariant = table.unpack(optionalArgs)
|
|
132
|
+
local spikes = table.unpack(fireArgs, 1, 1)
|
|
133
|
+
local callbackVariant = table.unpack(optionalArgs, 1, 1)
|
|
134
134
|
local variant = spikes:GetVariant()
|
|
135
135
|
return callbackVariant == nil or callbackVariant == variant
|
|
136
136
|
end
|
|
137
137
|
function ____exports.shouldFireTNT(self, fireArgs, optionalArgs)
|
|
138
|
-
local tnt = table.unpack(fireArgs)
|
|
139
|
-
local callbackVariant = table.unpack(optionalArgs)
|
|
138
|
+
local tnt = table.unpack(fireArgs, 1, 1)
|
|
139
|
+
local callbackVariant = table.unpack(optionalArgs, 1, 1)
|
|
140
140
|
local variant = tnt:GetVariant()
|
|
141
141
|
return callbackVariant == nil or callbackVariant == variant
|
|
142
142
|
end
|
|
143
143
|
function ____exports.shouldFireTear(self, fireArgs, optionalArgs)
|
|
144
|
-
local tear = table.unpack(fireArgs)
|
|
145
|
-
local callbackTearVariant, callbackSubType = table.unpack(optionalArgs)
|
|
144
|
+
local tear = table.unpack(fireArgs, 1, 1)
|
|
145
|
+
local callbackTearVariant, callbackSubType = table.unpack(optionalArgs, 1, 2)
|
|
146
146
|
return (callbackTearVariant == nil or callbackTearVariant == tear.Variant) and (callbackSubType == nil or callbackSubType == tear.SubType)
|
|
147
147
|
end
|
|
148
148
|
function ____exports.shouldFireTrinketType(self, fireArgs, optionalArgs)
|
|
149
|
-
local _player, trinketType = table.unpack(fireArgs)
|
|
150
|
-
local callbackTrinketType = table.unpack(optionalArgs)
|
|
149
|
+
local _player, trinketType = table.unpack(fireArgs, 1, 2)
|
|
150
|
+
local callbackTrinketType = table.unpack(optionalArgs, 1, 1)
|
|
151
151
|
return callbackTrinketType == nil or callbackTrinketType == trinketType
|
|
152
152
|
end
|
|
153
153
|
return ____exports
|
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "87.
|
|
3
|
+
"version": "87.8.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
"types": "./dist/index.rollup.d.ts",
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
29
|
-
"src"
|
|
30
|
-
"LICENSE",
|
|
31
|
-
"package.json",
|
|
32
|
-
"README.md"
|
|
29
|
+
"src"
|
|
33
30
|
],
|
|
34
31
|
"scripts": {
|
|
35
32
|
"build": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/build.mts",
|
|
@@ -37,13 +34,13 @@
|
|
|
37
34
|
"lint": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/lint.mts"
|
|
38
35
|
},
|
|
39
36
|
"dependencies": {
|
|
40
|
-
"isaac-typescript-definitions": "42.
|
|
37
|
+
"isaac-typescript-definitions": "42.3.0"
|
|
41
38
|
},
|
|
42
39
|
"devDependencies": {
|
|
43
|
-
"@microsoft/api-extractor": "7.52.
|
|
44
|
-
"complete-node": "
|
|
40
|
+
"@microsoft/api-extractor": "7.52.13",
|
|
41
|
+
"complete-node": "12.0.0",
|
|
45
42
|
"eslint-plugin-sort-exports": "0.9.1",
|
|
46
|
-
"typescript-eslint": "8.
|
|
47
|
-
"typescript-to-lua": "1.
|
|
43
|
+
"typescript-eslint": "8.43.0",
|
|
44
|
+
"typescript-to-lua": "1.32.0"
|
|
48
45
|
}
|
|
49
46
|
}
|
package/src/functions/array.ts
CHANGED