isaacscript-common 21.8.4 → 22.0.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.
@@ -762,13 +762,7 @@ local function __TS__AsyncAwaiter(generator)
762
762
  function(____, resolve, reject)
763
763
  local adopt, fulfilled, step, resolved, asyncCoroutine
764
764
  function adopt(self, value)
765
- local ____temp_0
766
- if __TS__InstanceOf(value, __TS__Promise) then
767
- ____temp_0 = value
768
- else
769
- ____temp_0 = __TS__Promise.resolve(value)
770
- end
771
- return ____temp_0
765
+ return __TS__InstanceOf(value, __TS__Promise) and value or __TS__Promise.resolve(value)
772
766
  end
773
767
  function fulfilled(self, value)
774
768
  local success, resultOrError = coroutine.resume(asyncCoroutine, value)
@@ -785,8 +779,8 @@ local function __TS__AsyncAwaiter(generator)
785
779
  if coroutine.status(asyncCoroutine) == "dead" then
786
780
  resolve(nil, result)
787
781
  else
788
- local ____self_1 = adopt(nil, result)
789
- ____self_1["then"](____self_1, fulfilled, reject)
782
+ local ____self_0 = adopt(nil, result)
783
+ ____self_0["then"](____self_0, fulfilled, reject)
790
784
  end
791
785
  end
792
786
  resolved = false
@@ -795,8 +789,8 @@ local function __TS__AsyncAwaiter(generator)
795
789
  asyncCoroutine,
796
790
  function(____, v)
797
791
  resolved = true
798
- local ____self_2 = adopt(nil, v)
799
- ____self_2["then"](____self_2, resolve, reject)
792
+ local ____self_1 = adopt(nil, v)
793
+ ____self_1["then"](____self_1, resolve, reject)
800
794
  end
801
795
  )
802
796
  if success then
@@ -903,7 +897,7 @@ do
903
897
  local descriptors = rawget(metatable, "_descriptors")
904
898
  if descriptors then
905
899
  local descriptor = descriptors[key]
906
- if descriptor then
900
+ if descriptor ~= nil then
907
901
  if descriptor.get then
908
902
  return descriptor.get(self)
909
903
  end
@@ -919,7 +913,7 @@ do
919
913
  local descriptors = rawget(metatable, "_descriptors")
920
914
  if descriptors then
921
915
  local descriptor = descriptors[key]
922
- if descriptor then
916
+ if descriptor ~= nil then
923
917
  if descriptor.set then
924
918
  descriptor.set(self, value)
925
919
  else
@@ -972,7 +966,7 @@ local function __TS__Decorate(decorators, target, key, desc)
972
966
  local i = #decorators
973
967
  while i >= 0 do
974
968
  local decorator = decorators[i + 1]
975
- if decorator then
969
+ if decorator ~= nil then
976
970
  local oldResult = result
977
971
  if key == nil then
978
972
  result = decorator(nil, result)
@@ -1045,7 +1039,7 @@ do
1045
1039
  if isClassicLua or caller and caller.func ~= error then
1046
1040
  return description
1047
1041
  else
1048
- return (tostring(description) .. "\n") .. self.stack
1042
+ return (description .. "\n") .. tostring(self.stack)
1049
1043
  end
1050
1044
  end
1051
1045
  end
@@ -1056,7 +1050,7 @@ do
1056
1050
  {__call = function(____, _self, message) return __TS__New(Type, message) end}
1057
1051
  )
1058
1052
  end
1059
- local ____initErrorClass_2 = initErrorClass
1053
+ local ____initErrorClass_1 = initErrorClass
1060
1054
  local ____class_0 = __TS__Class()
1061
1055
  ____class_0.name = ""
1062
1056
  function ____class_0.prototype.____constructor(self, message)
@@ -1067,31 +1061,25 @@ do
1067
1061
  self.name = "Error"
1068
1062
  self.stack = getErrorStack(nil, self.constructor.new)
1069
1063
  local metatable = getmetatable(self)
1070
- if not metatable.__errorToStringPatched then
1064
+ if metatable and not metatable.__errorToStringPatched then
1071
1065
  metatable.__errorToStringPatched = true
