isaacscript-common 1.2.103 → 1.2.106
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.
- package/dist/constants.d.ts +0 -2
- package/dist/constants.lua +0 -2
- package/dist/features/saveDataManager/exports.d.ts +1 -1
- package/dist/features/saveDataManager/load.d.ts +1 -1
- package/dist/features/saveDataManager/main.lua +1 -1
- package/dist/features/saveDataManager/maps.d.ts +1 -1
- package/dist/features/saveDataManager/merge.lua +1 -1
- package/dist/features/saveDataManager/save.d.ts +1 -1
- package/dist/functions/array.d.ts +7 -5
- package/dist/functions/array.lua +11 -9
- package/dist/functions/cards.d.ts +41 -11
- package/dist/functions/cards.lua +103 -25
- package/dist/functions/collectibleCacheFlag.lua +2 -2
- package/dist/functions/deepCopy.lua +1 -1
- package/dist/functions/deepCopyTests.lua +1 -1
- package/dist/functions/entity.d.ts +11 -0
- package/dist/functions/entity.lua +25 -0
- package/dist/functions/log.lua +10 -10
- package/dist/functions/pickups.d.ts +0 -7
- package/dist/functions/pickups.lua +0 -14
- package/dist/functions/pills.d.ts +1 -0
- package/dist/functions/pills.lua +4 -0
- package/dist/functions/player.lua +47 -39
- package/dist/functions/rooms.d.ts +8 -4
- package/dist/functions/rooms.lua +16 -21
- package/dist/functions/set.d.ts +15 -0
- package/dist/functions/set.lua +20 -0
- package/dist/functions/sprite.d.ts +4 -2
- package/dist/functions/transformations.lua +13 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.lua +1 -1
- package/dist/maps/cardTypeMap.d.ts +4 -0
- package/dist/maps/cardTypeMap.lua +108 -0
- package/dist/types/CardType.d.ts +38 -0
- package/dist/types/CardType.lua +18 -0
- package/dist/types/private/SaveData.d.ts +18 -0
- package/dist/types/private/SaveData.lua +8 -0
- package/dist/types/private/SerializationBrand.d.ts +15 -0
- package/dist/types/private/SerializationBrand.lua +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
|
+
export declare enum SerializationBrand {
|
|
3
|
+
DEFAULT_MAP = "__TSTL_DEFAULT_MAP",
|
|
4
|
+
/**
|
|
5
|
+
* This is set to the value that represents the default value (instead of an empty string like the
|
|
6
|
+
* other brands are).
|
|
7
|
+
*/
|
|
8
|
+
DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE",
|
|
9
|
+
MAP = "__TSTL_MAP",
|
|
10
|
+
SET = "__TSTL_SET",
|
|
11
|
+
CLASS = "__TSTL_CLASS",
|
|
12
|
+
OBJECT_WITH_NUMBER_KEYS = "__TSTL_OBJECT_WITH_NUMBER_KEYS",
|
|
13
|
+
VECTOR = "__VECTOR"
|
|
14
|
+
}
|
|
15
|
+
export declare function isSerializationBrand(key: AnyNotNil): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local Set = ____lualib.Set
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____utils = require("functions.utils")
|
|
7
|
+
local getEnumValues = ____utils.getEnumValues
|
|
8
|
+
____exports.SerializationBrand = SerializationBrand or ({})
|
|
9
|
+
____exports.SerializationBrand.DEFAULT_MAP = "__TSTL_DEFAULT_MAP"
|
|
10
|
+
____exports.SerializationBrand.DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE"
|
|
11
|
+
____exports.SerializationBrand.MAP = "__TSTL_MAP"
|
|
12
|
+
____exports.SerializationBrand.SET = "__TSTL_SET"
|
|
13
|
+
____exports.SerializationBrand.CLASS = "__TSTL_CLASS"
|
|
14
|
+
____exports.SerializationBrand.OBJECT_WITH_NUMBER_KEYS = "__TSTL_OBJECT_WITH_NUMBER_KEYS"
|
|
15
|
+
____exports.SerializationBrand.VECTOR = "__VECTOR"
|
|
16
|
+
local SERIALIZATION_BRANDS = getEnumValues(nil, ____exports.SerializationBrand)
|
|
17
|
+
local SERIALIZATION_BRAND_SET = __TS__New(Set, SERIALIZATION_BRANDS)
|
|
18
|
+
function ____exports.isSerializationBrand(self, key)
|
|
19
|
+
if type(key) ~= "string" then
|
|
20
|
+
return false
|
|
21
|
+
end
|
|
22
|
+
return SERIALIZATION_BRAND_SET:has(key)
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|