isaacscript-common 7.11.0 → 7.14.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.
Files changed (37) hide show
  1. package/dist/features/customPickup.d.ts +24 -0
  2. package/dist/features/customPickup.d.ts.map +1 -0
  3. package/dist/features/customPickup.lua +85 -0
  4. package/dist/features/customStage/backdrop.lua +3 -3
  5. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  6. package/dist/features/customStage/customStageGridEntities.lua +61 -35
  7. package/dist/features/customStage/shadows.lua +2 -2
  8. package/dist/functions/collectibleSet.d.ts.map +1 -1
  9. package/dist/functions/collectibleSet.lua +2 -2
  10. package/dist/functions/npcs.lua +3 -3
  11. package/dist/functions/pickups.lua +2 -2
  12. package/dist/functions/trinketSet.d.ts +44 -0
  13. package/dist/functions/trinketSet.d.ts.map +1 -0
  14. package/dist/functions/trinketSet.lua +101 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.lua +13 -0
  18. package/dist/initFeatures.d.ts.map +1 -1
  19. package/dist/initFeatures.lua +3 -0
  20. package/dist/interfaces/CustomStageTSConfig.d.ts +47 -0
  21. package/dist/interfaces/CustomStageTSConfig.d.ts.map +1 -1
  22. package/dist/objects/coinSubTypeToValue.d.ts +1 -1
  23. package/dist/objects/coinSubTypeToValue.d.ts.map +1 -1
  24. package/dist/objects/coinSubTypeToValue.lua +1 -1
  25. package/package.json +1 -1
  26. package/src/features/customPickup.ts +135 -0
  27. package/src/features/customStage/backdrop.ts +2 -2
  28. package/src/features/customStage/customStageGridEntities.ts +58 -16
  29. package/src/features/customStage/shadows.ts +2 -2
  30. package/src/functions/collectibleSet.ts +4 -3
  31. package/src/functions/npcs.ts +2 -2
  32. package/src/functions/pickups.ts +2 -2
  33. package/src/functions/trinketSet.ts +133 -0
  34. package/src/index.ts +2 -0
  35. package/src/initFeatures.ts +2 -0
  36. package/src/interfaces/CustomStageTSConfig.ts +50 -0
  37. package/src/objects/coinSubTypeToValue.ts +1 -1