1072
1066
  metatable.__tostring = wrapErrorToString(nil, metatable.__tostring)
1073
1067
  end
1074
1068
  end
1075
1069
  function ____class_0.prototype.__tostring(self)
1076
- local ____temp_1
1077
- if self.message ~= "" then
1078
- ____temp_1 = (self.name .. ": ") .. self.message
1079
- else
1080
- ____temp_1 = self.name
1081
- end
1082
- return ____temp_1
1070
+ return self.message ~= "" and (self.name .. ": ") .. self.message or self.name
1083
1071
  end
1084
- Error = ____initErrorClass_2(nil, ____class_0, "Error")
1072
+ Error = ____initErrorClass_1(nil, ____class_0, "Error")
1085
1073
  local function createErrorClass(self, name)
1086
- local ____initErrorClass_4 = initErrorClass
1087
- local ____class_3 = __TS__Class()
1088
- ____class_3.name = ____class_3.name
1089
- __TS__ClassExtends(____class_3, Error)
1090
- function ____class_3.prototype.____constructor(self, ...)
1091
- ____class_3.____super.prototype.____constructor(self, ...)
1074
+ local ____initErrorClass_3 = initErrorClass
1075
+ local ____class_2 = __TS__Class()
1076
+ ____class_2.name = ____class_2.name
1077
+ __TS__ClassExtends(____class_2, Error)
1078
+ function ____class_2.prototype.____constructor(self, ...)
1079
+ ____class_2.____super.prototype.____constructor(self, ...)
1092
1080
  self.name = name
1093
1081
  end
1094
- return ____initErrorClass_4(nil, ____class_3, name)
1082
+ return ____initErrorClass_3(nil, ____class_2, name)
1095
1083
  end
1096
1084
  RangeError = createErrorClass(nil, "RangeError")
1097
1085
  ReferenceError = createErrorClass(nil, "ReferenceError")
@@ -1261,13 +1249,13 @@ do
1261
1249
  self.size = self.size - 1
1262
1250
  local next = self.nextKey[key]
1263
1251
  local previous = self.previousKey[key]
1264
- if next and previous then
1252
+ if next ~= nil and previous ~= nil then
1265
1253
  self.nextKey[previous] = next
1266
1254
  self.previousKey[next] = previous
1267
- elseif next then
1255
+ elseif next ~= nil then
1268
1256
  self.firstKey = next
1269
1257
  self.previousKey[next] = nil
1270
- elseif previous then
1258
+ elseif previous ~= nil then
1271
1259
  self.lastKey = previous
1272
1260
  self.nextKey[previous] = nil
1273
1261
  else
@@ -1453,13 +1441,7 @@ do
1453
1441
  end
1454
1442
 
1455
1443
  local function __TS__ObjectDefineProperty(target, key, desc)
1456
- local ____temp_0
1457
- if type(key) == "number" then
1458
- ____temp_0 = key + 1
1459
- else
1460
- ____temp_0 = key
1461
- end
1462
- local luaKey = ____temp_0
1444
+ local luaKey = type(key) == "number" and key + 1 or key
1463
1445
  local value = rawget(target, luaKey)
1464
1446
  local hasGetterOrSetter = desc.get ~= nil or desc.set ~= nil
1465
1447
  local descriptor
@@ -1473,39 +1455,39 @@ local function __TS__ObjectDefineProperty(target, key, desc)
1473
1455
  descriptor = desc
1474
1456
  else
1475
1457
  local valueExists = value ~= nil
1476
- local ____desc_set_5 = desc.set
1477
- local ____desc_get_6 = desc.get
1478
- local ____temp_1
1458
+ local ____desc_set_4 = desc.set
1459
+ local ____desc_get_5 = desc.get
1460
+ local ____temp_0
1479
1461
  if desc.configurable ~= nil then
1480
- ____temp_1 = desc.configurable
1462
+ ____temp_0 = desc.configurable
1481
1463
  else
1482
- ____temp_1 = valueExists
1464
+ ____temp_0 = valueExists
1483
1465
  end
