isaacscript-common 2.2.0 → 2.3.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.
@@ -1,2 +1,8 @@
1
- /** Returns a 3-tuple of Language enum value, language name and resource folder suffix. */
1
+ /**
2
+ * Helper function to convert the language abbreviation from `Options.Language` to the "full"
3
+ * language name.
4
+ *
5
+ * For example, if the current language is set to Korean, `Options.Language` will be set to "kr",
6
+ * and this function will return "Korean".
7
+ */
2
8
  export declare function getLanguageName(): string;
@@ -1,15 +1,6 @@
1
1
  local ____exports = {}
2
- local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
- local LanguageAbbreviation = ____isaac_2Dtypescript_2Ddefinitions.LanguageAbbreviation
4
- local LANGUAGE_NAMES = {
5
- [LanguageAbbreviation.ENGLISH] = "English",
6
- [LanguageAbbreviation.JAPANESE] = "Japanese",
7
- [LanguageAbbreviation.KOREAN] = "Korean",
8
- [LanguageAbbreviation.CHINESE_SIMPLE] = "Chinese (Simple)",
9
- [LanguageAbbreviation.RUSSIAN] = "Russian",
10
- [LanguageAbbreviation.GERMAN] = "German",
11
- [LanguageAbbreviation.SPANISH] = "Spanish"
12
- }
2
+ local ____languageNames = require("objects.languageNames")
3
+ local LANGUAGE_NAMES = ____languageNames.LANGUAGE_NAMES
13
4
  function ____exports.getLanguageName(self)
14
5
  local languageAbbreviation = Options.Language
15
6
  return LANGUAGE_NAMES[languageAbbreviation]
package/index.d.ts CHANGED
@@ -107,6 +107,7 @@ export * from "./functions/ui";
107
107
  export * from "./functions/utils";
108
108
  export * from "./functions/vector";
109
109
  export * from "./interfaces/AddCallbackParameterCustom";
110
+ export * from "./interfaces/ChargeBarSprites";
110
111
  export * from "./interfaces/JSONDoor";
111
112
  export * from "./interfaces/JSONEntity";
112
113
  export * from "./interfaces/JSONRoom";
@@ -4,7 +4,7 @@ import { RoomShape } from "isaac-typescript-definitions";
4
4
  * wall would be at "Vector(-1, -1)".)
5
5
  */
6
6
  export declare const L_ROOM_SHAPE_TO_RECTANGLES: {
7
- [key in RoomShape]?: [
7
+ readonly [key in RoomShape]?: readonly [
8
8
  verticalTopLeft: Vector,
9
9
  verticalBottomRight: Vector,
10
10
  horizontalTopLeft: Vector,
@@ -6,12 +6,12 @@
6
6
  * `copyColor` function.
7
7
  */
8
8
  export declare const COLORS: {
9
- Black: Color;
10
- Red: Color;
11
- Green: Color;
12
- Blue: Color;
13
- Yellow: Color;
14
- Pink: Color;
15
- Cyan: Color;
16
- White: Color;
9
+ readonly Black: Color;
10
+ readonly Red: Color;
11
+ readonly Green: Color;
12
+ readonly Blue: Color;
13
+ readonly Yellow: Color;
14
+ readonly Pink: Color;
15
+ readonly Cyan: Color;
16
+ readonly White: Color;
17
17
  };
@@ -0,0 +1,4 @@
1
+ import { LanguageAbbreviation } from "isaac-typescript-definitions";
2
+ export declare const LANGUAGE_NAMES: {
3
+ readonly [key in LanguageAbbreviation]: string;
4
+ };
@@ -0,0 +1,13 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local LanguageAbbreviation = ____isaac_2Dtypescript_2Ddefinitions.LanguageAbbreviation
4
+ ____exports.LANGUAGE_NAMES = {
5
+ [LanguageAbbreviation.ENGLISH] = "English",
6
+ [LanguageAbbreviation.JAPANESE] = "Japanese",
7
+ [LanguageAbbreviation.KOREAN] = "Korean",
8
+ [LanguageAbbreviation.CHINESE_SIMPLE] = "Chinese (Simple)",
9
+ [LanguageAbbreviation.RUSSIAN] = "Russian",
10
+ [LanguageAbbreviation.GERMAN] = "German",
11
+ [LanguageAbbreviation.SPANISH] = "Spanish"
12
+ }
13
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "2.2.0",
3
+ "version": "2.3.2",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "index",
23
23
  "types": "index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^2.0.53"
25
+ "isaac-typescript-definitions": "^2.0.54"
26
26
  }
27
- }
27
+ }