isaacscript-common 1.2.187 → 1.2.190

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,7 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- export declare function getDefaultPlayerStat(cacheFlag: CacheFlag): float | boolean | undefined;
2
+ /**
3
+ * Returns the starting stat that Isaac (the default character) starts with.
4
+ *
5
+ * For example, if you pass this function `CacheFlag.CACHE_DAMAGE`, it will return 3.5.
6
+ */
7
+ export declare function getDefaultPlayerStat(cacheFlag: CacheFlag): number | undefined;
@@ -1,5 +1,4 @@
1
- local ____lualib = require("lualib_bundle")
2
- local Map = ____lualib.Map
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
3
2
  local ____exports = {}
4
3
  local ____defaultPlayerStatMap = require("maps.defaultPlayerStatMap")
5
4
  local DEFAULT_PLAYER_STAT_MAP = ____defaultPlayerStatMap.DEFAULT_PLAYER_STAT_MAP
@@ -9,4 +9,4 @@ export declare function onSetSeed(): boolean;
9
9
  * Helper function to restart the game using the console command of "restart". You can optionally
10
10
  * specify a `PlayerType` to restart the game as that character.
11
11
  */
12
- export declare function restart(character?: PlayerType): void;
12
+ export declare function restart(character?: PlayerType | int): void;
@@ -16,7 +16,7 @@ function ____exports.restart(self, character)
16
16
  Isaac.ExecuteCommand("restart")
17
17
  return
18
18
  end
19
- if character < 0 or character >= PlayerType.NUM_PLAYER_TYPES then
19
+ if character < 0 then
20
20
  error(("Restarting as a character of " .. tostring(character)) .. " would crash the game.")
21
21
  end
22
22
  log("Restarting as character: " .. tostring(character))
@@ -1,2 +1,2 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- export declare const DEFAULT_PLAYER_STAT_MAP: Map<CacheFlag, number | boolean>;
2
+ export declare const DEFAULT_PLAYER_STAT_MAP: ReadonlyMap<CacheFlag, number>;
@@ -8,7 +8,6 @@ ____exports.DEFAULT_PLAYER_STAT_MAP = __TS__New(Map, {
8
8
  {CacheFlag.CACHE_SHOTSPEED, 1},
9
9
  {CacheFlag.CACHE_RANGE, 6.5},
10
10
  {CacheFlag.CACHE_SPEED, 1},
11
- {CacheFlag.CACHE_FLYING, false},
12
11
  {CacheFlag.CACHE_LUCK, 0}
13
12
  })
14
13
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.187",
3
+ "version": "1.2.190",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",