1484
- local ____temp_2
1466
+ local ____temp_1
1485
1467
  if desc.enumerable ~= nil then
1486
- ____temp_2 = desc.enumerable
1468
+ ____temp_1 = desc.enumerable
1487
1469
  else
1488
- ____temp_2 = valueExists
1470
+ ____temp_1 = valueExists
1489
1471
  end
1490
- local ____temp_3
1472
+ local ____temp_2
1491
1473
  if desc.writable ~= nil then
1492
- ____temp_3 = desc.writable
1474
+ ____temp_2 = desc.writable
1493
1475
  else
1494
- ____temp_3 = valueExists
1476
+ ____temp_2 = valueExists
1495
1477
  end
1496
- local ____temp_4
1478
+ local ____temp_3
1497
1479
  if desc.value ~= nil then
1498
- ____temp_4 = desc.value
1480
+ ____temp_3 = desc.value
1499
1481
  else
1500
- ____temp_4 = value
1482
+ ____temp_3 = value
1501
1483
  end
1502
1484
  descriptor = {
1503
- set = ____desc_set_5,
1504
- get = ____desc_get_6,
1505
- configurable = ____temp_1,
1506
- enumerable = ____temp_2,
1507
- writable = ____temp_3,
1508
- value = ____temp_4
1485
+ set = ____desc_set_4,
1486
+ get = ____desc_get_5,
1487
+ configurable = ____temp_0,
1488
+ enumerable = ____temp_1,
1489
+ writable = ____temp_2,
1490
+ value = ____temp_3
1509
1491
  }
1510
1492
  end
1511
1493
  __TS__SetDescriptor(target, luaKey, descriptor)
@@ -1575,14 +1557,8 @@ end
1575
1557
 
1576
1558
  local function __TS__ParseFloat(numberString)
1577
1559
  local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
1578
- if infinityMatch then
1579
- local ____temp_0
1580
- if __TS__StringAccess(infinityMatch, 0) == "-" then
1581
- ____temp_0 = -math.huge
1582
- else
1583
- ____temp_0 = math.huge
1584
- end
1585
- return ____temp_0
1560
+ if infinityMatch ~= nil then
1561
+ return __TS__StringAccess(infinityMatch, 0) == "-" and -math.huge or math.huge
1586
1562
  end
1587
1563
  local number = tonumber(__TS__Match(numberString, "^%s*(-?%d+%.?%d*)"))
1588
1564
  return number or 0 / 0
@@ -1613,27 +1589,15 @@ do
1613
1589
  if base == nil then
1614
1590
  base = 10
1615
1591
  local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
1616
- if hexMatch then
1592
+ if hexMatch ~= nil then
1617
1593
  base = 16
