isaacscript-common 7.2.2 → 7.4.2
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/postDiceRoomActivated.d.ts.map +1 -1
- package/dist/callbacks/postDiceRoomActivated.lua +4 -5
- package/dist/callbacks/postItemDischarged.d.ts.map +1 -1
- package/dist/callbacks/postItemDischarged.lua +3 -2
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
- package/dist/callbacks/postPlayerChangeStat.lua +10 -7
- package/dist/features/customStage/exports.d.ts +4 -6
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +4 -6
- package/dist/functions/types.d.ts +8 -1
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/functions/types.lua +7 -0
- package/dist/index.d.ts +11034 -10
- package/dist/interfaces/CustomStageLua.d.ts +17 -33
- package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbacks/postDiceRoomActivated.ts +12 -7
- package/src/callbacks/postItemDischarged.ts +2 -3
- package/src/callbacks/postPlayerChangeStat.ts +4 -8
- package/src/features/customStage/exports.ts +4 -6
- package/src/functions/types.ts +11 -0
- package/src/interfaces/CustomStageLua.ts +17 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../src/callbacks/postDiceRoomActivated.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"postDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../src/callbacks/postDiceRoomActivated.ts"],"names":[],"mappings":";AAmBA,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAQxD"}
|
|
@@ -16,20 +16,19 @@ function hasSubscriptions(self)
|
|
|
16
16
|
return postDiceRoomActivatedHasSubscriptions(nil)
|
|
17
17
|
end
|
|
18
18
|
function postEffectUpdateDiceFloor(self, effect)
|
|
19
|
-
local diceFloor = effect
|
|
20
19
|
if not hasSubscriptions(nil) then
|
|
21
20
|
return
|
|
22
21
|
end
|
|
23
22
|
if v.room.diceRoomActivated then
|
|
24
23
|
return
|
|
25
24
|
end
|
|
26
|
-
if
|
|
25
|
+
if effect.FrameCount == 0 then
|
|
27
26
|
return
|
|
28
27
|
end
|
|
29
|
-
local closestPlayer = getClosestPlayer(nil,
|
|
30
|
-
if isCloseEnoughToTriggerDiceFloor(nil, closestPlayer,
|
|
28
|
+
local closestPlayer = getClosestPlayer(nil, effect.Position)
|
|
29
|
+
if isCloseEnoughToTriggerDiceFloor(nil, closestPlayer, effect) then
|
|
31
30
|
v.room.diceRoomActivated = true
|
|
32
|
-
postDiceRoomActivatedFire(nil, closestPlayer,
|
|
31
|
+
postDiceRoomActivatedFire(nil, closestPlayer, effect.SubType)
|
|
33
32
|
end
|
|
34
33
|
end
|
|
35
34
|
v = {room = {diceRoomActivated = false}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postItemDischarged.d.ts","sourceRoot":"","sources":["../../src/callbacks/postItemDischarged.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"postItemDischarged.d.ts","sourceRoot":"","sources":["../../src/callbacks/postItemDischarged.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAqCrD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAS5D"}
|
|
@@ -22,6 +22,8 @@ local ____playerDataStructures = require("functions.playerDataStructures")
|
|
|
22
22
|
local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
|
|
23
23
|
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
24
24
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
25
|
+
local ____types = require("functions.types")
|
|
26
|
+
local asNumber = ____types.asNumber
|
|
25
27
|
local ____postItemDischarged = require("callbacks.subscriptions.postItemDischarged")
|
|
26
28
|
local postItemDischargeFire = ____postItemDischarged.postItemDischargeFire
|
|
27
29
|
local postItemDischargeHasSubscriptions = ____postItemDischarged.postItemDischargeHasSubscriptions
|
|
@@ -70,11 +72,10 @@ function playerRecentlyCollidedWithBulb(self, player)
|
|
|
70
72
|
return collidedOnThisFrame or collidedOnLastFrame
|
|
71
73
|
end
|
|
72
74
|
function preNPCCollisionSucker(self, npc, collider)
|
|
73
|
-
local sucker = npc
|
|
74
75
|
if not hasSubscriptions(nil) then
|
|
75
76
|
return nil
|
|
76
77
|
end
|
|
77
|
-
if
|
|
78
|
+
if npc.Variant ~= asNumber(nil, SuckerVariant.BULB) then
|
|
78
79
|
return nil
|
|
79
80
|
end
|
|
80
81
|
local player = collider:ToPlayer()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"postPlayerChangeStat.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerChangeStat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AA2BrD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAO/D"}
|
|
@@ -11,17 +11,20 @@ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
|
11
11
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
12
12
|
local ____exports = require("features.saveDataManager.exports")
|
|
13
13
|
local saveDataManager = ____exports.saveDataManager
|
|
14
|
-
local
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local
|
|
18
|
-
local
|
|
19
|
-
local isColor = ____functions.isColor
|
|
20
|
-
local isNumber = ____functions.isNumber
|
|
14
|
+
local ____bitSet128 = require("functions.bitSet128")
|
|
15
|
+
local isBitSet128 = ____bitSet128.isBitSet128
|
|
16
|
+
local ____color = require("functions.color")
|
|
17
|
+
local colorEquals = ____color.colorEquals
|
|
18
|
+
local isColor = ____color.isColor
|
|
21
19
|
local ____enums = require("functions.enums")
|
|
22
20
|
local getEnumValues = ____enums.getEnumValues
|
|
23
21
|
local ____playerIndex = require("functions.playerIndex")
|
|
24
22
|
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
23
|
+
local ____playerStats = require("functions.playerStats")
|
|
24
|
+
local getPlayerStat = ____playerStats.getPlayerStat
|
|
25
|
+
local ____types = require("functions.types")
|
|
26
|
+
local isBoolean = ____types.isBoolean
|
|
27
|
+
local isNumber = ____types.isNumber
|
|
25
28
|
local ____postPlayerChangeStat = require("callbacks.subscriptions.postPlayerChangeStat")
|
|
26
29
|
local postPlayerChangeStatFire = ____postPlayerChangeStat.postPlayerChangeStatFire
|
|
27
30
|
local postPlayerChangeStatHasSubscriptions = ____postPlayerChangeStat.postPlayerChangeStatHasSubscriptions
|
|
@@ -29,12 +29,10 @@ export declare function setCustomStage(name: string, firstFloor?: boolean, verbo
|
|
|
29
29
|
* files for them.
|
|
30
30
|
*
|
|
31
31
|
* For reference:
|
|
32
|
-
* - The vanilla name sprite for Monstro is located at
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* (x86)\Steam\steamapps\common\The Binding of Isaac
|
|
37
|
-
* Rebirth\resources\gfx\ui\boss\portrait_20.0_monstro.png".
|
|
32
|
+
* - The vanilla name sprite for Monstro is located at:
|
|
33
|
+
* `resources/gfx/ui/boss/bossname_20.0_monstro.png`
|
|
34
|
+
* - The vanilla portrait sprite for Monstro is located at:
|
|
35
|
+
* `resources/gfx/ui/boss/portrait_20.0_monstro.png`
|
|
38
36
|
*
|
|
39
37
|
* (Note that boss metadata like this cannot be specified with the rest of the custom stage metadata
|
|
40
38
|
* in the "tsconfig.json" file because there is not a way to retrieve the name of an entity at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EAGV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAoBtC,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,YAAmB,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI,CAwDN;AA4ED
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EAGV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAoBtC,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,YAAmB,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI,CAwDN;AA4ED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,IAAI,CAGN;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
|
@@ -130,12 +130,10 @@ end
|
|
|
130
130
|
-- files for them.
|
|
131
131
|
--
|
|
132
132
|
-- For reference:
|
|
133
|
-
-- - The vanilla name sprite for Monstro is located at
|
|
134
|
-
--
|
|
135
|
-
--
|
|
136
|
-
--
|
|
137
|
-
-- (x86)\Steam\steamapps\common\The Binding of Isaac
|
|
138
|
-
-- Rebirth\resources\gfx\ui\boss\portrait_20.0_monstro.png".
|
|
133
|
+
-- - The vanilla name sprite for Monstro is located at:
|
|
134
|
+
-- `resources/gfx/ui/boss/bossname_20.0_monstro.png`
|
|
135
|
+
-- - The vanilla portrait sprite for Monstro is located at:
|
|
136
|
+
-- `resources/gfx/ui/boss/portrait_20.0_monstro.png`
|
|
139
137
|
--
|
|
140
138
|
-- (Note that boss metadata like this cannot be specified with the rest of the custom stage metadata
|
|
141
139
|
-- in the "tsconfig.json" file because there is not a way to retrieve the name of an entity at
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
2
|
/// <reference types="lua-types/5.3" />
|
|
3
|
-
import { Card, CollectibleType, LevelStage, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
|
|
3
|
+
import { Card, CollectibleType, LevelStage, NpcState, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to safely cast a `number` to a `Card`. (This is better than using the `as`
|
|
6
6
|
* TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
@@ -22,6 +22,13 @@ export declare function asCollectibleType(num: number): CollectibleType;
|
|
|
22
22
|
* This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
23
23
|
*/
|
|
24
24
|
export declare function asLevelStage(num: number): LevelStage;
|
|
25
|
+
/**
|
|
26
|
+
* Helper function to safely cast a `number` to a `NpcState`. (This is better than using the `as`
|
|
27
|
+
* TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
28
|
+
*
|
|
29
|
+
* This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
30
|
+
*/
|
|
31
|
+
export declare function asNpcState(num: number): NpcState;
|
|
25
32
|
/**
|
|
26
33
|
* Helper function to safely cast an enum to a `number`. (This is better than using the `as`
|
|
27
34
|
* TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/functions/types.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,IAAI,EACJ,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAExC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAEtD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,CAEhE;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAElE;AAED,w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AAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAEtD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,CAEhE;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAElE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,OAAO,GAAG,MAAM,GAAG,MAAM,CAOvC;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAExC;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
|
package/dist/functions/types.lua
CHANGED
|
@@ -20,6 +20,13 @@ end
|
|
|
20
20
|
function ____exports.asLevelStage(self, num)
|
|
21
21
|
return num
|
|
22
22
|
end
|
|
23
|
+
--- Helper function to safely cast a `number` to a `NpcState`. (This is better than using the `as`
|
|
24
|
+
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
25
|
+
--
|
|
26
|
+
-- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
|
|
27
|
+
function ____exports.asNpcState(self, num)
|
|
28
|
+
return num
|
|
29
|
+
end
|
|
23
30
|
--- Helper function to safely cast an enum to a `number`. (This is better than using the `as`
|
|
24
31
|
-- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
|
|
25
32
|
--
|