isaacscript-common 20.13.0 → 20.13.1

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.13.0
3
+ isaacscript-common 20.13.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -41865,6 +41865,8 @@ local ____roomData = require("src.functions.roomData")
41865
41865
  local getRoomSubType = ____roomData.getRoomSubType
41866
41866
  local ____string = require("src.functions.string")
41867
41867
  local removeCharactersBefore = ____string.removeCharactersBefore
41868
+ local ____ui = require("src.functions.ui")
41869
+ local getScreenCenterPos = ____ui.getScreenCenterPos
41868
41870
  local ____utils = require("src.functions.utils")
41869
41871
  local eRange = ____utils.eRange
41870
41872
  local ____bossNamePNGFileNames = require("src.objects.bossNamePNGFileNames")
@@ -42087,9 +42089,7 @@ function ____exports.versusScreenPostRender(self, v, pause, disableAllSound)
42087
42089
  finishVersusScreenAnimation(nil, v, pause, disableAllSound)
42088
42090
  return
42089
42091
  end
42090
- local room = game:GetRoom()
42091
- local centerPos = room:GetCenterPos()
42092
- local position = Isaac.WorldToRenderPosition(centerPos)
42092
+ local position = getScreenCenterPos(nil)
42093
42093
  versusScreenBackgroundSprite:RenderLayer(VersusScreenLayer.BACKGROUND, position)
42094
42094
  versusScreenBackgroundSprite:Update()
42095
42095
  versusScreenSprite:RenderLayer(VersusScreenLayer.OVERLAY, position)
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/customStages/versusScreen.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAOzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAU/C,UAAU,gBAAgB;IACxB,GAAG,EAAE;QACH,uBAAuB,EAAE,OAAO,CAAC;KAClC,CAAC;CACH;AA8ED,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,gBAAgB,EACnB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,GACzB,IAAI,CA0GN;AAiGD,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,gBAAgB,EACnB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,GAC/B,IAAI,CAwCN"}
1
+ {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/customStages/versusScreen.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAOzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAU/C,UAAU,gBAAgB;IACxB,GAAG,EAAE;QACH,uBAAuB,EAAE,OAAO,CAAC;KAClC,CAAC;CACH;AA8ED,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,gBAAgB,EACnB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,GACzB,IAAI,CA0GN;AAiGD,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,gBAAgB,EACnB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,GAC/B,IAAI,CAsCN"}
@@ -20,6 +20,8 @@ local ____roomData = require("src.functions.roomData")
20
20
  local getRoomSubType = ____roomData.getRoomSubType
21
21
  local ____string = require("src.functions.string")
22
22
  local removeCharactersBefore = ____string.removeCharactersBefore
23
+ local ____ui = require("src.functions.ui")
24
+ local getScreenCenterPos = ____ui.getScreenCenterPos
23
25
  local ____utils = require("src.functions.utils")
24
26
  local eRange = ____utils.eRange
25
27
  local ____bossNamePNGFileNames = require("src.objects.bossNamePNGFileNames")
@@ -254,9 +256,7 @@ function ____exports.versusScreenPostRender(self, v, pause, disableAllSound)
254
256
  finishVersusScreenAnimation(nil, v, pause, disableAllSound)
255
257
  return
256
258
  end
257
- local room = game:GetRoom()
258
- local centerPos = room:GetCenterPos()
259
- local position = Isaac.WorldToRenderPosition(centerPos)
259
+ local position = getScreenCenterPos(nil)
260
260
  versusScreenBackgroundSprite:RenderLayer(VersusScreenLayer.BACKGROUND, position)
261
261
  versusScreenBackgroundSprite:Update()
262
262
  versusScreenSprite:RenderLayer(VersusScreenLayer.OVERLAY, position)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "20.13.0",
3
+ "version": "20.13.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -12,6 +12,7 @@ import { arrayRemove } from "../../../../functions/array";
12
12
  import { getBosses } from "../../../../functions/bosses";
13
13
  import { getRoomSubType } from "../../../../functions/roomData";
14
14
  import { removeCharactersBefore } from "../../../../functions/string";
15
+ import { getScreenCenterPos } from "../../../../functions/ui";
15
16
  import { eRange } from "../../../../functions/utils";
16
17
  import { CustomStage } from "../../../../interfaces/private/CustomStage";
17
18
  import { BOSS_NAME_PNG_FILE_NAMES } from "../../../../objects/bossNamePNGFileNames";
@@ -340,9 +341,7 @@ export function versusScreenPostRender(
340
341
  return;
341
342
  }
342
343
 
343
- const room = game.GetRoom();
344
- const centerPos = room.GetCenterPos();
345
- const position = Isaac.WorldToRenderPosition(centerPos);
344
+ const position = getScreenCenterPos();
346
345
 
347
346
  // First, we render the background.
348
347
  versusScreenBackgroundSprite.RenderLayer(