1618
- local ____TS__Match_result__0_0
1619
- if __TS__Match(hexMatch, "-") then
1620
- ____TS__Match_result__0_0 = "-" .. __TS__StringSubstring(numberString, #hexMatch)
1621
- else
1622
- ____TS__Match_result__0_0 = __TS__StringSubstring(numberString, #hexMatch)
1623
- end
1624
- numberString = ____TS__Match_result__0_0
1594
+ numberString = __TS__Match(hexMatch, "-") and "-" .. __TS__StringSubstring(numberString, #hexMatch) or __TS__StringSubstring(numberString, #hexMatch)
1625
1595
  end
1626
1596
  end
1627
1597
  if base < 2 or base > 36 then
1628
1598
  return 0 / 0
1629
1599
  end
1630
- local ____temp_1
1631
- if base <= 10 then
1632
- ____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, base)
1633
- else
1634
- ____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
1635
- end
1636
- local allowedDigits = ____temp_1
1600
+ local allowedDigits = base <= 10 and __TS__StringSubstring(parseIntBasePattern, 0, base) or __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
1637
1601
  local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
1638
1602
  local number = tonumber(
1639
1603
  __TS__Match(numberString, pattern),
@@ -1872,13 +1836,13 @@ do
1872
1836
  self.size = self.size - 1
1873
1837
  local next = self.nextKey[value]
1874
1838
  local previous = self.previousKey[value]
1875
- if next and previous then
1839
+ if next ~= nil and previous ~= nil then
1876
1840
  self.nextKey[previous] = next
1877
1841
  self.previousKey[next] = previous
1878
- elseif next then
1842
+ elseif next ~= nil then
1879
1843
  self.firstKey = next
1880
1844
  self.previousKey[next] = nil
1881
- elseif previous then
1845
+ elseif previous ~= nil then
1882
1846
  self.lastKey = previous
1883
1847
  self.nextKey[previous] = nil
1884
1848
  else
@@ -2066,7 +2030,7 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2066
2030
  if thread == nil and message == nil and level == nil then
2067
2031
  trace = originalTraceback()
2068
2032
  elseif __TS__StringIncludes(_VERSION, "Lua 5.0") then
2069
- trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. message)
2033
+ trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. tostring(message))
2070
2034
  else
2071
2035
  trace = originalTraceback(thread, message, level)
2072
2036
  end
@@ -2075,12 +2039,12 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2075
2039
  end
2076
2040
  local function replacer(____, file, srcFile, line)
2077
2041
  local fileSourceMap = _G.__TS__sourcemap[file]
2078
- if fileSourceMap and fileSourceMap[line] then
2042
+ if fileSourceMap ~= nil and fileSourceMap[line] ~= nil then
2079
2043
  local data = fileSourceMap[line]
2080
2044
  if type(data) == "number" then
2081
2045
  return (srcFile .. ":") .. tostring(data)
2082
2046
  end
2083
- return (tostring(data.file) .. ":") .. tostring(data.line)
2047
+ return (data.file .. ":") .. tostring(data.line)
2084
2048
  end
2085
2049
  return (file .. ":") .. line
2086
2050
  end
@@ -2091,14 +2055,14 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2091
2055
  )
2092
2056
  local function stringReplacer(____, file, line)
2093
2057
  local fileSourceMap = _G.__TS__sourcemap[file]
2094
- if fileSourceMap and fileSourceMap[line] then
2058
+ if fileSourceMap ~= nil and fileSourceMap[line] ~= nil then
2095
2059
  local chunkName = __TS__Match(file, "%[string \"([^\"]+)\"%]")
2096
2060
  local sourceName = string.gsub(chunkName, ".lua$", ".ts")
2097
2061
  local data = fileSourceMap[line]
2098
2062
  if type(data) == "number" then
2099
2063
  return (sourceName .. ":") .. tostring(data)
2100
2064
  end
2101
- return (tostring(data.file) .. ":") .. tostring(data.line)
2065
+ return (data.file .. ":") .. tostring(data.line)
2102
2066
  end
2103
2067
  return (file .. ":") .. line
2104
2068
  end
@@ -2218,13 +2182,7 @@ do
2218
2182
  return source
2219
2183
  end
2220
2184
  local before = sub(source, 1, startPos - 1)
2221
- local ____temp_0
2222
- if type(replaceValue) == "string" then
2223
- ____temp_0 = replaceValue
2224
- else
2225
- ____temp_0 = replaceValue(nil, searchValue, startPos - 1, source)
2226
- end
2227
- local replacement = ____temp_0
2185
+ local replacement = type(replaceValue) == "string" and replaceValue or replaceValue(nil, searchValue, startPos - 1, source)
2228
2186
  local after = sub(source, endPos + 1)
2229
2187
  return (before .. replacement) .. after
2230
2188
  end
@@ -2379,6 +2337,7 @@ do
2379
2337
  return key
2380
2338
  end
2381
2339
  end
2340
+ return nil
2382
2341
  end
2383
2342
  end
2384
2343
 
@@ -19,7 +19,7 @@ export declare function deserializeColor(color: SerializedColor): Color;
19
19
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
20
20
  * @param alpha Optional. The alpha value to use. Default is 1.
21
21
  */
22
- export declare function getRandomColor(seedOrRNG?: Seed | RNG, alpha?: number): Color;
22
+ export declare function getRandomColor(seedOrRNG?: Seed | RNG, alpha?: number): Readonly<Color>;
23
23
  /** Helper function to check if something is an instantiated `Color` object. */
