@ecsframework/player-data-handler 0.0.1 → 0.0.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.
- package/flamework.build +2 -1
- package/out/decorators/saved.d.ts +2 -5
- package/out/decorators/saved.luau +1 -1
- package/out/init.luau +9 -0
- package/out/profile-wrapper.luau +14 -4
- package/out/serilizator/index.d.ts +3 -0
- package/out/serilizator/init.luau +55 -0
- package/out/serilizator/transformers/entity-transformer.d.ts +2 -0
- package/out/serilizator/transformers/entity-transformer.luau +98 -0
- package/out/serilizator/transformers/roblox-type-transformers.d.ts +7 -0
- package/out/serilizator/transformers/roblox-type-transformers.luau +369 -0
- package/out/serilizator/transformers/table-transformer.d.ts +1 -0
- package/out/serilizator/transformers/table-transformer.luau +33 -0
- package/out/serilizator/types.d.ts +6 -0
- package/out/tsconfig.tsbuildinfo +1 -1
- package/out/types.d.ts +1 -1
- package/package.json +1 -1
package/flamework.build
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"identifiers": {
|
|
5
5
|
"@ecsframework/player-data-handler:out/profile-wrapper@ProfileWrapper": "$ecsframework:player-data-handler:profile-wrapper@ProfileWrapper",
|
|
6
6
|
"@ecsframework/player-data-handler:out/systems/saving-system@SavingSystem": "$ecsframework:player-data-handler:systems/saving-system@SavingSystem",
|
|
7
|
-
"@ecsframework/player-data-handler:out/decorators/saved@SavedTag": "$ecsframework:player-data-handler:decorators/saved@SavedTag"
|
|
7
|
+
"@ecsframework/player-data-handler:out/decorators/saved@SavedTag": "$ecsframework:player-data-handler:decorators/saved@SavedTag",
|
|
8
|
+
"@ecsframework/player-data-handler:out/types@SavedTag": "$ecsframework:player-data-handler:types@SavedTag"
|
|
8
9
|
},
|
|
9
10
|
"metadata": {},
|
|
10
11
|
"identifierPrefix": "$ecsframework:player-data-handler",
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { Tag } from "@ecsframework/core";
|
|
2
1
|
import { Modding } from "@flamework/core";
|
|
3
2
|
import { Constructor } from "@flamework/core/out/utility";
|
|
4
|
-
import {
|
|
5
|
-
export interface SavedTag extends Tag {
|
|
6
|
-
}
|
|
3
|
+
import { SavedTag } from "../types";
|
|
7
4
|
type ConvertInObject<T> = {
|
|
8
5
|
[P in keyof T]: T[P];
|
|
9
6
|
};
|
|
10
7
|
/** @metadata macro */
|
|
11
|
-
export declare function Saved<T extends object>(options?:
|
|
8
|
+
export declare function Saved<T extends object>(options?: SavedTag<T>, guard?: Modding.Generic<ConvertInObject<T>, "guard">): (target: Constructor<T>) => void;
|
|
12
9
|
export {};
|
|
@@ -8,7 +8,7 @@ local function Saved(options, guard)
|
|
|
8
8
|
end
|
|
9
9
|
return function(target)
|
|
10
10
|
options.Guard = guard
|
|
11
|
-
DefineClassComponentMeta(target, options, "$ecsframework:player-data-handler:
|
|
11
|
+
DefineClassComponentMeta(target, options, "$ecsframework:player-data-handler:types@SavedTag")
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
return {
|
package/out/init.luau
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local exports = {}
|
|
4
|
+
TS.Promise.new(function(resolve)
|
|
5
|
+
resolve(TS.import(script, script, "serilizator", "transformers", "entity-transformer"))
|
|
6
|
+
end):expect()
|
|
7
|
+
TS.Promise.new(function(resolve)
|
|
8
|
+
resolve(TS.import(script, script, "serilizator", "transformers", "roblox-type-transformers"))
|
|
9
|
+
end):expect()
|
|
10
|
+
TS.Promise.new(function(resolve)
|
|
11
|
+
resolve(TS.import(script, script, "serilizator", "transformers", "table-transformer"))
|
|
12
|
+
end):expect()
|
|
4
13
|
for _k, _v in TS.import(script, script, "profile-wrapper") or {} do
|
|
5
14
|
exports[_k] = _v
|
|
6
15
|
end
|
package/out/profile-wrapper.luau
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
-- Compiled with roblox-ts v3.0.0
|
|
2
2
|
local TS = _G[script]
|
|
3
3
|
local produce = TS.import(script, TS.getModule(script, "@rbxts", "immut").src).produce
|
|
4
|
+
local _serilizator = TS.import(script, script.Parent, "serilizator")
|
|
5
|
+
local Deserialize = _serilizator.Deserialize
|
|
6
|
+
local Serialize = _serilizator.Serialize
|
|
4
7
|
local ProfileWrapper
|
|
5
8
|
do
|
|
6
9
|
ProfileWrapper = {}
|
|
@@ -16,10 +19,10 @@ do
|
|
|
16
19
|
self.isLoaded = false
|
|
17
20
|
self.isClosed = false
|
|
18
21
|
self.connections = {}
|
|
19
|
-
for componentId in system:Each("$ecsframework:player-data-handler:
|
|
22
|
+
for componentId in system:Each("$ecsframework:player-data-handler:types@SavedTag") do
|
|
20
23
|
local savedComponent = system:GetComponentKey(componentId)
|
|
21
24
|
local ctor = system:GetClassComponent(savedComponent)
|
|
22
|
-
local options = system:GetComponent(componentId, "$ecsframework:player-data-handler:
|
|
25
|
+
local options = system:GetComponent(componentId, "$ecsframework:player-data-handler:types@SavedTag")
|
|
23
26
|
if options.Guard == nil then
|
|
24
27
|
error(`No guard found for {savedComponent}`)
|
|
25
28
|
end
|
|
@@ -159,6 +162,9 @@ do
|
|
|
159
162
|
end
|
|
160
163
|
end
|
|
161
164
|
end
|
|
165
|
+
currentData = Deserialize(currentData, {
|
|
166
|
+
World = self.world,
|
|
167
|
+
})
|
|
162
168
|
if not componentInfo.Guard(currentData) then
|
|
163
169
|
error(`Guard failed for {componentName}`)
|
|
164
170
|
end
|
|
@@ -171,7 +177,9 @@ do
|
|
|
171
177
|
return data
|
|
172
178
|
end)
|
|
173
179
|
ProfileWrapper.SaveProfile = TS.async(function(self)
|
|
174
|
-
return self:onSaveProfile(
|
|
180
|
+
return self:onSaveProfile(Serialize(self.data, {
|
|
181
|
+
World = self.world,
|
|
182
|
+
}))
|
|
175
183
|
end)
|
|
176
184
|
ProfileWrapper.CloseProfile = TS.async(function(self)
|
|
177
185
|
if self.isClosed then
|
|
@@ -179,7 +187,9 @@ do
|
|
|
179
187
|
end
|
|
180
188
|
self.isClosed = true
|
|
181
189
|
if self.isSaveDataWhenClose then
|
|
182
|
-
TS.await(self:onSaveProfile(self.data
|
|
190
|
+
TS.await(self:onSaveProfile(Serialize(self.data, {
|
|
191
|
+
World = self.world,
|
|
192
|
+
})))
|
|
183
193
|
end
|
|
184
194
|
TS.await(self:onCloseProfile())
|
|
185
195
|
local _exp = self.connections
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function registerTransformer(serialize: (data: unknown, recursiveCallback: (data: unknown) => unknown, someData: {}) => unknown, deserialize: (data: unknown, recursiveCallback: (data: unknown) => unknown, someData: {}) => unknown, isMatchSerialize: (data: unknown, someData: {}) => boolean, isMatchDeserialize: (data: unknown, someData: {}) => boolean, priority?: number): void;
|
|
2
|
+
export declare function Serialize<T>(data: T, someData: {}): unknown;
|
|
3
|
+
export declare function Deserialize<T>(data: T, someData: {}): unknown;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local transformers = {}
|
|
3
|
+
local function registerTransformer(serialize, deserialize, isMatchSerialize, isMatchDeserialize, priority)
|
|
4
|
+
if priority == nil then
|
|
5
|
+
priority = 0
|
|
6
|
+
end
|
|
7
|
+
local _arg0 = {
|
|
8
|
+
Serialize = serialize,
|
|
9
|
+
Deserialize = deserialize,
|
|
10
|
+
Priority = priority,
|
|
11
|
+
IsMatchSerialize = isMatchSerialize,
|
|
12
|
+
IsMatchDeserialize = isMatchDeserialize,
|
|
13
|
+
}
|
|
14
|
+
table.insert(transformers, _arg0)
|
|
15
|
+
table.sort(transformers, function(a, b)
|
|
16
|
+
return a.Priority > b.Priority
|
|
17
|
+
end)
|
|
18
|
+
end
|
|
19
|
+
local function serializeRecursive(data, someData)
|
|
20
|
+
for _, _binding in transformers do
|
|
21
|
+
local Serialize = _binding.Serialize
|
|
22
|
+
local IsMatchSerialize = _binding.IsMatchSerialize
|
|
23
|
+
if not IsMatchSerialize(data, someData) then
|
|
24
|
+
continue
|
|
25
|
+
end
|
|
26
|
+
return Serialize(data, function(data)
|
|
27
|
+
return serializeRecursive(data, someData)
|
|
28
|
+
end, someData)
|
|
29
|
+
end
|
|
30
|
+
return data
|
|
31
|
+
end
|
|
32
|
+
local function Serialize(data, someData)
|
|
33
|
+
return serializeRecursive(data, someData)
|
|
34
|
+
end
|
|
35
|
+
local function deserializeRecursive(data, someData)
|
|
36
|
+
for _, _binding in transformers do
|
|
37
|
+
local Deserialize = _binding.Deserialize
|
|
38
|
+
local IsMatchDeserialize = _binding.IsMatchDeserialize
|
|
39
|
+
if not IsMatchDeserialize(data, someData) then
|
|
40
|
+
continue
|
|
41
|
+
end
|
|
42
|
+
return Deserialize(data, function(data)
|
|
43
|
+
return deserializeRecursive(data, someData)
|
|
44
|
+
end, someData)
|
|
45
|
+
end
|
|
46
|
+
return data
|
|
47
|
+
end
|
|
48
|
+
local function Deserialize(data, someData)
|
|
49
|
+
return deserializeRecursive(data, someData)
|
|
50
|
+
end
|
|
51
|
+
return {
|
|
52
|
+
registerTransformer = registerTransformer,
|
|
53
|
+
Serialize = Serialize,
|
|
54
|
+
Deserialize = Deserialize,
|
|
55
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local t = TS.import(script, TS.getModule(script, "@rbxts", "t").lib.ts).t
|
|
4
|
+
local Flamework = TS.import(script, TS.getModule(script, "@flamework", "core").out).Flamework
|
|
5
|
+
local _jecs = TS.import(script, TS.getModule(script, "@rbxts", "jecs").jecs)
|
|
6
|
+
local Component = _jecs.Component
|
|
7
|
+
local Name = _jecs.Name
|
|
8
|
+
local registerTransformer = TS.import(script, script.Parent.Parent).registerTransformer
|
|
9
|
+
local guard = Flamework.createGuard(t.interface({
|
|
10
|
+
__type = t.literal("EntityRef"),
|
|
11
|
+
EntityId = t.number,
|
|
12
|
+
}))
|
|
13
|
+
local function EntityTransformerSerialize(data, recursiveCallback, someData)
|
|
14
|
+
local _condition = not (someData.World ~= nil)
|
|
15
|
+
if not _condition then
|
|
16
|
+
local _world = someData.World
|
|
17
|
+
_condition = not (type(_world) == "table")
|
|
18
|
+
end
|
|
19
|
+
if _condition then
|
|
20
|
+
return data
|
|
21
|
+
end
|
|
22
|
+
local world = someData.World
|
|
23
|
+
if not guard(data) or not world:exists(data.EntityId) then
|
|
24
|
+
return data
|
|
25
|
+
end
|
|
26
|
+
local components = {}
|
|
27
|
+
components.__type = "EntityRef"
|
|
28
|
+
for componentId in world:query(Component) do
|
|
29
|
+
if not world:has(data.EntityId, componentId) then
|
|
30
|
+
continue
|
|
31
|
+
end
|
|
32
|
+
local component = world:get(data.EntityId, componentId)
|
|
33
|
+
local name = world:get(componentId, Name)
|
|
34
|
+
if not (name ~= "" and name) then
|
|
35
|
+
continue
|
|
36
|
+
end
|
|
37
|
+
local _arg1 = recursiveCallback(component)
|
|
38
|
+
components[name] = _arg1
|
|
39
|
+
end
|
|
40
|
+
return components
|
|
41
|
+
end
|
|
42
|
+
local function findComponentByName(name, world)
|
|
43
|
+
for component, foundName in world:query(Name) do
|
|
44
|
+
if foundName == name then
|
|
45
|
+
return component
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
local function EntityTransformerDeserialize(data, recursiveCallback, someData)
|
|
50
|
+
local _condition = not (someData.World ~= nil)
|
|
51
|
+
if not _condition then
|
|
52
|
+
local _world = someData.World
|
|
53
|
+
_condition = not (type(_world) == "table")
|
|
54
|
+
end
|
|
55
|
+
if _condition then
|
|
56
|
+
return data
|
|
57
|
+
end
|
|
58
|
+
local world = someData.World
|
|
59
|
+
local _data = data
|
|
60
|
+
local _condition_1 = not (type(_data) == "table")
|
|
61
|
+
if not _condition_1 then
|
|
62
|
+
_condition_1 = not (data.__type ~= nil) or data.__type ~= "EntityRef"
|
|
63
|
+
end
|
|
64
|
+
if _condition_1 then
|
|
65
|
+
return data
|
|
66
|
+
end
|
|
67
|
+
local newEntity = world:entity()
|
|
68
|
+
local result = {
|
|
69
|
+
__type = "EntityRef",
|
|
70
|
+
EntityId = newEntity,
|
|
71
|
+
}
|
|
72
|
+
for key, componentData in pairs(data) do
|
|
73
|
+
if key == "__type" then
|
|
74
|
+
continue
|
|
75
|
+
end
|
|
76
|
+
local componentId = findComponentByName(key, world)
|
|
77
|
+
if componentId == nil then
|
|
78
|
+
warn(`[EntityTransformer]: Could not find component with name {key}`)
|
|
79
|
+
continue
|
|
80
|
+
end
|
|
81
|
+
world:set(newEntity, componentId, recursiveCallback(componentData))
|
|
82
|
+
end
|
|
83
|
+
return result
|
|
84
|
+
end
|
|
85
|
+
registerTransformer(EntityTransformerSerialize, EntityTransformerDeserialize, function(data)
|
|
86
|
+
return guard(data)
|
|
87
|
+
end, function(data)
|
|
88
|
+
local _data = data
|
|
89
|
+
local _condition = type(_data) == "table"
|
|
90
|
+
if _condition then
|
|
91
|
+
_condition = data.__type ~= nil and data.__type == "EntityRef"
|
|
92
|
+
end
|
|
93
|
+
return _condition
|
|
94
|
+
end)
|
|
95
|
+
return {
|
|
96
|
+
EntityTransformerSerialize = EntityTransformerSerialize,
|
|
97
|
+
EntityTransformerDeserialize = EntityTransformerDeserialize,
|
|
98
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function Vector3TransformerSerialize(data: unknown, recursiveCallback: (data: unknown) => unknown, someData: {}): {
|
|
2
|
+
__type: string;
|
|
3
|
+
X: number;
|
|
4
|
+
Y: number;
|
|
5
|
+
Z: number;
|
|
6
|
+
} | undefined;
|
|
7
|
+
export declare function Vector3TransformerDeserialize(data: unknown, recursiveCallback: (data: unknown) => unknown, someData: {}): Vector3 | undefined;
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local t = TS.import(script, TS.getModule(script, "@rbxts", "t").lib.ts).t
|
|
4
|
+
local Flamework = TS.import(script, TS.getModule(script, "@flamework", "core").out).Flamework
|
|
5
|
+
local registerTransformer = TS.import(script, script.Parent.Parent).registerTransformer
|
|
6
|
+
local guard = Flamework.createGuard(t.interface({
|
|
7
|
+
__type = t.literal("Vector3"),
|
|
8
|
+
X = t.number,
|
|
9
|
+
Y = t.number,
|
|
10
|
+
Z = t.number,
|
|
11
|
+
}))
|
|
12
|
+
local function Vector3TransformerSerialize(data, recursiveCallback, someData)
|
|
13
|
+
local _data = data
|
|
14
|
+
if not (typeof(_data) == "Vector3") then
|
|
15
|
+
return nil
|
|
16
|
+
end
|
|
17
|
+
return {
|
|
18
|
+
__type = "Vector3",
|
|
19
|
+
X = data.X,
|
|
20
|
+
Y = data.Y,
|
|
21
|
+
Z = data.Z,
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
local function Vector3TransformerDeserialize(data, recursiveCallback, someData)
|
|
25
|
+
if not guard(data) then
|
|
26
|
+
return nil
|
|
27
|
+
end
|
|
28
|
+
return Vector3.new(data.X, data.Y, data.Z)
|
|
29
|
+
end
|
|
30
|
+
registerTransformer(Vector3TransformerSerialize, Vector3TransformerDeserialize, function(data)
|
|
31
|
+
local _data = data
|
|
32
|
+
return typeof(_data) == "Vector3"
|
|
33
|
+
end, function(data)
|
|
34
|
+
return guard(data)
|
|
35
|
+
end)
|
|
36
|
+
--* @metadata macro
|
|
37
|
+
local function makeTransformer(typeName, serialize, deserialize, guard)
|
|
38
|
+
local function ser(data)
|
|
39
|
+
local _data = data
|
|
40
|
+
local _typeName = typeName
|
|
41
|
+
if typeof(_data) == _typeName then
|
|
42
|
+
return serialize(data)
|
|
43
|
+
end
|
|
44
|
+
return data
|
|
45
|
+
end
|
|
46
|
+
local function deser(data)
|
|
47
|
+
if guard(data) then
|
|
48
|
+
return deserialize(data)
|
|
49
|
+
end
|
|
50
|
+
return data
|
|
51
|
+
end
|
|
52
|
+
registerTransformer(ser, deser, function(data)
|
|
53
|
+
local _data = data
|
|
54
|
+
local _typeName = typeName
|
|
55
|
+
return typeof(_data) == _typeName
|
|
56
|
+
end, guard)
|
|
57
|
+
end
|
|
58
|
+
-- BrickColor
|
|
59
|
+
makeTransformer("BrickColor", function(d)
|
|
60
|
+
return {
|
|
61
|
+
__type = "BrickColor",
|
|
62
|
+
r = d.r,
|
|
63
|
+
g = d.g,
|
|
64
|
+
b = d.b,
|
|
65
|
+
}
|
|
66
|
+
end, function(d)
|
|
67
|
+
return BrickColor.new(d.r, d.g, d.b)
|
|
68
|
+
end, t.interface({
|
|
69
|
+
__type = t.literal("BrickColor"),
|
|
70
|
+
r = t.number,
|
|
71
|
+
g = t.number,
|
|
72
|
+
b = t.number,
|
|
73
|
+
}))
|
|
74
|
+
-- CFrame
|
|
75
|
+
makeTransformer("CFrame", function(d)
|
|
76
|
+
return {
|
|
77
|
+
__type = "CFrame",
|
|
78
|
+
comps = { d:GetComponents() },
|
|
79
|
+
}
|
|
80
|
+
end, function(d)
|
|
81
|
+
return CFrame.new(d.comps[1], d.comps[2], d.comps[3], d.comps[4], d.comps[5], d.comps[6], d.comps[7])
|
|
82
|
+
end, t.interface({
|
|
83
|
+
__type = t.literal("CFrame"),
|
|
84
|
+
comps = t.array(t.number),
|
|
85
|
+
}))
|
|
86
|
+
-- Color3
|
|
87
|
+
makeTransformer("Color3", function(d)
|
|
88
|
+
return {
|
|
89
|
+
__type = "Color3",
|
|
90
|
+
r = d.R,
|
|
91
|
+
g = d.G,
|
|
92
|
+
b = d.B,
|
|
93
|
+
}
|
|
94
|
+
end, function(d)
|
|
95
|
+
return Color3.new(d.r, d.g, d.b)
|
|
96
|
+
end, t.interface({
|
|
97
|
+
__type = t.literal("Color3"),
|
|
98
|
+
r = t.number,
|
|
99
|
+
g = t.number,
|
|
100
|
+
b = t.number,
|
|
101
|
+
}))
|
|
102
|
+
-- ColorSequence
|
|
103
|
+
makeTransformer("ColorSequence", function(d)
|
|
104
|
+
local _object = {
|
|
105
|
+
__type = "ColorSequence",
|
|
106
|
+
}
|
|
107
|
+
local _left = "keypoints"
|
|
108
|
+
local _exp = d.Keypoints
|
|
109
|
+
-- ▼ ReadonlyArray.map ▼
|
|
110
|
+
local _newValue = table.create(#_exp)
|
|
111
|
+
local _callback = function(k)
|
|
112
|
+
return {
|
|
113
|
+
time = k.Time,
|
|
114
|
+
value = {
|
|
115
|
+
r = k.Value.R,
|
|
116
|
+
g = k.Value.G,
|
|
117
|
+
b = k.Value.B,
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
end
|
|
121
|
+
for _k, _v in _exp do
|
|
122
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
123
|
+
end
|
|
124
|
+
-- ▲ ReadonlyArray.map ▲
|
|
125
|
+
_object[_left] = _newValue
|
|
126
|
+
return _object
|
|
127
|
+
end, function(d)
|
|
128
|
+
local _exp = d.keypoints
|
|
129
|
+
-- ▼ ReadonlyArray.map ▼
|
|
130
|
+
local _newValue = table.create(#_exp)
|
|
131
|
+
local _callback = function(k)
|
|
132
|
+
return ColorSequenceKeypoint.new(k.time, Color3.new(k.value.r, k.value.g, k.value.b))
|
|
133
|
+
end
|
|
134
|
+
for _k, _v in _exp do
|
|
135
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
136
|
+
end
|
|
137
|
+
-- ▲ ReadonlyArray.map ▲
|
|
138
|
+
return ColorSequence.new(_newValue)
|
|
139
|
+
end, t.interface({
|
|
140
|
+
__type = t.literal("ColorSequence"),
|
|
141
|
+
keypoints = t.array(t.interface({
|
|
142
|
+
time = t.number,
|
|
143
|
+
value = t.interface({
|
|
144
|
+
r = t.number,
|
|
145
|
+
g = t.number,
|
|
146
|
+
b = t.number,
|
|
147
|
+
}),
|
|
148
|
+
})),
|
|
149
|
+
}))
|
|
150
|
+
-- DateTime
|
|
151
|
+
makeTransformer("DateTime", function(d)
|
|
152
|
+
return {
|
|
153
|
+
__type = "DateTime",
|
|
154
|
+
unix = d.UnixTimestamp,
|
|
155
|
+
}
|
|
156
|
+
end, function(d)
|
|
157
|
+
return DateTime.fromUnixTimestamp(d.unix)
|
|
158
|
+
end, t.interface({
|
|
159
|
+
__type = t.literal("DateTime"),
|
|
160
|
+
unix = t.number,
|
|
161
|
+
}))
|
|
162
|
+
-- NumberRange
|
|
163
|
+
makeTransformer("NumberRange", function(d)
|
|
164
|
+
return {
|
|
165
|
+
__type = "NumberRange",
|
|
166
|
+
min = d.Min,
|
|
167
|
+
max = d.Max,
|
|
168
|
+
}
|
|
169
|
+
end, function(d)
|
|
170
|
+
return NumberRange.new(d.min, d.max)
|
|
171
|
+
end, t.interface({
|
|
172
|
+
__type = t.literal("NumberRange"),
|
|
173
|
+
min = t.number,
|
|
174
|
+
max = t.number,
|
|
175
|
+
}))
|
|
176
|
+
makeTransformer("NumberSequence", function(d)
|
|
177
|
+
local _object = {
|
|
178
|
+
__type = "NumberSequence",
|
|
179
|
+
}
|
|
180
|
+
local _left = "keypoints"
|
|
181
|
+
local _exp = d.Keypoints
|
|
182
|
+
-- ▼ ReadonlyArray.map ▼
|
|
183
|
+
local _newValue = table.create(#_exp)
|
|
184
|
+
local _callback = function(k)
|
|
185
|
+
return {
|
|
186
|
+
time = k.Time,
|
|
187
|
+
value = k.Value,
|
|
188
|
+
envelope = k.Envelope,
|
|
189
|
+
}
|
|
190
|
+
end
|
|
191
|
+
for _k, _v in _exp do
|
|
192
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
193
|
+
end
|
|
194
|
+
-- ▲ ReadonlyArray.map ▲
|
|
195
|
+
_object[_left] = _newValue
|
|
196
|
+
return _object
|
|
197
|
+
end, function(d)
|
|
198
|
+
local _exp = d.keypoints
|
|
199
|
+
-- ▼ ReadonlyArray.map ▼
|
|
200
|
+
local _newValue = table.create(#_exp)
|
|
201
|
+
local _callback = function(k)
|
|
202
|
+
return NumberSequenceKeypoint.new(k.time, k.value, k.envelope)
|
|
203
|
+
end
|
|
204
|
+
for _k, _v in _exp do
|
|
205
|
+
_newValue[_k] = _callback(_v, _k - 1, _exp)
|
|
206
|
+
end
|
|
207
|
+
-- ▲ ReadonlyArray.map ▲
|
|
208
|
+
return NumberSequence.new(_newValue)
|
|
209
|
+
end, t.interface({
|
|
210
|
+
__type = t.literal("NumberSequence"),
|
|
211
|
+
keypoints = t.array(t.interface({
|
|
212
|
+
time = t.number,
|
|
213
|
+
value = t.number,
|
|
214
|
+
envelope = t.number,
|
|
215
|
+
})),
|
|
216
|
+
}))
|
|
217
|
+
makeTransformer("Rect", function(d)
|
|
218
|
+
return {
|
|
219
|
+
__type = "Rect",
|
|
220
|
+
minX = d.Min.X,
|
|
221
|
+
minY = d.Min.Y,
|
|
222
|
+
maxX = d.Max.X,
|
|
223
|
+
maxY = d.Max.Y,
|
|
224
|
+
}
|
|
225
|
+
end, function(d)
|
|
226
|
+
return Rect.new(d.minX, d.minY, d.maxX, d.maxY)
|
|
227
|
+
end, t.interface({
|
|
228
|
+
__type = t.literal("Rect"),
|
|
229
|
+
minX = t.number,
|
|
230
|
+
minY = t.number,
|
|
231
|
+
maxX = t.number,
|
|
232
|
+
maxY = t.number,
|
|
233
|
+
}))
|
|
234
|
+
makeTransformer("Region3", function(d)
|
|
235
|
+
local _result
|
|
236
|
+
if d.CFrame then
|
|
237
|
+
local _position = d.CFrame.Position
|
|
238
|
+
local _arg0 = d.Size / 2
|
|
239
|
+
local _exp = _position - _arg0
|
|
240
|
+
local _position_1 = d.CFrame.Position
|
|
241
|
+
local _arg0_1 = d.Size / 2
|
|
242
|
+
_result = { _exp, _position_1 + _arg0_1 }
|
|
243
|
+
else
|
|
244
|
+
_result = { Vector3.new(0, 0, 0), Vector3.new(0, 0, 0) }
|
|
245
|
+
end
|
|
246
|
+
local _binding = _result
|
|
247
|
+
local min = _binding[1]
|
|
248
|
+
local max = _binding[2]
|
|
249
|
+
return {
|
|
250
|
+
__type = "Region3",
|
|
251
|
+
min = { min.X, min.Y, min.Z },
|
|
252
|
+
max = { max.X, max.Y, max.Z },
|
|
253
|
+
}
|
|
254
|
+
end, function(d)
|
|
255
|
+
return Region3.new(Vector3.new(unpack(d.min)), Vector3.new(unpack(d.max)))
|
|
256
|
+
end, t.interface({
|
|
257
|
+
__type = t.literal("Region3"),
|
|
258
|
+
min = t.strictArray(t.number, t.number, t.number),
|
|
259
|
+
max = t.strictArray(t.number, t.number, t.number),
|
|
260
|
+
}))
|
|
261
|
+
makeTransformer("Region3int16", function(d)
|
|
262
|
+
return {
|
|
263
|
+
__type = "Region3int16",
|
|
264
|
+
min = { d.Min.X, d.Min.Y, d.Min.Z },
|
|
265
|
+
max = { d.Max.X, d.Max.Y, d.Max.Z },
|
|
266
|
+
}
|
|
267
|
+
end, function(d)
|
|
268
|
+
return Region3int16.new(Vector3int16.new(unpack(d.min)), Vector3int16.new(unpack(d.max)))
|
|
269
|
+
end, t.interface({
|
|
270
|
+
__type = t.literal("Region3int16"),
|
|
271
|
+
min = t.strictArray(t.number, t.number, t.number),
|
|
272
|
+
max = t.strictArray(t.number, t.number, t.number),
|
|
273
|
+
}))
|
|
274
|
+
makeTransformer("TweenInfo", function(d)
|
|
275
|
+
return {
|
|
276
|
+
__type = "TweenInfo",
|
|
277
|
+
time = d.Time,
|
|
278
|
+
easingStyle = d.EasingStyle,
|
|
279
|
+
easingDirection = d.EasingDirection,
|
|
280
|
+
repeatCount = d.RepeatCount,
|
|
281
|
+
reverses = d.Reverses,
|
|
282
|
+
delayTime = d.DelayTime,
|
|
283
|
+
}
|
|
284
|
+
end, function(d)
|
|
285
|
+
return TweenInfo.new(d.time, d.easingStyle, d.easingDirection, d.repeatCount, d.reverses, d.delayTime)
|
|
286
|
+
end, t.interface({
|
|
287
|
+
__type = t.literal("TweenInfo"),
|
|
288
|
+
time = t.number,
|
|
289
|
+
easingStyle = t.enum(Enum.EasingStyle),
|
|
290
|
+
easingDirection = t.enum(Enum.EasingDirection),
|
|
291
|
+
repeatCount = t.number,
|
|
292
|
+
reverses = t.boolean,
|
|
293
|
+
delayTime = t.number,
|
|
294
|
+
}))
|
|
295
|
+
makeTransformer("UDim", function(d)
|
|
296
|
+
return {
|
|
297
|
+
__type = "UDim",
|
|
298
|
+
scale = d.Scale,
|
|
299
|
+
offset = d.Offset,
|
|
300
|
+
}
|
|
301
|
+
end, function(d)
|
|
302
|
+
return UDim.new(d.scale, d.offset)
|
|
303
|
+
end, t.interface({
|
|
304
|
+
__type = t.literal("UDim"),
|
|
305
|
+
scale = t.number,
|
|
306
|
+
offset = t.number,
|
|
307
|
+
}))
|
|
308
|
+
makeTransformer("UDim2", function(d)
|
|
309
|
+
return {
|
|
310
|
+
__type = "UDim2",
|
|
311
|
+
sx = d.X.Scale,
|
|
312
|
+
ox = d.X.Offset,
|
|
313
|
+
sy = d.Y.Scale,
|
|
314
|
+
oy = d.Y.Offset,
|
|
315
|
+
}
|
|
316
|
+
end, function(d)
|
|
317
|
+
return UDim2.new(d.sx, d.ox, d.sy, d.oy)
|
|
318
|
+
end, t.interface({
|
|
319
|
+
__type = t.literal("UDim2"),
|
|
320
|
+
sx = t.number,
|
|
321
|
+
ox = t.number,
|
|
322
|
+
sy = t.number,
|
|
323
|
+
oy = t.number,
|
|
324
|
+
}))
|
|
325
|
+
makeTransformer("Vector2", function(d)
|
|
326
|
+
return {
|
|
327
|
+
__type = "Vector2",
|
|
328
|
+
x = d.X,
|
|
329
|
+
y = d.Y,
|
|
330
|
+
}
|
|
331
|
+
end, function(d)
|
|
332
|
+
return Vector2.new(d.x, d.y)
|
|
333
|
+
end, t.interface({
|
|
334
|
+
__type = t.literal("Vector2"),
|
|
335
|
+
x = t.number,
|
|
336
|
+
y = t.number,
|
|
337
|
+
}))
|
|
338
|
+
makeTransformer("Vector2int16", function(d)
|
|
339
|
+
return {
|
|
340
|
+
__type = "Vector2int16",
|
|
341
|
+
x = d.X,
|
|
342
|
+
y = d.Y,
|
|
343
|
+
}
|
|
344
|
+
end, function(d)
|
|
345
|
+
return Vector2int16.new(d.x, d.y)
|
|
346
|
+
end, t.interface({
|
|
347
|
+
__type = t.literal("Vector2int16"),
|
|
348
|
+
x = t.number,
|
|
349
|
+
y = t.number,
|
|
350
|
+
}))
|
|
351
|
+
makeTransformer("Vector3int16", function(d)
|
|
352
|
+
return {
|
|
353
|
+
__type = "Vector3int16",
|
|
354
|
+
x = d.X,
|
|
355
|
+
y = d.Y,
|
|
356
|
+
z = d.Z,
|
|
357
|
+
}
|
|
358
|
+
end, function(d)
|
|
359
|
+
return Vector3int16.new(d.x, d.y, d.z)
|
|
360
|
+
end, t.interface({
|
|
361
|
+
__type = t.literal("Vector3int16"),
|
|
362
|
+
x = t.number,
|
|
363
|
+
y = t.number,
|
|
364
|
+
z = t.number,
|
|
365
|
+
}))
|
|
366
|
+
return {
|
|
367
|
+
Vector3TransformerSerialize = Vector3TransformerSerialize,
|
|
368
|
+
Vector3TransformerDeserialize = Vector3TransformerDeserialize,
|
|
369
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
local registerTransformer = TS.import(script, script.Parent.Parent).registerTransformer
|
|
4
|
+
local function TableTransformerSerialize(data, recursiveCallback, someData)
|
|
5
|
+
local _data = data
|
|
6
|
+
if not (type(_data) == "table") then
|
|
7
|
+
return data
|
|
8
|
+
end
|
|
9
|
+
local result = {}
|
|
10
|
+
for key, value in pairs(data) do
|
|
11
|
+
result[key] = recursiveCallback(value)
|
|
12
|
+
end
|
|
13
|
+
return result
|
|
14
|
+
end
|
|
15
|
+
local function TableTransformerDeserialize(data, recursiveCallback, someData)
|
|
16
|
+
local _data = data
|
|
17
|
+
if not (type(_data) == "table") then
|
|
18
|
+
return data
|
|
19
|
+
end
|
|
20
|
+
local result = {}
|
|
21
|
+
for key, value in pairs(data) do
|
|
22
|
+
result[key] = recursiveCallback(value)
|
|
23
|
+
end
|
|
24
|
+
return result
|
|
25
|
+
end
|
|
26
|
+
registerTransformer(TableTransformerSerialize, TableTransformerDeserialize, function(data)
|
|
27
|
+
local _data = data
|
|
28
|
+
return type(_data) == "table"
|
|
29
|
+
end, function(data)
|
|
30
|
+
local _data = data
|
|
31
|
+
return type(_data) == "table"
|
|
32
|
+
end, -math.huge)
|
|
33
|
+
return nil
|
package/out/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../node_modules/@rbxts/t/lib/t.d.ts","../node_modules/@flamework/core/out/modding.d.ts","../node_modules/@flamework/core/out/utility.d.ts","../node_modules/@rbxts/jecs/jecs.d.ts","../node_modules/@flamework/core/out/reflect.d.ts","../node_modules/@flamework/core/out/flamework.d.ts","../node_modules/@flamework/core/out/index.d.ts","../node_modules/@ecsframework/core/out/framework/dependencies-container.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/signal.d.ts","../node_modules/@ecsframework/core/out/framework/index.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/registry.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/query.d.ts","../node_modules/@rbxts/immut/src/types-internal.d.ts","../node_modules/@rbxts/immut/src/types-external.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/query-change.d.ts","../node_modules/@ecsframework/core/out/framework/base-system.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/topo.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/index.d.ts","../node_modules/@ecsframework/core/out/framework/utilities.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/component.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/system.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/inject-type.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/unaffectable.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/tagged.d.ts","../node_modules/@ecsframework/core/out/framework/components/destroyed-component.d.ts","../node_modules/@ecsframework/core/out/framework/components/roblox-instance-component.d.ts","../node_modules/@ecsframework/core/out/framework/systems/roblox-instance-system.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-added.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-removed.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-changed.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-event.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-throttle.d.ts","../node_modules/@ecsframework/core/out/index.d.ts","../src/types.d.ts","../src/decorators/saved.ts","../node_modules/@rbxts/immut/src/none.d.ts","../node_modules/@rbxts/immut/src/makedraftsafe.d.ts","../node_modules/@rbxts/immut/src/makedraftsafereadonly.d.ts","../node_modules/@rbxts/immut/src/table.d.ts","../node_modules/@rbxts/immut/src/index.d.ts","../src/profile-wrapper.ts","../src/systems/saving-system.ts","../src/index.ts","../node_modules/@rbxts/types/include/generated/enums.d.ts","../node_modules/@rbxts/types/include/generated/none.d.ts","../node_modules/@rbxts/types/include/lua.d.ts","../node_modules/@rbxts/types/include/macro_math.d.ts","../node_modules/@rbxts/types/include/roblox.d.ts","../node_modules/@rbxts/compiler-types/types/array.d.ts","../node_modules/@rbxts/compiler-types/types/callmacros.d.ts","../node_modules/@rbxts/compiler-types/types/iterable.d.ts","../node_modules/@rbxts/compiler-types/types/map.d.ts","../node_modules/@rbxts/compiler-types/types/promise.d.ts","../node_modules/@rbxts/compiler-types/types/set.d.ts","../node_modules/@rbxts/compiler-types/types/string.d.ts","../node_modules/@rbxts/compiler-types/types/symbol.d.ts","../node_modules/@rbxts/compiler-types/types/typeutils.d.ts","../node_modules/@rbxts/compiler-types/types/eslintignore.d.ts","../node_modules/@rbxts/compiler-types/types/core.d.ts","../node_modules/@rbxts/maid/maid.d.ts","../node_modules/@rbxts/object-utils/index.d.ts","../node_modules/@rbxts/services/index.d.ts","../node_modules/@rbxts/signal/index.d.ts"],"fileInfos":[{"version":"0b4867459e8a965a7d9ceef9fb0314f20ae2b224d0b281d70875df517d8228a3","signature":false},{"version":"ca313ec48ea6c4a9e6a43cfe56ee981de5e3cbf8d1e961a8caf60f734bffd066","signature":false},{"version":"6a9d1f275772d2e39321d5ab6bc25b61003fdc425bf45a50e59672bcb8218d7a","signature":false},{"version":"2a21843ede3063a695f54e5cb1ef4c76a0ab9cc310b13e2997faad64744a7f06","signature":false},{"version":"392ed5c8f5c689dc2993d68bbb71fe6d87c0b6a5ffebd898bd20a3a7a6fbc6d1","signature":false},{"version":"cd7b852febe45d3283329b14f48c3d51ec5beba9b0804880e471f8201fe33840","signature":false},{"version":"121cf23c36581721a12c7d7dd08bb539d5ac20c22a65f98f29a68fd91ef5279a","signature":false},{"version":"04038ad2cdbeac08c550b5ecd101f8115854612ab7aa1fb27e032217a5f4fab1","signature":false},{"version":"eecdccbeac3b47202823c2abd08ec0a03c85e5177b829476e40a43e3ea850552","signature":false},{"version":"a60e524a1609900eff2ba42db0a13627cb0c86576a0fb79823437eff2b886534","signature":false},{"version":"ba817340a8e27930de08730f21d40f96010cbaae8abe39648a443c12cef0d112","signature":false},{"version":"1908cddf0c57e5325a452e2c1ec410dbe8f13709d1e845e89e696ff662a780ab","signature":false},{"version":"c6e031ec1fd9753a27e1e7a4f1b61c5325f3ddb8a21d2c36c4a69a0c2879a84c","signature":false},{"version":"1f8c7c6a1cd951edf43bbe58cb1c9e2d1875a8054978652f9c1fc1ec3956c127","signature":false},{"version":"5503cc71485ad7884447668827c77b872fdc188c3368baac9ad74377133090ad","signature":false},{"version":"8745ae4610b8b6072138bf00323132c0d6d3bbe07c969d4d4d8ca7297349543c","signature":false},{"version":"819d6dc57f3528e82fdf1d71feb3831a44df86ce92a5b9948e5dd56926d8ed71","signature":false},{"version":"94a6cccb410352b81df2d14e66fcdf75c3ce80322530ff6c545a3715ac259ecc","signature":false},{"version":"0278bde4bbf792eac25e3a15561a828388d55c85b836db855a192591bdcf3b6a","signature":false},{"version":"2d9a3ccceed29fa8c57edfa3712e316c58ca695a4a39a038c643a785f993be09","signature":false},{"version":"67b827701649bf5ad5f536aefdf3a3f80f6b1db736e6ef585c874671b997f36b","signature":false},{"version":"697c293a4129b24446869db450decb5d5bfae2fb7f66d2e951e183c7405ec12c","signature":false},{"version":"39940a3bd7a0e2c5dc3f842f29e53a4390d5d20ff016edeed781c9f86bf7824f","signature":false},{"version":"4c9ae7898ad9e8bc01251c2407a4756f3c7ebe8f712c96a2a3220d3961667bab","signature":false},{"version":"a9e592d16ccce15de3f4f08f445a9172b8ce250ba6bbd97cc2aaa5f725e0cc1b","signature":false},{"version":"c3183153ffda128ff91931e0e560ef8881718951b06664174d89299e5cd8024a","signature":false},{"version":"21a6fba4a85d92577f3f8366fe4f8072c9a9821537cc9498499839a10248d079","signature":false},{"version":"4ab3f27f9e6e974e6eb6f879eb32d8c5c89d529a5d06a59d7ae0d0e5e77cd55e","signature":false},{"version":"9e5485dfe6f63fa905c5df28af37c4469aca65e0b1c0bc3182b0bab59e0b0513","signature":false},{"version":"62e220db4aaecbf30d99b77d3d390cd98af66131fa35021a8396013bad826678","signature":false},{"version":"18e4712e9b8919e14a10620f746d766c8075c1a9ae40a45946cf4054a8b1a0c6","signature":false},{"version":"6ae1129c084d8001b212f921c6ee08ae8a4df0c0bb27a546a384af9e4cc87d8f","signature":false},{"version":"11238a0bb5130a0152e6ba846ed930ec2a5fbd87f7d964159d9afd887889e6ad","signature":false},{"version":"129ee1fd1436f6656477fc7c903e72a6e625bf0cc8bd16ccb8faeb894a1a87e0","signature":false},{"version":"4d4f58beb10b81797c9f5142ec35cdd4bd403c6a8f6ece702f8f41c589283bf9","signature":false},{"version":"30d7eb05300ccd9f267a6429d4bfd2cd94fff2fecdb700dc9225b8ecac00b0a1","signature":false},{"version":"b1a1ff5a1bcfa15ea2ba6211d70eda25819c3facfc8c9ead19de1a54c31c906c","signature":false},{"version":"05d5380e8867b9c3dd765ecbcec1b7ef9aaea813a0e61b555f4ad9aeec7959fc","signature":false},{"version":"3a38f0b05b7240574731238ecb4ad75b184b556105696eba354dc67da90ba39b","signature":false},{"version":"49f569326a7121ba2fe447b415389bbf2f58e83f0da34248f86dfcef99c5981e","signature":false},{"version":"abee957e1ba216d783d3d28f92d229ce98beb621a47e0eb74d8fdd664224827e","signature":false},{"version":"edff1a4c75b00e8558ffaa7c4c3591bc6b385079578794c0a79a1f6358cc35da","signature":false},{"version":"fa419b10d671552124b827e88273954d28ffc9f6eebdcd5d2a0bf3fc5c90b918","signature":false},{"version":"ccbe8d79d7a81fe4e0cdbe9cd7883442e2b42d4382c2b62b3dbefff6ef211735","signature":false,"affectsGlobalScope":true},{"version":"64cc6db9f08d98a1f5c0ad61e748076c4ed86170e125246f955f961a145994b5","signature":false,"affectsGlobalScope":true},{"version":"f81be17e276811737d9bb20f5b2c3dad79d211ae594b9eeaadba6bf3902f5d50","signature":false,"affectsGlobalScope":true},{"version":"f52dcf788c4417a40b18121e940dcb54831db316594cdee8b7ce4e6e114cf5e6","signature":false,"affectsGlobalScope":true},{"version":"ae02a7833ef6e143fe12c5ef0a4cca4299562574455e6c12c0b69cc978b8351c","signature":false,"affectsGlobalScope":true},{"version":"6f764e82380d216bc49cd9b36917b8fc543686c290a5fed25360ea86bc91ee6f","signature":false,"affectsGlobalScope":true},{"version":"577a0e686ed07655d42d12a93432c523164c764c71db59bcd0551311d40e7b7e","signature":false,"affectsGlobalScope":true},{"version":"a6070671ab5ce7ad631488bbce101475cdd754b7d524944545637d6e7a0183a8","signature":false,"affectsGlobalScope":true},{"version":"5ae20e37704ceeefcb66efccd614cc04147170d2e6934aeca4ebbf827edf53c1","signature":false,"affectsGlobalScope":true},{"version":"1a5dfbb5c55a07d934e5d24fb5bbe4c37bfd9dc5d93c041bd9f253e3b59318a3","signature":false,"affectsGlobalScope":true},{"version":"cfc2ab2febb258cd1a0f412cd0c7569bf2c9d2ecacd8bda5bfd3ff02e7056802","signature":false,"affectsGlobalScope":true},{"version":"cc9864bd1dfb28bf95ac021610567d9bca6c351c429c807cd0ca674b4f480c8a","signature":false,"affectsGlobalScope":true},{"version":"37bc6d268b22917a95f410490c66c8ade4002e6c2c78086dfd91b804bbc87bf1","signature":false,"affectsGlobalScope":true},{"version":"442f50ea082839c98d9745db0a18c8d57e31f7271377dfa36eff6a49c45490a9","signature":false,"affectsGlobalScope":true},{"version":"8a9d48000f1e1d16ba08ec476bbef802abcd3b4d4e5e71d49a07cc9d5ab92a99","signature":false,"affectsGlobalScope":true},{"version":"1f1ba069246c6dd28669264f2ea01859db5c7d67dc00fe6fb1b661c080c64c0f","signature":false,"affectsGlobalScope":true},{"version":"804ba5edd8389cf1443d52797edcec64e0bb8d5122a44a5e3574f841e1dc547a","signature":false},{"version":"61ff336abf8628a43fc097ee0376e31d152e6992bc55fc39831f9586fda7e40d","signature":false},{"version":"182aebde6812e8c9812dcfbfb4af217c513d9368b56b91004a8f6a8bd0319966","signature":false},{"version":"4f341e6384f77d8fa06b6cd9d96de7e5189a8320c66473bd67ac2ca24a6271b6","signature":false}],"root":[34,35,[41,43]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"downlevelIteration":true,"experimentalDecorators":true,"jsx":2,"module":1,"outDir":"./","rootDir":"../src","strict":true,"target":99,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"fileIdsList":[[3,4,7,9,11,14,15,18],[18],[19],[3,16,19],[3,4,8,18],[3,7],[11,12,17],[4,11],[4,7,9],[4,16],[4,7,11],[7,11],[7],[3,4,8,9],[3,11,18],[8,10,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],[1,2,3],[2,5,6],[1,3],[3],[2],[48],[48,49,50,51,52,53,54,55,56,57,58],[13,14,36,39],[37,38],[13],[44,48],[45,59],[44,45,46,47,59],[3,7,33,34],[34,35,41,42],[1,3,4,8,19,33,34,35,40],[3,4,33,41],[1,4,33]],"referencedMap":[[16,1],[25,2],[20,3],[21,4],[24,5],[8,6],[18,7],[12,8],[11,9],[17,10],[15,11],[28,12],[30,12],[31,13],[29,12],[32,13],[10,14],[27,10],[19,15],[33,16],[6,17],[7,18],[2,19],[5,20],[3,21],[49,22],[50,22],[59,23],[58,22],[51,22],[52,22],[53,22],[54,22],[55,22],[56,22],[57,22],[40,24],[39,25],[14,26],[44,22],[45,27],[46,28],[48,29],[35,30],[43,31],[41,32],[42,33],[34,34]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63]},"version":"5.5.3"}
|
|
1
|
+
{"program":{"fileNames":["../node_modules/@rbxts/t/lib/t.d.ts","../node_modules/@flamework/core/out/modding.d.ts","../node_modules/@flamework/core/out/utility.d.ts","../node_modules/@rbxts/jecs/jecs.d.ts","../node_modules/@flamework/core/out/reflect.d.ts","../node_modules/@flamework/core/out/flamework.d.ts","../node_modules/@flamework/core/out/index.d.ts","../node_modules/@ecsframework/core/out/framework/dependencies-container.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/signal.d.ts","../node_modules/@ecsframework/core/out/framework/index.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/registry.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/query.d.ts","../node_modules/@rbxts/immut/src/types-internal.d.ts","../node_modules/@rbxts/immut/src/types-external.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/query-change.d.ts","../node_modules/@ecsframework/core/out/framework/base-system.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/topo.d.ts","../node_modules/@ecsframework/core/out/framework/flamecs/index.d.ts","../node_modules/@ecsframework/core/out/framework/utilities.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/component.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/system.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/inject-type.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/unaffectable.d.ts","../node_modules/@ecsframework/core/out/framework/decorators/tagged.d.ts","../node_modules/@ecsframework/core/out/framework/components/destroyed-component.d.ts","../node_modules/@ecsframework/core/out/framework/components/roblox-instance-component.d.ts","../node_modules/@ecsframework/core/out/framework/systems/roblox-instance-system.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-added.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-removed.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-changed.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-event.d.ts","../node_modules/@ecsframework/core/out/framework/hooks/use-throttle.d.ts","../node_modules/@ecsframework/core/out/index.d.ts","../node_modules/@rbxts/immut/src/none.d.ts","../node_modules/@rbxts/immut/src/makedraftsafe.d.ts","../node_modules/@rbxts/immut/src/makedraftsafereadonly.d.ts","../node_modules/@rbxts/immut/src/table.d.ts","../node_modules/@rbxts/immut/src/index.d.ts","../src/types.d.ts","../src/serilizator/index.ts","../src/profile-wrapper.ts","../src/decorators/saved.ts","../src/systems/saving-system.ts","../src/serilizator/types.d.ts","../src/serilizator/transformers/entity-transformer.ts","../src/serilizator/transformers/roblox-type-transformers.ts","../src/serilizator/transformers/table-transformer.ts","../src/index.ts","../node_modules/@rbxts/types/include/generated/enums.d.ts","../node_modules/@rbxts/types/include/generated/none.d.ts","../node_modules/@rbxts/types/include/lua.d.ts","../node_modules/@rbxts/types/include/macro_math.d.ts","../node_modules/@rbxts/types/include/roblox.d.ts","../node_modules/@rbxts/compiler-types/types/array.d.ts","../node_modules/@rbxts/compiler-types/types/callmacros.d.ts","../node_modules/@rbxts/compiler-types/types/iterable.d.ts","../node_modules/@rbxts/compiler-types/types/map.d.ts","../node_modules/@rbxts/compiler-types/types/promise.d.ts","../node_modules/@rbxts/compiler-types/types/set.d.ts","../node_modules/@rbxts/compiler-types/types/string.d.ts","../node_modules/@rbxts/compiler-types/types/symbol.d.ts","../node_modules/@rbxts/compiler-types/types/typeutils.d.ts","../node_modules/@rbxts/compiler-types/types/eslintignore.d.ts","../node_modules/@rbxts/compiler-types/types/core.d.ts","../node_modules/@rbxts/maid/maid.d.ts","../node_modules/@rbxts/object-utils/index.d.ts","../node_modules/@rbxts/services/index.d.ts","../node_modules/@rbxts/signal/index.d.ts"],"fileInfos":[{"version":"0b4867459e8a965a7d9ceef9fb0314f20ae2b224d0b281d70875df517d8228a3","signature":false},{"version":"ca313ec48ea6c4a9e6a43cfe56ee981de5e3cbf8d1e961a8caf60f734bffd066","signature":false},{"version":"6a9d1f275772d2e39321d5ab6bc25b61003fdc425bf45a50e59672bcb8218d7a","signature":false},{"version":"2a21843ede3063a695f54e5cb1ef4c76a0ab9cc310b13e2997faad64744a7f06","signature":false},{"version":"392ed5c8f5c689dc2993d68bbb71fe6d87c0b6a5ffebd898bd20a3a7a6fbc6d1","signature":false},{"version":"cd7b852febe45d3283329b14f48c3d51ec5beba9b0804880e471f8201fe33840","signature":false},{"version":"121cf23c36581721a12c7d7dd08bb539d5ac20c22a65f98f29a68fd91ef5279a","signature":false},{"version":"04038ad2cdbeac08c550b5ecd101f8115854612ab7aa1fb27e032217a5f4fab1","signature":false},{"version":"eecdccbeac3b47202823c2abd08ec0a03c85e5177b829476e40a43e3ea850552","signature":false},{"version":"a60e524a1609900eff2ba42db0a13627cb0c86576a0fb79823437eff2b886534","signature":false},{"version":"ba817340a8e27930de08730f21d40f96010cbaae8abe39648a443c12cef0d112","signature":false},{"version":"1908cddf0c57e5325a452e2c1ec410dbe8f13709d1e845e89e696ff662a780ab","signature":false},{"version":"c6e031ec1fd9753a27e1e7a4f1b61c5325f3ddb8a21d2c36c4a69a0c2879a84c","signature":false},{"version":"1f8c7c6a1cd951edf43bbe58cb1c9e2d1875a8054978652f9c1fc1ec3956c127","signature":false},{"version":"5503cc71485ad7884447668827c77b872fdc188c3368baac9ad74377133090ad","signature":false},{"version":"8745ae4610b8b6072138bf00323132c0d6d3bbe07c969d4d4d8ca7297349543c","signature":false},{"version":"819d6dc57f3528e82fdf1d71feb3831a44df86ce92a5b9948e5dd56926d8ed71","signature":false},{"version":"94a6cccb410352b81df2d14e66fcdf75c3ce80322530ff6c545a3715ac259ecc","signature":false},{"version":"0278bde4bbf792eac25e3a15561a828388d55c85b836db855a192591bdcf3b6a","signature":false},{"version":"2d9a3ccceed29fa8c57edfa3712e316c58ca695a4a39a038c643a785f993be09","signature":false},{"version":"67b827701649bf5ad5f536aefdf3a3f80f6b1db736e6ef585c874671b997f36b","signature":false},{"version":"697c293a4129b24446869db450decb5d5bfae2fb7f66d2e951e183c7405ec12c","signature":false},{"version":"39940a3bd7a0e2c5dc3f842f29e53a4390d5d20ff016edeed781c9f86bf7824f","signature":false},{"version":"4c9ae7898ad9e8bc01251c2407a4756f3c7ebe8f712c96a2a3220d3961667bab","signature":false},{"version":"a9e592d16ccce15de3f4f08f445a9172b8ce250ba6bbd97cc2aaa5f725e0cc1b","signature":false},{"version":"c3183153ffda128ff91931e0e560ef8881718951b06664174d89299e5cd8024a","signature":false},{"version":"21a6fba4a85d92577f3f8366fe4f8072c9a9821537cc9498499839a10248d079","signature":false},{"version":"4ab3f27f9e6e974e6eb6f879eb32d8c5c89d529a5d06a59d7ae0d0e5e77cd55e","signature":false},{"version":"9e5485dfe6f63fa905c5df28af37c4469aca65e0b1c0bc3182b0bab59e0b0513","signature":false},{"version":"62e220db4aaecbf30d99b77d3d390cd98af66131fa35021a8396013bad826678","signature":false},{"version":"18e4712e9b8919e14a10620f746d766c8075c1a9ae40a45946cf4054a8b1a0c6","signature":false},{"version":"6ae1129c084d8001b212f921c6ee08ae8a4df0c0bb27a546a384af9e4cc87d8f","signature":false},{"version":"11238a0bb5130a0152e6ba846ed930ec2a5fbd87f7d964159d9afd887889e6ad","signature":false},{"version":"30d7eb05300ccd9f267a6429d4bfd2cd94fff2fecdb700dc9225b8ecac00b0a1","signature":false},{"version":"b1a1ff5a1bcfa15ea2ba6211d70eda25819c3facfc8c9ead19de1a54c31c906c","signature":false},{"version":"05d5380e8867b9c3dd765ecbcec1b7ef9aaea813a0e61b555f4ad9aeec7959fc","signature":false},{"version":"3a38f0b05b7240574731238ecb4ad75b184b556105696eba354dc67da90ba39b","signature":false},{"version":"49f569326a7121ba2fe447b415389bbf2f58e83f0da34248f86dfcef99c5981e","signature":false},{"version":"a56347b3acda70ee05b1c19c90c30f6e1416d79971eb20636889c9064a86df24","signature":false},{"version":"a8df11bc94804b4a52fd5b60d80dac94c5bd2c2c20117b35327d98c406d98369","signature":false},{"version":"ee3b46c4e761fc35980803586781fc9d15bf896ed61f1b19c678d22c3f759fe2","signature":false},{"version":"b191e68e48ba86fb81a7abceb48871e96051db44a6be1efe8e6eb72af4476af5","signature":false},{"version":"edff1a4c75b00e8558ffaa7c4c3591bc6b385079578794c0a79a1f6358cc35da","signature":false},{"version":"0e19fdd7fd45ef7a480cfc3abac085e32d1dda5dac080e464b2e8a0d43f2e35c","signature":false},{"version":"0881f84bff5d13ec8bb7a579441a634c0da45dd049e528c1ff4fbbb776a7fb62","signature":false},{"version":"97e7e3e094bf1d2e325b5e0ab20faecb843dfbbbfa002069f474a8620b88b97f","signature":false},{"version":"afec401ca9de0e9753e58f9ee426437c1fd4771662fbc86bdd1cdeccedcd2506","signature":false},{"version":"a3f30101e2e150e8ccb3f6f737ea752d34c7daae62fc12a09e299213eaeb3aef","signature":false},{"version":"ccbe8d79d7a81fe4e0cdbe9cd7883442e2b42d4382c2b62b3dbefff6ef211735","signature":false,"affectsGlobalScope":true},{"version":"64cc6db9f08d98a1f5c0ad61e748076c4ed86170e125246f955f961a145994b5","signature":false,"affectsGlobalScope":true},{"version":"f81be17e276811737d9bb20f5b2c3dad79d211ae594b9eeaadba6bf3902f5d50","signature":false,"affectsGlobalScope":true},{"version":"f52dcf788c4417a40b18121e940dcb54831db316594cdee8b7ce4e6e114cf5e6","signature":false,"affectsGlobalScope":true},{"version":"ae02a7833ef6e143fe12c5ef0a4cca4299562574455e6c12c0b69cc978b8351c","signature":false,"affectsGlobalScope":true},{"version":"6f764e82380d216bc49cd9b36917b8fc543686c290a5fed25360ea86bc91ee6f","signature":false,"affectsGlobalScope":true},{"version":"577a0e686ed07655d42d12a93432c523164c764c71db59bcd0551311d40e7b7e","signature":false,"affectsGlobalScope":true},{"version":"a6070671ab5ce7ad631488bbce101475cdd754b7d524944545637d6e7a0183a8","signature":false,"affectsGlobalScope":true},{"version":"5ae20e37704ceeefcb66efccd614cc04147170d2e6934aeca4ebbf827edf53c1","signature":false,"affectsGlobalScope":true},{"version":"1a5dfbb5c55a07d934e5d24fb5bbe4c37bfd9dc5d93c041bd9f253e3b59318a3","signature":false,"affectsGlobalScope":true},{"version":"cfc2ab2febb258cd1a0f412cd0c7569bf2c9d2ecacd8bda5bfd3ff02e7056802","signature":false,"affectsGlobalScope":true},{"version":"cc9864bd1dfb28bf95ac021610567d9bca6c351c429c807cd0ca674b4f480c8a","signature":false,"affectsGlobalScope":true},{"version":"37bc6d268b22917a95f410490c66c8ade4002e6c2c78086dfd91b804bbc87bf1","signature":false,"affectsGlobalScope":true},{"version":"442f50ea082839c98d9745db0a18c8d57e31f7271377dfa36eff6a49c45490a9","signature":false,"affectsGlobalScope":true},{"version":"8a9d48000f1e1d16ba08ec476bbef802abcd3b4d4e5e71d49a07cc9d5ab92a99","signature":false,"affectsGlobalScope":true},{"version":"1f1ba069246c6dd28669264f2ea01859db5c7d67dc00fe6fb1b661c080c64c0f","signature":false,"affectsGlobalScope":true},{"version":"804ba5edd8389cf1443d52797edcec64e0bb8d5122a44a5e3574f841e1dc547a","signature":false},{"version":"61ff336abf8628a43fc097ee0376e31d152e6992bc55fc39831f9586fda7e40d","signature":false},{"version":"182aebde6812e8c9812dcfbfb4af217c513d9368b56b91004a8f6a8bd0319966","signature":false},{"version":"4f341e6384f77d8fa06b6cd9d96de7e5189a8320c66473bd67ac2ca24a6271b6","signature":false}],"root":[[39,48]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"downlevelIteration":true,"experimentalDecorators":true,"jsx":2,"module":1,"outDir":"./","rootDir":"../src","strict":true,"target":99,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"fileIdsList":[[3,4,7,9,11,14,15,18],[18],[19],[3,16,19],[3,4,8,18],[3,7],[11,12,17],[4,11],[4,7,9],[4,16],[4,7,11],[7,11],[7],[3,4,8,9],[3,11,18],[8,10,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],[1,2,3],[2,5,6],[1,3],[3],[2],[53],[53,54,55,56,57,58,59,60,61,62,63],[13,14,34,37],[35,36],[13],[49,53],[50,64],[49,50,51,52,64],[3,7,33,39],[39,41,42,43,45,46,47],[1,3,4,8,19,33,38,39,40],[4,7,40,44],[7,40],[40],[4],[3,4,33,41],[1,4,33]],"referencedMap":[[16,1],[25,2],[20,3],[21,4],[24,5],[8,6],[18,7],[12,8],[11,9],[17,10],[15,11],[28,12],[30,12],[31,13],[29,12],[32,13],[10,14],[27,10],[19,15],[33,16],[6,17],[7,18],[2,19],[5,20],[3,21],[54,22],[55,22],[64,23],[63,22],[56,22],[57,22],[58,22],[59,22],[60,22],[61,22],[62,22],[38,24],[37,25],[14,26],[49,22],[50,27],[51,28],[53,29],[42,30],[48,31],[41,32],[45,33],[46,34],[47,35],[44,36],[43,37],[39,38]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]},"version":"5.5.3"}
|
package/out/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DependenciesContainer } from "@ecsframework/core";
|
|
|
3
3
|
import { World } from "@rbxts/jecs";
|
|
4
4
|
import { t } from "@rbxts/t";
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface SavedTag<T extends object> {
|
|
7
7
|
Migrations?: ((data: unknown) => unknown)[];
|
|
8
8
|
Guard?: t.check<unknown>;
|
|
9
9
|
OnCreate?: (world: World, container: DependenciesContainer, system: BaseSystem) => T;
|