isaacscript-common 20.14.3 → 20.14.4

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.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 20.14.3
3
+ isaacscript-common 20.14.4
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -25,15 +25,7 @@ information about using TypeScript, see the website: https://isaacscript.github.
25
25
 
26
26
  --]]
27
27
 
28
- ---@diagnostic disable: assign-type-mismatch
29
- ---@diagnostic disable: deprecated
30
- ---@diagnostic disable: lowercase-global
31
- ---@diagnostic disable: need-check-nil
32
- ---@diagnostic disable: redefined-local
33
- ---@diagnostic disable: redundant-parameter
34
- ---@diagnostic disable: unused-function
35
- ---@diagnostic disable: unused-local
36
- ---@diagnostic disable: unused-vararg
28
+ ---@diagnostic disable
37
29
 
38
30
 
39
31
  local ____modules = {}
@@ -42493,6 +42485,7 @@ function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakTex
42493
42485
  local baseStageType = customStage.baseStageType == nil and DEFAULT_BASE_STAGE_TYPE or customStage.baseStageType
42494
42486
  local reseed = asNumber(nil, stage) >= baseStage
42495
42487
  setStage(nil, baseStage, baseStageType, reseed)
42488
+ musicManager:Disable()
42496
42489
  self:setStageRoomsData(customStage, rng, verbose)
42497
42490
  local targetStage = CUSTOM_FLOOR_STAGE
42498
42491
  local targetStageType = CUSTOM_FLOOR_STAGE_TYPE
@@ -42504,8 +42497,9 @@ function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakTex
42504
42497
  end)
42505
42498
  end
42506
42499
  local music = customStage.music == nil and getMusicForStage(nil, baseStage, baseStageType) or Isaac.GetMusicIdByName(customStage.music)
42507
- self.runInNFrames:runNextGameFrame(function()
42508
- musicManager:Play(music, 0.5)
42500
+ self.runInNFrames:runNextRenderFrame(function()
42501
+ musicManager:Enable()
42502
+ musicManager:Crossfade(music)
42509
42503
  end)
42510
42504
  end
42511
42505
  function CustomStages.prototype.disableCustomStage(self)
@@ -1 +1 @@
1
- {"version":3,"file":"CustomStages.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomStages.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoChD,qBAAa,YAAa,SAAQ,OAAO;IA8BvC,oCAAoC;IACpC,OAAO,CAAC,eAAe,CAAkC;IAEzD,+BAA+B;IAC/B,OAAO,CAAC,yBAAyB,CAAwC;IAEzE,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,sBAAsB,CAAyB;IACvD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,YAAY,CAAe;IAqDnC,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,6BAA6B;IAOrC,OAAO,CAAC,eAAe,CAarB;IAGF,OAAO,CAAC,UAAU,CAQhB;IAGF,OAAO,CAAC,aAAa,CAcnB;IAGF,OAAO,CAAC,eAAe,CAUrB;IAIF,OAAO,CAAC,2BAA2B,CAejC;IAGF,OAAO,CAAC,kBAAkB,CAqBxB;IAGF,OAAO,CAAC,oBAAoB,CAe1B;IAEF,gDAAgD;IAChD,OAAO,CAAC,iBAAiB;IA+FzB;;;;;;;;;;;;;;;;OAgBG;IAEI,cAAc,CACnB,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI;IAiFP;;;;;OAKG;IAEI,kBAAkB,IAAI,IAAI;CAGlC"}
1
+ {"version":3,"file":"CustomStages.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomStages.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoChD,qBAAa,YAAa,SAAQ,OAAO;IA8BvC,oCAAoC;IACpC,OAAO,CAAC,eAAe,CAAkC;IAEzD,+BAA+B;IAC/B,OAAO,CAAC,yBAAyB,CAAwC;IAEzE,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,sBAAsB,CAAyB;IACvD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,YAAY,CAAe;IAqDnC,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,6BAA6B;IAOrC,OAAO,CAAC,eAAe,CAarB;IAGF,OAAO,CAAC,UAAU,CAQhB;IAGF,OAAO,CAAC,aAAa,CAcnB;IAGF,OAAO,CAAC,eAAe,CAUrB;IAIF,OAAO,CAAC,2BAA2B,CAejC;IAGF,OAAO,CAAC,kBAAkB,CAqBxB;IAGF,OAAO,CAAC,oBAAoB,CAe1B;IAEF,gDAAgD;IAChD,OAAO,CAAC,iBAAiB;IA+FzB;;;;;;;;;;;;;;;;OAgBG;IAEI,cAAc,CACnB,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI;IAsFP;;;;;OAKG;IAEI,kBAAkB,IAAI,IAAI;CAGlC"}
@@ -330,6 +330,7 @@ function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakTex
330
330
  local baseStageType = customStage.baseStageType == nil and DEFAULT_BASE_STAGE_TYPE or customStage.baseStageType
331
331
  local reseed = asNumber(nil, stage) >= baseStage
332
332
  setStage(nil, baseStage, baseStageType, reseed)
333
+ musicManager:Disable()
333
334
  self:setStageRoomsData(customStage, rng, verbose)
334
335
  local targetStage = CUSTOM_FLOOR_STAGE
335
336
  local targetStageType = CUSTOM_FLOOR_STAGE_TYPE
@@ -341,8 +342,9 @@ function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakTex
341
342
  end)
342
343
  end
343
344
  local music = customStage.music == nil and getMusicForStage(nil, baseStage, baseStageType) or Isaac.GetMusicIdByName(customStage.music)
344
- self.runInNFrames:runNextGameFrame(function()
345
- musicManager:Play(music, 0.5)
345
+ self.runInNFrames:runNextRenderFrame(function()
346
+ musicManager:Enable()
347
+ musicManager:Crossfade(music)
346
348
  end)
347
349
  end
348
350
  function CustomStages.prototype.disableCustomStage(self)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "20.14.3",
3
+ "version": "20.14.4",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -476,6 +476,10 @@ export class CustomStages extends Feature {
476
476
 
477
477
  setStage(baseStage, baseStageType, reseed);
478
478
 
479
+ // As soon as we warp to the base stage, the base stage music will begin to play. Thus, we
480
+ // temporarily mute all music.
481
+ musicManager.Disable();
482
+
479
483
  this.setStageRoomsData(customStage, rng, verbose);
480
484
 
481
485
  // Set the stage to an invalid value, which will prevent the walls and floors from loading.
@@ -503,10 +507,11 @@ export class CustomStages extends Feature {
503
507
  customStage.music === undefined
504
508
  ? getMusicForStage(baseStage, baseStageType)
505
509
  : Isaac.GetMusicIdByName(customStage.music);
506
- this.runInNFrames.runNextGameFrame(() => {
510
+ this.runInNFrames.runNextRenderFrame(() => {
507
511
  // By default, the `MusicManager.Play` method will play the music at max volume (1.0), which
508
512
  // is around twice as loud as the vanilla music plays.
509
- musicManager.Play(music, 0.5);
513
+ musicManager.Enable();
514
+ musicManager.Crossfade(music);
510
515
  });
511
516
 
512
517
  // We must reload the current room in order for the `Level.SetStage` method to take effect.