24
24
  export declare function isColor(object: unknown): object is Color;
25
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/functions/color.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAYzE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACt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AAgB,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CA8B9D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,QAAQ,CAAC,KAAK,CAAC,CAQjB;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,KAAK,CAExD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,eAAe,CAM5E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAW5D"}
@@ -6,12 +6,12 @@
6
6
  * @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
7
7
  * @param alpha Optional. Range is from 0 to 1. Default is 1. (The same as the `Color` constructor.)
8
8
  */
9
- export declare function hexToColor(hexString: string, alpha?: number): Color;
9
+ export declare function hexToColor(hexString: string, alpha?: number): Readonly<Color>;
10
10
  /**
11
11
  * Converts a hex string like "#33aa33" to a Color object.
12
12
  *
13
13
  * @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
14
14
  * @param alpha Range is from 0 to 1. Default is 1.
15
15
  */
16
- export declare function hexToKColor(hexString: string, alpha?: number): KColor;
16
+ export declare function hexToKColor(hexString: string, alpha?: number): Readonly<KColor>;
17
17
  //# sourceMappingURL=hex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../../src/functions/hex.ts"],"names":[],"mappings":";;AAIA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,KAAK,CAMhE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,MAAM,CAMlE"}
1
+ {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../../src/functions/hex.ts"],"names":[],"mappings":";;AAIA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAM1E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAM5E"}
@@ -18,7 +18,7 @@ export declare function deserializeKColor(kColor: SerializedKColor): KColor;
18
18
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
19
19
  * @param alpha Optional. The alpha value to use. Default is 1.
20
20
  */
21
- export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number): KColor;
21
+ export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number): Readonly<KColor>;
22
22
  /** Helper function to check if something is an instantiated `KColor` object. */
23
23
  export declare function isKColor(object: unknown): object is KColor;