@@ -0,0 +1,24 @@
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare function customPickupInit(mod: Mod): void;
3
+ /**
4
+ * Helper function to register a custom pickup with the IsaacScript standard library. Use this
5
+ * feature for custom pickups that are intended to be picked up by the player, like keys and bombs.
6
+ *
7
+ * When IsaacScript detects that a player should be collecting the custom pickup, then the pickup
8
+ * will be immediately removed, and an effect showing the pickup's respective `Collect` animation
9
+ * will be spawned. (This emulates how a normal vanilla pickup would work.)
10
+ *
11
+ * Note that when you specify your custom pickup in the "entities2.xml" file, it should have a type
12
+ * of "5" and be associated with an anm2 file that has a "Collect" animation.
13
+ *
14
+ * @param pickupVariantCustom The variant for the corresponding custom pickup.
15
+ * @param subType The sub-type for the corresponding custom pickup.
16
+ * @param collectFunc The function to run when the player collects this pickup.
17
+ * @param collisionFunc Optional. The function to run when a player collides with the pickup.
18
+ * Default is a function that always returns true, meaning that the player will
19
+ * always immediately collect the pickup when they collide with it. Specify
20
+ * this function if your pickup should only be able to be collected under
21
+ * certain conditions.
22
+ */
23
+ export declare function registerCustomPickup(pickupVariantCustom: PickupVariant, subType: int, collectFunc: (player: EntityPlayer) => void, collisionFunc?: (player: EntityPlayer) => boolean): void;
24
+ //# sourceMappingURL=customPickup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customPickup.d.ts","sourceRoot":"","sources":["../../src/features/customPickup.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACd,MAAM,8BAA8B,CAAC;AA6BtC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAO/C;AAuDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,mBAAmB,EAAE,aAAa,EAClC,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,EAC3C,aAAa,GAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAoB,GAC5D,IAAI,CAaN"}
@@ -0,0 +1,85 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Map = ____lualib.Map
3
+ local __TS__New = ____lualib.__TS__New
4
+ local ____exports = {}
5
+ local prePickupCollision, postEffectRenderPickupEffect, PICKUP_EFFECT_VARIANT, PICKUP_EFFECT_SUB_TYPE, customPickupFunctionsMap
6
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
+ local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
8
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
9
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
+ local ____featuresInitialized = require("featuresInitialized")
11
+ local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
12
+ local ____entities = require("functions.entities")
13
+ local getEntityID = ____entities.getEntityID
14
+ local getEntityIDFromConstituents = ____entities.getEntityIDFromConstituents
15
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
16
+ local spawnEffect = ____entitiesSpecific.spawnEffect
17
+ function prePickupCollision(self, pickup, collider)
18
+ local entityID = getEntityID(nil, pickup)
19
+ local customPickupFunctions = customPickupFunctionsMap:get(entityID)
20
+ if customPickupFunctions == nil then
21
+ return nil
22
+ end
23
+ local player = collider:ToPlayer()
24
+ if player == nil then
25
+ return nil
26
+ end
27
+ local shouldPickup = customPickupFunctions:collisionFunc(player)
28
+ if not shouldPickup then
29
+ return nil
30
+ end
31
+ pickup:Remove()
32
+ local pickupSprite = pickup:GetSprite()
33
+ local fileName = pickupSprite:GetFilename()
34
+ local effect = spawnEffect(nil, PICKUP_EFFECT_VARIANT, PICKUP_EFFECT_SUB_TYPE, pickup.Position)
35
+ local effectSprite = effect:GetSprite()
36
+ effectSprite:Load(fileName, true)
37
+ effectSprite:Play("Collect", true)
38
+ customPickupFunctions:collectFunc(player)
39
+ return nil
40
+ end
41
+ function postEffectRenderPickupEffect(self, effect)
42
+ if effect.SubType ~= PICKUP_EFFECT_SUB_TYPE then
43
+ return
44
+ end
45
+ local sprite = effect:GetSprite()
46
+ if sprite:IsFinished("Collect") then
47
+ effect:Remove()
48
+ end
49
+ end
50
+ local FEATURE_NAME = "customPickup"
51
+ PICKUP_EFFECT_VARIANT = EffectVariant.LADDER
52
+ PICKUP_EFFECT_SUB_TYPE = 103
53
+ customPickupFunctionsMap = __TS__New(Map)
54
+ function ____exports.customPickupInit(self, mod)
55
+ mod:AddCallback(ModCallback.PRE_PICKUP_COLLISION, prePickupCollision)
56
+ mod:AddCallback(ModCallback.POST_EFFECT_RENDER, postEffectRenderPickupEffect, PICKUP_EFFECT_VARIANT)
57
+ end
58
+ --- Helper function to register a custom pickup with the IsaacScript standard library. Use this
59
+ -- feature for custom pickups that are intended to be picked up by the player, like keys and bombs.
60
+ --
61
+ -- When IsaacScript detects that a player should be collecting the custom pickup, then the pickup
62
+ -- will be immediately removed, and an effect showing the pickup's respective `Collect` animation
63
+ -- will be spawned. (This emulates how a normal vanilla pickup would work.)
64
+ --
65
+ -- Note that when you specify your custom pickup in the "entities2.xml" file, it should have a type
66
+ -- of "5" and be associated with an anm2 file that has a "Collect" animation.
67
+ --
68
+ -- @param pickupVariantCustom The variant for the corresponding custom pickup.
69
+ -- @param subType The sub-type for the corresponding custom pickup.
70
+ -- @param collectFunc The function to run when the player collects this pickup.
71
+ -- @param collisionFunc Optional. The function to run when a player collides with the pickup.
72
+ -- Default is a function that always returns true, meaning that the player will
73
+ -- always immediately collect the pickup when they collide with it. Specify
74
+ -- this function if your pickup should only be able to be collected under
75
+ -- certain conditions.
76
+ function ____exports.registerCustomPickup(self, pickupVariantCustom, subType, collectFunc, collisionFunc)
77
+ if collisionFunc == nil then
78
+ collisionFunc = function() return true end
79
+ end
80
+ errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
81
+ local entityID = getEntityIDFromConstituents(nil, EntityType.PICKUP, pickupVariantCustom, subType)
82
+ local customPickupFunctions = {collectFunc = collectFunc, collisionFunc = collisionFunc}
83
+ customPickupFunctionsMap:set(entityID, customPickupFunctions)
84
+ end
85
+ return ____exports
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT, BACKDROP_EFFECT_SUBTYPE
5
+ local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT, BACKDROP_EFFECT_SUB_TYPE
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
8
8
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
@@ -42,7 +42,7 @@ function spawnWallEntity(self, customStage, rng, isExtraWall)
42
42
  local wallEffect = spawnEffectWithSeed(
43
43
  nil,
44
44
  BACKDROP_EFFECT_VARIANT,
45
- BACKDROP_EFFECT_SUBTYPE,
45
+ BACKDROP_EFFECT_SUB_TYPE,
46
46
  VectorZero,
47
47
  seed
48
48
  )
