isaacscript-common 1.2.154 → 1.2.155
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/callbacks/postCustomDoorEnter.lua +4 -1
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +1 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +3 -1
- package/dist/features/extraConsoleCommands/commands.lua +6 -1
- package/dist/features/extraConsoleCommands/init.lua +2 -1
- package/dist/objects/directionToVector.lua +2 -2
- package/dist/types/CallbackParametersCustom.d.ts +2 -1
- package/dist/types/ModUpgraded.d.ts +2 -2
- package/dist/types/ModUpgraded.lua +7 -7
- package/package.json +1 -1
|
@@ -111,7 +111,7 @@ function getAnimation(self, effect)
|
|
|
111
111
|
end
|
|
112
112
|
until true
|
|
113
113
|
end
|
|
114
|
-
POSITION_OFFSET_MULTIPLIER = 23
|
|
114
|
+
POSITION_OFFSET_MULTIPLIER = -23
|
|
115
115
|
local initializedEffectVariants = __TS__New(Set)
|
|
116
116
|
v = {room = {doors = __TS__New(Map)}}
|
|
117
117
|
function ____exports.postCustomDoorEnterCallbackInit(self)
|
|
@@ -153,5 +153,8 @@ function ____exports.spawnCustomDoor(self, effectVariant, doorSlot)
|
|
|
153
153
|
wall.CollisionClass = GridCollisionClass.COLLISION_WALL_EXCEPT_PLAYER
|
|
154
154
|
end
|
|
155
155
|
end
|
|
156
|
+
local ptrHash = GetPtrHash(effect)
|
|
157
|
+
local doorData = {slot = doorSlot}
|
|
158
|
+
v.room.doors:set(ptrHash, doorData)
|
|
156
159
|
end
|
|
157
160
|
return ____exports
|
|
@@ -14,7 +14,7 @@ function ____exports.postCustomDoorEnterFire(self, player, effectVariant, doorSl
|
|
|
14
14
|
local callback = ____value[1]
|
|
15
15
|
local callbackEffectVariant = ____value[2]
|
|
16
16
|
do
|
|
17
|
-
if
|
|
17
|
+
if callbackEffectVariant ~= nil and callbackEffectVariant ~= effectVariant then
|
|
18
18
|
goto __continue5
|
|
19
19
|
end
|
|
20
20
|
callback(
|
|
@@ -264,7 +264,9 @@ export declare function sacrifice(): void;
|
|
|
264
264
|
/** Warps to the first Secret Room on the floor. */
|
|
265
265
|
export declare function secret(): void;
|
|
266
266
|
/** Logs all of the current run's seed effects to the "log.txt" file. */
|
|
267
|
-
export declare function
|
|
267
|
+
export declare function seedsCommand(): void;
|
|
268
|
+
/** Changes to a seeded run, using the seed of the current run. */
|
|
269
|
+
export declare function seedStick(): void;
|
|
268
270
|
/**
|
|
269
271
|
* Sets a charge to the player's specified active item. You must provide the active slot number and
|
|
270
272
|
* the number of charges to set.
|
|
@@ -755,10 +755,15 @@ end
|
|
|
755
755
|
function ____exports.secret(self)
|
|
756
756
|
warpToRoomType(nil, RoomType.ROOM_SECRET)
|
|
757
757
|
end
|
|
758
|
-
function ____exports.
|
|
758
|
+
function ____exports.seedsCommand(self)
|
|
759
759
|
logAllSeedEffects()
|
|
760
760
|
printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
|
|
761
761
|
end
|
|
762
|
+
function ____exports.seedStick(self)
|
|
763
|
+
local seeds = game:GetSeeds()
|
|
764
|
+
local startSeedString = seeds:GetStartSeedString()
|
|
765
|
+
Isaac.ExecuteCommand("seed " .. startSeedString)
|
|
766
|
+
end
|
|
762
767
|
function ____exports.setCharges(self, params)
|
|
763
768
|
if params == "" then
|
|
764
769
|
printConsole(nil, "You must specify a slot number and a charge amount. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)")
|
|
@@ -173,7 +173,8 @@ commandFunctionsMap:set("rottenhearts", commands.rottenHearts)
|
|
|
173
173
|
commandFunctionsMap:set("s", commands.s)
|
|
174
174
|
commandFunctionsMap:set("sacrifice", commands.sacrifice)
|
|
175
175
|
commandFunctionsMap:set("secret", commands.secret)
|
|
176
|
-
commandFunctionsMap:set("seeds", commands.
|
|
176
|
+
commandFunctionsMap:set("seeds", commands.seedsCommand)
|
|
177
|
+
commandFunctionsMap:set("seedstick", commands.seedStick)
|
|
177
178
|
commandFunctionsMap:set("setcharges", commands.setCharges)
|
|
178
179
|
commandFunctionsMap:set("setposition", commands.setPosition)
|
|
179
180
|
commandFunctionsMap:set("sh", commands.sh)
|
|
@@ -3,8 +3,8 @@ local ____exports = {}
|
|
|
3
3
|
____exports.DIRECTION_TO_VECTOR = {
|
|
4
4
|
[Direction.NO_DIRECTION] = Vector.Zero,
|
|
5
5
|
[Direction.LEFT] = Vector(-1, 0),
|
|
6
|
-
[Direction.UP] = Vector(0, 1),
|
|
6
|
+
[Direction.UP] = Vector(0, -1),
|
|
7
7
|
[Direction.RIGHT] = Vector(1, 0),
|
|
8
|
-
[Direction.DOWN] = Vector(0,
|
|
8
|
+
[Direction.DOWN] = Vector(0, 1)
|
|
9
9
|
}
|
|
10
10
|
return ____exports
|
|
@@ -233,6 +233,7 @@ export interface CallbackParametersCustom {
|
|
|
233
233
|
callback: PostBoneSwingCallbackType
|
|
234
234
|
];
|
|
235
235
|
[ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER]: [
|
|
236
|
-
callback: PostCustomDoorEnterCallbackType
|
|
236
|
+
callback: PostCustomDoorEnterCallbackType,
|
|
237
|
+
effectVariant?: int
|
|
237
238
|
];
|
|
238
239
|
}
|
|
@@ -8,11 +8,11 @@ export declare class ModUpgraded implements Mod {
|
|
|
8
8
|
/** End-users can optionally enable verbose-mode, which helps troubleshoot crashes. */
|
|
9
9
|
Verbose: boolean;
|
|
10
10
|
constructor(mod: Mod, verbose: boolean);
|
|
11
|
-
AddCallback<T extends keyof CallbackParameters>(
|
|
11
|
+
AddCallback<T extends keyof CallbackParameters>(modCallbacks: T, ...args: CallbackParameters[T]): void;
|
|
12
12
|
HasData(): boolean;
|
|
13
13
|
LoadData(): string;
|
|
14
14
|
RemoveCallback(callbackID: ModCallbacks, callback: () => void): void;
|
|
15
15
|
RemoveData(): void;
|
|
16
16
|
SaveData(data: string): void;
|
|
17
|
-
AddCallbackCustom<T extends keyof CallbackParametersCustom>(
|
|
17
|
+
AddCallbackCustom<T extends keyof CallbackParametersCustom>(modCallbacksCustom: T, ...args: CallbackParametersCustom[T]): void;
|
|
18
18
|
}
|
|
@@ -27,12 +27,12 @@ function ModUpgraded.prototype.____constructor(self, mod, verbose)
|
|
|
27
27
|
self.Mod = mod
|
|
28
28
|
self.Verbose = verbose
|
|
29
29
|
end
|
|
30
|
-
function ModUpgraded.prototype.AddCallback(self,
|
|
30
|
+
function ModUpgraded.prototype.AddCallback(self, modCallbacks, ...)
|
|
31
31
|
local args = {...}
|
|
32
32
|
if self.Verbose then
|
|
33
33
|
local callback = args[1]
|
|
34
34
|
local optionalArg = args[2]
|
|
35
|
-
local callbackName = getCallbackName(nil,
|
|
35
|
+
local callbackName = getCallbackName(nil, modCallbacks)
|
|
36
36
|
local debugMsg = getDebugPrependString(nil, callbackName)
|
|
37
37
|
local function callbackWithLogger(____, ...)
|
|
38
38
|
Isaac.DebugString(debugMsg .. " - START")
|
|
@@ -40,10 +40,10 @@ function ModUpgraded.prototype.AddCallback(self, callbackID, ...)
|
|
|
40
40
|
Isaac.DebugString((debugMsg .. " - END - ") .. tostring(value))
|
|
41
41
|
return value
|
|
42
42
|
end
|
|
43
|
-
self.Mod:AddCallback(
|
|
43
|
+
self.Mod:AddCallback(modCallbacks, callbackWithLogger, optionalArg)
|
|
44
44
|
else
|
|
45
45
|
self.Mod:AddCallback(
|
|
46
|
-
|
|
46
|
+
modCallbacks,
|
|
47
47
|
__TS__Spread(args)
|
|
48
48
|
)
|
|
49
49
|
end
|
|
@@ -63,10 +63,10 @@ end
|
|
|
63
63
|
function ModUpgraded.prototype.SaveData(self, data)
|
|
64
64
|
self.Mod:SaveData(data)
|
|
65
65
|
end
|
|
66
|
-
function ModUpgraded.prototype.AddCallbackCustom(self,
|
|
67
|
-
local callbackRegisterFunction = CALLBACK_REGISTER_FUNCTIONS[
|
|
66
|
+
function ModUpgraded.prototype.AddCallbackCustom(self, modCallbacksCustom, ...)
|
|
67
|
+
local callbackRegisterFunction = CALLBACK_REGISTER_FUNCTIONS[modCallbacksCustom]
|
|
68
68
|
if callbackRegisterFunction == nil then
|
|
69
|
-
error("Failed to find a callback registration function for custom callback: " .. tostring(
|
|
69
|
+
error("Failed to find a callback registration function for custom callback: " .. tostring(modCallbacksCustom))
|
|
70
70
|
end
|
|
71
71
|
callbackRegisterFunction(nil, ...)
|
|
72
72
|
end
|