isaacscript-common 3.0.0 → 3.2.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/cachedClasses.d.ts +6 -4
- package/cachedClasses.lua +4 -4
- package/callbacks/postPickupInitFirst.d.ts +1 -0
- package/callbacks/postPickupInitFirst.lua +55 -0
- package/callbacks/postSlotDestroyed.d.ts +1 -0
- package/callbacks/postSlotDestroyed.lua +66 -0
- package/callbacks/postSlotRender.lua +3 -21
- package/callbacks/subscriptions/postCustomRevive.d.ts +1 -0
- package/callbacks/subscriptions/postDoorRender.d.ts +1 -0
- package/callbacks/subscriptions/postDoorUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postPickupCollect.d.ts +1 -0
- package/callbacks/subscriptions/postPickupInitFirst.d.ts +3 -0
- package/callbacks/subscriptions/postPickupInitFirst.lua +29 -0
- package/callbacks/subscriptions/postPickupStateChanged.d.ts +1 -0
- package/callbacks/subscriptions/postPitRender.d.ts +1 -0
- package/callbacks/subscriptions/postPitUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postPoopRender.d.ts +1 -0
- package/callbacks/subscriptions/postPoopUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postPressurePlateRender.d.ts +1 -0
- package/callbacks/subscriptions/postPressurePlateUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postRockRender.d.ts +1 -0
- package/callbacks/subscriptions/postRockUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postSpikesRender.d.ts +1 -0
- package/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -0
- package/callbacks/subscriptions/postTNTRender.d.ts +1 -0
- package/callbacks/subscriptions/postTNTUpdate.d.ts +1 -0
- package/classes/DefaultMap.d.ts +1 -2
- package/classes/DefaultMap.lua +1 -4
- package/enums/ModCallbackCustom.d.ts +61 -39
- package/enums/ModCallbackCustom.lua +40 -38
- package/features/debugDisplay/exports.d.ts +17 -0
- package/features/debugDisplay/v.d.ts +17 -0
- package/features/deployJSONRoom.d.ts +1 -0
- package/features/saveDataManager/load.lua +12 -8
- package/features/saveDataManager/main.lua +10 -3
- package/features/saveDataManager/merge.lua +33 -21
- package/features/saveDataManager/save.lua +12 -7
- package/functions/array.d.ts +2 -0
- package/functions/bombs.d.ts +3 -0
- package/functions/bombs.lua +12 -0
- package/functions/chargeBar.d.ts +1 -0
- package/functions/collectibles.d.ts +13 -8
- package/functions/collectibles.lua +24 -11
- package/functions/deepCopy.lua +35 -26
- package/functions/deepCopyTests.lua +8 -5
- package/functions/direction.d.ts +8 -0
- package/functions/direction.lua +27 -0
- package/functions/doors.d.ts +1 -0
- package/functions/doors.lua +5 -0
- package/functions/entity.d.ts +4 -4
- package/functions/entity.lua +8 -8
- package/functions/entitySpecific.d.ts +20 -20
- package/functions/entitySpecific.lua +10 -10
- package/functions/enums.d.ts +2 -0
- package/functions/globals.lua +2 -10
- package/functions/gridEntitySpecific.d.ts +5 -0
- package/functions/isaacAPIClass.d.ts +4 -4
- package/functions/isaacAPIClass.lua +6 -6
- package/functions/jsonRoom.d.ts +2 -0
- package/functions/log.lua +3 -3
- package/functions/pickups.d.ts +9 -9
- package/functions/player.d.ts +7 -0
- package/functions/player.lua +44 -9
- package/functions/playerHealth.d.ts +3 -0
- package/functions/playerHealth.lua +87 -68
- package/functions/playerIndex.d.ts +2 -0
- package/functions/positionVelocity.d.ts +3 -0
- package/functions/random.d.ts +2 -0
- package/functions/revive.d.ts +2 -0
- package/functions/rng.d.ts +1 -0
- package/functions/saveFile.d.ts +15 -0
- package/functions/saveFile.lua +106 -0
- package/functions/serialization.lua +2 -2
- package/functions/set.d.ts +1 -0
- package/functions/sprite.d.ts +2 -0
- package/functions/table.d.ts +12 -0
- package/functions/table.lua +34 -0
- package/functions/tears.d.ts +1 -0
- package/functions/tstlClass.d.ts +34 -0
- package/functions/tstlClass.lua +54 -9
- package/functions/ui.d.ts +2 -0
- package/functions/utils.d.ts +15 -0
- package/functions/utils.lua +20 -0
- package/functions/vector.lua +4 -16
- package/index.d.ts +2 -0
- package/index.lua +16 -0
- package/initCustomCallbacks.lua +6 -0
- package/interfaces/AddCallbackParameterCustom.d.ts +2 -0
- package/interfaces/ChargeBarSprites.d.ts +1 -0
- package/interfaces/private/TSTLClassMetatable.d.ts +2 -0
- package/objects/callbackRegisterFunctions.lua +3 -0
- package/objects/oppositeDoorSlots.d.ts +4 -0
- package/objects/oppositeDoorSlots.lua +15 -0
- package/package.json +1 -1
- package/types/AnyEntity.d.ts +10 -0
package/functions/vector.lua
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local OBJECT_NAME
|
|
3
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
5
3
|
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
6
4
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
7
5
|
local ____SerializationType = require("enums.SerializationType")
|
|
8
6
|
local SerializationType = ____SerializationType.SerializationType
|
|
7
|
+
local ____direction = require("functions.direction")
|
|
8
|
+
local angleToDirection = ____direction.angleToDirection
|
|
9
9
|
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
10
10
|
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
11
11
|
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
@@ -101,20 +101,8 @@ function ____exports.vectorEquals(self, vector1, vector2)
|
|
|
101
101
|
end
|
|
102
102
|
--- Helper function for finding out which way a vector is pointing.
|
|
103
103
|
function ____exports.vectorToDirection(self, vector)
|
|
104
|
-
local
|
|
105
|
-
|
|
106
|
-
return Direction.RIGHT
|
|
107
|
-
end
|
|
108
|
-
if degrees >= 45 and degrees <= 135 then
|
|
109
|
-
return Direction.DOWN
|
|
110
|
-
end
|
|
111
|
-
if degrees <= -45 and degrees >= -135 then
|
|
112
|
-
return Direction.UP
|
|
113
|
-
end
|
|
114
|
-
if degrees > 135 or degrees < -135 then
|
|
115
|
-
return Direction.LEFT
|
|
116
|
-
end
|
|
117
|
-
return Direction.NO_DIRECTION
|
|
104
|
+
local angleDegrees = vector:GetAngleDegrees()
|
|
105
|
+
return angleToDirection(nil, angleDegrees)
|
|
118
106
|
end
|
|
119
107
|
function ____exports.vectorToString(self, vector, round)
|
|
120
108
|
if round == nil then
|
package/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { getTaintedLazarusSubPlayer } from "./features/taintedLazarusPlayers";
|
|
|
30
30
|
export * from "./functions/array";
|
|
31
31
|
export * from "./functions/benchmark";
|
|
32
32
|
export * from "./functions/bitwise";
|
|
33
|
+
export * from "./functions/bombs";
|
|
33
34
|
export * from "./functions/boss";
|
|
34
35
|
export * from "./functions/cacheFlag";
|
|
35
36
|
export * from "./functions/cards";
|
|
@@ -88,6 +89,7 @@ export * from "./functions/roomGrid";
|
|
|
88
89
|
export * from "./functions/rooms";
|
|
89
90
|
export * from "./functions/roomShape";
|
|
90
91
|
export * from "./functions/run";
|
|
92
|
+
export * from "./functions/saveFile";
|
|
91
93
|
export * from "./functions/seeds";
|
|
92
94
|
export * from "./functions/serialization";
|
|
93
95
|
export * from "./functions/set";
|
package/index.lua
CHANGED
|
@@ -242,6 +242,14 @@ do
|
|
|
242
242
|
end
|
|
243
243
|
end
|
|
244
244
|
end
|
|
245
|
+
do
|
|
246
|
+
local ____export = require("functions.bombs")
|
|
247
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
248
|
+
if ____exportKey ~= "default" then
|
|
249
|
+
____exports[____exportKey] = ____exportValue
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
245
253
|
do
|
|
246
254
|
local ____export = require("functions.boss")
|
|
247
255
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -697,6 +705,14 @@ do
|
|
|
697
705
|
end
|
|
698
706
|
end
|
|
699
707
|
end
|
|
708
|
+
do
|
|
709
|
+
local ____export = require("functions.saveFile")
|
|
710
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
711
|
+
if ____exportKey ~= "default" then
|
|
712
|
+
____exports[____exportKey] = ____exportValue
|
|
713
|
+
end
|
|
714
|
+
end
|
|
715
|
+
end
|
|
700
716
|
do
|
|
701
717
|
local ____export = require("functions.seeds")
|
|
702
718
|
for ____exportKey, ____exportValue in pairs(____export) do
|
package/initCustomCallbacks.lua
CHANGED
|
@@ -51,6 +51,8 @@ local ____postNPCStateChanged = require("callbacks.postNPCStateChanged")
|
|
|
51
51
|
local postNPCStateChangedCallbackInit = ____postNPCStateChanged.postNPCStateChangedCallbackInit
|
|
52
52
|
local ____postPickupCollect = require("callbacks.postPickupCollect")
|
|
53
53
|
local postPickupCollectCallbackInit = ____postPickupCollect.postPickupCollectCallbackInit
|
|
54
|
+
local ____postPickupInitFirst = require("callbacks.postPickupInitFirst")
|
|
55
|
+
local postPickupInitFirstCallbackInit = ____postPickupInitFirst.postPickupInitFirstCallbackInit
|
|
54
56
|
local ____postPickupInitLate = require("callbacks.postPickupInitLate")
|
|
55
57
|
local postPickupInitLateCallbackInit = ____postPickupInitLate.postPickupInitLateCallbackInit
|
|
56
58
|
local ____postPickupStateChanged = require("callbacks.postPickupStateChanged")
|
|
@@ -89,6 +91,8 @@ local ____postRoomClearChanged = require("callbacks.postRoomClearChanged")
|
|
|
89
91
|
local postRoomClearChangedCallbackInit = ____postRoomClearChanged.postRoomClearChangedCallbackInit
|
|
90
92
|
local ____postSacrifice = require("callbacks.postSacrifice")
|
|
91
93
|
local postSacrificeCallbackInit = ____postSacrifice.postSacrificeCallbackInit
|
|
94
|
+
local ____postSlotDestroyed = require("callbacks.postSlotDestroyed")
|
|
95
|
+
local postSlotDestroyedCallbacksInit = ____postSlotDestroyed.postSlotDestroyedCallbacksInit
|
|
92
96
|
local ____postSlotInitUpdate = require("callbacks.postSlotInitUpdate")
|
|
93
97
|
local postSlotInitUpdateCallbacksInit = ____postSlotInitUpdate.postSlotInitUpdateCallbacksInit
|
|
94
98
|
local ____postSlotRender = require("callbacks.postSlotRender")
|
|
@@ -142,6 +146,7 @@ function ____exports.initCustomCallbacks(self, mod)
|
|
|
142
146
|
postNPCInitLateCallbackInit(nil, mod)
|
|
143
147
|
postNPCStateChangedCallbackInit(nil, mod)
|
|
144
148
|
postPickupCollectCallbackInit(nil, mod)
|
|
149
|
+
postPickupInitFirstCallbackInit(nil, mod)
|
|
145
150
|
postPickupInitLateCallbackInit(nil, mod)
|
|
146
151
|
postPickupStateChangedCallbackInit(nil, mod)
|
|
147
152
|
postPitRenderInit(nil, mod)
|
|
@@ -161,6 +166,7 @@ function ____exports.initCustomCallbacks(self, mod)
|
|
|
161
166
|
postRockUpdateInit(nil, mod)
|
|
162
167
|
postRoomClearChangedCallbackInit(nil, mod)
|
|
163
168
|
postSacrificeCallbackInit(nil, mod)
|
|
169
|
+
postSlotDestroyedCallbacksInit(nil, mod)
|
|
164
170
|
postSlotInitUpdateCallbacksInit(nil, mod)
|
|
165
171
|
postSlotRenderCallbacksInit(nil, mod)
|
|
166
172
|
postSpikesRenderInit(nil, mod)
|
|
@@ -35,6 +35,7 @@ import { PostNPCInitLateRegisterParameters } from "../callbacks/subscriptions/po
|
|
|
35
35
|
import { PostNPCStateChangedRegisterParameters } from "../callbacks/subscriptions/postNPCStateChanged";
|
|
36
36
|
import { PostPEffectUpdateReorderedRegisterParameters } from "../callbacks/subscriptions/postPEffectUpdateReordered";
|
|
37
37
|
import { PostPickupCollectRegisterParameters } from "../callbacks/subscriptions/postPickupCollect";
|
|
38
|
+
import { PostPickupInitFirstRegisterParameters } from "../callbacks/subscriptions/postPickupInitFirst";
|
|
38
39
|
import { PostPickupInitLateRegisterParameters } from "../callbacks/subscriptions/postPickupInitLate";
|
|
39
40
|
import { PostPickupStateChangedRegisterParameters } from "../callbacks/subscriptions/postPickupStateChanged";
|
|
40
41
|
import { PostPitRenderRegisterParameters } from "../callbacks/subscriptions/postPitRender";
|
|
@@ -112,6 +113,7 @@ export interface AddCallbackParameterCustom {
|
|
|
112
113
|
[ModCallbackCustom.POST_NPC_STATE_CHANGED]: PostNPCStateChangedRegisterParameters;
|
|
113
114
|
[ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED]: PostPEffectUpdateReorderedRegisterParameters;
|
|
114
115
|
[ModCallbackCustom.POST_PICKUP_COLLECT]: PostPickupCollectRegisterParameters;
|
|
116
|
+
[ModCallbackCustom.POST_PICKUP_INIT_FIRST]: PostPickupInitFirstRegisterParameters;
|
|
115
117
|
[ModCallbackCustom.POST_PICKUP_INIT_LATE]: PostPickupInitLateRegisterParameters;
|
|
116
118
|
[ModCallbackCustom.POST_PICKUP_STATE_CHANGED]: PostPickupStateChangedRegisterParameters;
|
|
117
119
|
[ModCallbackCustom.POST_PIT_RENDER]: PostPitRenderRegisterParameters;
|
|
@@ -73,6 +73,8 @@ local ____postPEffectUpdateReordered = require("callbacks.subscriptions.postPEff
|
|
|
73
73
|
local postPEffectUpdateReorderedRegister = ____postPEffectUpdateReordered.postPEffectUpdateReorderedRegister
|
|
74
74
|
local ____postPickupCollect = require("callbacks.subscriptions.postPickupCollect")
|
|
75
75
|
local postPickupCollectRegister = ____postPickupCollect.postPickupCollectRegister
|
|
76
|
+
local ____postPickupInitFirst = require("callbacks.subscriptions.postPickupInitFirst")
|
|
77
|
+
local postPickupInitFirstRegister = ____postPickupInitFirst.postPickupInitFirstRegister
|
|
76
78
|
local ____postPickupInitLate = require("callbacks.subscriptions.postPickupInitLate")
|
|
77
79
|
local postPickupInitLateRegister = ____postPickupInitLate.postPickupInitLateRegister
|
|
78
80
|
local ____postPickupStateChanged = require("callbacks.subscriptions.postPickupStateChanged")
|
|
@@ -189,6 +191,7 @@ ____exports.CALLBACK_REGISTER_FUNCTIONS = {
|
|
|
189
191
|
[ModCallbackCustom.POST_NPC_STATE_CHANGED] = postNPCStateChangedRegister,
|
|
190
192
|
[ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED] = postPEffectUpdateReorderedRegister,
|
|
191
193
|
[ModCallbackCustom.POST_PICKUP_COLLECT] = postPickupCollectRegister,
|
|
194
|
+
[ModCallbackCustom.POST_PICKUP_INIT_FIRST] = postPickupInitFirstRegister,
|
|
192
195
|
[ModCallbackCustom.POST_PICKUP_INIT_LATE] = postPickupInitLateRegister,
|
|
193
196
|
[ModCallbackCustom.POST_PICKUP_STATE_CHANGED] = postPickupStateChangedRegister,
|
|
194
197
|
[ModCallbackCustom.POST_PIT_RENDER] = postPitRenderRegister,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
4
|
+
____exports.OPPOSITE_DOOR_SLOTS = {
|
|
5
|
+
[DoorSlot.NO_DOOR_SLOT] = nil,
|
|
6
|
+
[DoorSlot.LEFT_0] = DoorSlot.RIGHT_0,
|
|
7
|
+
[DoorSlot.UP_0] = DoorSlot.DOWN_0,
|
|
8
|
+
[DoorSlot.RIGHT_0] = DoorSlot.LEFT_0,
|
|
9
|
+
[DoorSlot.LEFT_1] = DoorSlot.RIGHT_1,
|
|
10
|
+
[DoorSlot.DOWN_0] = DoorSlot.UP_0,
|
|
11
|
+
[DoorSlot.UP_1] = DoorSlot.DOWN_1,
|
|
12
|
+
[DoorSlot.RIGHT_1] = DoorSlot.LEFT_1,
|
|
13
|
+
[DoorSlot.DOWN_1] = DoorSlot.UP_1
|
|
14
|
+
}
|
|
15
|
+
return ____exports
|
package/package.json
CHANGED
package/types/AnyEntity.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
5
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
6
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
7
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
8
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
9
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
10
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
11
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
12
|
export declare type AnyEntity = Entity | EntityBomb | EntityEffect | EntityFamiliar | EntityKnife | EntityLaser | EntityNPC | EntityPickup | EntityPlayer | EntityProjectile | EntityTear;
|