@@ -181,7 +181,7 @@ WALL_OFFSET = Vector(-80, -80)
181
181
  L_FLOOR_ANM2_LAYERS = {16, 17}
182
182
  N_FLOOR_ANM2_LAYERS = {18, 19}
183
183
  BACKDROP_EFFECT_VARIANT = EffectVariant.LADDER
184
- BACKDROP_EFFECT_SUBTYPE = 101
184
+ BACKDROP_EFFECT_SUB_TYPE = 101
185
185
  local BACKDROP_ROOM_TYPE_SET = __TS__New(Set, {RoomType.DEFAULT, RoomType.BOSS, RoomType.MINI_BOSS})
186
186
  function ____exports.setCustomStageBackdrop(self, customStage)
187
187
  local room = game:GetRoom()
@@ -1 +1 @@
1
- {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CA4BN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CA2BN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
1
+ {"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwCN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyDN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAwBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
@@ -34,9 +34,9 @@ local ____v = require("features.customStage.v")
34
34
  local v = ____v.default
35
35
  function getNewDoorPNGPath(self, customStage, fileName)
36
36
  repeat
37
- local ____switch24 = fileName
38
- local ____cond24 = ____switch24 == "gfx/grid/door_01_normaldoor.anm2"
39
- if ____cond24 then
37
+ local ____switch30 = fileName
38
+ local ____cond30 = ____switch30 == "gfx/grid/door_01_normaldoor.anm2"
39
+ if ____cond30 then
40
40
  do
41
41
  local ____customStage_doorPNGPaths_normal_0 = customStage.doorPNGPaths
42
42
  if ____customStage_doorPNGPaths_normal_0 ~= nil then
@@ -45,8 +45,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
45
45
  return ____customStage_doorPNGPaths_normal_0
46
46
  end
47
47
  end
48
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_02_treasureroomdoor.anm2"
49
- if ____cond24 then
48
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_02_treasureroomdoor.anm2"
49
+ if ____cond30 then
50
50
  do
51
51
  local ____customStage_doorPNGPaths_treasureRoom_2 = customStage.doorPNGPaths
52
52
  if ____customStage_doorPNGPaths_treasureRoom_2 ~= nil then
@@ -55,8 +55,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
55
55
  return ____customStage_doorPNGPaths_treasureRoom_2
56
56
  end
57
57
  end
58
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_03_ambushroomdoor.anm2"
59
- if ____cond24 then
58
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_03_ambushroomdoor.anm2"
59
+ if ____cond30 then
60
60
  do
61
61
  local ____customStage_doorPNGPaths_normalChallengeRoom_4 = customStage.doorPNGPaths
62
62
  if ____customStage_doorPNGPaths_normalChallengeRoom_4 ~= nil then
@@ -65,8 +65,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
65
65
  return ____customStage_doorPNGPaths_normalChallengeRoom_4
66
66
  end
67
67
  end
68
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
69
- if ____cond24 then
68
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
69
+ if ____cond30 then
70
70
  do
71
71
  local ____customStage_doorPNGPaths_curseRoom_6 = customStage.doorPNGPaths
72
72
  if ____customStage_doorPNGPaths_curseRoom_6 ~= nil then
@@ -75,8 +75,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
75
75
  return ____customStage_doorPNGPaths_curseRoom_6
76
76
  end
77
77
  end
78
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_05_arcaderoomdoor.anm2"
79
- if ____cond24 then
78
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_05_arcaderoomdoor.anm2"
79
+ if ____cond30 then
80
80
  do
81
81
  local ____customStage_doorPNGPaths_arcade_8 = customStage.doorPNGPaths
82
82
  if ____customStage_doorPNGPaths_arcade_8 ~= nil then
@@ -85,8 +85,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
85
85
  return ____customStage_doorPNGPaths_arcade_8
86
86
  end
87
87
  end
88
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_devilroomdoor.anm2"
89
- if ____cond24 then
88
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_07_devilroomdoor.anm2"
89
+ if ____cond30 then
90
90
  do
91
91
  local ____customStage_doorPNGPaths_devilRoom_10 = customStage.doorPNGPaths
92
92
  if ____customStage_doorPNGPaths_devilRoom_10 ~= nil then
@@ -95,8 +95,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
95
95
  return ____customStage_doorPNGPaths_devilRoom_10
96
96
  end
97
97
  end
98
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_holyroomdoor.anm2"
99
- if ____cond24 then
98
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_07_holyroomdoor.anm2"
99
+ if ____cond30 then
100
100
  do
101
101
  local ____customStage_doorPNGPaths_angelRoom_12 = customStage.doorPNGPaths
102
102
  if ____customStage_doorPNGPaths_angelRoom_12 ~= nil then
@@ -105,8 +105,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
105
105
  return ____customStage_doorPNGPaths_angelRoom_12
106
106
  end
107
107
  end
108
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_08_holeinwall.anm2"
109
- if ____cond24 then
108
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_08_holeinwall.anm2"
109
+ if ____cond30 then
110
110
  do
111
111
  local ____customStage_doorPNGPaths_secretRoom_14 = customStage.doorPNGPaths
112
112
  if ____customStage_doorPNGPaths_secretRoom_14 ~= nil then
@@ -115,8 +115,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
115
115
  return ____customStage_doorPNGPaths_secretRoom_14
116
116
  end
117
117
  end
118
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_09_bossambushroomdoor.anm2"
119
- if ____cond24 then
118
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_09_bossambushroomdoor.anm2"
119
+ if ____cond30 then
120
120
  do
121
121
  local ____customStage_doorPNGPaths_bossChallengeRoom_16 = customStage.doorPNGPaths
122
122
  if ____customStage_doorPNGPaths_bossChallengeRoom_16 ~= nil then
@@ -125,8 +125,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
125
125
  return ____customStage_doorPNGPaths_bossChallengeRoom_16
126
126
  end
127
127
  end
128
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_10_bossroomdoor.anm2"
129
- if ____cond24 then
128
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_10_bossroomdoor.anm2"
129
+ if ____cond30 then
130
130
  do
131
131
  local ____customStage_doorPNGPaths_bossRoom_18 = customStage.doorPNGPaths
132
132
  if ____customStage_doorPNGPaths_bossRoom_18 ~= nil then
@@ -135,8 +135,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
135
135
  return ____customStage_doorPNGPaths_bossRoom_18
136
136
  end
137
137
  end
138
- ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_15_bossrushdoor.anm2"
139
- if ____cond24 then
138
+ ____cond30 = ____cond30 or ____switch30 == "gfx/grid/door_15_bossrushdoor.anm2"
139
+ if ____cond30 then
140
140
  do
141
141
  local ____customStage_doorPNGPaths_bossRush_20 = customStage.doorPNGPaths
142
142
  if ____customStage_doorPNGPaths_bossRush_20 ~= nil then
@@ -157,10 +157,9 @@ function removeEntitiesSpawnedFromGridEntity(self, entities, gridEntity)
157
157
  end
158
158
  --- For `GridEntityType.DECORATION` (1)
159
159
  function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
160
- if customStage.decorationsPNGPath == nil then
160
+ if customStage.decorationsPNGPath == nil and customStage.decorationsANM2Path == nil then
161
161
  return
162
162
  end
163
- local pngPath = removeCharactersBefore(nil, customStage.decorationsPNGPath, "gfx/")
164
163
  if isCustomGridEntity(nil, gridEntity) then
165
164
  return
166
165
  end
@@ -170,17 +169,23 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
170
169
  end
171
170
  local sprite = gridEntity:GetSprite()
172
171
  local fileName = sprite:GetFilename()
173
- if string.lower(fileName) == "gfx/grid/props_01_basement.anm2" then
172
+ if string.lower(fileName) ~= "gfx/grid/props_01_basement.anm2" then
173
+ return
174
+ end
175
+ if customStage.decorationsANM2Path ~= nil then
176
+ local anm2Path = removeCharactersBefore(nil, customStage.decorationsANM2Path, "gfx/")
177
+ sprite:Load(anm2Path, true)
178
+ elseif customStage.decorationsPNGPath ~= nil then
179
+ local pngPath = removeCharactersBefore(nil, customStage.decorationsPNGPath, "gfx/")
174
180
  sprite:ReplaceSpritesheet(0, pngPath)
175
181
  sprite:LoadGraphics()
176
182
  end
177
183
  end
178
184
  --- For `GridEntityType.ROCK` (2)
179
185
  function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
180
- if customStage.rocksPNGPath == nil then
186
+ if customStage.rocksPNGPath == nil and customStage.rocksANM2Path == nil then
181
187
  return
182
188
  end
183
- local pngPath = removeCharactersBefore(nil, customStage.rocksPNGPath, "gfx/")
184
189
  if isCustomGridEntity(nil, gridEntity) then
185
190
  return
186
191
  end
@@ -190,13 +195,34 @@ function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
190
195
  end
191
196
  local sprite = gridEntity:GetSprite()
192
197
  local fileName = sprite:GetFilename()
193
- if fileName == "gfx/grid/grid_rock.anm2" then
194
- sprite:ReplaceSpritesheet(0, pngPath)
195
- sprite:LoadGraphics()
196
- elseif fileName == "gfx/grid/grid_pit.anm2" then
197
- sprite:ReplaceSpritesheet(1, pngPath)
198
- sprite:LoadGraphics()
199
- end
198
+ repeat
199
+ local ____switch13 = fileName
200
+ local ____cond13 = ____switch13 == "gfx/grid/grid_rock.anm2"
201
+ if ____cond13 then
202
+ do
203
+ if customStage.rocksANM2Path ~= nil then
204
+ local anm2Path = removeCharactersBefore(nil, customStage.rocksANM2Path, "gfx/")
205
+ sprite:Load(anm2Path, true)
206
+ elseif customStage.rocksPNGPath ~= nil then
207
+ local pngPath = removeCharactersBefore(nil, customStage.rocksPNGPath, "gfx/")
208
+ sprite:ReplaceSpritesheet(0, pngPath)
209
+ sprite:LoadGraphics()
210
+ end
211
+ break
212
+ end
213
+ end
214
+ ____cond13 = ____cond13 or ____switch13 == "gfx/grid/grid_pit.anm2"
215
+ if ____cond13 then
216
+ do
217
+ if customStage.rocksPNGPath ~= nil then
218
+ local pngPath = removeCharactersBefore(nil, customStage.rocksPNGPath, "gfx/")
219
+ sprite:ReplaceSpritesheet(1, pngPath)
220
+ sprite:LoadGraphics()
221
+ end
222
+ break
223
+ end
224
+ end
225
+ until true
200
226
  end
201
227
  --- For `GridEntityType.PIT` (7)
202
228
  function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
@@ -21,7 +21,7 @@ local v = ____v.default
21
21
  -- We arbitrarily choose a ladder for this purpose because it will not automatically despawn after
22
22
  -- time passes, like most other effects.
23
23
  local SHADOW_EFFECT_VARIANT = EffectVariant.LADDER
24
- local SHADOW_EFFECT_SUBTYPE = 102
24
+ local SHADOW_EFFECT_SUB_TYPE = 102
25
25
  --- The animation comes from StageAPI.
26
26
  local ROOM_SHAPE_TO_SHADOW_ANIMATION = {
27
27
  [RoomShape.SHAPE_1x1] = "1x1",
@@ -54,7 +54,7 @@ function ____exports.setShadows(self, customStage)
54
54
  local shadowEffect = spawnEffectWithSeed(
55
55
  nil,
56
56
  SHADOW_EFFECT_VARIANT,
57
- SHADOW_EFFECT_SUBTYPE,
57
+ SHADOW_EFFECT_SUB_TYPE,
58
58
  centerPos,
59
59
  seed
60
60
  )
@@ -1 +1 @@
1
- {"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAuD/D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,eAAe,EAAE,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,eAAe,EAAE,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,eAAe,EAAE,CAKvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKvE"}
1
+ {"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAwD/D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,eAAe,EAAE,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,eAAe,EAAE,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,eAAe,EAAE,CAKvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKvE"}
@@ -38,14 +38,14 @@ local function initCollectibleArraysAndSets(self)
38
38
  ::__continue4::
39
39
  end
40
40
  __TS__ArraySort(ALL_COLLECTIBLES_ARRAY)
41
- __TS__ArraySort(VANILLA_COLLECTIBLES_ARRAY)
42
- __TS__ArraySort(MODDED_COLLECTIBLES_ARRAY)
43
41
  for ____, collectibleType in ipairs(ALL_COLLECTIBLES_ARRAY) do
44
42
  ALL_COLLECTIBLES_SET:add(collectibleType)
45
43
  end
44
+ __TS__ArraySort(VANILLA_COLLECTIBLES_ARRAY)
46
45
  for ____, collectibleType in ipairs(VANILLA_COLLECTIBLES_ARRAY) do
47
46
  VANILLA_COLLECTIBLES_SET:add(collectibleType)
48
47
  end
48
+ __TS__ArraySort(MODDED_COLLECTIBLES_ARRAY)
49
49
  for ____, collectibleType in ipairs(MODDED_COLLECTIBLES_ARRAY) do
50
50
  MODDED_COLLECTIBLES_SET:add(collectibleType)
51
51
  end
@@ -3,7 +3,7 @@ local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
5
  local ____exports = {}
6
- local NON_ALIVE_NPCS_TYPE_VARIANT, NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE
6
+ local NON_ALIVE_NPCS_TYPE_VARIANT, NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
8
  local BegottenVariant = ____isaac_2Dtypescript_2Ddefinitions.BegottenVariant
9
9
  local BigHornVariant = ____isaac_2Dtypescript_2Ddefinitions.BigHornVariant
@@ -34,7 +34,7 @@ function ____exports.isAliveExceptionNPC(self, npc)
34
34
  return true
35
35
  end
36
36
  local entityTypeVariantSubType = (((tostring(npc.Type) .. ".") .. tostring(npc.Variant)) .. ".") .. tostring(npc.SubType)
37
- if NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE:has(entityTypeVariantSubType) then
37
+ if NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE:has(entityTypeVariantSubType) then
38
38
  return true
39
39
  end
40
40
  if ____exports.isDyingEggyWithNoSpidersLeft(nil, npc) then
@@ -86,7 +86,7 @@ NON_ALIVE_NPCS_TYPE_VARIANT = __TS__New(
86
86
  (tostring(EntityType.DARK_ESAU) .. ".") .. tostring(DarkEsauVariant.PIT)
87
87
  }
88
88
  )
89
- NON_ALIVE_NPCS_TYPE_VARIANT_SUBTYPE = __TS__New(
89
+ NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE = __TS__New(
90
90
  Set,
91
91
  {
92
92
  (((tostring(EntityType.CHARGER) .. ".") .. tostring(ChargerVariant.CHARGER)) .. ".") .. tostring(ChargerSubType.MY_SHADOW),
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
3
3
  local ____exports = {}
4
4
  local ____coinSubTypeToValue = require("objects.coinSubTypeToValue")
5
- local COIN_SUBTYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUBTYPE_TO_VALUE
5
+ local COIN_SUB_TYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUB_TYPE_TO_VALUE
6
6
  local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
7
7
  local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
8
8
  local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
@@ -17,7 +17,7 @@ local isHeart = ____pickupVariants.isHeart
17
17
  --- Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
18
18
  -- sub-types.
19
19
  function ____exports.getCoinValue(self, coinSubType)
20
- local value = COIN_SUBTYPE_TO_VALUE[coinSubType]
20
+ local value = COIN_SUB_TYPE_TO_VALUE[coinSubType]
21
21
  return value == nil and DEFAULT_COIN_VALUE or value
22
22
  end
23
23
  --- Helper function to get all of the red heart pickup entities in the room.
@@ -0,0 +1,44 @@
1
+ import { TrinketType } from "isaac-typescript-definitions";
2
+ /**
3
+ * Returns an array containing every valid trinket type in the game, including modded trinkets.
4
+ *
5
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
6
+ * use the `getTrinketSet` helper function instead.
7
+ */
8
+ export declare function getModdedTrinketArray(): readonly TrinketType[];
9
+ /**
10
+ * Returns a set containing every valid trinket type in the game, including modded trinkets.
11
+ *
12
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
13
+ * use the `getTrinketArray` helper function instead.
14
+ */
15
+ export declare function getModdedTrinketSet(): ReadonlySet<TrinketType>;
16
+ /**
17
+ * Returns an array containing every modded trinket type in the game.
18
+ *
19
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
20
+ * use the `getModdedTrinketSet` helper function instead.
21
+ */
22
+ export declare function getTrinketArray(): readonly TrinketType[];
23
+ /**
24
+ * Returns a set containing every modded trinket type in the game.
25
+ *
26
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
27
+ * use the `getModdedTrinketArray` helper function instead.
28
+ */
29
+ export declare function getTrinketSet(): ReadonlySet<TrinketType>;
30
+ /**
31
+ * Returns an array containing every valid vanilla trinket type in the game.
32
+ *
33
+ * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
34
+ * use the `getVanillaTrinketSet` helper function instead.
35
+ */
36
+ export declare function getVanillaTrinketArray(): readonly TrinketType[];
37
+ /**
38
+ * Returns a set containing every valid vanilla trinket type in the game.
39
+ *
40
+ * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
41
+ * use the `getVanillaTrinketArray` helper function instead.
42
+ */
43
+ export declare function getVanillaTrinketSet(): ReadonlySet<TrinketType>;
44
+ //# sourceMappingURL=trinketSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trinketSet.d.ts","sourceRoot":"","sources":["../../src/functions/trinketSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAwD3D;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,WAAW,EAAE,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,CAAC,WAAW,CAAC,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,SAAS,WAAW,EAAE,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAAC,WAAW,CAAC,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,SAAS,WAAW,EAAE,CAK/D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC,CAK/D"}
@@ -0,0 +1,101 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Set = ____lualib.Set
3
+ local __TS__New = ____lualib.__TS__New
4
+ local __TS__ArraySort = ____lualib.__TS__ArraySort
5
+ local ____exports = {}
6
+ local ____cachedClasses = require("core.cachedClasses")
7
+ local itemConfig = ____cachedClasses.itemConfig
8
+ local ____constantsFirstLast = require("core.constantsFirstLast")
9
+ local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
10
+ local LAST_TRINKET_TYPE = ____constantsFirstLast.LAST_TRINKET_TYPE
11
+ local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
12
+ local ____utils = require("functions.utils")
13
+ local irange = ____utils.irange
14
+ local ALL_TRINKETS_ARRAY = {}
15
+ local VANILLA_TRINKETS_ARRAY = {}
16
+ local MODDED_TRINKETS_ARRAY = {}
17
+ local ALL_TRINKETS_SET = __TS__New(Set)
18
+ local VANILLA_TRINKETS_SET = __TS__New(Set)
19
+ local MODDED_TRINKETS_SET = __TS__New(Set)
20
+ local function initTrinketArraysAndSets(self)
21
+ if #ALL_TRINKETS_ARRAY ~= 0 then
22
+ return
23
+ end
24
+ local trinketTypeRange = irange(nil, FIRST_TRINKET_TYPE, LAST_TRINKET_TYPE)
25
+ for ____, trinketType in ipairs(trinketTypeRange) do
26
+ do
27
+ local itemConfigItem = itemConfig:GetTrinket(trinketType)
28
+ if itemConfigItem == nil then
29
+ goto __continue4
30
+ end
31
+ ALL_TRINKETS_ARRAY[#ALL_TRINKETS_ARRAY + 1] = trinketType
32
+ if trinketType <= LAST_VANILLA_TRINKET_TYPE then
33
+ VANILLA_TRINKETS_ARRAY[#VANILLA_TRINKETS_ARRAY + 1] = trinketType
34
+ else
35
+ MODDED_TRINKETS_ARRAY[#MODDED_TRINKETS_ARRAY + 1] = trinketType
36
+ end
37
+ end
38
+ ::__continue4::
39
+ end
40
+ __TS__ArraySort(ALL_TRINKETS_ARRAY)
41
+ for ____, trinketType in ipairs(ALL_TRINKETS_ARRAY) do
42
+ ALL_TRINKETS_SET:add(trinketType)
43
+ end
44
+ __TS__ArraySort(VANILLA_TRINKETS_ARRAY)
45
+ for ____, trinketType in ipairs(VANILLA_TRINKETS_ARRAY) do
46
+ VANILLA_TRINKETS_SET:add(trinketType)
47
+ end
48
+ __TS__ArraySort(MODDED_TRINKETS_ARRAY)
49
+ for ____, trinketType in ipairs(MODDED_TRINKETS_ARRAY) do
50
+ MODDED_TRINKETS_SET:add(trinketType)
51
+ end
52
+ end
53
+ --- Returns an array containing every valid trinket type in the game, including modded trinkets.
54
+ --
55
+ -- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
56
+ -- use the `getTrinketSet` helper function instead.
57
+ function ____exports.getModdedTrinketArray(self)
58
+ initTrinketArraysAndSets(nil)
59
+ return MODDED_TRINKETS_ARRAY
60
+ end
61
+ --- Returns a set containing every valid trinket type in the game, including modded trinkets.
62
+ --
63
+ -- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
64
+ -- use the `getTrinketArray` helper function instead.
65
+ function ____exports.getModdedTrinketSet(self)
66
+ initTrinketArraysAndSets(nil)
67
+ return MODDED_TRINKETS_SET
68
+ end
69
+ --- Returns an array containing every modded trinket type in the game.
70
+ --
71
+ -- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
72
+ -- use the `getModdedTrinketSet` helper function instead.
73
+ function ____exports.getTrinketArray(self)
74
+ initTrinketArraysAndSets(nil)
75
+ return ALL_TRINKETS_ARRAY
76
+ end
77
+ --- Returns a set containing every modded trinket type in the game.
78
+ --
79
+ -- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
80
+ -- use the `getModdedTrinketArray` helper function instead.
81
+ function ____exports.getTrinketSet(self)
82
+ initTrinketArraysAndSets(nil)
83
+ return ALL_TRINKETS_SET
84
+ end
85
+ --- Returns an array containing every valid vanilla trinket type in the game.
86
+ --
87
+ -- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
88
+ -- use the `getVanillaTrinketSet` helper function instead.
89
+ function ____exports.getVanillaTrinketArray(self)
90
+ initTrinketArraysAndSets(nil)
91
+ return VANILLA_TRINKETS_ARRAY
92
+ end
93
+ --- Returns a set containing every valid vanilla trinket type in the game.
94
+ --
95
+ -- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
96
+ -- use the `getVanillaTrinketArray` helper function instead.
97
+ function ____exports.getVanillaTrinketSet(self)
98
+ initTrinketArraysAndSets(nil)
99
+ return VANILLA_TRINKETS_SET
100
+ end
101
+ return ____exports
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export { registerCharacterStats } from "./features/characterStats";
19
19
  export { getCollectibleItemPoolType } from "./features/collectibleItemPoolType";
20
20
  export { initCustomDoor, spawnCustomDoor } from "./features/customDoor";
21
21
  export { removeCustomGridEntity, spawnCustomGridEntity, } from "./features/customGridEntity";
22
+ export { registerCustomPickup } from "./features/customPickup";
22
23
  export * from "./features/customStage/exports";
23
24
  export * from "./features/customTrapdoor/exports";
24
25
  export * from "./features/debugDisplay/exports";
@@ -139,6 +140,7 @@ export * from "./functions/transformations";
139
140
  export * from "./functions/trinketCacheFlag";
140
141
  export * from "./functions/trinketGive";
141
142
  export * from "./functions/trinkets";
143
+ export * from "./functions/trinketSet";
142
144
  export * from "./functions/tstlClass";
143
145
  export * from "./functions/types";
144
146
  export * from "./functions/ui";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;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