24
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../../src/functions/kColor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAYzE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC,OAAO,CAAC;CACpD,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CA+BlE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,gFAAgF;AAChF,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AAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE"}
@@ -26,7 +26,7 @@ export declare function getParentFunctionDescription(this: void, levels?: number
26
26
  * @param includeParentFunction Optional. Whether to prefix the message with the function name and
27
27
  * line number, as shown in the above example. Default is true.
28
28
  */
29
- export declare function log(this: void, msg: string, includeParentFunction?: boolean): void;
29
+ export declare function log(this: void, msg: string | number, includeParentFunction?: boolean): void;
30
30
  /**
31
31
  * Helper function to log a message to the "log.txt" file and to print it to the screen at the same
32
32
  * time.
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,EACX,qBAAqB,UAAO,GAC3B,IAAI,CASN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C"}
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,qBAAqB,UAAO,GAC3B,IAAI,CAaN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C"}
@@ -1,4 +1,6 @@
1
1
  local ____exports = {}
2
+ local ____types = require("src.functions.types")
3
+ local isNumber = ____types.isNumber
2
4
  --- Helper function to get the name and the line number of the current calling function.
3
5
  --
4
6
  -- For this function to work properly, the "--luadebug" flag must be enabled. Otherwise, it will
@@ -41,6 +43,9 @@ function ____exports.log(msg, includeParentFunction)
41
43
  if includeParentFunction == nil then
42
44
  includeParentFunction = true
43
45
  end
46
+ if isNumber(nil, msg) then
47
+ msg = tostring(msg)
48
+ end
44
49
  local ____includeParentFunction_0
45
50
  if includeParentFunction then
46
51
  ____includeParentFunction_0 = ____exports.getParentFunctionDescription()
@@ -20,6 +20,15 @@ export declare function addRoomDisplayFlag(roomGridIndex: int | undefined, displ
20
20
  * the changes will be immediately visible.
21
21
  */
22
22
  export declare function clearFloorDisplayFlags(): void;
23
+ /**
24
+ * Helper function to set the value of `DisplayFlag` for a room 0.
25
+ *
26
+ * This function automatically accounts for whether or not MinimapAPI is being used.
27
+ *
28
+ * This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
29
+ * the changes will be immediately visible.
30
+ */
31
+ export declare function clearRoomDisplayFlags(roomGridIndex: int): void;
23
32
  /**
24
33
  * Helper function to get the minimap `DisplayFlag` value for every room on the floor. Returns a map
25
34
  * that is indexed by the room's safe grid index.
@@ -70,13 +79,4 @@ export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<
70
79
  * the `Level.UpdateVisibility` method after you are done.
71
80
  */
72
81
  export declare function setRoomDisplayFlags(roomGridIndex: int | undefined, displayFlags: BitFlags<DisplayFlag>, updateVisibility?: boolean): void;
73
- /**
74
- * Helper function to make a single room visible in a similar way to how the Compass makes a Boss
75
- * Room visible (e.g. by adding `DisplayFlag.SHOW_ICON`).
76
- *
77
- * @param roomGridIndex Set to undefined to use the current room index.
78
- * @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
79
- * make the changes immediately visible. Default is true.
80
- */
81
- export declare function setRoomVisible(roomGridIndex: int | undefined, updateVisibility?: boolean): void;
82
82
  //# sourceMappingURL=minimap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAM5E;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,WAAW,EAAE,WAAW,EACxB,gBAAgB,UAAO,GACtB,IAAI,CAIN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAUtE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAiBvB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAW5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAWN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,EACnC,gBAAgB,UAAO,GACtB,IAAI,CAsBN;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,gBAAgB,UAAO,GACtB,IAAI,CAEN"}
1
+ {"version":3,"file":"minimap.d.ts","sourceRoot":"","sources":["../../../src/functions/minimap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,8BAA8B,CAAC;AAM5E;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,WAAW,EAAE,WAAW,EACxB,gBAAgB,UAAO,GACtB,IAAI,CAIN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAUtE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,GAAG,GAClB,QAAQ,CAAC,WAAW,CAAC,CAiBvB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAW5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,GAC/C,IAAI,CAWN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,EACnC,gBAAgB,UAAO,GACtB,IAAI,CAiCN"}
@@ -4,7 +4,6 @@ local __TS__New = ____lualib.__TS__New
4
4
  local __TS__Iterator = ____lualib.__TS__Iterator
5
5
  local ____exports = {}
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
- local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
8
7
  local DisplayFlagZero = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlagZero
9
8
  local ____cachedClasses = require("src.core.cachedClasses")
10
9
  local game = ____cachedClasses.game
@@ -78,9 +77,15 @@ function ____exports.setRoomDisplayFlags(self, roomGridIndex, displayFlags, upda
78
77
  else
79
78
  local minimapAPIRoomDescriptor = MinimapAPI:GetRoomByIdx(roomGridIndex)
80
79
  if minimapAPIRoomDescriptor == nil then
80
+ if displayFlags == DisplayFlagZero then
81
+ return
82
+ end
81
83
  error("Failed to get the MinimapAPI room descriptor for the room at index: " .. tostring(roomGridIndex))
82
84
  end
83
85
  minimapAPIRoomDescriptor:SetDisplayFlags(displayFlags)
86
+ if displayFlags == DisplayFlagZero then
87
+ minimapAPIRoomDescriptor:Remove()
88
+ end
84
89
  end
85
90
  end
86
91
  --- Helper function to add a `DisplayFlag` to a particular room's minimap display flags (e.g. whether
@@ -109,6 +114,15 @@ end
109
114
  function ____exports.clearFloorDisplayFlags(self)
110
115
  ____exports.setAllDisplayFlags(nil, DisplayFlagZero)
111
116
  end
117
+ --- Helper function to set the value of `DisplayFlag` for a room 0.
118
+ --
119
+ -- This function automatically accounts for whether or not MinimapAPI is being used.
120
+ --
121
+ -- This function automatically calls the `Level.UpdateVisibility` after setting the flags so that
122
+ -- the changes will be immediately visible.
123
+ function ____exports.clearRoomDisplayFlags(self, roomGridIndex)
124
+ ____exports.setRoomDisplayFlags(nil, roomGridIndex, DisplayFlagZero)
125
+ end
112
126
  --- Helper function to get the minimap `DisplayFlag` value for every room on the floor. Returns a map
113
127
  -- that is indexed by the room's safe grid index.
114
128
  --
@@ -141,16 +155,4 @@ function ____exports.setFloorDisplayFlags(self, displayFlagsMap)
141
155
  level:UpdateVisibility()
142
156
  end
143
157
  end
144
- --- Helper function to make a single room visible in a similar way to how the Compass makes a Boss
145
- -- Room visible (e.g. by adding `DisplayFlag.SHOW_ICON`).
146
- --
147
- -- @param roomGridIndex Set to undefined to use the current room index.
148
- -- @param updateVisibility Optional. Whether to call the `Level.UpdateVisibility` method in order to
149
- -- make the changes immediately visible. Default is true.
150
- function ____exports.setRoomVisible(self, roomGridIndex, updateVisibility)
151
- if updateVisibility == nil then
152
- updateVisibility = true
153
- end
154
- ____exports.addRoomDisplayFlag(nil, roomGridIndex, DisplayFlag.SHOW_ICON, updateVisibility)
155
- end
156
158
  return ____exports
@@ -23,7 +23,7 @@ export declare function anyPlayerCloserThan(position: Vector, distance: float):
23
23
  * @param minimumDistance Optional. If specified, will ensure that the randomly generated position
24
24
  * is equal to or greater than the distance provided.
25
25
  */
26
- export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean, minimumDistance?: float): Vector;
26
+ export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean, minimumDistance?: float): Readonly<Vector>;
27
27
  /**
28
28
  * Helper function to get a map containing the positions of every entity in the current room.
29
29
  *
@@ -1 +1 @@
1
- {"version":3,"file":"positionVelocity.d.ts","sourceRoot":"","sources":["../../../src/functions/positionVelocity.ts"],"names":[],"mappings":";;;;AAaA,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,GACZ,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,KAAK,GACd,OAAO,CAKT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,UAAQ,EAC3B,eAAe,CAAC,EAAE,KAAK,GACtB,MAAM,CA4CR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY7E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACrC,QAAQ,CAAC,EAAE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,CAYN"}
@@ -12,20 +12,20 @@ import { RoomShape } from "isaac-typescript-definitions";
12
12
  *
13
13
  * For example, the coordinates of (0, 0) are equal to `Vector(80, 160)`.
14
14
  */
15
- export declare function gridCoordinatesToWorldPosition(x: int, y: int): Vector;
15
+ export declare function gridCoordinatesToWorldPosition(x: int, y: int): Readonly<Vector>;
16
16
  /**
17
17
  * Helper function to convert a grid index to a grid position.
18
18
  *
19
19
  * For example, in a 1x1 room, grid index 0 is equal to "Vector(-1, -1) and grid index 16 is equal
20
20
  * to "Vector(0, 0)".
21
21
  */
22
- export declare function gridIndexToGridPosition(gridIndex: int, roomShape: RoomShape): Vector;
22
+ export declare function gridIndexToGridPosition(gridIndex: int, roomShape: RoomShape): Readonly<Vector>;
23
23
  /**
24
24
  * Helper function to convert a grid position `Vector` to a world position `Vector`.
25
25
  *
26
26
  * For example, the coordinates of (0, 0) are equal to `Vector(80, 160)`.
27
27
  */
28
- export declare function gridPositionToWorldPosition(gridPosition: Vector): Vector;
28
+ export declare function gridPositionToWorldPosition(gridPosition: Vector): Readonly<Vector>;
29
29
  /**
30
30
  * Test if a grid position is actually in the given `RoomShape`.
31
31
  *
@@ -37,7 +37,7 @@ export declare function isValidGridPosition(gridPosition: Vector, roomShape: Roo
37
37
  *
38
38
  * In this context, the grid position of the top-left wall is "Vector(-1, -1)".
39
39
  */
40
- export declare function worldPositionToGridPosition(worldPos: Vector): Vector;
40
+ export declare function worldPositionToGridPosition(worldPos: Vector): Readonly<Vector>;
41
41
  /**
42
42
  * Helper function to convert a world position `Vector` to a grid position `Vector`.
43
43
  *
@@ -45,5 +45,5 @@ export declare function worldPositionToGridPosition(worldPos: Vector): Vector;
45
45
  *
46
46
  * This is similar to the `worldPositionToGridPosition` function, but the values are not rounded.
47
47
  */
48
- export declare function worldPositionToGridPositionFast(worldPos: Vector): Vector;
48
+ export declare function worldPositionToGridPositionFast(worldPos: Vector): Readonly<Vector>;
49
49
  //# sourceMappingURL=roomGrid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roomGrid.d.ts","sourceRoot":"","sources":["../../../src/functions/roomGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAUzD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,SAAS,GACnB,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,GACnB,OAAO,CAIT;AA0BD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIpE;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIxE"}
1
+ {"version":3,"file":"roomGrid.d.ts","sourceRoot":"","sources":["../../../src/functions/roomGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAUzD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,CAAC,EAAE,GAAG,EACN,CAAC,EAAE,GAAG,GACL,QAAQ,CAAC,MAAM,CAAC,CAGlB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,SAAS,GACnB,QAAQ,CAAC,MAAM,CAAC,CAMlB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,GACnB,QAAQ,CAAC,MAAM,CAAC,CAKlB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,GACnB,OAAO,CAIT;AA0BD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,QAAQ,CAAC,MAAM,CAAC,CAIlB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,GACf,QAAQ,CAAC,MAAM,CAAC,CAIlB"}
@@ -11,7 +11,7 @@
11
11
  * - If the user does not have a HUD offset configured, this function will return `Vector(0, 0)`.
12
12
  * - If the user has a HUD offset of 1.0 configured, this function will return `Vector(20, 12)`.
13
13
  */
14
- export declare function getHUDOffsetVector(): Vector;
14
+ export declare function getHUDOffsetVector(): Readonly<Vector>;
15
15
  /**
16
16
  * Returns how many hearts are in the heart UI row. If the player has more than 6 hearts, this
17
17
  * function will return 6.
@@ -23,13 +23,13 @@ export declare function getHeartRowLength(player: EntityPlayer): int;
23
23
  * combination with the `getHUDOffsetVector` helper function.
24
24
  */
25
25
  export declare function getHeartsUIWidth(): int;
26
- export declare function getScreenBottomCenterPos(): Vector;
27
- export declare function getScreenBottomLeftPos(): Vector;
28
- export declare function getScreenBottomRightPos(): Vector;
29
- export declare function getScreenCenterPos(): Vector;
30
- export declare function getScreenTopCenterPos(): Vector;
31
- export declare function getScreenTopLeftPos(): Vector;
32
- export declare function getScreenTopRightPos(): Vector;
26
+ export declare function getScreenBottomCenterPos(): Readonly<Vector>;
27
+ export declare function getScreenBottomLeftPos(): Readonly<Vector>;
28
+ export declare function getScreenBottomRightPos(): Readonly<Vector>;
29
+ export declare function getScreenCenterPos(): Readonly<Vector>;
30
+ export declare function getScreenTopCenterPos(): Readonly<Vector>;
31
+ export declare function getScreenTopLeftPos(): Readonly<Vector>;
32
+ export declare function getScreenTopRightPos(): Readonly<Vector>;
33
33
  /**
34
34
  * Get how many hearts are currently being shown on the hearts UI.
35
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAmB3C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAGjD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAKhD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAG9C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAG7C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
@@ -33,7 +33,7 @@ export declare function doesVectorHaveLength(vector: Vector, threshold?: number)
33
33
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
34
34
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
35
35
  */
36
- export declare function getRandomVector(seedOrRNG?: Seed | RNG): Vector;
36
+ export declare function getRandomVector(seedOrRNG?: Seed | RNG): Readonly<Vector>;
37
37
  /**
38
38
  * Used to determine is the given table is a serialized `Vector` object created by the `deepCopy`
39
39
  * function.