diff --git a/coverage/amber.png b/coverage/amber.png deleted file mode 100644 index 2cab170..0000000 Binary files a/coverage/amber.png and /dev/null differ diff --git a/coverage/ansi.luau.html b/coverage/ansi.luau.html new file mode 100644 index 0000000..87c5c73 --- /dev/null +++ b/coverage/ansi.luau.html @@ -0,0 +1,65 @@ +
+ + + +Function | Hits |
---|---|
1 | |
white_underline:2 | 0 |
white:6 | 0 |
green:10 | 0 |
red:14 | 0 |
yellow:18 | 0 |
red_highlight:22 | 0 |
green_highlight:26 | 0 |
gray:30 | 0 |
Line | Hits | Code |
---|---|---|
1 | 1 | return { |
2 | 1 | white_underline = function(s: any) |
3 | 0 | return `\27[1;4m{s}\27[0m` |
4 | N/A | end, | >
5 | N/A | > |
6 | 1 | white = function(s: any) |
7 | 0 | return `\27[37;1m{s}\27[0m` |
8 | N/A | end, | >
9 | N/A | > |
10 | 1 | green = function(s: any) |
11 | 0 | return `\27[32;1m{s}\27[0m` |
12 | N/A | end, | >
13 | N/A | > |
14 | 1 | red = function(s: any) |
15 | 0 | return `\27[31;1m{s}\27[0m` |
16 | N/A | end, | >
17 | N/A | > |
18 | 1 | yellow = function(s: any) |
19 | 0 | return `\27[33;1m{s}\27[0m` |
20 | N/A | end, | >
21 | N/A | > |
22 | 1 | red_highlight = function(s: any) |
23 | 0 | return `\27[41;1;30m{s}\27[0m` |
24 | N/A | end, | >
25 | N/A | > |
26 | 1 | green_highlight = function(s: any) |
27 | 0 | return `\27[42;1;30m{s}\27[0m` |
28 | N/A | end, | >
29 | N/A | > |
30 | 1 | gray = function(s: any) |
31 | 0 | return `\27[30;1m{s}\27[0m` |
32 | N/A | end, | >
33 | 0 | } |
Function | Hits |
---|---|
1 | |
pe:6 | 0 |
name:11 | 0 |
components:15 | 0 |
Line | Hits | Code |
---|---|---|
1 | 1 | local jecs = require("@jecs") |
2 | 1 | local ECS_GENERATION = jecs.ECS_GENERATION |
3 | 1 | local ECS_ID = jecs.ECS_ID |
4 | 1 | local ansi = require("@tools/ansi") |
5 | N/A | > |
6 | 1 | local function pe(e: any) |
7 | 0 | local gen = ECS_GENERATION(e) |
8 | 0 | return ansi.green(`e{ECS_ID(e)}`) .. ansi.yellow(`v{gen}`) |
9 | N/A | end | >
10 | N/A | > |
11 | 1 | local function name(world: jecs.World, id: any) |
12 | 0 | return world:get(id, jecs.Name) or `${id}` |
13 | N/A | end | >
14 | N/A | > |
15 | 1 | local function components(world: jecs.World, entity: any) |
16 | 0 | local r = jecs.entity_index_try_get(world.entity_index, entity) |
17 | 0 | if not r then |
18 | 0 | return false |
19 | N/A | end | >
20 | N/A | > |
21 | 0 | local archetype = r.archetype |
22 | 0 | local row = r.row |
23 | 0 | print(`Entity {pe(entity)}`) |
24 | 0 | print("-----------------------------------------------------") |
25 | 0 | for i, column in archetype.columns do |
26 | 0 | local component = archetype.types[i] |
27 | 0 | local n |
28 | 0 | if jecs.IS_PAIR(component) then |
29 | 0 | n = `({name(world, jecs.pair_first(world, component))}, {name(world, jecs.pair_second(world, component))})` |
30 | 0 | else |
31 | 0 | n = name(world, component) |
32 | N/A | end | >
33 | 0 | local data = column[row] or "TAG" |
34 | 0 | print(`| {n} | {data} |`) |
35 | N/A | end | >
36 | 0 | print("-----------------------------------------------------") |
37 | 0 | return true |
38 | N/A | end | >
39 | N/A | > |
40 | 1 | return { |
41 | 1 | components = components, |
42 | 1 | prettify = pe, |
43 | 0 | } |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Directory ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -|
jecs/tools | -
-
|
- 63.0 % | -508 | -320 | -63.6 % | -55 | -35 | -|
jecs/test/test | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Directory ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs/tools | -
-
|
- 63.0 % | -508 | -320 | -63.6 % | -55 | -35 | -|
jecs | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -|
jecs/test/test | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Directory ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -|
jecs/test/test | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -|
jecs/tools | -
-
|
- 63.0 % | -508 | -320 | -63.6 % | -55 | -35 | -
![]() |
Generated by: LCOV version 2.0-1 |
File | Total Hits | Functions |
---|---|---|
tests.luau | 72 | 67 |
jecs.luau | 161937 | 98 |
testkit.luau | 615 | 31 |
lifetime_tracker.luau | 1 | 11 |
entity_visualiser.luau | 1 | 4 |
ansi.luau | 1 | 9 |
Function | Hits |
---|---|
1 | |
ECS_COMBINE:144 | 0 |
ECS_IS_PAIR:149 | 4 |
ECS_GENERATION_INC:153 | 1 |
ECS_ENTITY_T_LO:168 | 4 |
ECS_GENERATION:172 | 5 |
ECS_ENTITY_T_HI:176 | 0 |
ECS_PAIR:180 | 186 |
ECS_PAIR_FIRST:187 | 0 |
ECS_PAIR_SECOND:191 | 0 |
entity_index_try_get_any:195 | 17 |
entity_index_try_get:208 | 1 |
entity_index_try_get_fast:222 | 0 |
entity_index_is_alive:232 | 0 |
entity_index_get_alive:236 | 0 |
ecs_get_alive:244 | 0 |
entity_index_new_id:267 | 0 |
ecs_pair_first:288 | 4 |
ecs_pair_second:293 | 5 |
query_match:298 | 0 |
find_observers:321 | 0 |
archetype_move:330 | 1822 |
archetype_append:390 | 0 |
new_entity:400 | 0 |
entity_move:411 | 0 |
hash:425 | 0 |
fetch:429 | 0 |
world_get:440 | 734 |
world_has_one_inline:471 | 0 |
world_has:487 | 80 |
world_target:509 | 1440 |
ECS_ID_IS_WILDCARD:541 | 0 |
id_record_ensure:547 | 704 |
archetype_append_to_records:610 | 0 |
archetype_create:635 | 987 |
world_entity:700 | 66852 |
world_parent:704 | 1 |
archetype_ensure:708 | 0 |
find_insert:722 | 0 |
find_archetype_with:734 | 0 |
find_archetype_without:752 | 22 |
archetype_init_edge:769 | 0 |
archetype_ensure_edge:780 | 0 |
init_edge_for_add:794 | 0 |
init_edge_for_remove:811 | 0 |
create_edge_for_add:834 | 0 |
create_edge_for_remove:845 | 0 |
archetype_traverse_add:856 | 1 |
archetype_traverse_remove:872 | 1 |
world_add:889 | 19316 |
world_set:921 | 2775 |
world_component:973 | 121 |
world_remove:985 | 298 |
archetype_fast_delete_last:1010 | 0 |
archetype_fast_delete:1018 | 0 |
archetype_delete:1027 | 58 |
world_clear:1066 | 0 |
archetype_disconnect_edge:1166 | 0 |
archetype_remove_edge:1177 | 0 |
archetype_clear_edges:1182 | 22 |
archetype_destroy:1215 | 2 |
world_cleanup:1251 | 1 |
world_delete:1272 | 65539 |
world_contains:1448 | 145 |
NOOP:1452 | 0 |
query_iter_init:1463 | 26 |
world_query_iter_next:1529 | 556 |
world_query_iter_next:1555 | 7 |
world_query_iter_next:1582 | 0 |
world_query_iter_next:1610 | 2 |
world_query_iter_next:1639 | 0 |
world_query_iter_next:1669 | 0 |
world_query_iter_next:1700 | 0 |
world_query_iter_next:1732 | 0 |
world_query_iter_next:1766 | 2 |
query_iter:1800 | 20 |
query_without:1808 | 6 |
query_with:1838 | 1 |
query_archetypes:1872 | 5 |
query_cached:1876 | 6 |
on_create_callback:1926 | 4 |
on_delete_callback:1930 | 1 |
cached_query_iter:1943 | 11 |
world_query_iter_next:2003 | 11 |
world_query_iter_next:2029 | 8 |
world_query_iter_next:2056 | 0 |
world_query_iter_next:2084 | 0 |
world_query_iter_next:2113 | 0 |
world_query_iter_next:2143 | 0 |
world_query_iter_next:2174 | 0 |
world_query_iter_next:2206 | 0 |
world_query_iter_next:2240 | 0 |
world_query:2297 | 33 |
world_each:2357 | 2 |
12 | |
world_children:2391 | 2 |
0 | |
world_new:2441 | 73 |
Line | Hits | Code |
---|---|---|
1 | N/A | --!optimize 2 | >
2 | N/A | --!native | >
3 | N/A | --!strict | >
4 | N/A | --draft 4 | >
5 | N/A | > |
6 | 0 | type i53 = number |
7 | 0 | type i24 = number |
8 | N/A | > |
9 | 0 | type Ty = { i53 } |
10 | 0 | type ArchetypeId = number |
11 | N/A | > |
12 | 0 | type Column = { any } |
13 | N/A | > |
14 | 0 | type Map |
15 | N/A | > |
16 | 0 | type ecs_graph_edge_t = { |
17 | 0 | from: ecs_archetype_t, |
18 | 0 | to: ecs_archetype_t?, |
19 | 0 | id: number, |
20 | 0 | prev: ecs_graph_edge_t?, |
21 | 0 | next: ecs_graph_edge_t?, |
22 | 0 | } |
23 | N/A | > |
24 | 0 | type ecs_graph_edges_t = Map |
25 | N/A | > |
26 | 0 | type ecs_graph_node_t = { |
27 | 0 | add: ecs_graph_edges_t, |
28 | 0 | remove: ecs_graph_edges_t, |
29 | 0 | refs: ecs_graph_edge_t, |
30 | 0 | } |
31 | N/A | > |
32 | 0 | type ecs_archetype_t = { |
33 | 0 | id: number, |
34 | 0 | types: Ty, |
35 | 0 | type: string, |
36 | 0 | entities: { number }, |
37 | 0 | columns: { Column }, |
38 | 0 | records: { [i53]: number }, |
39 | 0 | counts: { [i53]: number }, |
40 | 0 | } & ecs_graph_node_t |
41 | N/A | > |
42 | 0 | export type Archetype = { |
43 | 0 | id: number, |
44 | 0 | types: Ty, |
45 | 0 | type: string, |
46 | 0 | entities: { number }, |
47 | 0 | columns: { Column }, |
48 | 0 | records: { [Id]: number }, |
49 | 0 | counts: { [Id]: number }, |
50 | 0 | } |
51 | N/A | > |
52 | 0 | type ecs_record_t = { |
53 | 0 | archetype: ecs_archetype_t, |
54 | 0 | row: number, |
55 | 0 | dense: i24, |
56 | 0 | } |
57 | N/A | > |
58 | 0 | type ecs_id_record_t = { |
59 | 0 | cache: { number }, |
60 | 0 | counts: { number }, |
61 | 0 | flags: number, |
62 | 0 | size: number, |
63 | 0 | hooks: { |
64 | 0 | on_add: ((entity: i53) -> ())?, |
65 | 0 | on_set: ((entity: i53, data: any) -> ())?, |
66 | 0 | on_remove: ((entity: i53) -> ())?, |
67 | 0 | }, |
68 | 0 | } |
69 | N/A | > |
70 | 0 | type ecs_id_index_t = Map |
71 | N/A | > |
72 | 0 | type ecs_archetypes_map_t = { [string]: ecs_archetype_t } |
73 | N/A | > |
74 | 0 | type ecs_archetypes_t = { ecs_archetype_t } |
75 | N/A | > |
76 | 0 | type ecs_entity_index_t = { |
77 | 0 | dense_array: Map |
78 | 0 | sparse_array: Map |
79 | 0 | alive_count: number, |
80 | 0 | max_id: number, |
81 | 0 | } |
82 | N/A | > |
83 | 0 | type ecs_query_data_t = { |
84 | 0 | compatible_archetypes: { ecs_archetype_t }, |
85 | 0 | ids: { i53 }, |
86 | 0 | filter_with: { i53 }, |
87 | 0 | filter_without: { i53 }, |
88 | 0 | next: () -> (number, ...any), |
89 | 0 | world: ecs_world_t, |
90 | 0 | } |
91 | N/A | > |
92 | 0 | type ecs_observer_t = { |
93 | 0 | callback: (archetype: ecs_archetype_t) -> (), |
94 | 0 | query: ecs_query_data_t, |
95 | 0 | } |
96 | N/A | > |
97 | 0 | type ecs_observable_t = Map |
98 | N/A | > |
99 | 0 | type ecs_world_t = { |
100 | 0 | entity_index: ecs_entity_index_t, |
101 | 0 | component_index: ecs_id_index_t, |
102 | 0 | archetypes: ecs_archetypes_t, |
103 | 0 | archetype_index: ecs_archetypes_map_t, |
104 | 0 | max_archetype_id: number, |
105 | 0 | max_component_id: number, |
106 | 0 | ROOT_ARCHETYPE: ecs_archetype_t, |
107 | 0 | observable: Map |
108 | 0 | } |
109 | N/A | > |
110 | 1 | local HI_COMPONENT_ID = _G.__JECS_HI_COMPONENT_ID or 256 |
111 | N/A | -- stylua: ignore start | >
112 | 1 | local EcsOnAdd = HI_COMPONENT_ID + 1 |
113 | 1 | local EcsOnRemove = HI_COMPONENT_ID + 2 |
114 | 1 | local EcsOnSet = HI_COMPONENT_ID + 3 |
115 | 1 | local EcsWildcard = HI_COMPONENT_ID + 4 |
116 | 1 | local EcsChildOf = HI_COMPONENT_ID + 5 |
117 | 1 | local EcsComponent = HI_COMPONENT_ID + 6 |
118 | 1 | local EcsOnDelete = HI_COMPONENT_ID + 7 |
119 | 1 | local EcsOnDeleteTarget = HI_COMPONENT_ID + 8 |
120 | 1 | local EcsDelete = HI_COMPONENT_ID + 9 |
121 | 1 | local EcsRemove = HI_COMPONENT_ID + 10 |
122 | 1 | local EcsName = HI_COMPONENT_ID + 11 |
123 | 1 | local EcsOnArchetypeCreate = HI_COMPONENT_ID + 12 |
124 | 1 | local EcsOnArchetypeDelete = HI_COMPONENT_ID + 13 |
125 | 1 | local EcsRest = HI_COMPONENT_ID + 14 |
126 | N/A | > |
127 | 1 | local ECS_ID_DELETE = 0b0000_0001 |
128 | 1 | local ECS_ID_IS_TAG = 0b0000_0010 |
129 | 1 | local ECS_ID_HAS_ON_ADD = 0b0000_0100 |
130 | 1 | local ECS_ID_HAS_ON_SET = 0b0000_1000 |
131 | 1 | local ECS_ID_HAS_ON_REMOVE = 0b0001_0000 |
132 | 1 | local ECS_ID_MASK = 0b0000_0000 |
133 | N/A | > |
134 | 1 | local ECS_ENTITY_MASK = bit32.lshift(1, 24) |
135 | 1 | local ECS_GENERATION_MASK = bit32.lshift(1, 16) |
136 | N/A | > |
137 | 1 | local NULL_ARRAY = table.freeze({}) |
138 | 1 | local ECS_INTERNAL_ERROR = [[ |
139 | 0 | This is an internal error, please file a bug report via the following link: |
140 | N/A | > |
141 | 0 | https://github.com/Ukendio/jecs/issues/new?template=BUG-REPORT.md |
142 | 0 | ]] |
143 | N/A | > |
144 | 1 | local function ECS_COMBINE(id: number, generation: number): i53 |
145 | 65539 | return id + (generation * ECS_ENTITY_MASK) |
146 | N/A | end | >
147 | 1 | local ECS_PAIR_OFFSET = 2^48 |
148 | N/A | > |
149 | 1 | local function ECS_IS_PAIR(e: number): boolean |
150 | 34 | return e > ECS_PAIR_OFFSET |
151 | N/A | end | >
152 | N/A | > |
153 | 1 | local function ECS_GENERATION_INC(e: i53): i53 |
154 | 65683 | if e > ECS_ENTITY_MASK then |
155 | 65540 | local id = e % ECS_ENTITY_MASK |
156 | 65540 | local generation = e // ECS_ENTITY_MASK |
157 | N/A | > |
158 | 65540 | local next_gen = generation + 1 |
159 | 65540 | if next_gen >= ECS_GENERATION_MASK then |
160 | 1 | return id |
161 | N/A | end | >
162 | N/A | > |
163 | 65539 | return ECS_COMBINE(id, next_gen) |
164 | N/A | end | >
165 | 143 | return ECS_COMBINE(e, 1) |
166 | N/A | end | >
167 | N/A | > |
168 | 1 | local function ECS_ENTITY_T_LO(e: i53): i24 |
169 | 145 | return e % ECS_ENTITY_MASK |
170 | N/A | end | >
171 | N/A | > |
172 | 1 | local function ECS_GENERATION(e: i53) |
173 | 5 | return e // ECS_ENTITY_MASK |
174 | N/A | end | >
175 | N/A | > |
176 | 1 | local function ECS_ENTITY_T_HI(e: i53): i24 |
177 | 0 | return e // ECS_ENTITY_MASK |
178 | N/A | end | >
179 | N/A | > |
180 | 1 | local function ECS_PAIR(pred: i53, obj: i53): i53 |
181 | 73 | pred %= ECS_ENTITY_MASK |
182 | 73 | obj %= ECS_ENTITY_MASK |
183 | N/A | > |
184 | 73 | return obj + (pred * ECS_ENTITY_MASK) + ECS_PAIR_OFFSET |
185 | N/A | end | >
186 | N/A | > |
187 | 1 | local function ECS_PAIR_FIRST(e: i53): i24 |
188 | 260 | return (e - ECS_PAIR_OFFSET) // ECS_ENTITY_MASK |
189 | N/A | end | >
190 | N/A | > |
191 | 1 | local function ECS_PAIR_SECOND(e: i53): i24 |
192 | 24 | return (e - ECS_PAIR_OFFSET) % ECS_ENTITY_MASK |
193 | N/A | end | >
194 | N/A | > |
195 | 1 | local function entity_index_try_get_any( |
196 | 0 | entity_index: ecs_entity_index_t, |
197 | 0 | entity: number |
198 | 0 | ): ecs_record_t? |
199 | 145 | local r = entity_index.sparse_array[ECS_ENTITY_T_LO(entity)] |
200 | N/A | > |
201 | 145 | if not r or r.dense == 0 then |
202 | 0 | return nil |
203 | N/A | end | >
204 | N/A | > |
205 | 145 | return r |
206 | N/A | end | >
207 | N/A | > |
208 | 1 | local function entity_index_try_get(entity_index: ecs_entity_index_t, entity: number): ecs_record_t? |
209 | 145 | local r = entity_index_try_get_any(entity_index, entity) |
210 | 145 | if r then |
211 | 145 | local r_dense = r.dense |
212 | 145 | if r_dense > entity_index.alive_count then |
213 | 125 | return nil |
214 | N/A | end | >
215 | 20 | if entity_index.dense_array[r_dense] ~= entity then |
216 | 2 | return nil |
217 | N/A | end | >
218 | N/A | end | >
219 | 18 | return r |
220 | N/A | end | >
221 | N/A | > |
222 | 1 | local function entity_index_try_get_fast(entity_index: ecs_entity_index_t, entity: number): ecs_record_t? |
223 | 298 | local r = entity_index.sparse_array[ECS_ENTITY_T_LO(entity)] |
224 | 298 | if r then |
225 | 298 | if entity_index.dense_array[r.dense] ~= entity then |
226 | 0 | return nil |
227 | N/A | end | >
228 | N/A | end | >
229 | 298 | return r |
230 | N/A | end | >
231 | N/A | > |
232 | 1 | local function entity_index_is_alive(entity_index: ecs_entity_index_t, entity: i53) |
233 | 145 | return entity_index_try_get(entity_index, entity) ~= nil |
234 | N/A | end | >
235 | N/A | > |
236 | 1 | local function entity_index_get_alive(index: ecs_entity_index_t, entity: i53): i53? |
237 | 24 | local r = entity_index_try_get_any(index, entity) |
238 | 24 | if r then |
239 | 24 | return index.dense_array[r.dense] |
240 | N/A | end | >
241 | 0 | return nil |
242 | N/A | end | >
243 | N/A | > |
244 | 1 | local function ecs_get_alive(world, entity) |
245 | 5 | if entity == 0 then |
246 | 0 | return 0 |
247 | N/A | end | >
248 | N/A | > |
249 | 5 | local eindex = world.entity_index |
250 | N/A | > |
251 | 5 | if entity_index_is_alive(eindex, entity) then |
252 | 5 | return entity |
253 | N/A | end | >
254 | N/A | > |
255 | 0 | if entity > ECS_ENTITY_MASK then |
256 | 0 | return 0 |
257 | N/A | end | >
258 | N/A | > |
259 | 0 | local current = entity_index_get_alive(eindex, entity) |
260 | 0 | if not current or not entity_index_is_alive(eindex, current) then |
261 | 0 | return 0 |
262 | N/A | end | >
263 | N/A | > |
264 | 0 | return current |
265 | N/A | end | >
266 | N/A | > |
267 | 1 | local function entity_index_new_id(entity_index: ecs_entity_index_t): i53 |
268 | 18688 | local dense_array = entity_index.dense_array |
269 | 18688 | local alive_count = entity_index.alive_count |
270 | 18688 | local max_id = entity_index.max_id |
271 | 18688 | if alive_count ~= max_id then |
272 | 0 | alive_count += 1 |
273 | 0 | entity_index.alive_count = alive_count |
274 | 0 | local id = dense_array[alive_count] |
275 | 0 | return id |
276 | N/A | end | >
277 | N/A | > |
278 | 18688 | local id = max_id + 1 |
279 | 18688 | entity_index.max_id = id |
280 | 18688 | alive_count += 1 |
281 | 18688 | entity_index.alive_count = alive_count |
282 | 18688 | dense_array[alive_count] = id |
283 | 18688 | entity_index.sparse_array[id] = { dense = alive_count } :: ecs_record_t |
284 | N/A | > |
285 | 18688 | return id |
286 | N/A | end | >
287 | N/A | > |
288 | 1 | local function ecs_pair_first(world: ecs_world_t, e: i53) |
289 | 4 | local pred = ECS_PAIR_FIRST(e) |
290 | 4 | return ecs_get_alive(world, pred) |
291 | N/A | end | >
292 | N/A | > |
293 | 1 | local function ecs_pair_second(world: ecs_world_t, e: i53) |
294 | 5 | local obj = ECS_PAIR_SECOND(e) |
295 | 5 | return ecs_get_alive(world, obj) |
296 | N/A | end | >
297 | N/A | > |
298 | 1 | local function query_match(query: ecs_query_data_t, |
299 | 0 | archetype: ecs_archetype_t) |
300 | 2 | local records = archetype.records |
301 | 2 | local with = query.filter_with |
302 | N/A | > |
303 | 2 | for _, id in with do |
304 | 4 | if not records[id] then |
305 | 1 | return false |
306 | N/A | end | >
307 | N/A | end | >
308 | N/A | > |
309 | 1 | local without = query.filter_without |
310 | 1 | if without then |
311 | 1 | for _, id in without do |
312 | 1 | if records[id] then |
313 | 0 | return false |
314 | N/A | end | >
315 | N/A | end | >
316 | N/A | end | >
317 | N/A | > |
318 | 1 | return true |
319 | N/A | end | >
320 | N/A | > |
321 | 1 | local function find_observers(world: ecs_world_t, event: i53, |
322 | 0 | component: i53): { ecs_observer_t }? |
323 | 113 | local cache = world.observable[event] |
324 | 113 | if not cache then |
325 | 110 | return nil |
326 | N/A | end | >
327 | 3 | return cache[component] :: any |
328 | N/A | end | >
329 | N/A | > |
330 | 1 | local function archetype_move( |
331 | 0 | entity_index: ecs_entity_index_t, |
332 | 0 | to: ecs_archetype_t, |
333 | 0 | dst_row: i24, |
334 | 0 | from: ecs_archetype_t, |
335 | 0 | src_row: i24 |
336 | 0 | ) |
337 | 1822 | local src_columns = from.columns |
338 | 1822 | local dst_columns = to.columns |
339 | 1822 | local dst_entities = to.entities |
340 | 1822 | local src_entities = from.entities |
341 | N/A | > |
342 | 1822 | local last = #src_entities |
343 | 1822 | local id_types = from.types |
344 | 1822 | local records = to.records |
345 | N/A | > |
346 | 1822 | for i, column in src_columns do |
347 | 2251 | if column == NULL_ARRAY then |
348 | 0 | continue |
349 | N/A | end | >
350 | N/A | -- Retrieves the new column index from the source archetype's record from each component | >
351 | N/A | -- We have to do this because the columns are tightly packed and indexes may not correspond to each other. | >
352 | 1739 | local tr = records[id_types[i]] |
353 | N/A | > |
354 | N/A | -- Sometimes target column may not exist, e.g. when you remove a component. | >
355 | 1739 | if tr then |
356 | 1446 | dst_columns[tr][dst_row] = column[src_row] |
357 | N/A | end | >
358 | N/A | > |
359 | N/A | -- If the entity is the last row in the archetype then swapping it would be meaningless. | >
360 | 1739 | if src_row ~= last then |
361 | N/A | -- Swap rempves columns to ensure there are no holes in the archetype. | >
362 | 95 | column[src_row] = column[last] |
363 | N/A | end | >
364 | 1739 | column[last] = nil |
365 | N/A | end | >
366 | N/A | > |
367 | 1822 | local moved = #src_entities |
368 | N/A | > |
369 | N/A | -- Move the entity from the source to the destination archetype. | >
370 | N/A | -- Because we have swapped columns we now have to update the records | >
371 | N/A | -- corresponding to the entities' rows that were swapped. | >
372 | 1822 | local e1 = src_entities[src_row] |
373 | 1822 | local e2 = src_entities[moved] |
374 | N/A | > |
375 | 1822 | if src_row ~= moved then |
376 | 461 | src_entities[src_row] = e2 |
377 | N/A | end | >
378 | N/A | > |
379 | 1822 | src_entities[moved] = nil :: any |
380 | 1822 | dst_entities[dst_row] = e1 |
381 | N/A | > |
382 | 1822 | local sparse_array = entity_index.sparse_array |
383 | N/A | > |
384 | 1822 | local record1 = sparse_array[ECS_ENTITY_T_LO(e1)] |
385 | 1822 | local record2 = sparse_array[ECS_ENTITY_T_LO(e2)] |
386 | 1822 | record1.row = dst_row |
387 | 1822 | record2.row = src_row |
388 | N/A | end | >
389 | N/A | > |
390 | 1 | local function archetype_append( |
391 | 0 | entity: i53, |
392 | 0 | archetype: ecs_archetype_t |
393 | 0 | ): number |
394 | 296 | local entities = archetype.entities |
395 | 296 | local length = #entities + 1 |
396 | 296 | entities[length] = entity |
397 | 296 | return length |
398 | N/A | end | >
399 | N/A | > |
400 | 1 | local function new_entity( |
401 | 0 | entity: i53, |
402 | 0 | record: ecs_record_t, |
403 | 0 | archetype: ecs_archetype_t |
404 | 0 | ): ecs_record_t |
405 | 1388 | local row = archetype_append(entity, archetype) |
406 | 1388 | record.archetype = archetype |
407 | 1388 | record.row = row |
408 | 0 | return record |
409 | N/A | end | >
410 | N/A | > |
411 | 1 | local function entity_move( |
412 | 0 | entity_index: ecs_entity_index_t, |
413 | 0 | entity: i53, |
414 | 0 | record: ecs_record_t, |
415 | 0 | to: ecs_archetype_t |
416 | 0 | ) |
417 | 296 | local sourceRow = record.row |
418 | 296 | local from = record.archetype |
419 | 296 | local dst_row = archetype_append(entity, to) |
420 | 296 | archetype_move(entity_index, to, dst_row, from, sourceRow) |
421 | 296 | record.archetype = to |
422 | 296 | record.row = dst_row |
423 | N/A | end | >
424 | N/A | > |
425 | 1 | local function hash(arr: { number }): string |
426 | 324 | return table.concat(arr, "_") |
427 | N/A | end | >
428 | N/A | > |
429 | 1 | local function fetch(id: i53, records: { number }, |
430 | 0 | columns: { Column }, row: number): any |
431 | 623 | local tr = records[id] |
432 | N/A | > |
433 | 623 | if not tr then |
434 | 598 | return nil |
435 | N/A | end | >
436 | N/A | > |
437 | 25 | return columns[tr][row] |
438 | N/A | end | >
439 | N/A | > |
440 | 1 | local function world_get(world: ecs_world_t, entity: i53, |
441 | 0 | a: i53, b: i53?, c: i53?, d: i53?, e: i53?): ...any |
442 | 734 | local record = entity_index_try_get_fast(world.entity_index, entity) |
443 | 734 | if not record then |
444 | 75 | return nil |
445 | N/A | end | >
446 | N/A | > |
447 | 659 | local archetype = record.archetype |
448 | 659 | if not archetype then |
449 | 36 | return nil |
450 | N/A | end | >
451 | N/A | > |
452 | 623 | local records = archetype.records |
453 | 623 | local columns = archetype.columns |
454 | 623 | local row = record.row |
455 | N/A | > |
456 | 623 | local va = fetch(a, records, columns, row) |
457 | N/A | > |
458 | 623 | if not b then |
459 | 30 | return va |
460 | 593 | elseif not c then |
461 | 0 | return va, fetch(b, records, columns, row) |
462 | 593 | elseif not d then |
463 | 593 | return va, fetch(b, records, columns, row), fetch(c, records, columns, row) |
464 | 0 | elseif not e then |
465 | 0 | return va, fetch(b, records, columns, row), fetch(c, records, columns, row), fetch(d, records, columns, row) |
466 | 0 | else |
467 | 0 | error("args exceeded") |
468 | N/A | end | >
469 | N/A | end | >
470 | N/A | > |
471 | 1 | local function world_has_one_inline(world: ecs_world_t, entity: i53, id: i53): boolean |
472 | 702 | local record = entity_index_try_get_fast(world.entity_index, entity) |
473 | 702 | if not record then |
474 | 73 | return false |
475 | N/A | end | >
476 | N/A | > |
477 | 629 | local archetype = record.archetype |
478 | 629 | if not archetype then |
479 | 36 | return false |
480 | N/A | end | >
481 | N/A | > |
482 | 593 | local records = archetype.records |
483 | N/A | > |
484 | 593 | return records[id] ~= nil |
485 | N/A | end | >
486 | N/A | > |
487 | 1 | local function world_has(world: ecs_world_t, entity: i53, ...: i53): boolean |
488 | 80 | local record = entity_index_try_get_fast(world.entity_index, entity) |
489 | 80 | if not record then |
490 | 22 | return false |
491 | N/A | end | >
492 | N/A | > |
493 | 58 | local archetype = record.archetype |
494 | 58 | if not archetype then |
495 | 1 | return false |
496 | N/A | end | >
497 | N/A | > |
498 | 57 | local records = archetype.records |
499 | N/A | > |
500 | 57 | for i = 1, select("#", ...) do |
501 | 66 | if not records[select(i, ...)] then |
502 | 25 | return false |
503 | N/A | end | >
504 | N/A | end | >
505 | N/A | > |
506 | 32 | return true |
507 | N/A | end | >
508 | N/A | > |
509 | 1 | local function world_target(world: ecs_world_t, entity: i53, relation: i24, index: number?): i24? |
510 | 1440 | local nth = index or 0 |
511 | 1440 | local record = entity_index_try_get_fast(world.entity_index, entity) |
512 | 1440 | if not record then |
513 | 146 | return nil |
514 | N/A | end | >
515 | N/A | > |
516 | 1294 | local archetype = record.archetype |
517 | 1294 | if not archetype then |
518 | 72 | return nil |
519 | N/A | end | >
520 | N/A | > |
521 | 1222 | local r = ECS_PAIR(relation, EcsWildcard) |
522 | N/A | > |
523 | 1222 | local count = archetype.counts[r] |
524 | 1222 | if not count then |
525 | 1167 | return nil |
526 | N/A | end | >
527 | N/A | > |
528 | 55 | if nth >= count then |
529 | 5 | nth = nth + count + 1 |
530 | N/A | end | >
531 | N/A | > |
532 | 55 | nth = archetype.types[nth + archetype.records[r]] |
533 | 55 | if not nth then |
534 | 5 | return nil |
535 | N/A | end | >
536 | N/A | > |
537 | 50 | return entity_index_get_alive(world.entity_index, |
538 | 50 | ECS_PAIR_SECOND(nth)) |
539 | N/A | end | >
540 | N/A | > |
541 | 1 | local function ECS_ID_IS_WILDCARD(e: i53): boolean |
542 | 0 | local first = ECS_ENTITY_T_HI(e) |
543 | 0 | local second = ECS_ENTITY_T_LO(e) |
544 | 0 | return first == EcsWildcard or second == EcsWildcard |
545 | N/A | end | >
546 | N/A | > |
547 | 1 | local function id_record_ensure(world: ecs_world_t, id: number): ecs_id_record_t |
548 | 1509 | local component_index = world.component_index |
549 | 1509 | local entity_index = world.entity_index |
550 | 1509 | local idr: ecs_id_record_t = component_index[id] |
551 | N/A | > |
552 | 1509 | if not idr then |
553 | 704 | local flags = ECS_ID_MASK |
554 | 704 | local relation = id |
555 | 704 | local target = 0 |
556 | 704 | local is_pair = ECS_IS_PAIR(id) |
557 | 704 | if is_pair then |
558 | 384 | relation = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53 |
559 | 384 | assert(relation and entity_index_is_alive( |
560 | 384 | entity_index, relation), ECS_INTERNAL_ERROR) |
561 | 383 | target = entity_index_get_alive(entity_index, ECS_PAIR_SECOND(id)) :: i53 |
562 | 383 | assert(target and entity_index_is_alive( |
563 | 383 | entity_index, target), ECS_INTERNAL_ERROR) |
564 | N/A | end | >
565 | N/A | > |
566 | 702 | local cleanup_policy = world_target(world, relation, EcsOnDelete, 0) |
567 | 702 | local cleanup_policy_target = world_target(world, relation, EcsOnDeleteTarget, 0) |
568 | N/A | > |
569 | 702 | local has_delete = false |
570 | N/A | > |
571 | 702 | if cleanup_policy == EcsDelete or cleanup_policy_target == EcsDelete then |
572 | 21 | has_delete = true |
573 | N/A | end | >
574 | N/A | > |
575 | 702 | local on_add, on_set, on_remove = world_get(world, relation, EcsOnAdd, EcsOnSet, EcsOnRemove) |
576 | N/A | > |
577 | 702 | local is_tag = not world_has_one_inline(world, relation, EcsComponent) |
578 | N/A | > |
579 | 702 | if is_tag and is_pair then |
580 | 190 | is_tag = not world_has_one_inline(world, target, EcsComponent) |
581 | N/A | end | >
582 | N/A | > |
583 | 702 | flags = bit32.bor( |
584 | 702 | flags, |
585 | 702 | if on_add then ECS_ID_HAS_ON_ADD else 0, |
586 | 702 | if on_remove then ECS_ID_HAS_ON_REMOVE else 0, |
587 | 702 | if on_set then ECS_ID_HAS_ON_SET else 0, |
588 | 702 | if has_delete then ECS_ID_DELETE else 0, |
589 | 702 | if is_tag then ECS_ID_IS_TAG else 0 |
590 | 0 | ) |
591 | N/A | > |
592 | 702 | idr = { |
593 | 702 | size = 0, |
594 | 702 | cache = {}, |
595 | 702 | counts = {}, |
596 | 702 | flags = flags, |
597 | 702 | hooks = { |
598 | 702 | on_add = on_add, |
599 | 702 | on_set = on_set, |
600 | 702 | on_remove = on_remove, |
601 | 0 | }, |
602 | 0 | } |
603 | N/A | > |
604 | 702 | component_index[id] = idr |
605 | N/A | end | >
606 | N/A | > |
607 | 1507 | return idr |
608 | N/A | end | >
609 | N/A | > |
610 | 1 | local function archetype_append_to_records( |
611 | 0 | idr: ecs_id_record_t, |
612 | 0 | archetype: ecs_archetype_t, |
613 | 0 | id: i53, |
614 | 0 | index: number |
615 | 0 | ) |
616 | 987 | local archetype_id = archetype.id |
617 | 987 | local archetype_records = archetype.records |
618 | 987 | local archetype_counts = archetype.counts |
619 | 987 | local idr_columns = idr.cache |
620 | 987 | local idr_counts = idr.counts |
621 | 987 | local tr = idr_columns[archetype_id] |
622 | 987 | if not tr then |
623 | 987 | idr_columns[archetype_id] = index |
624 | 987 | idr_counts[archetype_id] = 1 |
625 | N/A | > |
626 | 987 | archetype_records[id] = index |
627 | 987 | archetype_counts[id] = 1 |
628 | 0 | else |
629 | 82 | local max_count = idr_counts[archetype_id] + 1 |
630 | 82 | idr_counts[archetype_id] = max_count |
631 | 82 | archetype_counts[id] = max_count |
632 | N/A | end | >
633 | N/A | end | >
634 | N/A | > |
635 | 1 | local function archetype_create(world: ecs_world_t, id_types: { i24 }, ty, prev: i53?): ecs_archetype_t |
636 | 635 | local archetype_id = (world.max_archetype_id :: number) + 1 |
637 | 635 | world.max_archetype_id = archetype_id |
638 | N/A | > |
639 | 635 | local length = #id_types |
640 | 635 | local columns = (table.create(length) :: any) :: { Column } |
641 | N/A | > |
642 | 635 | local records: { number } = {} |
643 | 635 | local counts: {number} = {} |
644 | N/A | > |
645 | 635 | local archetype: ecs_archetype_t = { |
646 | 635 | columns = columns, |
647 | 635 | entities = {}, |
648 | 635 | id = archetype_id, |
649 | 635 | records = records, |
650 | 635 | counts = counts, |
651 | 635 | type = ty, |
652 | 635 | types = id_types, |
653 | N/A | > |
654 | 635 | add = {}, |
655 | 635 | remove = {}, |
656 | 635 | refs = {} :: ecs_graph_edge_t, |
657 | 0 | } |
658 | N/A | > |
659 | 635 | for i, component_id in id_types do |
660 | 989 | local idr = id_record_ensure(world, component_id) |
661 | 987 | archetype_append_to_records(idr, archetype, component_id, i) |
662 | N/A | > |
663 | 987 | if ECS_IS_PAIR(component_id) then |
664 | 260 | local relation = ECS_PAIR_FIRST(component_id) |
665 | 260 | local object = ECS_PAIR_SECOND(component_id) |
666 | 260 | local r = ECS_PAIR(relation, EcsWildcard) |
667 | 260 | local idr_r = id_record_ensure(world, r) |
668 | 260 | archetype_append_to_records(idr_r, archetype, r, i) |
669 | N/A | > |
670 | 260 | local t = ECS_PAIR(EcsWildcard, object) |
671 | 260 | local idr_t = id_record_ensure(world, t) |
672 | 260 | archetype_append_to_records(idr_t, archetype, t, i) |
673 | N/A | end | >
674 | N/A | > |
675 | 987 | if bit32.band(idr.flags, ECS_ID_IS_TAG) == 0 then |
676 | 594 | columns[i] = {} |
677 | 0 | else |
678 | 393 | columns[i] = NULL_ARRAY |
679 | N/A | end | >
680 | N/A | end | >
681 | N/A | > |
682 | 633 | for id in records do |
683 | 1405 | local observer_list = find_observers(world, EcsOnArchetypeCreate, id) |
684 | 1405 | if not observer_list then |
685 | 0 | continue |
686 | N/A | end | >
687 | 8 | for _, observer in observer_list do |
688 | 8 | if query_match(observer.query, archetype) then |
689 | 4 | observer.callback(archetype) |
690 | N/A | end | >
691 | N/A | end | >
692 | N/A | end | >
693 | N/A | > |
694 | 633 | world.archetype_index[ty] = archetype |
695 | 633 | world.archetypes[archetype_id] = archetype |
696 | N/A | > |
697 | 633 | return archetype |
698 | N/A | end | >
699 | N/A | > |
700 | 1 | local function world_entity(world: ecs_world_t): i53 |
701 | 66852 | return entity_index_new_id(world.entity_index) |
702 | N/A | end | >
703 | N/A | > |
704 | 1 | local function world_parent(world: ecs_world_t, entity: i53) |
705 | 1 | return world_target(world, entity, EcsChildOf, 0) |
706 | N/A | end | >
707 | N/A | > |
708 | 1 | local function archetype_ensure(world: ecs_world_t, id_types): ecs_archetype_t |
709 | 324 | if #id_types < 1 then |
710 | 0 | return world.ROOT_ARCHETYPE |
711 | N/A | end | >
712 | N/A | > |
713 | 324 | local ty = hash(id_types) |
714 | 324 | local archetype = world.archetype_index[ty] |
715 | 324 | if archetype then |
716 | 0 | return archetype |
717 | N/A | end | >
718 | N/A | > |
719 | 324 | return archetype_create(world, id_types, ty) |
720 | N/A | end | >
721 | N/A | > |
722 | 1 | local function find_insert(id_types: { i53 }, toAdd: i53): number |
723 | 326 | for i, id in id_types do |
724 | 244 | if id == toAdd then |
725 | 2 | return -1 |
726 | N/A | end | >
727 | 242 | if id > toAdd then |
728 | 13 | return i |
729 | N/A | end | >
730 | N/A | end | >
731 | 311 | return #id_types + 1 |
732 | N/A | end | >
733 | N/A | > |
734 | 1 | local function find_archetype_with(world: ecs_world_t, node: ecs_archetype_t, id: i53): ecs_archetype_t |
735 | 326 | local id_types = node.types |
736 | N/A | -- Component IDs are added incrementally, so inserting and sorting | >
737 | N/A | -- them each time would be expensive. Instead this insertion sort can find the insertion | >
738 | N/A | -- point in the types array. | >
739 | N/A | > |
740 | 326 | local dst = table.clone(node.types) :: { i53 } |
741 | 326 | local at = find_insert(id_types, id) |
742 | 326 | if at == -1 then |
743 | N/A | -- If it finds a duplicate, it just means it is the same archetype so it can return it | >
744 | N/A | -- directly instead of needing to hash types for a lookup to the archetype. | >
745 | 2 | return node |
746 | N/A | end | >
747 | 324 | table.insert(dst, at, id) |
748 | N/A | > |
749 | 324 | return archetype_ensure(world, dst) |
750 | N/A | end | >
751 | N/A | > |
752 | 1 | local function find_archetype_without( |
753 | 0 | world: ecs_world_t, |
754 | 0 | node: ecs_archetype_t, |
755 | 0 | id: i53 |
756 | 0 | ): ecs_archetype_t |
757 | 33 | local id_types = node.types |
758 | 33 | local at = table.find(id_types, id) |
759 | 33 | if at == nil then |
760 | 0 | return node |
761 | N/A | end | >
762 | N/A | > |
763 | 33 | local dst = table.clone(id_types) |
764 | 33 | table.remove(dst, at) |
765 | N/A | > |
766 | 33 | return archetype_ensure(world, dst) |
767 | N/A | end | >
768 | N/A | > |
769 | 1 | local function archetype_init_edge( |
770 | 0 | archetype: ecs_archetype_t, |
771 | 0 | edge: ecs_graph_edge_t, |
772 | 0 | id: i53, |
773 | 0 | to: ecs_archetype_t |
774 | 0 | ) |
775 | 32 | edge.from = archetype |
776 | 32 | edge.to = to |
777 | 32 | edge.id = id |
778 | N/A | end | >
779 | N/A | > |
780 | 1 | local function archetype_ensure_edge( |
781 | 0 | world: ecs_world_t, |
782 | 0 | edges: ecs_graph_edges_t, |
783 | 0 | id: i53 |
784 | 0 | ): ecs_graph_edge_t |
785 | 296 | local edge = edges[id] |
786 | 296 | if not edge then |
787 | 32 | edge = {} :: ecs_graph_edge_t |
788 | 32 | edges[id] = edge |
789 | N/A | end | >
790 | N/A | > |
791 | 296 | return edge |
792 | N/A | end | >
793 | N/A | > |
794 | 1 | local function init_edge_for_add(world, archetype: ecs_archetype_t, edge: ecs_graph_edge_t, id, to: ecs_archetype_t) |
795 | 325 | archetype_init_edge(archetype, edge, id, to) |
796 | 325 | archetype_ensure_edge(world, archetype.add, id) |
797 | 325 | if archetype ~= to then |
798 | 323 | local to_refs = to.refs |
799 | 323 | local next_edge = to_refs.next |
800 | N/A | > |
801 | 323 | to_refs.next = edge |
802 | 323 | edge.prev = to_refs |
803 | 323 | edge.next = next_edge |
804 | N/A | > |
805 | 323 | if next_edge then |
806 | 0 | next_edge.prev = edge |
807 | N/A | end | >
808 | N/A | end | >
809 | N/A | end | >
810 | N/A | > |
811 | 1 | local function init_edge_for_remove( |
812 | 0 | world: ecs_world_t, |
813 | 0 | archetype: ecs_archetype_t, |
814 | 0 | edge: ecs_graph_edge_t, |
815 | 0 | id: number, |
816 | 0 | to: ecs_archetype_t |
817 | 0 | ) |
818 | 32 | archetype_init_edge(archetype, edge, id, to) |
819 | 32 | archetype_ensure_edge(world, archetype.remove, id) |
820 | 32 | if archetype ~= to then |
821 | 32 | local to_refs = to.refs |
822 | 32 | local prev_edge = to_refs.prev |
823 | N/A | > |
824 | 32 | to_refs.prev = edge |
825 | 32 | edge.next = to_refs |
826 | 32 | edge.prev = prev_edge |
827 | N/A | > |
828 | 32 | if prev_edge then |
829 | 2 | prev_edge.next = edge |
830 | N/A | end | >
831 | N/A | end | >
832 | N/A | end | >
833 | N/A | > |
834 | 1 | local function create_edge_for_add( |
835 | 0 | world: ecs_world_t, |
836 | 0 | node: ecs_archetype_t, |
837 | 0 | edge: ecs_graph_edge_t, |
838 | 0 | id: i53 |
839 | 0 | ): ecs_archetype_t |
840 | 326 | local to = find_archetype_with(world, node, id) |
841 | 325 | init_edge_for_add(world, node, edge, id, to) |
842 | 325 | return to |
843 | N/A | end | >
844 | N/A | > |
845 | 1 | local function create_edge_for_remove( |
846 | 0 | world: ecs_world_t, |
847 | 0 | node: ecs_archetype_t, |
848 | 0 | edge: ecs_graph_edge_t, |
849 | 0 | id: i53 |
850 | 0 | ): ecs_archetype_t |
851 | 32 | local to = find_archetype_without(world, node, id) |
852 | 32 | init_edge_for_remove(world, node, edge, id, to) |
853 | 32 | return to |
854 | N/A | end | >
855 | N/A | > |
856 | 1 | local function archetype_traverse_add( |
857 | 0 | world: ecs_world_t, |
858 | 0 | id: i53, |
859 | 0 | from: ecs_archetype_t |
860 | 0 | ): ecs_archetype_t |
861 | 2775 | from = from or world.ROOT_ARCHETYPE |
862 | 2775 | local edge = archetype_ensure_edge(world, from.add, id) |
863 | N/A | > |
864 | 2775 | local to = edge.to |
865 | 2775 | if not to then |
866 | 326 | to = create_edge_for_add(world, from, edge, id) |
867 | N/A | end | >
868 | N/A | > |
869 | 2774 | return to :: ecs_archetype_t |
870 | N/A | end | >
871 | N/A | > |
872 | 1 | local function archetype_traverse_remove( |
873 | 0 | world: ecs_world_t, |
874 | 0 | id: i53, |
875 | 0 | from: ecs_archetype_t |
876 | 0 | ): ecs_archetype_t |
877 | 296 | from = from or world.ROOT_ARCHETYPE |
878 | N/A | > |
879 | 296 | local edge = archetype_ensure_edge(world, from.remove, id) |
880 | N/A | > |
881 | 296 | local to = edge.to |
882 | 296 | if not to then |
883 | 32 | to = create_edge_for_remove(world, from, edge, id) |
884 | N/A | end | >
885 | N/A | > |
886 | 296 | return to :: ecs_archetype_t |
887 | N/A | end | >
888 | N/A | > |
889 | 1 | local function world_add( |
890 | 0 | world: ecs_world_t, |
891 | 0 | entity: i53, |
892 | 0 | id: i53 |
893 | 0 | ): () |
894 | 19316 | local entity_index = world.entity_index |
895 | 19316 | local record = entity_index_try_get_fast(entity_index, entity) |
896 | 19316 | if not record then |
897 | 0 | return |
898 | N/A | end | >
899 | N/A | > |
900 | 19316 | local from = record.archetype |
901 | 19316 | local to = archetype_traverse_add(world, id, from) |
902 | 19315 | if from == to then |
903 | 3 | return |
904 | N/A | end | >
905 | 19312 | if from then |
906 | 142 | entity_move(entity_index, entity, record, to) |
907 | 0 | else |
908 | 19170 | if #to.types > 0 then |
909 | 19170 | new_entity(entity, record, to) |
910 | N/A | end | >
911 | N/A | end | >
912 | N/A | > |
913 | 19312 | local idr = world.component_index[id] |
914 | 19312 | local on_add = idr.hooks.on_add |
915 | N/A | > |
916 | 19312 | if on_add then |
917 | 1 | on_add(entity) |
918 | N/A | end | >
919 | N/A | end | >
920 | N/A | > |
921 | 1 | local function world_set(world: ecs_world_t, entity: i53, id: i53, data: unknown): () |
922 | 2775 | local entity_index = world.entity_index |
923 | 2775 | local record = entity_index_try_get_fast(entity_index, entity) |
924 | 2775 | if not record then |
925 | 0 | return |
926 | N/A | end | >
927 | N/A | > |
928 | 2775 | local from: ecs_archetype_t = record.archetype |
929 | 2775 | local to: ecs_archetype_t = archetype_traverse_add(world, id, from) |
930 | 2774 | local idr = world.component_index[id] |
931 | 2774 | local idr_hooks = idr.hooks |
932 | N/A | > |
933 | 2774 | if from == to then |
934 | N/A | -- If the archetypes are the same it can avoid moving the entity | >
935 | N/A | -- and just set the data directly. | >
936 | 2 | local tr = to.records[id] |
937 | 2 | local column = from.columns[tr] |
938 | 2 | column[record.row] = data |
939 | 2 | local on_set = idr_hooks.on_set |
940 | 2 | if on_set then |
941 | 0 | on_set(entity, data) |
942 | N/A | end | >
943 | N/A | > |
944 | 2 | return |
945 | N/A | end | >
946 | N/A | > |
947 | 2772 | if from then |
948 | N/A | -- If there was a previous archetype, then the entity needs to move the archetype | >
949 | 1384 | entity_move(entity_index, entity, record, to) |
950 | 0 | else |
951 | 1388 | if #to.types > 0 then |
952 | N/A | -- When there is no previous archetype it should create the archetype | >
953 | 1388 | new_entity(entity, record, to) |
954 | N/A | end | >
955 | N/A | end | >
956 | N/A | > |
957 | 2772 | local tr = to.records[id] |
958 | 2772 | local column = to.columns[tr] |
959 | N/A | > |
960 | 2772 | column[record.row] = data |
961 | N/A | > |
962 | 2765 | local on_add = idr_hooks.on_add |
963 | 2765 | if on_add then |
964 | 0 | on_add(entity) |
965 | N/A | end | >
966 | N/A | > |
967 | 2765 | local on_set = idr_hooks.on_set |
968 | 2765 | if on_set then |
969 | 1 | on_set(entity, data) |
970 | N/A | end | >
971 | N/A | end | >
972 | N/A | > |
973 | 1 | local function world_component(world: World): i53 |
974 | 121 | local id = (world.max_component_id :: number) + 1 |
975 | 121 | if id > HI_COMPONENT_ID then |
976 | N/A | -- IDs are partitioned into ranges because component IDs are not nominal, | >
977 | N/A | -- so it needs to error when IDs intersect into the entity range. | >
978 | 0 | error("Too many components, consider using world:entity() instead to create components.") |
979 | N/A | end | >
980 | 121 | world.max_component_id = id |
981 | N/A | > |
982 | 121 | return id |
983 | N/A | end | >
984 | N/A | > |
985 | 1 | local function world_remove(world: ecs_world_t, entity: i53, id: i53) |
986 | 298 | local entity_index = world.entity_index |
987 | 298 | local record = entity_index_try_get_fast(entity_index, entity) |
988 | 298 | if not record then |
989 | 0 | return |
990 | N/A | end | >
991 | 298 | local from = record.archetype |
992 | N/A | > |
993 | 298 | if not from then |
994 | 1 | return |
995 | N/A | end | >
996 | N/A | > |
997 | 297 | if from.records[id] then |
998 | 296 | local idr = world.component_index[id] |
999 | 296 | local on_remove = idr.hooks.on_remove |
1000 | 296 | if on_remove then |
1001 | 3 | on_remove(entity) |
1002 | N/A | end | >
1003 | N/A | > |
1004 | 296 | local to = archetype_traverse_remove(world, id, record.archetype) |
1005 | N/A | > |
1006 | 296 | entity_move(entity_index, entity, record, to) |
1007 | N/A | end | >
1008 | N/A | end | >
1009 | N/A | > |
1010 | 1 | local function archetype_fast_delete_last(columns: { Column }, column_count: number, types: { i53 }, entity: i53) |
1011 | 76 | for i, column in columns do |
1012 | 153 | if column ~= NULL_ARRAY then |
1013 | 135 | column[column_count] = nil |
1014 | N/A | end | >
1015 | N/A | end | >
1016 | N/A | end | >
1017 | N/A | > |
1018 | 1 | local function archetype_fast_delete(columns: { Column }, column_count: number, row, types, entity) |
1019 | 58 | for i, column in columns do |
1020 | 109 | if column ~= NULL_ARRAY then |
1021 | 103 | column[row] = column[column_count] |
1022 | 103 | column[column_count] = nil |
1023 | N/A | end | >
1024 | N/A | end | >
1025 | N/A | end | >
1026 | N/A | > |
1027 | 1 | local function archetype_delete(world: ecs_world_t, archetype: ecs_archetype_t, row: number) |
1028 | 134 | local entity_index = world.entity_index |
1029 | 134 | local component_index = world.component_index |
1030 | 134 | local columns = archetype.columns |
1031 | 134 | local id_types = archetype.types |
1032 | 134 | local entities = archetype.entities |
1033 | 134 | local column_count = #entities |
1034 | 134 | local last = #entities |
1035 | 134 | local move = entities[last] |
1036 | N/A | -- We assume first that the entity is the last in the archetype | >
1037 | 134 | local delete = move |
1038 | N/A | > |
1039 | 134 | if row ~= last then |
1040 | 58 | local record_to_move = entity_index_try_get_any(entity_index, move) |
1041 | 58 | if record_to_move then |
1042 | 58 | record_to_move.row = row |
1043 | N/A | end | >
1044 | N/A | > |
1045 | 58 | delete = entities[row] |
1046 | 58 | entities[row] = move |
1047 | N/A | end | >
1048 | N/A | > |
1049 | 134 | for _, id in id_types do |
1050 | 262 | local idr = component_index[id] |
1051 | 262 | local on_remove = idr.hooks.on_remove |
1052 | 262 | if on_remove then |
1053 | 3 | on_remove(delete) |
1054 | N/A | end | >
1055 | N/A | end | >
1056 | N/A | > |
1057 | 134 | entities[last] = nil :: any |
1058 | N/A | > |
1059 | 134 | if row == last then |
1060 | 76 | archetype_fast_delete_last(columns, column_count, id_types, delete) |
1061 | 0 | else |
1062 | 58 | archetype_fast_delete(columns, column_count, row, id_types, delete) |
1063 | N/A | end | >
1064 | N/A | end | >
1065 | N/A | > |
1066 | 1 | local function world_clear(world: ecs_world_t, entity: i53) |
1067 | 6 | local entity_index = world.entity_index |
1068 | 6 | local component_index = world.component_index |
1069 | 6 | local archetypes = world.archetypes |
1070 | 6 | local tgt = ECS_PAIR(EcsWildcard, entity) |
1071 | 6 | local idr_t = component_index[tgt] |
1072 | 6 | local idr = component_index[entity] |
1073 | 6 | local rel = ECS_PAIR(entity, EcsWildcard) |
1074 | 6 | local idr_r = component_index[rel] |
1075 | N/A | > |
1076 | 6 | if idr then |
1077 | 4 | local count = 0 |
1078 | 4 | local queue = {} |
1079 | 4 | for archetype_id in idr.cache do |
1080 | 11 | local idr_archetype = archetypes[archetype_id] |
1081 | 11 | local entities = idr_archetype.entities |
1082 | 11 | local n = #entities |
1083 | 11 | count += n |
1084 | 11 | table.move(entities, 1, n, #queue + 1, queue) |
1085 | N/A | end | >
1086 | 4 | for _, e in queue do |
1087 | 8 | world_remove(world, e, entity) |
1088 | N/A | end | >
1089 | N/A | end | >
1090 | N/A | > |
1091 | 6 | if idr_t then |
1092 | 0 | local queue |
1093 | 0 | local ids |
1094 | N/A | > |
1095 | 0 | local count = 0 |
1096 | 0 | local archetype_ids = idr_t.cache |
1097 | 0 | for archetype_id in archetype_ids do |
1098 | 0 | local idr_t_archetype = archetypes[archetype_id] |
1099 | 0 | local idr_t_types = idr_t_archetype.types |
1100 | 0 | local entities = idr_t_archetype.entities |
1101 | 0 | local removal_queued = false |
1102 | N/A | > |
1103 | 0 | for _, id in idr_t_types do |
1104 | 0 | if not ECS_IS_PAIR(id) then |
1105 | 0 | continue |
1106 | N/A | end | >
1107 | 0 | local object = entity_index_get_alive( |
1108 | 0 | entity_index, ECS_PAIR_SECOND(id)) |
1109 | 0 | if object ~= entity then |
1110 | 0 | continue |
1111 | N/A | end | >
1112 | 0 | if not ids then |
1113 | 0 | ids = {} |
1114 | N/A | end | >
1115 | 0 | ids[id] = true |
1116 | 0 | removal_queued = true |
1117 | N/A | end | >
1118 | N/A | > |
1119 | 0 | if not removal_queued then |
1120 | 0 | continue |
1121 | N/A | end | >
1122 | N/A | > |
1123 | 0 | if not queue then |
1124 | 0 | queue = {} |
1125 | N/A | end | >
1126 | N/A | > |
1127 | 0 | local n = #entities |
1128 | 0 | table.move(entities, 1, n, count + 1, queue) |
1129 | 0 | count += n |
1130 | N/A | end | >
1131 | N/A | > |
1132 | 0 | for id in ids do |
1133 | 0 | for _, child in queue do |
1134 | 0 | world_remove(world, child, id) |
1135 | N/A | end | >
1136 | N/A | end | >
1137 | N/A | end | >
1138 | N/A | > |
1139 | 6 | if idr_r then |
1140 | 1 | local count = 0 |
1141 | 1 | local archetype_ids = idr_r.cache |
1142 | 1 | local ids = {} |
1143 | 1 | local queue = {} |
1144 | 1 | for archetype_id in archetype_ids do |
1145 | 2 | local idr_r_archetype = archetypes[archetype_id] |
1146 | 2 | local entities = idr_r_archetype.entities |
1147 | 2 | local tr = idr_r_archetype.records[rel] |
1148 | 2 | local tr_count = idr_r_archetype.counts[rel] |
1149 | 2 | local types = idr_r_archetype.types |
1150 | 2 | for i = tr, tr + tr_count - 1 do |
1151 | 2 | ids[types[i]] = true |
1152 | N/A | end | >
1153 | 2 | local n = #entities |
1154 | 2 | table.move(entities, 1, n, count + 1, queue) |
1155 | 2 | count += n |
1156 | N/A | end | >
1157 | N/A | > |
1158 | 1 | for _, e in queue do |
1159 | 3 | for id in ids do |
1160 | 3 | world_remove(world, e, id) |
1161 | N/A | end | >
1162 | N/A | end | >
1163 | N/A | end | >
1164 | N/A | end | >
1165 | N/A | > |
1166 | 1 | local function archetype_disconnect_edge(edge: ecs_graph_edge_t) |
1167 | 22 | local edge_next = edge.next |
1168 | 22 | local edge_prev = edge.prev |
1169 | 22 | if edge_next then |
1170 | 18 | edge_next.prev = edge_prev |
1171 | N/A | end | >
1172 | 22 | if edge_prev then |
1173 | 22 | edge_prev.next = edge_next |
1174 | N/A | end | >
1175 | N/A | end | >
1176 | N/A | > |
1177 | 1 | local function archetype_remove_edge(edges: ecs_graph_edges_t, id: i53, edge: ecs_graph_edge_t) |
1178 | 22 | archetype_disconnect_edge(edge) |
1179 | 22 | edges[id] = nil :: any |
1180 | N/A | end | >
1181 | N/A | > |
1182 | 1 | local function archetype_clear_edges(archetype: ecs_archetype_t) |
1183 | 36 | local add: ecs_graph_edges_t = archetype.add |
1184 | 36 | local remove: ecs_graph_edges_t = archetype.remove |
1185 | 36 | local node_refs = archetype.refs |
1186 | 36 | for id, edge in add do |
1187 | 9 | archetype_disconnect_edge(edge) |
1188 | 9 | add[id] = nil :: any |
1189 | N/A | end | >
1190 | 36 | for id, edge in remove do |
1191 | 18 | archetype_disconnect_edge(edge) |
1192 | 18 | remove[id] = nil :: any |
1193 | N/A | end | >
1194 | N/A | > |
1195 | 36 | local cur = node_refs.next |
1196 | 36 | while cur do |
1197 | 22 | local edge = cur :: ecs_graph_edge_t |
1198 | 22 | local next_edge = edge.next |
1199 | 22 | archetype_remove_edge(edge.from.add, edge.id, edge) |
1200 | 22 | cur = next_edge |
1201 | N/A | end | >
1202 | N/A | > |
1203 | 36 | cur = node_refs.prev |
1204 | 36 | while cur do |
1205 | 1 | local edge: ecs_graph_edge_t = cur |
1206 | 1 | local next_edge = edge.prev |
1207 | 1 | archetype_remove_edge(edge.from.remove, edge.id, edge) |
1208 | 1 | cur = next_edge |
1209 | N/A | end | >
1210 | N/A | > |
1211 | 36 | node_refs.next = nil |
1212 | 36 | node_refs.prev = nil |
1213 | N/A | end | >
1214 | N/A | > |
1215 | 1 | local function archetype_destroy(world: ecs_world_t, archetype: ecs_archetype_t) |
1216 | 37 | if archetype == world.ROOT_ARCHETYPE then |
1217 | 1 | return |
1218 | N/A | end | >
1219 | N/A | > |
1220 | 36 | local component_index = world.component_index |
1221 | 36 | archetype_clear_edges(archetype) |
1222 | 36 | local archetype_id = archetype.id |
1223 | 36 | world.archetypes[archetype_id] = nil :: any |
1224 | 36 | world.archetype_index[archetype.type] = nil :: any |
1225 | 36 | local records = archetype.records |
1226 | N/A | > |
1227 | 36 | for id in records do |
1228 | 113 | local observer_list = find_observers(world, EcsOnArchetypeDelete, id) |
1229 | 113 | if not observer_list then |
1230 | 0 | continue |
1231 | N/A | end | >
1232 | 2 | for _, observer in observer_list do |
1233 | 2 | if query_match(observer.query, archetype) then |
1234 | 1 | observer.callback(archetype) |
1235 | N/A | end | >
1236 | N/A | end | >
1237 | N/A | end | >
1238 | N/A | > |
1239 | 36 | for id in records do |
1240 | 113 | local idr = component_index[id] |
1241 | 113 | idr.cache[archetype_id] = nil :: any |
1242 | 113 | idr.counts[archetype_id] = nil |
1243 | 113 | idr.size -= 1 |
1244 | 113 | records[id] = nil :: any |
1245 | 113 | if idr.size == 0 then |
1246 | 0 | component_index[id] = nil :: any |
1247 | N/A | end | >
1248 | N/A | end | >
1249 | N/A | end | >
1250 | N/A | > |
1251 | 1 | local function world_cleanup(world: ecs_world_t) |
1252 | 1 | local archetypes = world.archetypes |
1253 | N/A | > |
1254 | 1 | for _, archetype in archetypes do |
1255 | 9 | if #archetype.entities == 0 then |
1256 | 4 | archetype_destroy(world, archetype) |
1257 | N/A | end | >
1258 | N/A | end | >
1259 | N/A | > |
1260 | 1 | local new_archetypes = table.create(#archetypes) :: { ecs_archetype_t } |
1261 | 1 | local new_archetype_map = {} |
1262 | N/A | > |
1263 | 1 | for index, archetype in archetypes do |
1264 | 6 | new_archetypes[index] = archetype |
1265 | 6 | new_archetype_map[archetype.type] = archetype |
1266 | N/A | end | >
1267 | N/A | > |
1268 | 1 | world.archetypes = new_archetypes |
1269 | 1 | world.archetype_index = new_archetype_map |
1270 | N/A | end | >
1271 | N/A | > |
1272 | 1 | local function world_delete(world: ecs_world_t, entity: i53) |
1273 | 65684 | local entity_index = world.entity_index |
1274 | 65684 | local record = entity_index_try_get(entity_index, entity) |
1275 | 65684 | if not record then |
1276 | 1 | return |
1277 | N/A | end | >
1278 | N/A | > |
1279 | 65683 | local archetype = record.archetype |
1280 | 65683 | local row = record.row |
1281 | N/A | > |
1282 | 65683 | if archetype then |
1283 | N/A | -- In the future should have a destruct mode for | >
1284 | N/A | -- deleting archetypes themselves. Maybe requires recycling | >
1285 | 134 | archetype_delete(world, archetype, row) |
1286 | N/A | end | >
1287 | N/A | > |
1288 | 65683 | local delete = entity |
1289 | 65683 | local component_index = world.component_index |
1290 | 65683 | local archetypes = world.archetypes |
1291 | 65683 | local tgt = ECS_PAIR(EcsWildcard, delete) |
1292 | 65683 | local rel = ECS_PAIR(delete, EcsWildcard) |
1293 | N/A | > |
1294 | 65683 | local idr_t = component_index[tgt] |
1295 | 65683 | local idr = component_index[delete] |
1296 | 65683 | local idr_r = component_index[rel] |
1297 | N/A | > |
1298 | 65683 | if idr then |
1299 | 8 | local flags = idr.flags |
1300 | 8 | if bit32.band(flags, ECS_ID_DELETE) ~= 0 then |
1301 | 1 | for archetype_id in idr.cache do |
1302 | 1 | local idr_archetype = archetypes[archetype_id] |
1303 | N/A | > |
1304 | 1 | local entities = idr_archetype.entities |
1305 | 1 | local n = #entities |
1306 | 1 | for i = n, 1, -1 do |
1307 | 2 | world_delete(world, entities[i]) |
1308 | N/A | end | >
1309 | N/A | > |
1310 | 1 | archetype_destroy(world, idr_archetype) |
1311 | N/A | end | >
1312 | 0 | else |
1313 | 7 | for archetype_id in idr.cache do |
1314 | 12 | local idr_archetype = archetypes[archetype_id] |
1315 | 12 | local entities = idr_archetype.entities |
1316 | 12 | local n = #entities |
1317 | 12 | for i = n, 1, -1 do |
1318 | 10 | world_remove(world, entities[i], delete) |
1319 | N/A | end | >
1320 | N/A | > |
1321 | 12 | archetype_destroy(world, idr_archetype) |
1322 | N/A | end | >
1323 | N/A | end | >
1324 | N/A | end | >
1325 | N/A | > |
1326 | 65683 | if idr_t then |
1327 | 13 | local children |
1328 | 13 | local ids |
1329 | N/A | > |
1330 | 13 | local count = 0 |
1331 | 13 | local archetype_ids = idr_t.cache |
1332 | 13 | for archetype_id in archetype_ids do |
1333 | 18 | local idr_t_archetype = archetypes[archetype_id] |
1334 | 18 | local idr_t_types = idr_t_archetype.types |
1335 | 18 | local entities = idr_t_archetype.entities |
1336 | 18 | local removal_queued = false |
1337 | N/A | > |
1338 | 18 | for _, id in idr_t_types do |
1339 | 34 | if not ECS_IS_PAIR(id) then |
1340 | 0 | continue |
1341 | N/A | end | >
1342 | 24 | local object = entity_index_get_alive( |
1343 | 24 | entity_index, ECS_PAIR_SECOND(id)) |
1344 | 24 | if object ~= delete then |
1345 | 0 | continue |
1346 | N/A | end | >
1347 | 20 | local id_record = component_index[id] |
1348 | 20 | local flags = id_record.flags |
1349 | 20 | local flags_delete_mask: number = bit32.band(flags, ECS_ID_DELETE) |
1350 | 20 | if flags_delete_mask ~= 0 then |
1351 | 8 | for i = #entities, 1, -1 do |
1352 | 15 | local child = entities[i] |
1353 | 15 | world_delete(world, child) |
1354 | N/A | end | >
1355 | 8 | break |
1356 | 0 | else |
1357 | 12 | if not ids then |
1358 | 6 | ids = {} |
1359 | N/A | end | >
1360 | 12 | ids[id] = true |
1361 | 12 | removal_queued = true |
1362 | N/A | end | >
1363 | N/A | end | >
1364 | N/A | > |
1365 | 18 | if not removal_queued then |
1366 | 0 | continue |
1367 | N/A | end | >
1368 | 10 | if not children then |
1369 | 6 | children = {} |
1370 | N/A | end | >
1371 | 10 | local n = #entities |
1372 | 10 | table.move(entities, 1, n, count + 1, children) |
1373 | 10 | count += n |
1374 | N/A | end | >
1375 | N/A | > |
1376 | 13 | if ids then |
1377 | 6 | for _, child in children do |
1378 | 17 | for id in ids do |
1379 | 19 | world_remove(world, child, id) |
1380 | N/A | end | >
1381 | N/A | end | >
1382 | N/A | end | >
1383 | N/A | > |
1384 | 13 | for archetype_id in archetype_ids do |
1385 | 20 | archetype_destroy(world, archetypes[archetype_id]) |
1386 | N/A | end | >
1387 | N/A | end | >
1388 | N/A | > |
1389 | 65683 | if idr_r then |
1390 | 0 | local archetype_ids = idr_r.cache |
1391 | 0 | local flags = idr_r.flags |
1392 | 0 | if bit32.band(flags, ECS_ID_DELETE) ~= 0 then |
1393 | 0 | for archetype_id in archetype_ids do |
1394 | 0 | local idr_r_archetype = archetypes[archetype_id] |
1395 | 0 | local entities = idr_r_archetype.entities |
1396 | 0 | local n = #entities |
1397 | 0 | for i = n, 1, -1 do |
1398 | 0 | world_delete(world, entities[i]) |
1399 | N/A | end | >
1400 | 0 | archetype_destroy(world, idr_r_archetype) |
1401 | N/A | end | >
1402 | 0 | else |
1403 | 0 | local children = {} |
1404 | 0 | local count = 0 |
1405 | 0 | local ids = {} |
1406 | 0 | for archetype_id in archetype_ids do |
1407 | 0 | local idr_r_archetype = archetypes[archetype_id] |
1408 | 0 | local entities = idr_r_archetype.entities |
1409 | 0 | local tr = idr_r_archetype.records[rel] |
1410 | 0 | local tr_count = idr_r_archetype.counts[rel] |
1411 | 0 | local types = idr_r_archetype.types |
1412 | 0 | for i = tr, tr_count - 1 do |
1413 | 0 | ids[types[tr]] = true |
1414 | N/A | end | >
1415 | 0 | local n = #entities |
1416 | 0 | table.move(entities, 1, n, count + 1, children) |
1417 | 0 | count += n |
1418 | N/A | end | >
1419 | N/A | > |
1420 | 0 | for _, child in children do |
1421 | 0 | for id in ids do |
1422 | 0 | world_remove(world, child, id) |
1423 | N/A | end | >
1424 | N/A | end | >
1425 | N/A | > |
1426 | 0 | for archetype_id in archetype_ids do |
1427 | 0 | archetype_destroy(world, archetypes[archetype_id]) |
1428 | N/A | end | >
1429 | N/A | end | >
1430 | N/A | end | >
1431 | N/A | > |
1432 | 65683 | local dense_array = entity_index.dense_array |
1433 | 65683 | local index_of_deleted_entity = record.dense |
1434 | 65683 | local index_of_last_alive_entity = entity_index.alive_count |
1435 | 65683 | entity_index.alive_count = index_of_last_alive_entity - 1 |
1436 | N/A | > |
1437 | 65683 | local last_alive_entity = dense_array[index_of_last_alive_entity] |
1438 | 65683 | local r_swap = entity_index_try_get_any(entity_index, last_alive_entity) :: ecs_record_t |
1439 | 65683 | r_swap.dense = index_of_deleted_entity |
1440 | 65683 | record.archetype = nil :: any |
1441 | 65683 | record.row = nil :: any |
1442 | 65683 | record.dense = index_of_last_alive_entity |
1443 | N/A | > |
1444 | 65683 | dense_array[index_of_deleted_entity] = last_alive_entity |
1445 | 65683 | dense_array[index_of_last_alive_entity] = ECS_GENERATION_INC(entity) |
1446 | N/A | end | >
1447 | N/A | > |
1448 | 1 | local function world_contains(world: ecs_world_t, entity): boolean |
1449 | 145 | return entity_index_is_alive(world.entity_index, entity) |
1450 | N/A | end | >
1451 | N/A | > |
1452 | 1 | local function NOOP() end |
1453 | N/A | > |
1454 | 0 | export type QueryInner = { |
1455 | 0 | compatible_archetypes: { Archetype }, |
1456 | 0 | ids: { i53 }, |
1457 | 0 | filter_with: { i53 }, |
1458 | 0 | filter_without: { i53 }, |
1459 | 0 | next: () -> (number, ...any), |
1460 | 0 | world: World, |
1461 | 0 | } |
1462 | N/A | > |
1463 | 1 | local function query_iter_init(query: ecs_query_data_t): () -> (number, ...any) |
1464 | 26 | local world_query_iter_next |
1465 | N/A | > |
1466 | 26 | local compatible_archetypes = query.compatible_archetypes |
1467 | 26 | local lastArchetype = 1 |
1468 | 26 | local archetype = compatible_archetypes[1] |
1469 | 26 | if not archetype then |
1470 | 4 | return NOOP :: () -> (number, ...any) |
1471 | N/A | end | >
1472 | 22 | local columns = archetype.columns |
1473 | 22 | local entities = archetype.entities |
1474 | 22 | local i = #entities |
1475 | 22 | local records = archetype.records |
1476 | N/A | > |
1477 | 22 | local ids = query.ids |
1478 | 22 | local A, B, C, D, E, F, G, H, I = unpack(ids) |
1479 | 22 | local a: Column, b: Column, c: Column, d: Column |
1480 | 22 | local e: Column, f: Column, g: Column, h: Column |
1481 | N/A | > |
1482 | 22 | if not B then |
1483 | 17 | a = columns[records[A]] |
1484 | 5 | elseif not C then |
1485 | 3 | a = columns[records[A]] |
1486 | 3 | b = columns[records[B]] |
1487 | 2 | elseif not D then |
1488 | 0 | a = columns[records[A]] |
1489 | 0 | b = columns[records[B]] |
1490 | 0 | c = columns[records[C]] |
1491 | 2 | elseif not E then |
1492 | 1 | a = columns[records[A]] |
1493 | 1 | b = columns[records[B]] |
1494 | 1 | c = columns[records[C]] |
1495 | 1 | d = columns[records[D]] |
1496 | 1 | elseif not F then |
1497 | 0 | a = columns[records[A]] |
1498 | 0 | b = columns[records[B]] |
1499 | 0 | c = columns[records[C]] |
1500 | 0 | d = columns[records[D]] |
1501 | 0 | e = columns[records[E]] |
1502 | 1 | elseif not G then |
1503 | 0 | a = columns[records[A]] |
1504 | 0 | b = columns[records[B]] |
1505 | 0 | c = columns[records[C]] |
1506 | 0 | d = columns[records[D]] |
1507 | 0 | e = columns[records[E]] |
1508 | 0 | f = columns[records[F]] |
1509 | 1 | elseif not H then |
1510 | 0 | a = columns[records[A]] |
1511 | 0 | b = columns[records[B]] |
1512 | 0 | c = columns[records[C]] |
1513 | 0 | d = columns[records[D]] |
1514 | 0 | e = columns[records[E]] |
1515 | 0 | f = columns[records[F]] |
1516 | 0 | g = columns[records[G]] |
1517 | 1 | elseif not I then |
1518 | 0 | a = columns[records[A]] |
1519 | 0 | b = columns[records[B]] |
1520 | 0 | c = columns[records[C]] |
1521 | 0 | d = columns[records[D]] |
1522 | 0 | e = columns[records[E]] |
1523 | 0 | f = columns[records[F]] |
1524 | 0 | g = columns[records[G]] |
1525 | 0 | h = columns[records[H]] |
1526 | N/A | end | >
1527 | N/A | > |
1528 | 22 | if not B then |
1529 | 17 | function world_query_iter_next(): any |
1530 | 556 | local entity = entities[i] |
1531 | 556 | while entity == nil do |
1532 | 26 | lastArchetype += 1 |
1533 | 26 | archetype = compatible_archetypes[lastArchetype] |
1534 | 26 | if not archetype then |
1535 | 18 | return nil |
1536 | N/A | end | >
1537 | N/A | > |
1538 | 8 | entities = archetype.entities |
1539 | 8 | i = #entities |
1540 | 8 | if i == 0 then |
1541 | 0 | continue |
1542 | N/A | end | >
1543 | 8 | entity = entities[i] |
1544 | 8 | columns = archetype.columns |
1545 | 8 | records = archetype.records |
1546 | 8 | a = columns[records[A]] |
1547 | N/A | end | >
1548 | N/A | > |
1549 | 538 | local row = i |
1550 | 538 | i -= 1 |
1551 | N/A | > |
1552 | 538 | return entity, a[row] |
1553 | N/A | end | >
1554 | 5 | elseif not C then |
1555 | 3 | function world_query_iter_next(): any |
1556 | 7 | local entity = entities[i] |
1557 | 7 | while entity == nil do |
1558 | 3 | lastArchetype += 1 |
1559 | 3 | archetype = compatible_archetypes[lastArchetype] |
1560 | 3 | if not archetype then |
1561 | 3 | return nil |
1562 | N/A | end | >
1563 | N/A | > |
1564 | 0 | entities = archetype.entities |
1565 | 0 | i = #entities |
1566 | 0 | if i == 0 then |
1567 | 0 | continue |
1568 | N/A | end | >
1569 | 0 | entity = entities[i] |
1570 | 0 | columns = archetype.columns |
1571 | 0 | records = archetype.records |
1572 | 0 | a = columns[records[A]] |
1573 | 0 | b = columns[records[B]] |
1574 | N/A | end | >
1575 | N/A | > |
1576 | 4 | local row = i |
1577 | 4 | i -= 1 |
1578 | N/A | > |
1579 | 4 | return entity, a[row], b[row] |
1580 | N/A | end | >
1581 | 2 | elseif not D then |
1582 | 0 | function world_query_iter_next(): any |
1583 | 0 | local entity = entities[i] |
1584 | 0 | while entity == nil do |
1585 | 0 | lastArchetype += 1 |
1586 | 0 | archetype = compatible_archetypes[lastArchetype] |
1587 | 0 | if not archetype then |
1588 | 0 | return nil |
1589 | N/A | end | >
1590 | N/A | > |
1591 | 0 | entities = archetype.entities |
1592 | 0 | i = #entities |
1593 | 0 | if i == 0 then |
1594 | 0 | continue |
1595 | N/A | end | >
1596 | 0 | entity = entities[i] |
1597 | 0 | columns = archetype.columns |
1598 | 0 | records = archetype.records |
1599 | 0 | a = columns[records[A]] |
1600 | 0 | b = columns[records[B]] |
1601 | 0 | c = columns[records[C]] |
1602 | N/A | end | >
1603 | N/A | > |
1604 | 0 | local row = i |
1605 | 0 | i -= 1 |
1606 | N/A | > |
1607 | 0 | return entity, a[row], b[row], c[row] |
1608 | N/A | end | >
1609 | 2 | elseif not E then |
1610 | 1 | function world_query_iter_next(): any |
1611 | 2 | local entity = entities[i] |
1612 | 2 | while entity == nil do |
1613 | 1 | lastArchetype += 1 |
1614 | 1 | archetype = compatible_archetypes[lastArchetype] |
1615 | 1 | if not archetype then |
1616 | 1 | return nil |
1617 | N/A | end | >
1618 | N/A | > |
1619 | 0 | entities = archetype.entities |
1620 | 0 | i = #entities |
1621 | 0 | if i == 0 then |
1622 | 0 | continue |
1623 | N/A | end | >
1624 | 0 | entity = entities[i] |
1625 | 0 | columns = archetype.columns |
1626 | 0 | records = archetype.records |
1627 | 0 | a = columns[records[A]] |
1628 | 0 | b = columns[records[B]] |
1629 | 0 | c = columns[records[C]] |
1630 | 0 | d = columns[records[D]] |
1631 | N/A | end | >
1632 | N/A | > |
1633 | 1 | local row = i |
1634 | 1 | i -= 1 |
1635 | N/A | > |
1636 | 1 | return entity, a[row], b[row], c[row], d[row] |
1637 | N/A | end | >
1638 | 1 | elseif not F then |
1639 | 0 | function world_query_iter_next(): any |
1640 | 0 | local entity = entities[i] |
1641 | 0 | while entity == nil do |
1642 | 0 | lastArchetype += 1 |
1643 | 0 | archetype = compatible_archetypes[lastArchetype] |
1644 | 0 | if not archetype then |
1645 | 0 | return nil |
1646 | N/A | end | >
1647 | N/A | > |
1648 | 0 | entities = archetype.entities |
1649 | 0 | i = #entities |
1650 | 0 | if i == 0 then |
1651 | 0 | continue |
1652 | N/A | end | >
1653 | 0 | entity = entities[i] |
1654 | 0 | columns = archetype.columns |
1655 | 0 | records = archetype.records |
1656 | 0 | a = columns[records[A]] |
1657 | 0 | b = columns[records[B]] |
1658 | 0 | c = columns[records[C]] |
1659 | 0 | d = columns[records[D]] |
1660 | 0 | e = columns[records[E]] |
1661 | N/A | end | >
1662 | N/A | > |
1663 | 0 | local row = i |
1664 | 0 | i -= 1 |
1665 | N/A | > |
1666 | 0 | return entity, a[row], b[row], c[row], d[row], e[row] |
1667 | N/A | end | >
1668 | 1 | elseif not G then |
1669 | 0 | function world_query_iter_next(): any |
1670 | 0 | local entity = entities[i] |
1671 | 0 | while entity == nil do |
1672 | 0 | lastArchetype += 1 |
1673 | 0 | archetype = compatible_archetypes[lastArchetype] |
1674 | 0 | if not archetype then |
1675 | 0 | return nil |
1676 | N/A | end | >
1677 | N/A | > |
1678 | 0 | entities = archetype.entities |
1679 | 0 | i = #entities |
1680 | 0 | if i == 0 then |
1681 | 0 | continue |
1682 | N/A | end | >
1683 | 0 | entity = entities[i] |
1684 | 0 | columns = archetype.columns |
1685 | 0 | records = archetype.records |
1686 | 0 | a = columns[records[A]] |
1687 | 0 | b = columns[records[B]] |
1688 | 0 | c = columns[records[C]] |
1689 | 0 | d = columns[records[D]] |
1690 | 0 | e = columns[records[E]] |
1691 | 0 | f = columns[records[F]] |
1692 | N/A | end | >
1693 | N/A | > |
1694 | 0 | local row = i |
1695 | 0 | i -= 1 |
1696 | N/A | > |
1697 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row] |
1698 | N/A | end | >
1699 | 1 | elseif not H then |
1700 | 0 | function world_query_iter_next(): any |
1701 | 0 | local entity = entities[i] |
1702 | 0 | while entity == nil do |
1703 | 0 | lastArchetype += 1 |
1704 | 0 | archetype = compatible_archetypes[lastArchetype] |
1705 | 0 | if not archetype then |
1706 | 0 | return nil |
1707 | N/A | end | >
1708 | N/A | > |
1709 | 0 | entities = archetype.entities |
1710 | 0 | i = #entities |
1711 | 0 | if i == 0 then |
1712 | 0 | continue |
1713 | N/A | end | >
1714 | 0 | entity = entities[i] |
1715 | 0 | columns = archetype.columns |
1716 | 0 | records = archetype.records |
1717 | 0 | a = columns[records[A]] |
1718 | 0 | b = columns[records[B]] |
1719 | 0 | c = columns[records[C]] |
1720 | 0 | d = columns[records[D]] |
1721 | 0 | e = columns[records[E]] |
1722 | 0 | f = columns[records[F]] |
1723 | 0 | g = columns[records[G]] |
1724 | N/A | end | >
1725 | N/A | > |
1726 | 0 | local row = i |
1727 | 0 | i -= 1 |
1728 | N/A | > |
1729 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row] |
1730 | N/A | end | >
1731 | 1 | elseif not I then |
1732 | 0 | function world_query_iter_next(): any |
1733 | 0 | local entity = entities[i] |
1734 | 0 | while entity == nil do |
1735 | 0 | lastArchetype += 1 |
1736 | 0 | archetype = compatible_archetypes[lastArchetype] |
1737 | 0 | if not archetype then |
1738 | 0 | return nil |
1739 | N/A | end | >
1740 | N/A | > |
1741 | 0 | entities = archetype.entities |
1742 | 0 | i = #entities |
1743 | 0 | if i == 0 then |
1744 | 0 | continue |
1745 | N/A | end | >
1746 | 0 | entity = entities[i] |
1747 | 0 | columns = archetype.columns |
1748 | 0 | records = archetype.records |
1749 | 0 | a = columns[records[A]] |
1750 | 0 | b = columns[records[B]] |
1751 | 0 | c = columns[records[C]] |
1752 | 0 | d = columns[records[D]] |
1753 | 0 | e = columns[records[E]] |
1754 | 0 | f = columns[records[F]] |
1755 | 0 | g = columns[records[G]] |
1756 | 0 | h = columns[records[H]] |
1757 | N/A | end | >
1758 | N/A | > |
1759 | 0 | local row = i |
1760 | 0 | i -= 1 |
1761 | N/A | > |
1762 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], h[row] |
1763 | N/A | end | >
1764 | 0 | else |
1765 | 1 | local output = {} |
1766 | 1 | function world_query_iter_next(): any |
1767 | 2 | local entity = entities[i] |
1768 | 2 | while entity == nil do |
1769 | 1 | lastArchetype += 1 |
1770 | 1 | archetype = compatible_archetypes[lastArchetype] |
1771 | 1 | if not archetype then |
1772 | 1 | return nil |
1773 | N/A | end | >
1774 | N/A | > |
1775 | 0 | entities = archetype.entities |
1776 | 0 | i = #entities |
1777 | 0 | if i == 0 then |
1778 | 0 | continue |
1779 | N/A | end | >
1780 | 0 | entity = entities[i] |
1781 | 0 | columns = archetype.columns |
1782 | 0 | records = archetype.records |
1783 | N/A | end | >
1784 | N/A | > |
1785 | 1 | local row = i |
1786 | 1 | i -= 1 |
1787 | N/A | > |
1788 | 1 | for j, id in ids do |
1789 | 9 | output[j] = columns[records[id]][row] |
1790 | N/A | end | >
1791 | N/A | > |
1792 | 1 | return entity, unpack(output) |
1793 | N/A | end | >
1794 | N/A | end | >
1795 | N/A | > |
1796 | 22 | query.next = world_query_iter_next |
1797 | 22 | return world_query_iter_next |
1798 | N/A | end | >
1799 | N/A | > |
1800 | 1 | local function query_iter(query): () -> (number, ...any) |
1801 | 20 | local query_next = query.next |
1802 | 20 | if not query_next then |
1803 | 19 | query_next = query_iter_init(query) |
1804 | N/A | end | >
1805 | 20 | return query_next |
1806 | N/A | end | >
1807 | N/A | > |
1808 | 1 | local function query_without(query: ecs_query_data_t, ...: i53) |
1809 | 6 | local without = { ... } |
1810 | 6 | query.filter_without = without |
1811 | 6 | local compatible_archetypes = query.compatible_archetypes |
1812 | 6 | for i = #compatible_archetypes, 1, -1 do |
1813 | 3 | local archetype = compatible_archetypes[i] |
1814 | 3 | local records = archetype.records |
1815 | 3 | local matches = true |
1816 | N/A | > |
1817 | 3 | for _, id in without do |
1818 | 3 | if records[id] then |
1819 | 2 | matches = false |
1820 | 2 | break |
1821 | N/A | end | >
1822 | N/A | end | >
1823 | N/A | > |
1824 | 3 | if matches then |
1825 | 0 | continue |
1826 | N/A | end | >
1827 | N/A | > |
1828 | 2 | local last = #compatible_archetypes |
1829 | 2 | if last ~= i then |
1830 | 0 | compatible_archetypes[i] = compatible_archetypes[last] |
1831 | N/A | end | >
1832 | 2 | compatible_archetypes[last] = nil :: any |
1833 | N/A | end | >
1834 | N/A | > |
1835 | 6 | return query :: any |
1836 | N/A | end | >
1837 | N/A | > |
1838 | 1 | local function query_with(query: ecs_query_data_t, ...: i53) |
1839 | 1 | local compatible_archetypes = query.compatible_archetypes |
1840 | 1 | local with = { ... } |
1841 | 1 | query.filter_with = with |
1842 | N/A | > |
1843 | 1 | for i = #compatible_archetypes, 1, -1 do |
1844 | 0 | local archetype = compatible_archetypes[i] |
1845 | 0 | local records = archetype.records |
1846 | 0 | local matches = true |
1847 | N/A | > |
1848 | 0 | for _, id in with do |
1849 | 0 | if not records[id] then |
1850 | 0 | matches = false |
1851 | 0 | break |
1852 | N/A | end | >
1853 | N/A | end | >
1854 | N/A | > |
1855 | 0 | if matches then |
1856 | 0 | continue |
1857 | N/A | end | >
1858 | N/A | > |
1859 | 0 | local last = #compatible_archetypes |
1860 | 0 | if last ~= i then |
1861 | 0 | compatible_archetypes[i] = compatible_archetypes[last] |
1862 | N/A | end | >
1863 | 0 | compatible_archetypes[last] = nil :: any |
1864 | N/A | end | >
1865 | N/A | > |
1866 | 1 | return query :: any |
1867 | N/A | end | >
1868 | N/A | > |
1869 | N/A | -- Meant for directly iterating over archetypes to minimize | >
1870 | N/A | -- function call overhead. Should not be used unless iterating over | >
1871 | N/A | -- hundreds of thousands of entities in bulk. | >
1872 | 1 | local function query_archetypes(query) |
1873 | 5 | return query.compatible_archetypes |
1874 | N/A | end | >
1875 | N/A | > |
1876 | 1 | local function query_cached(query: ecs_query_data_t) |
1877 | 6 | local with = query.filter_with |
1878 | 6 | local ids = query.ids |
1879 | 6 | if with then |
1880 | 1 | table.move(ids, 1, #ids, #with + 1, with) |
1881 | 0 | else |
1882 | 5 | query.filter_with = ids |
1883 | N/A | end | >
1884 | N/A | > |
1885 | 6 | local compatible_archetypes = query.compatible_archetypes |
1886 | 6 | local lastArchetype = 1 |
1887 | N/A | > |
1888 | 6 | local A, B, C, D, E, F, G, H, I = unpack(ids) |
1889 | 6 | local a: Column, b: Column, c: Column, d: Column |
1890 | 6 | local e: Column, f: Column, g: Column, h: Column |
1891 | N/A | > |
1892 | 6 | local world_query_iter_next |
1893 | 6 | local columns: { Column } |
1894 | 6 | local entities: { number } |
1895 | 6 | local i: number |
1896 | 6 | local archetype: ecs_archetype_t |
1897 | 6 | local records: { number } |
1898 | 6 | local archetypes = query.compatible_archetypes |
1899 | N/A | > |
1900 | 6 | local world = query.world :: { observable: ecs_observable_t } |
1901 | N/A | -- Only need one observer for EcsArchetypeCreate and EcsArchetypeDelete respectively | >
1902 | N/A | -- because the event will be emitted for all components of that Archetype. | >
1903 | 6 | local observable = world.observable :: ecs_observable_t |
1904 | 6 | local on_create_action = observable[EcsOnArchetypeCreate] |
1905 | 6 | if not on_create_action then |
1906 | 6 | on_create_action = {} |
1907 | 6 | observable[EcsOnArchetypeCreate] = on_create_action |
1908 | N/A | end | >
1909 | 6 | local query_cache_on_create = on_create_action[A] |
1910 | 6 | if not query_cache_on_create then |
1911 | 6 | query_cache_on_create = {} |
1912 | 6 | on_create_action[A] = query_cache_on_create |
1913 | N/A | end | >
1914 | N/A | > |
1915 | 6 | local on_delete_action = observable[EcsOnArchetypeDelete] |
1916 | 6 | if not on_delete_action then |
1917 | 6 | on_delete_action = {} |
1918 | 6 | observable[EcsOnArchetypeDelete] = on_delete_action |
1919 | N/A | end | >
1920 | 6 | local query_cache_on_delete = on_delete_action[A] |
1921 | 6 | if not query_cache_on_delete then |
1922 | 6 | query_cache_on_delete = {} |
1923 | 6 | on_delete_action[A] = query_cache_on_delete |
1924 | N/A | end | >
1925 | N/A | > |
1926 | 6 | local function on_create_callback(archetype) |
1927 | 4 | table.insert(archetypes, archetype) |
1928 | N/A | end | >
1929 | N/A | > |
1930 | 6 | local function on_delete_callback(archetype) |
1931 | 1 | local i = table.find(archetypes, archetype) :: number |
1932 | 1 | local n = #archetypes |
1933 | 1 | archetypes[i] = archetypes[n] |
1934 | 1 | archetypes[n] = nil |
1935 | N/A | end | >
1936 | N/A | > |
1937 | 6 | local observer_for_create = { query = query, callback = on_create_callback } |
1938 | 6 | local observer_for_delete = { query = query, callback = on_delete_callback } |
1939 | N/A | > |
1940 | 6 | table.insert(query_cache_on_create, observer_for_create) |
1941 | 6 | table.insert(query_cache_on_delete, observer_for_delete) |
1942 | N/A | > |
1943 | 6 | local function cached_query_iter() |
1944 | 11 | lastArchetype = 1 |
1945 | 11 | archetype = compatible_archetypes[lastArchetype] |
1946 | 11 | if not archetype then |
1947 | 1 | return NOOP |
1948 | N/A | end | >
1949 | 10 | entities = archetype.entities |
1950 | 10 | i = #entities |
1951 | 10 | records = archetype.records |
1952 | 10 | columns = archetype.columns |
1953 | 10 | if not B then |
1954 | 6 | a = columns[records[A]] |
1955 | 4 | elseif not C then |
1956 | 4 | a = columns[records[A]] |
1957 | 4 | b = columns[records[B]] |
1958 | 0 | elseif not D then |
1959 | 0 | a = columns[records[A]] |
1960 | 0 | b = columns[records[B]] |
1961 | 0 | c = columns[records[C]] |
1962 | 0 | elseif not E then |
1963 | 0 | a = columns[records[A]] |
1964 | 0 | b = columns[records[B]] |
1965 | 0 | c = columns[records[C]] |
1966 | 0 | d = columns[records[D]] |
1967 | 0 | elseif not F then |
1968 | 0 | a = columns[records[A]] |
1969 | 0 | b = columns[records[B]] |
1970 | 0 | c = columns[records[C]] |
1971 | 0 | d = columns[records[D]] |
1972 | 0 | e = columns[records[E]] |
1973 | 0 | elseif not G then |
1974 | 0 | a = columns[records[A]] |
1975 | 0 | b = columns[records[B]] |
1976 | 0 | c = columns[records[C]] |
1977 | 0 | d = columns[records[D]] |
1978 | 0 | e = columns[records[E]] |
1979 | 0 | f = columns[records[F]] |
1980 | 0 | elseif not H then |
1981 | 0 | a = columns[records[A]] |
1982 | 0 | b = columns[records[B]] |
1983 | 0 | c = columns[records[C]] |
1984 | 0 | d = columns[records[D]] |
1985 | 0 | e = columns[records[E]] |
1986 | 0 | f = columns[records[F]] |
1987 | 0 | g = columns[records[G]] |
1988 | 0 | elseif not I then |
1989 | 0 | a = columns[records[A]] |
1990 | 0 | b = columns[records[B]] |
1991 | 0 | c = columns[records[C]] |
1992 | 0 | d = columns[records[D]] |
1993 | 0 | e = columns[records[E]] |
1994 | 0 | f = columns[records[F]] |
1995 | 0 | g = columns[records[G]] |
1996 | 0 | h = columns[records[H]] |
1997 | N/A | end | >
1998 | N/A | > |
1999 | 10 | return world_query_iter_next |
2000 | N/A | end | >
2001 | N/A | > |
2002 | 6 | if not B then |
2003 | 5 | function world_query_iter_next(): any |
2004 | 11 | local entity = entities[i] |
2005 | 11 | while entity == nil do |
2006 | 6 | lastArchetype += 1 |
2007 | 6 | archetype = compatible_archetypes[lastArchetype] |
2008 | 6 | if not archetype then |
2009 | 6 | return nil |
2010 | N/A | end | >
2011 | N/A | > |
2012 | 0 | entities = archetype.entities |
2013 | 0 | i = #entities |
2014 | 0 | if i == 0 then |
2015 | 0 | continue |
2016 | N/A | end | >
2017 | 0 | entity = entities[i] |
2018 | 0 | columns = archetype.columns |
2019 | 0 | records = archetype.records |
2020 | 0 | a = columns[records[A]] |
2021 | N/A | end | >
2022 | N/A | > |
2023 | 5 | local row = i |
2024 | 5 | i -= 1 |
2025 | N/A | > |
2026 | 5 | return entity, a[row] |
2027 | N/A | end | >
2028 | 1 | elseif not C then |
2029 | 1 | function world_query_iter_next(): any |
2030 | 8 | local entity = entities[i] |
2031 | 8 | while entity == nil do |
2032 | 4 | lastArchetype += 1 |
2033 | 4 | archetype = compatible_archetypes[lastArchetype] |
2034 | 4 | if not archetype then |
2035 | 4 | return nil |
2036 | N/A | end | >
2037 | N/A | > |
2038 | 0 | entities = archetype.entities |
2039 | 0 | i = #entities |
2040 | 0 | if i == 0 then |
2041 | 0 | continue |
2042 | N/A | end | >
2043 | 0 | entity = entities[i] |
2044 | 0 | columns = archetype.columns |
2045 | 0 | records = archetype.records |
2046 | 0 | a = columns[records[A]] |
2047 | 0 | b = columns[records[B]] |
2048 | N/A | end | >
2049 | N/A | > |
2050 | 4 | local row = i |
2051 | 4 | i -= 1 |
2052 | N/A | > |
2053 | 4 | return entity, a[row], b[row] |
2054 | N/A | end | >
2055 | 0 | elseif not D then |
2056 | 0 | function world_query_iter_next(): any |
2057 | 0 | local entity = entities[i] |
2058 | 0 | while entity == nil do |
2059 | 0 | lastArchetype += 1 |
2060 | 0 | archetype = compatible_archetypes[lastArchetype] |
2061 | 0 | if not archetype then |
2062 | 0 | return nil |
2063 | N/A | end | >
2064 | N/A | > |
2065 | 0 | entities = archetype.entities |
2066 | 0 | i = #entities |
2067 | 0 | if i == 0 then |
2068 | 0 | continue |
2069 | N/A | end | >
2070 | 0 | entity = entities[i] |
2071 | 0 | columns = archetype.columns |
2072 | 0 | records = archetype.records |
2073 | 0 | a = columns[records[A]] |
2074 | 0 | b = columns[records[B]] |
2075 | 0 | c = columns[records[C]] |
2076 | N/A | end | >
2077 | N/A | > |
2078 | 0 | local row = i |
2079 | 0 | i -= 1 |
2080 | N/A | > |
2081 | 0 | return entity, a[row], b[row], c[row] |
2082 | N/A | end | >
2083 | 0 | elseif not E then |
2084 | 0 | function world_query_iter_next(): any |
2085 | 0 | local entity = entities[i] |
2086 | 0 | while entity == nil do |
2087 | 0 | lastArchetype += 1 |
2088 | 0 | archetype = compatible_archetypes[lastArchetype] |
2089 | 0 | if not archetype then |
2090 | 0 | return nil |
2091 | N/A | end | >
2092 | N/A | > |
2093 | 0 | entities = archetype.entities |
2094 | 0 | i = #entities |
2095 | 0 | if i == 0 then |
2096 | 0 | continue |
2097 | N/A | end | >
2098 | 0 | entity = entities[i] |
2099 | 0 | columns = archetype.columns |
2100 | 0 | records = archetype.records |
2101 | 0 | a = columns[records[A]] |
2102 | 0 | b = columns[records[B]] |
2103 | 0 | c = columns[records[C]] |
2104 | 0 | d = columns[records[D]] |
2105 | N/A | end | >
2106 | N/A | > |
2107 | 0 | local row = i |
2108 | 0 | i -= 1 |
2109 | N/A | > |
2110 | 0 | return entity, a[row], b[row], c[row], d[row] |
2111 | N/A | end | >
2112 | 0 | elseif not F then |
2113 | 0 | function world_query_iter_next(): any |
2114 | 0 | local entity = entities[i] |
2115 | 0 | while entity == nil do |
2116 | 0 | lastArchetype += 1 |
2117 | 0 | archetype = compatible_archetypes[lastArchetype] |
2118 | 0 | if not archetype then |
2119 | 0 | return nil |
2120 | N/A | end | >
2121 | N/A | > |
2122 | 0 | entities = archetype.entities |
2123 | 0 | i = #entities |
2124 | 0 | if i == 0 then |
2125 | 0 | continue |
2126 | N/A | end | >
2127 | 0 | entity = entities[i] |
2128 | 0 | columns = archetype.columns |
2129 | 0 | records = archetype.records |
2130 | 0 | a = columns[records[A]] |
2131 | 0 | b = columns[records[B]] |
2132 | 0 | c = columns[records[C]] |
2133 | 0 | d = columns[records[D]] |
2134 | 0 | e = columns[records[E]] |
2135 | N/A | end | >
2136 | N/A | > |
2137 | 0 | local row = i |
2138 | 0 | i -= 1 |
2139 | N/A | > |
2140 | 0 | return entity, a[row], b[row], c[row], d[row], e[row] |
2141 | N/A | end | >
2142 | 0 | elseif not G then |
2143 | 0 | function world_query_iter_next(): any |
2144 | 0 | local entity = entities[i] |
2145 | 0 | while entity == nil do |
2146 | 0 | lastArchetype += 1 |
2147 | 0 | archetype = compatible_archetypes[lastArchetype] |
2148 | 0 | if not archetype then |
2149 | 0 | return nil |
2150 | N/A | end | >
2151 | N/A | > |
2152 | 0 | entities = archetype.entities |
2153 | 0 | i = #entities |
2154 | 0 | if i == 0 then |
2155 | 0 | continue |
2156 | N/A | end | >
2157 | 0 | entity = entities[i] |
2158 | 0 | columns = archetype.columns |
2159 | 0 | records = archetype.records |
2160 | 0 | a = columns[records[A]] |
2161 | 0 | b = columns[records[B]] |
2162 | 0 | c = columns[records[C]] |
2163 | 0 | d = columns[records[D]] |
2164 | 0 | e = columns[records[E]] |
2165 | 0 | f = columns[records[F]] |
2166 | N/A | end | >
2167 | N/A | > |
2168 | 0 | local row = i |
2169 | 0 | i -= 1 |
2170 | N/A | > |
2171 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row] |
2172 | N/A | end | >
2173 | 0 | elseif not H then |
2174 | 0 | function world_query_iter_next(): any |
2175 | 0 | local entity = entities[i] |
2176 | 0 | while entity == nil do |
2177 | 0 | lastArchetype += 1 |
2178 | 0 | archetype = compatible_archetypes[lastArchetype] |
2179 | 0 | if not archetype then |
2180 | 0 | return nil |
2181 | N/A | end | >
2182 | N/A | > |
2183 | 0 | entities = archetype.entities |
2184 | 0 | i = #entities |
2185 | 0 | if i == 0 then |
2186 | 0 | continue |
2187 | N/A | end | >
2188 | 0 | entity = entities[i] |
2189 | 0 | columns = archetype.columns |
2190 | 0 | records = archetype.records |
2191 | 0 | a = columns[records[A]] |
2192 | 0 | b = columns[records[B]] |
2193 | 0 | c = columns[records[C]] |
2194 | 0 | d = columns[records[D]] |
2195 | 0 | e = columns[records[E]] |
2196 | 0 | f = columns[records[F]] |
2197 | 0 | g = columns[records[G]] |
2198 | N/A | end | >
2199 | N/A | > |
2200 | 0 | local row = i |
2201 | 0 | i -= 1 |
2202 | N/A | > |
2203 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row] |
2204 | N/A | end | >
2205 | 0 | elseif not I then |
2206 | 0 | function world_query_iter_next(): any |
2207 | 0 | local entity = entities[i] |
2208 | 0 | while entity == nil do |
2209 | 0 | lastArchetype += 1 |
2210 | 0 | archetype = compatible_archetypes[lastArchetype] |
2211 | 0 | if not archetype then |
2212 | 0 | return nil |
2213 | N/A | end | >
2214 | N/A | > |
2215 | 0 | entities = archetype.entities |
2216 | 0 | i = #entities |
2217 | 0 | if i == 0 then |
2218 | 0 | continue |
2219 | N/A | end | >
2220 | 0 | entity = entities[i] |
2221 | 0 | columns = archetype.columns |
2222 | 0 | records = archetype.records |
2223 | 0 | a = columns[records[A]] |
2224 | 0 | b = columns[records[B]] |
2225 | 0 | c = columns[records[C]] |
2226 | 0 | d = columns[records[D]] |
2227 | 0 | e = columns[records[E]] |
2228 | 0 | f = columns[records[F]] |
2229 | 0 | g = columns[records[G]] |
2230 | 0 | h = columns[records[H]] |
2231 | N/A | end | >
2232 | N/A | > |
2233 | 0 | local row = i |
2234 | 0 | i -= 1 |
2235 | N/A | > |
2236 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], h[row] |
2237 | N/A | end | >
2238 | 0 | else |
2239 | 0 | local queryOutput = {} |
2240 | 0 | function world_query_iter_next(): any |
2241 | 0 | local entity = entities[i] |
2242 | 0 | while entity == nil do |
2243 | 0 | lastArchetype += 1 |
2244 | 0 | archetype = compatible_archetypes[lastArchetype] |
2245 | 0 | if not archetype then |
2246 | 0 | return nil |
2247 | N/A | end | >
2248 | N/A | > |
2249 | 0 | entities = archetype.entities |
2250 | 0 | i = #entities |
2251 | 0 | if i == 0 then |
2252 | 0 | continue |
2253 | N/A | end | >
2254 | 0 | entity = entities[i] |
2255 | 0 | columns = archetype.columns |
2256 | 0 | records = archetype.records |
2257 | N/A | end | >
2258 | N/A | > |
2259 | 0 | local row = i |
2260 | 0 | i -= 1 |
2261 | N/A | > |
2262 | 0 | if not F then |
2263 | 0 | return entity, a[row], b[row], c[row], d[row], e[row] |
2264 | 0 | elseif not G then |
2265 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row] |
2266 | 0 | elseif not H then |
2267 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row] |
2268 | 0 | elseif not I then |
2269 | 0 | return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], h[row] |
2270 | N/A | end | >
2271 | N/A | > |
2272 | 0 | for j, id in ids do |
2273 | 0 | queryOutput[j] = columns[records[id]][row] |
2274 | N/A | end | >
2275 | N/A | > |
2276 | 0 | return entity, unpack(queryOutput) |
2277 | N/A | end | >
2278 | N/A | end | >
2279 | N/A | > |
2280 | 6 | local cached_query = query :: any |
2281 | 6 | cached_query.archetypes = query_archetypes |
2282 | 6 | cached_query.__iter = cached_query_iter |
2283 | 6 | cached_query.iter = cached_query_iter |
2284 | 6 | setmetatable(cached_query, cached_query) |
2285 | 6 | return cached_query |
2286 | N/A | end | >
2287 | N/A | > |
2288 | 1 | local Query = {} |
2289 | 1 | Query.__index = Query |
2290 | 1 | Query.__iter = query_iter |
2291 | 1 | Query.iter = query_iter_init |
2292 | 1 | Query.without = query_without |
2293 | 1 | Query.with = query_with |
2294 | 1 | Query.archetypes = query_archetypes |
2295 | 1 | Query.cached = query_cached |
2296 | N/A | > |
2297 | 1 | local function world_query(world: ecs_world_t, ...) |
2298 | 33 | local compatible_archetypes = {} |
2299 | 33 | local length = 0 |
2300 | N/A | > |
2301 | 33 | local ids = { ... } |
2302 | N/A | > |
2303 | 33 | local archetypes = world.archetypes |
2304 | N/A | > |
2305 | 33 | local idr: ecs_id_record_t? |
2306 | 33 | local component_index = world.component_index |
2307 | N/A | > |
2308 | 33 | local q = setmetatable({ |
2309 | 33 | ids = ids, |
2310 | 33 | compatible_archetypes = compatible_archetypes, |
2311 | 33 | world = world, |
2312 | 33 | }, Query) |
2313 | N/A | > |
2314 | 33 | for _, id in ids do |
2315 | 47 | local map = component_index[id] |
2316 | 47 | if not map then |
2317 | 7 | return q |
2318 | N/A | end | >
2319 | N/A | > |
2320 | 40 | if idr == nil or map.size < idr.size then |
2321 | 27 | idr = map |
2322 | N/A | end | >
2323 | N/A | end | >
2324 | N/A | > |
2325 | 26 | if not idr then |
2326 | 0 | return q |
2327 | N/A | end | >
2328 | N/A | > |
2329 | 26 | for archetype_id in idr.cache do |
2330 | 48 | local compatibleArchetype = archetypes[archetype_id] |
2331 | 48 | if #compatibleArchetype.entities == 0 then |
2332 | 0 | continue |
2333 | N/A | end | >
2334 | 34 | local records = compatibleArchetype.records |
2335 | N/A | > |
2336 | 34 | local skip = false |
2337 | N/A | > |
2338 | 34 | for i, id in ids do |
2339 | 47 | local tr = records[id] |
2340 | 47 | if not tr then |
2341 | 0 | skip = true |
2342 | 0 | break |
2343 | N/A | end | >
2344 | N/A | end | >
2345 | N/A | > |
2346 | 34 | if skip then |
2347 | 0 | continue |
2348 | N/A | end | >
2349 | N/A | > |
2350 | 34 | length += 1 |
2351 | 34 | compatible_archetypes[length] = compatibleArchetype |
2352 | N/A | end | >
2353 | N/A | > |
2354 | 26 | return q |
2355 | N/A | end | >
2356 | N/A | > |
2357 | 1 | local function world_each(world: ecs_world_t, id: i53): () -> () |
2358 | 2 | local idr = world.component_index[id] |
2359 | 2 | if not idr then |
2360 | 0 | return NOOP |
2361 | N/A | end | >
2362 | N/A | > |
2363 | 2 | local idr_cache = idr.cache |
2364 | 2 | local archetypes = world.archetypes |
2365 | 2 | local archetype_id = next(idr_cache, nil) :: number |
2366 | 2 | local archetype = archetypes[archetype_id] |
2367 | 2 | if not archetype then |
2368 | 0 | return NOOP |
2369 | N/A | end | >
2370 | N/A | > |
2371 | 2 | local entities = archetype.entities |
2372 | 2 | local row = #entities |
2373 | N/A | > |
2374 | 2 | return function(): any |
2375 | 12 | local entity = entities[row] |
2376 | 12 | while not entity do |
2377 | 11 | archetype_id = next(idr_cache, archetype_id) :: number |
2378 | 11 | if not archetype_id then |
2379 | 4 | return |
2380 | N/A | end | >
2381 | 7 | archetype = archetypes[archetype_id] |
2382 | 7 | entities = archetype.entities |
2383 | 7 | row = #entities |
2384 | 7 | entity = entities[row] |
2385 | N/A | end | >
2386 | 8 | row -= 1 |
2387 | 8 | return entity |
2388 | N/A | end | >
2389 | N/A | end | >
2390 | N/A | > |
2391 | 1 | local function world_children(world: ecs_world_t, parent: i53) |
2392 | 2 | return world_each(world, ECS_PAIR(EcsChildOf, parent)) |
2393 | N/A | end | >
2394 | N/A | > |
2395 | 0 | export type Record = { |
2396 | 0 | archetype: Archetype, |
2397 | 0 | row: number, |
2398 | 0 | dense: i24, |
2399 | 0 | } |
2400 | 0 | export type ComponentRecord = { |
2401 | 0 | cache: { [Id]: number }, |
2402 | 0 | counts: { [Id]: number }, |
2403 | 0 | flags: number, |
2404 | 0 | size: number, |
2405 | 0 | hooks: { |
2406 | 0 | on_add: ((entity: Entity) -> ())?, |
2407 | 0 | on_set: ((entity: Entity, data: any) -> ())?, |
2408 | 0 | on_remove: ((entity: Entity) -> ())?, |
2409 | 0 | }, |
2410 | 0 | } |
2411 | 0 | export type ComponentIndex = Map |
2412 | 0 | export type Archetypes = { [Id]: Archetype } |
2413 | N/A | > |
2414 | 0 | export type EntityIndex = { |
2415 | 0 | dense_array: Map |
2416 | 0 | sparse_array: Map |
2417 | 0 | alive_count: number, |
2418 | 0 | max_id: number, |
2419 | 0 | } |
2420 | N/A | > |
2421 | 1 | local World = {} |
2422 | 1 | World.__index = World |
2423 | N/A | > |
2424 | 1 | World.entity = world_entity |
2425 | 1 | World.query = world_query |
2426 | 1 | World.remove = world_remove |
2427 | 1 | World.clear = world_clear |
2428 | 1 | World.delete = world_delete |
2429 | 1 | World.component = world_component |
2430 | 1 | World.add = world_add |
2431 | 1 | World.set = world_set |
2432 | 1 | World.get = world_get |
2433 | 1 | World.has = world_has |
2434 | 1 | World.target = world_target |
2435 | 1 | World.parent = world_parent |
2436 | 1 | World.contains = world_contains |
2437 | 1 | World.cleanup = world_cleanup |
2438 | 1 | World.each = world_each |
2439 | 1 | World.children = world_children |
2440 | N/A | > |
2441 | 1 | local function world_new() |
2442 | 73 | local entity_index = { |
2443 | 73 | dense_array = {}, |
2444 | 73 | sparse_array = {}, |
2445 | 73 | alive_count = 0, |
2446 | 73 | max_id = 0, |
2447 | 0 | } :: ecs_entity_index_t |
2448 | 73 | local self = setmetatable({ |
2449 | 73 | archetype_index = {} :: { [string]: Archetype }, |
2450 | 73 | archetypes = {} :: Archetypes, |
2451 | 73 | component_index = {} :: ComponentIndex, |
2452 | 73 | entity_index = entity_index, |
2453 | 73 | ROOT_ARCHETYPE = (nil :: any) :: Archetype, |
2454 | N/A | > |
2455 | 73 | max_archetype_id = 0, |
2456 | 73 | max_component_id = 0, |
2457 | N/A | > |
2458 | 73 | observable = {} :: Observable, |
2459 | 73 | }, World) :: any |
2460 | N/A | > |
2461 | 73 | self.ROOT_ARCHETYPE = archetype_create(self, {}, "") |
2462 | N/A | > |
2463 | 73 | for i = 1, HI_COMPONENT_ID do |
2464 | 18688 | local e = entity_index_new_id(entity_index) |
2465 | 18688 | world_add(self, e, EcsComponent) |
2466 | N/A | end | >
2467 | N/A | > |
2468 | 73 | for i = HI_COMPONENT_ID + 1, EcsRest do |
2469 | N/A | -- Initialize built-in components | >
2470 | 1022 | entity_index_new_id(entity_index) |
2471 | N/A | end | >
2472 | N/A | > |
2473 | 73 | world_add(self, EcsName, EcsComponent) |
2474 | 73 | world_add(self, EcsOnSet, EcsComponent) |
2475 | 73 | world_add(self, EcsOnAdd, EcsComponent) |
2476 | 73 | world_add(self, EcsOnRemove, EcsComponent) |
2477 | 73 | world_add(self, EcsWildcard, EcsComponent) |
2478 | 73 | world_add(self, EcsRest, EcsComponent) |
2479 | N/A | > |
2480 | 73 | world_set(self, EcsOnAdd, EcsName, "jecs.OnAdd") |
2481 | 73 | world_set(self, EcsOnRemove, EcsName, "jecs.OnRemove") |
2482 | 73 | world_set(self, EcsOnSet, EcsName, "jecs.OnSet") |
2483 | 73 | world_set(self, EcsWildcard, EcsName, "jecs.Wildcard") |
2484 | 73 | world_set(self, EcsChildOf, EcsName, "jecs.ChildOf") |
2485 | 73 | world_set(self, EcsComponent, EcsName, "jecs.Component") |
2486 | 73 | world_set(self, EcsOnDelete, EcsName, "jecs.OnDelete") |
2487 | 73 | world_set(self, EcsOnDeleteTarget, EcsName, "jecs.OnDeleteTarget") |
2488 | 73 | world_set(self, EcsDelete, EcsName, "jecs.Delete") |
2489 | 73 | world_set(self, EcsRemove, EcsName, "jecs.Remove") |
2490 | 73 | world_set(self, EcsName, EcsName, "jecs.Name") |
2491 | 73 | world_set(self, EcsRest, EcsRest, "jecs.Rest") |
2492 | N/A | > |
2493 | 73 | world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete)) |
2494 | N/A | > |
2495 | 73 | return self |
2496 | N/A | end | >
2497 | N/A | > |
2498 | 1 | World.new = world_new |
2499 | N/A | > |
2500 | 0 | export type Entity |
2501 | 0 | export type Id |
2502 | 0 | export type Pair = Id |
2503 | 0 | type ecs_id_t |
2504 | 0 | export type Item |
2505 | 0 | export type Iter |
2506 | N/A | > |
2507 | 0 | export type Query |
2508 | 0 | __iter = (nil :: any) :: Iter |
2509 | 0 | })) & { |
2510 | 0 | iter: Iter |
2511 | 0 | with: (self: Query |
2512 | 0 | without: (self: Query |
2513 | 0 | archetypes: (self: Query |
2514 | 0 | cached: (self: Query |
2515 | 0 | } |
2516 | N/A | > |
2517 | 0 | export type Observer = { |
2518 | 0 | callback: (archetype: Archetype) -> (), |
2519 | 0 | query: QueryInner, |
2520 | 0 | } |
2521 | N/A | > |
2522 | 0 | export type Observable = { |
2523 | 0 | [Id]: { |
2524 | 0 | [Id]: { |
2525 | 0 | { Observer } |
2526 | 0 | } |
2527 | 0 | } |
2528 | 0 | } |
2529 | N/A | > |
2530 | 0 | export type World = { |
2531 | 0 | archetype_index: { [string]: Archetype }, |
2532 | 0 | archetypes: Archetypes, |
2533 | 0 | component_index: ComponentIndex, |
2534 | 0 | entity_index: EntityIndex, |
2535 | 0 | ROOT_ARCHETYPE: Archetype, |
2536 | N/A | > |
2537 | 0 | max_component_id: number, |
2538 | 0 | max_archetype_id: number, |
2539 | N/A | > |
2540 | 0 | observable: any, |
2541 | N/A | > |
2542 | N/A | --- Creates a new entity | >
2543 | 0 | entity: (self: World, id: Entity?) -> Entity, |
2544 | N/A | --- Creates a new entity located in the first 256 ids. | >
2545 | N/A | --- These should be used for static components for fast access. | >
2546 | 0 | component: |
2547 | N/A | --- Gets the target of an relationship. For example, when a user calls | >
2548 | N/A | --- `world:target(id, ChildOf(parent), 0)`, you will obtain the parent entity. | >
2549 | 0 | target: (self: World, id: Entity, relation: Id, index: number?) -> Entity?, |
2550 | N/A | --- Deletes an entity and all it's related components and relationships. | >
2551 | 0 | delete: (self: World, id: Entity) -> (), |
2552 | N/A | > |
2553 | N/A | --- Adds a component to the entity with no value | >
2554 | 0 | add: |
2555 | N/A | --- Assigns a value to a component on the given entity | >
2556 | 0 | set: |
2557 | N/A | > |
2558 | 0 | cleanup: (self: World) -> (), |
2559 | N/A | -- Clears an entity from the world | >
2560 | 0 | clear: (self: World, id: Entity) -> (), |
2561 | N/A | --- Removes a component from the given entity | >
2562 | 0 | remove: (self: World, id: Entity, component: Id) -> (), |
2563 | N/A | --- Retrieves the value of up to 4 components. These values may be nil. | >
2564 | 0 | get: ((self: World, id: Entity, Id) -> A?) |
2565 | 0 | & ((self: World, id: Entity, Id, Id) -> (A?, B?)) |
2566 | 0 | & ((self: World, id: Entity, Id, Id, Id |
2567 | 0 | & (self: World, id: Entity, Id, Id, Id |
2568 | N/A | > |
2569 | N/A | --- Returns whether the entity has the ID. | >
2570 | 0 | has: (self: World, entity: Entity, ...Id) -> boolean, |
2571 | N/A | > |
2572 | N/A | --- Get parent (target of ChildOf relationship) for entity. If there is no ChildOf relationship pair, it will return nil. | >
2573 | 0 | parent:(self: World, entity: Entity) -> Entity, |
2574 | N/A | > |
2575 | N/A | --- Checks if the world contains the given entity | >
2576 | 0 | contains:(self: World, entity: Entity) -> boolean, |
2577 | N/A | > |
2578 | 0 | each: (self: World, id: Id) -> () -> Entity, |
2579 | N/A | > |
2580 | 0 | children: (self: World, id: Id) -> () -> Entity, |
2581 | N/A | > |
2582 | N/A | --- Searches the world for entities that match a given query | >
2583 | 0 | query: ((World, Id) -> Query) |
2584 | 0 | & ((World, Id, Id) -> Query) |
2585 | 0 | & ((World, Id, Id, Id |
2586 | 0 | & ((World, Id, Id, Id |
2587 | 0 | & ((World, Id, Id, Id |
2588 | 0 | & ((World, Id, Id, Id |
2589 | 0 | & ((World, Id, Id, Id |
2590 | 0 | & ((World, Id, Id, Id |
2591 | 0 | } |
2592 | N/A | -- type function ecs_id_t(entity) | >
2593 | N/A | -- local ty = entity:components()[2] | >
2594 | N/A | -- local __T = ty:readproperty(types.singleton("__T")) | >
2595 | N/A | -- if not __T then | >
2596 | N/A | -- return ty:readproperty(types.singleton("__jecs_pair_value")) | >
2597 | N/A | -- end | >
2598 | N/A | -- return __T | >
2599 | N/A | -- end | >
2600 | N/A | > |
2601 | N/A | -- type function ecs_pair_t(first, second) | >
2602 | N/A | -- if ecs_id_t(first):is("nil") then | >
2603 | N/A | -- return second | >
2604 | N/A | -- else | >
2605 | N/A | -- return first | >
2606 | N/A | -- end | >
2607 | N/A | -- end | >
2608 | N/A | > |
2609 | 1 | return { |
2610 | 1 | World = World :: { new: () -> World }, |
2611 | 1 | world = World.new :: () -> World, |
2612 | N/A | > |
2613 | 1 | OnAdd = EcsOnAdd :: Entity<(entity: Entity) -> ()>, |
2614 | 1 | OnRemove = EcsOnRemove :: Entity<(entity: Entity) -> ()>, |
2615 | 1 | OnSet = EcsOnSet :: Entity<(entity: Entity, data: any) -> ()>, |
2616 | 1 | ChildOf = EcsChildOf :: Entity, |
2617 | 1 | Component = EcsComponent :: Entity, |
2618 | 1 | Wildcard = EcsWildcard :: Entity, |
2619 | 1 | w = EcsWildcard :: Entity, |
2620 | 1 | OnDelete = EcsOnDelete :: Entity, |
2621 | 1 | OnDeleteTarget = EcsOnDeleteTarget :: Entity, |
2622 | 1 | Delete = EcsDelete :: Entity, |
2623 | 1 | Remove = EcsRemove :: Entity, |
2624 | 1 | Name = EcsName :: Entity |
2625 | 1 | Rest = EcsRest :: Entity, |
2626 | N/A | > |
2627 | 1 | pair = (ECS_PAIR :: any) :: (first: Id , second: Id , |
2628 | N/A | > |
2629 | N/A | -- Inwards facing API for testing | >
2630 | 1 | ECS_ID = ECS_ENTITY_T_LO, |
2631 | 1 | ECS_GENERATION_INC = ECS_GENERATION_INC, |
2632 | 1 | ECS_GENERATION = ECS_GENERATION, |
2633 | 1 | ECS_ID_IS_WILDCARD = ECS_ID_IS_WILDCARD, |
2634 | N/A | > |
2635 | 1 | ECS_ID_DELETE = ECS_ID_DELETE, |
2636 | N/A | > |
2637 | 1 | IS_PAIR = ECS_IS_PAIR, |
2638 | 1 | pair_first = ecs_pair_first, |
2639 | 1 | pair_second = ecs_pair_second, |
2640 | 1 | entity_index_get_alive = entity_index_get_alive, |
2641 | N/A | > |
2642 | 1 | archetype_append_to_records = archetype_append_to_records, |
2643 | 1 | id_record_ensure = id_record_ensure, |
2644 | 1 | archetype_create = archetype_create, |
2645 | 1 | archetype_ensure = archetype_ensure, |
2646 | 1 | find_insert = find_insert, |
2647 | 1 | find_archetype_with = find_archetype_with, |
2648 | 1 | find_archetype_without = find_archetype_without, |
2649 | 1 | archetype_init_edge = archetype_init_edge, |
2650 | 1 | archetype_ensure_edge = archetype_ensure_edge, |
2651 | 1 | init_edge_for_add = init_edge_for_add, |
2652 | 1 | init_edge_for_remove = init_edge_for_remove, |
2653 | 1 | create_edge_for_add = create_edge_for_add, |
2654 | 1 | create_edge_for_remove = create_edge_for_remove, |
2655 | 1 | archetype_traverse_add = archetype_traverse_add, |
2656 | 1 | archetype_traverse_remove = archetype_traverse_remove, |
2657 | N/A | > |
2658 | 1 | entity_move = entity_move, |
2659 | N/A | > |
2660 | 1 | entity_index_try_get = entity_index_try_get, |
2661 | 1 | entity_index_try_get_any = entity_index_try_get_any, |
2662 | 1 | entity_index_try_get_fast = entity_index_try_get_fast, |
2663 | 1 | entity_index_is_alive = entity_index_is_alive, |
2664 | 1 | entity_index_new_id = entity_index_new_id, |
2665 | N/A | > |
2666 | 1 | query_iter = query_iter, |
2667 | 1 | query_iter_init = query_iter_init, |
2668 | 1 | query_with = query_with, |
2669 | 1 | query_without = query_without, |
2670 | 1 | query_archetypes = query_archetypes, |
2671 | 1 | query_match = query_match, |
2672 | N/A | > |
2673 | 1 | find_observers = find_observers, |
2674 | 0 | } |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs.luau | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs.luau | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
jecs.luau | -
-
|
- 71.7 % | -1487 | -1066 | -53.6 % | -97 | -52 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2 : /* (content generated from line coverage data) */ - 3 : /* ... */ - 4 : /* ... */ - 5 : /* ... */ - 6 : /* ... */ - 7 : /* ... */ - 8 : /* ... */ - 9 : /* ... */ - 10 : /* ... */ - 11 : /* ... */ - 12 : /* ... */ - 13 : /* ... */ - 14 : /* ... */ - 15 : /* ... */ - 16 : /* ... */ - 17 : /* ... */ - 18 : /* ... */ - 19 : /* ... */ - 20 : /* ... */ - 21 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 22 : /* (content generated from line coverage data) */ - 23 : /* ... */ - 24 : /* ... */ - 25 : /* ... */ - 26 : /* ... */ - 27 : /* ... */ - 28 : /* ... */ - 29 : /* ... */ - 30 : /* ... */ - 31 : /* ... */ - 32 : /* ... */ - 33 : /* ... */ - 34 : /* ... */ - 35 : /* ... */ - 36 : /* ... */ - 37 : /* ... */ - 38 : /* ... */ - 39 : /* ... */ - 40 : /* ... */ - 41 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 42 : /* (content generated from line coverage data) */ - 43 : /* ... */ - 44 : /* ... */ - 45 : /* ... */ - 46 : /* ... */ - 47 : /* ... */ - 48 : /* ... */ - 49 : /* ... */ - 50 : /* ... */ - 51 : /* ... */ - 52 : /* ... */ - 53 : /* ... */ - 54 : /* ... */ - 55 : /* ... */ - 56 : /* ... */ - 57 : /* ... */ - 58 : /* ... */ - 59 : /* ... */ - 60 : /* ... */ - 61 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 62 : /* (content generated from line coverage data) */ - 63 : /* ... */ - 64 : /* ... */ - 65 : /* ... */ - 66 : /* ... */ - 67 : /* ... */ - 68 : /* ... */ - 69 : /* ... */ - 70 : /* ... */ - 71 : /* ... */ - 72 : /* ... */ - 73 : /* ... */ - 74 : /* ... */ - 75 : /* ... */ - 76 : /* ... */ - 77 : /* ... */ - 78 : /* ... */ - 79 : /* ... */ - 80 : /* ... */ - 81 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 82 : /* (content generated from line coverage data) */ - 83 : /* ... */ - 84 : /* ... */ - 85 : /* ... */ - 86 : /* ... */ - 87 : /* ... */ - 88 : /* ... */ - 89 : /* ... */ - 90 : /* ... */ - 91 : /* ... */ - 92 : /* ... */ - 93 : /* ... */ - 94 : /* ... */ - 95 : /* ... */ - 96 : /* ... */ - 97 : /* ... */ - 98 : /* ... */ - 99 : /* ... */ - 100 : /* ... */ - 101 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 102 : /* (content generated from line coverage data) */ - 103 : /* ... */ - 104 : /* ... */ - 105 : /* ... */ - 106 : /* ... */ - 107 : /* ... */ - 108 : /* ... */ - 109 : /* ... */ - 110 1 : /* ... */ - 111 : /* ... */ - 112 1 : /* ... */ - 113 1 : /* ... */ - 114 1 : /* ... */ - 115 1 : /* ... */ - 116 1 : /* ... */ - 117 1 : /* ... */ - 118 1 : /* ... */ - 119 1 : /* ... */ - 120 1 : /* ... */ - 121 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 122 1 : /* (content generated from line coverage data) */ - 123 1 : /* ... */ - 124 1 : /* ... */ - 125 1 : /* ... */ - 126 : /* ... */ - 127 1 : /* ... */ - 128 1 : /* ... */ - 129 1 : /* ... */ - 130 1 : /* ... */ - 131 1 : /* ... */ - 132 1 : /* ... */ - 133 : /* ... */ - 134 1 : /* ... */ - 135 1 : /* ... */ - 136 : /* ... */ - 137 1 : /* ... */ - 138 1 : /* ... */ - 139 : /* ... */ - 140 : /* ... */ - 141 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 142 : /* (content generated from line coverage data) */ - 143 : /* ... */ - 144 1 : /* ... */ - 145 65537 : /* ... */ - 146 : /* ... */ - 147 1 : /* ... */ - 148 : /* ... */ - 149 1 : /* ... */ - 150 1646 : /* ... */ - 151 : /* ... */ - 152 : /* ... */ - 153 1 : /* ... */ - 154 65678 : /* ... */ - 155 65537 : /* ... */ - 156 65537 : /* ... */ - 157 : /* ... */ - 158 65537 : /* ... */ - 159 65537 : /* ... */ - 160 1 : /* ... */ - 161 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 162 : /* (content generated from line coverage data) */ - 163 65536 : /* ... */ - 164 : /* ... */ - 165 141 : /* ... */ - 166 : /* ... */ - 167 : /* ... */ - 168 1 : /* ... */ - 169 92607 : /* ... */ - 170 : /* ... */ - 171 : /* ... */ - 172 1 : /* ... */ - 173 15 : /* ... */ - 174 : /* ... */ - 175 : /* ... */ - 176 1 : /* ... */ - 177 0 : /* ... */ - 178 : /* ... */ - 179 : /* ... */ - 180 1 : /* ... */ - 181 67324 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 182 67324 : /* (content generated from line coverage data) */ - 183 : /* ... */ - 184 67324 : /* ... */ - 185 : /* ... */ - 186 : /* ... */ - 187 1 : /* ... */ - 188 623 : /* ... */ - 189 : /* ... */ - 190 : /* ... */ - 191 1 : /* ... */ - 192 687 : /* ... */ - 193 : /* ... */ - 194 : /* ... */ - 195 1 : /* ... */ - 196 : /* ... */ - 197 : /* ... */ - 198 : /* ... */ - 199 66335 : /* ... */ - 200 : /* ... */ - 201 66335 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 202 0 : /* (content generated from line coverage data) */ - 203 : /* ... */ - 204 : /* ... */ - 205 66335 : /* ... */ - 206 : /* ... */ - 207 : /* ... */ - 208 1 : /* ... */ - 209 66214 : /* ... */ - 210 66214 : /* ... */ - 211 66214 : /* ... */ - 212 66214 : /* ... */ - 213 122 : /* ... */ - 214 : /* ... */ - 215 66092 : /* ... */ - 216 2 : /* ... */ - 217 : /* ... */ - 218 : /* ... */ - 219 66090 : /* ... */ - 220 : /* ... */ - 221 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 222 1 : /* (content generated from line coverage data) */ - 223 24891 : /* ... */ - 224 24891 : /* ... */ - 225 24603 : /* ... */ - 226 24 : /* ... */ - 227 : /* ... */ - 228 : /* ... */ - 229 24867 : /* ... */ - 230 : /* ... */ - 231 : /* ... */ - 232 1 : /* ... */ - 233 528 : /* ... */ - 234 : /* ... */ - 235 : /* ... */ - 236 1 : /* ... */ - 237 431 : /* ... */ - 238 431 : /* ... */ - 239 431 : /* ... */ - 240 : /* ... */ - 241 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 242 : /* (content generated from line coverage data) */ - 243 : /* ... */ - 244 1 : /* ... */ - 245 25 : /* ... */ - 246 0 : /* ... */ - 247 : /* ... */ - 248 : /* ... */ - 249 25 : /* ... */ - 250 : /* ... */ - 251 25 : /* ... */ - 252 24 : /* ... */ - 253 : /* ... */ - 254 : /* ... */ - 255 1 : /* ... */ - 256 0 : /* ... */ - 257 : /* ... */ - 258 : /* ... */ - 259 1 : /* ... */ - 260 1 : /* ... */ - 261 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 262 : /* (content generated from line coverage data) */ - 263 : /* ... */ - 264 0 : /* ... */ - 265 : /* ... */ - 266 : /* ... */ - 267 1 : /* ... */ - 268 85268 : /* ... */ - 269 85268 : /* ... */ - 270 85268 : /* ... */ - 271 85268 : /* ... */ - 272 65554 : /* ... */ - 273 65554 : /* ... */ - 274 65554 : /* ... */ - 275 65554 : /* ... */ - 276 : /* ... */ - 277 : /* ... */ - 278 19714 : /* ... */ - 279 19714 : /* ... */ - 280 19714 : /* ... */ - 281 19714 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 282 19714 : /* (content generated from line coverage data) */ - 283 19714 : /* ... */ - 284 : /* ... */ - 285 19714 : /* ... */ - 286 : /* ... */ - 287 : /* ... */ - 288 1 : /* ... */ - 289 12 : /* ... */ - 290 12 : /* ... */ - 291 : /* ... */ - 292 : /* ... */ - 293 1 : /* ... */ - 294 13 : /* ... */ - 295 13 : /* ... */ - 296 : /* ... */ - 297 : /* ... */ - 298 1 : /* ... */ - 299 : /* ... */ - 300 10 : /* ... */ - 301 10 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 302 : /* (content generated from line coverage data) */ - 303 10 : /* ... */ - 304 14 : /* ... */ - 305 3 : /* ... */ - 306 : /* ... */ - 307 : /* ... */ - 308 : /* ... */ - 309 7 : /* ... */ - 310 7 : /* ... */ - 311 6 : /* ... */ - 312 8 : /* ... */ - 313 2 : /* ... */ - 314 : /* ... */ - 315 : /* ... */ - 316 : /* ... */ - 317 : /* ... */ - 318 5 : /* ... */ - 319 : /* ... */ - 320 : /* ... */ - 321 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 322 : /* (content generated from line coverage data) */ - 323 1413 : /* ... */ - 324 1413 : /* ... */ - 325 1394 : /* ... */ - 326 : /* ... */ - 327 19 : /* ... */ - 328 : /* ... */ - 329 : /* ... */ - 330 1 : /* ... */ - 331 : /* ... */ - 332 : /* ... */ - 333 : /* ... */ - 334 : /* ... */ - 335 : /* ... */ - 336 : /* ... */ - 337 1778 : /* ... */ - 338 1778 : /* ... */ - 339 1778 : /* ... */ - 340 1778 : /* ... */ - 341 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 342 1778 : /* (content generated from line coverage data) */ - 343 1778 : /* ... */ - 344 1778 : /* ... */ - 345 : /* ... */ - 346 1778 : /* ... */ - 347 2182 : /* ... */ - 348 : /* ... */ - 349 : /* ... */ - 350 : /* ... */ - 351 : /* ... */ - 352 1678 : /* ... */ - 353 : /* ... */ - 354 : /* ... */ - 355 1678 : /* ... */ - 356 1402 : /* ... */ - 357 : /* ... */ - 358 : /* ... */ - 359 : /* ... */ - 360 1678 : /* ... */ - 361 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 362 88 : /* (content generated from line coverage data) */ - 363 : /* ... */ - 364 1678 : /* ... */ - 365 : /* ... */ - 366 : /* ... */ - 367 1778 : /* ... */ - 368 : /* ... */ - 369 : /* ... */ - 370 : /* ... */ - 371 : /* ... */ - 372 1778 : /* ... */ - 373 1778 : /* ... */ - 374 : /* ... */ - 375 1778 : /* ... */ - 376 450 : /* ... */ - 377 : /* ... */ - 378 : /* ... */ - 379 1778 : /* ... */ - 380 1778 : /* ... */ - 381 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 382 1778 : /* (content generated from line coverage data) */ - 383 : /* ... */ - 384 1778 : /* ... */ - 385 1778 : /* ... */ - 386 1778 : /* ... */ - 387 1778 : /* ... */ - 388 : /* ... */ - 389 : /* ... */ - 390 1 : /* ... */ - 391 : /* ... */ - 392 : /* ... */ - 393 : /* ... */ - 394 20556 : /* ... */ - 395 20556 : /* ... */ - 396 20556 : /* ... */ - 397 20556 : /* ... */ - 398 : /* ... */ - 399 : /* ... */ - 400 1 : /* ... */ - 401 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 402 : /* (content generated from line coverage data) */ - 403 : /* ... */ - 404 : /* ... */ - 405 20277 : /* ... */ - 406 20277 : /* ... */ - 407 20277 : /* ... */ - 408 0 : /* ... */ - 409 : /* ... */ - 410 : /* ... */ - 411 1 : /* ... */ - 412 : /* ... */ - 413 : /* ... */ - 414 : /* ... */ - 415 : /* ... */ - 416 : /* ... */ - 417 1778 : /* ... */ - 418 1778 : /* ... */ - 419 1778 : /* ... */ - 420 1778 : /* ... */ - 421 1778 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 422 1778 : /* (content generated from line coverage data) */ - 423 : /* ... */ - 424 : /* ... */ - 425 1 : /* ... */ - 426 537 : /* ... */ - 427 : /* ... */ - 428 : /* ... */ - 429 1 : /* ... */ - 430 : /* ... */ - 431 601 : /* ... */ - 432 : /* ... */ - 433 601 : /* ... */ - 434 578 : /* ... */ - 435 : /* ... */ - 436 : /* ... */ - 437 23 : /* ... */ - 438 : /* ... */ - 439 : /* ... */ - 440 1 : /* ... */ - 441 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 442 718 : /* (content generated from line coverage data) */ - 443 718 : /* ... */ - 444 74 : /* ... */ - 445 : /* ... */ - 446 : /* ... */ - 447 644 : /* ... */ - 448 644 : /* ... */ - 449 43 : /* ... */ - 450 : /* ... */ - 451 : /* ... */ - 452 601 : /* ... */ - 453 601 : /* ... */ - 454 601 : /* ... */ - 455 : /* ... */ - 456 601 : /* ... */ - 457 : /* ... */ - 458 601 : /* ... */ - 459 37 : /* ... */ - 460 564 : /* ... */ - 461 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 462 564 : /* (content generated from line coverage data) */ - 463 564 : /* ... */ - 464 0 : /* ... */ - 465 0 : /* ... */ - 466 : /* ... */ - 467 0 : /* ... */ - 468 : /* ... */ - 469 : /* ... */ - 470 : /* ... */ - 471 1 : /* ... */ - 472 672 : /* ... */ - 473 672 : /* ... */ - 474 72 : /* ... */ - 475 : /* ... */ - 476 : /* ... */ - 477 600 : /* ... */ - 478 600 : /* ... */ - 479 36 : /* ... */ - 480 : /* ... */ - 481 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 482 564 : /* (content generated from line coverage data) */ - 483 : /* ... */ - 484 564 : /* ... */ - 485 : /* ... */ - 486 : /* ... */ - 487 1 : /* ... */ - 488 59 : /* ... */ - 489 59 : /* ... */ - 490 22 : /* ... */ - 491 : /* ... */ - 492 : /* ... */ - 493 37 : /* ... */ - 494 37 : /* ... */ - 495 2 : /* ... */ - 496 : /* ... */ - 497 : /* ... */ - 498 35 : /* ... */ - 499 : /* ... */ - 500 35 : /* ... */ - 501 38 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 502 17 : /* (content generated from line coverage data) */ - 503 : /* ... */ - 504 : /* ... */ - 505 : /* ... */ - 506 18 : /* ... */ - 507 : /* ... */ - 508 : /* ... */ - 509 1 : /* ... */ - 510 1378 : /* ... */ - 511 1378 : /* ... */ - 512 1378 : /* ... */ - 513 144 : /* ... */ - 514 : /* ... */ - 515 : /* ... */ - 516 1234 : /* ... */ - 517 1234 : /* ... */ - 518 72 : /* ... */ - 519 : /* ... */ - 520 : /* ... */ - 521 1162 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 522 : /* (content generated from line coverage data) */ - 523 1162 : /* ... */ - 524 1162 : /* ... */ - 525 1112 : /* ... */ - 526 : /* ... */ - 527 : /* ... */ - 528 50 : /* ... */ - 529 5 : /* ... */ - 530 : /* ... */ - 531 : /* ... */ - 532 50 : /* ... */ - 533 50 : /* ... */ - 534 5 : /* ... */ - 535 : /* ... */ - 536 : /* ... */ - 537 45 : /* ... */ - 538 45 : /* ... */ - 539 : /* ... */ - 540 : /* ... */ - 541 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 542 0 : /* (content generated from line coverage data) */ - 543 0 : /* ... */ - 544 0 : /* ... */ - 545 : /* ... */ - 546 : /* ... */ - 547 1 : /* ... */ - 548 1428 : /* ... */ - 549 1428 : /* ... */ - 550 1428 : /* ... */ - 551 : /* ... */ - 552 1428 : /* ... */ - 553 674 : /* ... */ - 554 674 : /* ... */ - 555 674 : /* ... */ - 556 674 : /* ... */ - 557 674 : /* ... */ - 558 366 : /* ... */ - 559 366 : /* ... */ - 560 366 : /* ... */ - 561 365 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 562 365 : /* (content generated from line coverage data) */ - 563 365 : /* ... */ - 564 : /* ... */ - 565 : /* ... */ - 566 672 : /* ... */ - 567 672 : /* ... */ - 568 : /* ... */ - 569 672 : /* ... */ - 570 : /* ... */ - 571 672 : /* ... */ - 572 16 : /* ... */ - 573 : /* ... */ - 574 : /* ... */ - 575 672 : /* ... */ - 576 : /* ... */ - 577 672 : /* ... */ - 578 : /* ... */ - 579 672 : /* ... */ - 580 188 : /* ... */ - 581 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 582 : /* (content generated from line coverage data) */ - 583 672 : /* ... */ - 584 672 : /* ... */ - 585 672 : /* ... */ - 586 672 : /* ... */ - 587 672 : /* ... */ - 588 672 : /* ... */ - 589 672 : /* ... */ - 590 : /* ... */ - 591 : /* ... */ - 592 672 : /* ... */ - 593 672 : /* ... */ - 594 672 : /* ... */ - 595 672 : /* ... */ - 596 672 : /* ... */ - 597 672 : /* ... */ - 598 672 : /* ... */ - 599 672 : /* ... */ - 600 672 : /* ... */ - 601 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 602 : /* (content generated from line coverage data) */ - 603 : /* ... */ - 604 672 : /* ... */ - 605 : /* ... */ - 606 : /* ... */ - 607 1426 : /* ... */ - 608 : /* ... */ - 609 : /* ... */ - 610 1 : /* ... */ - 611 : /* ... */ - 612 : /* ... */ - 613 : /* ... */ - 614 : /* ... */ - 615 : /* ... */ - 616 936 : /* ... */ - 617 936 : /* ... */ - 618 936 : /* ... */ - 619 936 : /* ... */ - 620 936 : /* ... */ - 621 936 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 622 936 : /* (content generated from line coverage data) */ - 623 936 : /* ... */ - 624 936 : /* ... */ - 625 : /* ... */ - 626 936 : /* ... */ - 627 936 : /* ... */ - 628 : /* ... */ - 629 82 : /* ... */ - 630 82 : /* ... */ - 631 82 : /* ... */ - 632 : /* ... */ - 633 : /* ... */ - 634 : /* ... */ - 635 1 : /* ... */ - 636 605 : /* ... */ - 637 605 : /* ... */ - 638 : /* ... */ - 639 605 : /* ... */ - 640 605 : /* ... */ - 641 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 642 605 : /* (content generated from line coverage data) */ - 643 605 : /* ... */ - 644 : /* ... */ - 645 605 : /* ... */ - 646 605 : /* ... */ - 647 605 : /* ... */ - 648 605 : /* ... */ - 649 605 : /* ... */ - 650 605 : /* ... */ - 651 605 : /* ... */ - 652 605 : /* ... */ - 653 : /* ... */ - 654 605 : /* ... */ - 655 605 : /* ... */ - 656 605 : /* ... */ - 657 : /* ... */ - 658 : /* ... */ - 659 605 : /* ... */ - 660 938 : /* ... */ - 661 936 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 662 : /* (content generated from line coverage data) */ - 663 936 : /* ... */ - 664 245 : /* ... */ - 665 245 : /* ... */ - 666 245 : /* ... */ - 667 245 : /* ... */ - 668 245 : /* ... */ - 669 : /* ... */ - 670 245 : /* ... */ - 671 245 : /* ... */ - 672 245 : /* ... */ - 673 : /* ... */ - 674 : /* ... */ - 675 936 : /* ... */ - 676 549 : /* ... */ - 677 : /* ... */ - 678 387 : /* ... */ - 679 : /* ... */ - 680 : /* ... */ - 681 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 682 603 : /* (content generated from line coverage data) */ - 683 1328 : /* ... */ - 684 1328 : /* ... */ - 685 : /* ... */ - 686 : /* ... */ - 687 8 : /* ... */ - 688 8 : /* ... */ - 689 4 : /* ... */ - 690 : /* ... */ - 691 : /* ... */ - 692 : /* ... */ - 693 : /* ... */ - 694 603 : /* ... */ - 695 603 : /* ... */ - 696 : /* ... */ - 697 603 : /* ... */ - 698 : /* ... */ - 699 : /* ... */ - 700 1 : /* ... */ - 701 66836 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 702 : /* (content generated from line coverage data) */ - 703 : /* ... */ - 704 1 : /* ... */ - 705 1 : /* ... */ - 706 : /* ... */ - 707 : /* ... */ - 708 1 : /* ... */ - 709 545 : /* ... */ - 710 8 : /* ... */ - 711 : /* ... */ - 712 : /* ... */ - 713 537 : /* ... */ - 714 537 : /* ... */ - 715 537 : /* ... */ - 716 4 : /* ... */ - 717 : /* ... */ - 718 : /* ... */ - 719 533 : /* ... */ - 720 : /* ... */ - 721 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 722 1 : /* (content generated from line coverage data) */ - 723 529 : /* ... */ - 724 408 : /* ... */ - 725 4 : /* ... */ - 726 : /* ... */ - 727 404 : /* ... */ - 728 13 : /* ... */ - 729 : /* ... */ - 730 : /* ... */ - 731 512 : /* ... */ - 732 : /* ... */ - 733 : /* ... */ - 734 1 : /* ... */ - 735 529 : /* ... */ - 736 : /* ... */ - 737 : /* ... */ - 738 : /* ... */ - 739 : /* ... */ - 740 529 : /* ... */ - 741 529 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 742 529 : /* (content generated from line coverage data) */ - 743 : /* ... */ - 744 : /* ... */ - 745 4 : /* ... */ - 746 : /* ... */ - 747 525 : /* ... */ - 748 : /* ... */ - 749 525 : /* ... */ - 750 : /* ... */ - 751 : /* ... */ - 752 1 : /* ... */ - 753 : /* ... */ - 754 : /* ... */ - 755 : /* ... */ - 756 : /* ... */ - 757 20 : /* ... */ - 758 20 : /* ... */ - 759 20 : /* ... */ - 760 0 : /* ... */ - 761 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 762 : /* (content generated from line coverage data) */ - 763 20 : /* ... */ - 764 20 : /* ... */ - 765 : /* ... */ - 766 20 : /* ... */ - 767 : /* ... */ - 768 : /* ... */ - 769 1 : /* ... */ - 770 : /* ... */ - 771 : /* ... */ - 772 : /* ... */ - 773 : /* ... */ - 774 : /* ... */ - 775 547 : /* ... */ - 776 547 : /* ... */ - 777 547 : /* ... */ - 778 : /* ... */ - 779 : /* ... */ - 780 1 : /* ... */ - 781 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 782 : /* (content generated from line coverage data) */ - 783 : /* ... */ - 784 : /* ... */ - 785 22064 : /* ... */ - 786 22064 : /* ... */ - 787 549 : /* ... */ - 788 549 : /* ... */ - 789 : /* ... */ - 790 : /* ... */ - 791 22064 : /* ... */ - 792 : /* ... */ - 793 : /* ... */ - 794 1 : /* ... */ - 795 527 : /* ... */ - 796 527 : /* ... */ - 797 527 : /* ... */ - 798 523 : /* ... */ - 799 523 : /* ... */ - 800 : /* ... */ - 801 523 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 802 523 : /* (content generated from line coverage data) */ - 803 523 : /* ... */ - 804 : /* ... */ - 805 523 : /* ... */ - 806 0 : /* ... */ - 807 : /* ... */ - 808 : /* ... */ - 809 : /* ... */ - 810 : /* ... */ - 811 1 : /* ... */ - 812 : /* ... */ - 813 : /* ... */ - 814 : /* ... */ - 815 : /* ... */ - 816 : /* ... */ - 817 : /* ... */ - 818 20 : /* ... */ - 819 20 : /* ... */ - 820 20 : /* ... */ - 821 20 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 822 20 : /* (content generated from line coverage data) */ - 823 : /* ... */ - 824 20 : /* ... */ - 825 20 : /* ... */ - 826 20 : /* ... */ - 827 : /* ... */ - 828 20 : /* ... */ - 829 0 : /* ... */ - 830 : /* ... */ - 831 : /* ... */ - 832 : /* ... */ - 833 : /* ... */ - 834 1 : /* ... */ - 835 : /* ... */ - 836 : /* ... */ - 837 : /* ... */ - 838 : /* ... */ - 839 : /* ... */ - 840 529 : /* ... */ - 841 527 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 842 527 : /* (content generated from line coverage data) */ - 843 : /* ... */ - 844 : /* ... */ - 845 1 : /* ... */ - 846 : /* ... */ - 847 : /* ... */ - 848 : /* ... */ - 849 : /* ... */ - 850 : /* ... */ - 851 20 : /* ... */ - 852 20 : /* ... */ - 853 20 : /* ... */ - 854 : /* ... */ - 855 : /* ... */ - 856 1 : /* ... */ - 857 : /* ... */ - 858 : /* ... */ - 859 : /* ... */ - 860 : /* ... */ - 861 21784 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 862 21784 : /* (content generated from line coverage data) */ - 863 : /* ... */ - 864 21784 : /* ... */ - 865 21784 : /* ... */ - 866 529 : /* ... */ - 867 : /* ... */ - 868 : /* ... */ - 869 21782 : /* ... */ - 870 : /* ... */ - 871 : /* ... */ - 872 1 : /* ... */ - 873 : /* ... */ - 874 : /* ... */ - 875 : /* ... */ - 876 : /* ... */ - 877 280 : /* ... */ - 878 : /* ... */ - 879 280 : /* ... */ - 880 : /* ... */ - 881 280 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 882 280 : /* (content generated from line coverage data) */ - 883 20 : /* ... */ - 884 : /* ... */ - 885 : /* ... */ - 886 280 : /* ... */ - 887 : /* ... */ - 888 : /* ... */ - 889 1 : /* ... */ - 890 : /* ... */ - 891 : /* ... */ - 892 : /* ... */ - 893 : /* ... */ - 894 19044 : /* ... */ - 895 19044 : /* ... */ - 896 19044 : /* ... */ - 897 0 : /* ... */ - 898 : /* ... */ - 899 : /* ... */ - 900 19044 : /* ... */ - 901 19044 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 902 19043 : /* (content generated from line coverage data) */ - 903 3 : /* ... */ - 904 : /* ... */ - 905 19040 : /* ... */ - 906 133 : /* ... */ - 907 : /* ... */ - 908 18907 : /* ... */ - 909 18907 : /* ... */ - 910 : /* ... */ - 911 : /* ... */ - 912 : /* ... */ - 913 19040 : /* ... */ - 914 19040 : /* ... */ - 915 : /* ... */ - 916 19040 : /* ... */ - 917 1 : /* ... */ - 918 : /* ... */ - 919 : /* ... */ - 920 : /* ... */ - 921 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 922 2739 : /* (content generated from line coverage data) */ - 923 2739 : /* ... */ - 924 2739 : /* ... */ - 925 0 : /* ... */ - 926 : /* ... */ - 927 : /* ... */ - 928 2739 : /* ... */ - 929 2739 : /* ... */ - 930 2738 : /* ... */ - 931 2738 : /* ... */ - 932 : /* ... */ - 933 2738 : /* ... */ - 934 : /* ... */ - 935 : /* ... */ - 936 2 : /* ... */ - 937 2 : /* ... */ - 938 2 : /* ... */ - 939 2 : /* ... */ - 940 2 : /* ... */ - 941 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 942 : /* (content generated from line coverage data) */ - 943 : /* ... */ - 944 2 : /* ... */ - 945 : /* ... */ - 946 : /* ... */ - 947 2736 : /* ... */ - 948 : /* ... */ - 949 1366 : /* ... */ - 950 : /* ... */ - 951 1370 : /* ... */ - 952 : /* ... */ - 953 1370 : /* ... */ - 954 : /* ... */ - 955 : /* ... */ - 956 : /* ... */ - 957 2736 : /* ... */ - 958 2736 : /* ... */ - 959 : /* ... */ - 960 2736 : /* ... */ - 961 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 962 2729 : /* (content generated from line coverage data) */ - 963 2729 : /* ... */ - 964 0 : /* ... */ - 965 : /* ... */ - 966 : /* ... */ - 967 2729 : /* ... */ - 968 2729 : /* ... */ - 969 1 : /* ... */ - 970 : /* ... */ - 971 : /* ... */ - 972 : /* ... */ - 973 1 : /* ... */ - 974 108 : /* ... */ - 975 108 : /* ... */ - 976 : /* ... */ - 977 : /* ... */ - 978 0 : /* ... */ - 979 : /* ... */ - 980 108 : /* ... */ - 981 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 982 108 : /* (content generated from line coverage data) */ - 983 : /* ... */ - 984 : /* ... */ - 985 1 : /* ... */ - 986 281 : /* ... */ - 987 281 : /* ... */ - 988 281 : /* ... */ - 989 0 : /* ... */ - 990 : /* ... */ - 991 281 : /* ... */ - 992 : /* ... */ - 993 281 : /* ... */ - 994 1 : /* ... */ - 995 : /* ... */ - 996 : /* ... */ - 997 280 : /* ... */ - 998 279 : /* ... */ - 999 279 : /* ... */ - 1000 279 : /* ... */ - 1001 3 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1002 : /* (content generated from line coverage data) */ - 1003 : /* ... */ - 1004 279 : /* ... */ - 1005 : /* ... */ - 1006 279 : /* ... */ - 1007 : /* ... */ - 1008 : /* ... */ - 1009 : /* ... */ - 1010 1 : /* ... */ - 1011 76 : /* ... */ - 1012 153 : /* ... */ - 1013 135 : /* ... */ - 1014 : /* ... */ - 1015 : /* ... */ - 1016 : /* ... */ - 1017 : /* ... */ - 1018 1 : /* ... */ - 1019 57 : /* ... */ - 1020 108 : /* ... */ - 1021 104 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1022 104 : /* (content generated from line coverage data) */ - 1023 : /* ... */ - 1024 : /* ... */ - 1025 : /* ... */ - 1026 : /* ... */ - 1027 1 : /* ... */ - 1028 133 : /* ... */ - 1029 133 : /* ... */ - 1030 133 : /* ... */ - 1031 133 : /* ... */ - 1032 133 : /* ... */ - 1033 133 : /* ... */ - 1034 133 : /* ... */ - 1035 133 : /* ... */ - 1036 : /* ... */ - 1037 133 : /* ... */ - 1038 : /* ... */ - 1039 133 : /* ... */ - 1040 57 : /* ... */ - 1041 57 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1042 57 : /* (content generated from line coverage data) */ - 1043 : /* ... */ - 1044 : /* ... */ - 1045 57 : /* ... */ - 1046 57 : /* ... */ - 1047 : /* ... */ - 1048 : /* ... */ - 1049 133 : /* ... */ - 1050 261 : /* ... */ - 1051 261 : /* ... */ - 1052 261 : /* ... */ - 1053 3 : /* ... */ - 1054 : /* ... */ - 1055 : /* ... */ - 1056 : /* ... */ - 1057 133 : /* ... */ - 1058 : /* ... */ - 1059 133 : /* ... */ - 1060 76 : /* ... */ - 1061 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1062 57 : /* (content generated from line coverage data) */ - 1063 : /* ... */ - 1064 : /* ... */ - 1065 : /* ... */ - 1066 1 : /* ... */ - 1067 : /* ... */ - 1068 4 : /* ... */ - 1069 4 : /* ... */ - 1070 0 : /* ... */ - 1071 : /* ... */ - 1072 : /* ... */ - 1073 4 : /* ... */ - 1074 4 : /* ... */ - 1075 : /* ... */ - 1076 4 : /* ... */ - 1077 : /* ... */ - 1078 : /* ... */ - 1079 4 : /* ... */ - 1080 : /* ... */ - 1081 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1082 4 : /* (content generated from line coverage data) */ - 1083 4 : /* ... */ - 1084 : /* ... */ - 1085 : /* ... */ - 1086 1 : /* ... */ - 1087 17 : /* ... */ - 1088 17 : /* ... */ - 1089 17 : /* ... */ - 1090 12 : /* ... */ - 1091 : /* ... */ - 1092 17 : /* ... */ - 1093 17 : /* ... */ - 1094 : /* ... */ - 1095 : /* ... */ - 1096 : /* ... */ - 1097 1 : /* ... */ - 1098 17 : /* ... */ - 1099 17 : /* ... */ - 1100 : /* ... */ - 1101 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1102 1 : /* (content generated from line coverage data) */ - 1103 27 : /* ... */ - 1104 27 : /* ... */ - 1105 27 : /* ... */ - 1106 27 : /* ... */ - 1107 6 : /* ... */ - 1108 6 : /* ... */ - 1109 : /* ... */ - 1110 27 : /* ... */ - 1111 12 : /* ... */ - 1112 12 : /* ... */ - 1113 : /* ... */ - 1114 : /* ... */ - 1115 27 : /* ... */ - 1116 27 : /* ... */ - 1117 17 : /* ... */ - 1118 17 : /* ... */ - 1119 17 : /* ... */ - 1120 17 : /* ... */ - 1121 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1122 : /* (content generated from line coverage data) */ - 1123 27 : /* ... */ - 1124 27 : /* ... */ - 1125 1 : /* ... */ - 1126 1 : /* ... */ - 1127 1 : /* ... */ - 1128 1 : /* ... */ - 1129 : /* ... */ - 1130 : /* ... */ - 1131 27 : /* ... */ - 1132 27 : /* ... */ - 1133 : /* ... */ - 1134 : /* ... */ - 1135 1 : /* ... */ - 1136 28 : /* ... */ - 1137 1 : /* ... */ - 1138 : /* ... */ - 1139 : /* ... */ - 1140 27 : /* ... */ - 1141 27 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1142 27 : /* (content generated from line coverage data) */ - 1143 27 : /* ... */ - 1144 27 : /* ... */ - 1145 27 : /* ... */ - 1146 : /* ... */ - 1147 27 : /* ... */ - 1148 85 : /* ... */ - 1149 85 : /* ... */ - 1150 : /* ... */ - 1151 : /* ... */ - 1152 2 : /* ... */ - 1153 2 : /* ... */ - 1154 1 : /* ... */ - 1155 : /* ... */ - 1156 : /* ... */ - 1157 : /* ... */ - 1158 : /* ... */ - 1159 27 : /* ... */ - 1160 85 : /* ... */ - 1161 85 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1162 85 : /* (content generated from line coverage data) */ - 1163 85 : /* ... */ - 1164 85 : /* ... */ - 1165 85 : /* ... */ - 1166 0 : /* ... */ - 1167 : /* ... */ - 1168 : /* ... */ - 1169 : /* ... */ - 1170 : /* ... */ - 1171 1 : /* ... */ - 1172 1 : /* ... */ - 1173 : /* ... */ - 1174 1 : /* ... */ - 1175 9 : /* ... */ - 1176 4 : /* ... */ - 1177 : /* ... */ - 1178 : /* ... */ - 1179 : /* ... */ - 1180 1 : /* ... */ - 1181 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1182 : /* (content generated from line coverage data) */ - 1183 1 : /* ... */ - 1184 6 : /* ... */ - 1185 6 : /* ... */ - 1186 : /* ... */ - 1187 : /* ... */ - 1188 1 : /* ... */ - 1189 1 : /* ... */ - 1190 : /* ... */ - 1191 : /* ... */ - 1192 1 : /* ... */ - 1193 65678 : /* ... */ - 1194 65678 : /* ... */ - 1195 65678 : /* ... */ - 1196 1 : /* ... */ - 1197 : /* ... */ - 1198 : /* ... */ - 1199 65677 : /* ... */ - 1200 65677 : /* ... */ - 1201 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1202 65677 : /* (content generated from line coverage data) */ - 1203 : /* ... */ - 1204 : /* ... */ - 1205 129 : /* ... */ - 1206 : /* ... */ - 1207 : /* ... */ - 1208 65677 : /* ... */ - 1209 65677 : /* ... */ - 1210 65677 : /* ... */ - 1211 65677 : /* ... */ - 1212 65677 : /* ... */ - 1213 65677 : /* ... */ - 1214 : /* ... */ - 1215 65677 : /* ... */ - 1216 6 : /* ... */ - 1217 6 : /* ... */ - 1218 1 : /* ... */ - 1219 1 : /* ... */ - 1220 : /* ... */ - 1221 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1222 1 : /* (content generated from line coverage data) */ - 1223 1 : /* ... */ - 1224 2 : /* ... */ - 1225 : /* ... */ - 1226 : /* ... */ - 1227 1 : /* ... */ - 1228 : /* ... */ - 1229 : /* ... */ - 1230 5 : /* ... */ - 1231 8 : /* ... */ - 1232 8 : /* ... */ - 1233 8 : /* ... */ - 1234 8 : /* ... */ - 1235 6 : /* ... */ - 1236 : /* ... */ - 1237 : /* ... */ - 1238 8 : /* ... */ - 1239 : /* ... */ - 1240 : /* ... */ - 1241 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1242 : /* (content generated from line coverage data) */ - 1243 65677 : /* ... */ - 1244 : /* ... */ - 1245 65677 : /* ... */ - 1246 10 : /* ... */ - 1247 10 : /* ... */ - 1248 10 : /* ... */ - 1249 10 : /* ... */ - 1250 10 : /* ... */ - 1251 13 : /* ... */ - 1252 13 : /* ... */ - 1253 13 : /* ... */ - 1254 13 : /* ... */ - 1255 : /* ... */ - 1256 13 : /* ... */ - 1257 24 : /* ... */ - 1258 : /* ... */ - 1259 : /* ... */ - 1260 19 : /* ... */ - 1261 19 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1262 19 : /* (content generated from line coverage data) */ - 1263 : /* ... */ - 1264 : /* ... */ - 1265 15 : /* ... */ - 1266 15 : /* ... */ - 1267 15 : /* ... */ - 1268 15 : /* ... */ - 1269 5 : /* ... */ - 1270 13 : /* ... */ - 1271 13 : /* ... */ - 1272 : /* ... */ - 1273 5 : /* ... */ - 1274 : /* ... */ - 1275 10 : /* ... */ - 1276 5 : /* ... */ - 1277 : /* ... */ - 1278 10 : /* ... */ - 1279 10 : /* ... */ - 1280 : /* ... */ - 1281 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1282 : /* (content generated from line coverage data) */ - 1283 13 : /* ... */ - 1284 : /* ... */ - 1285 : /* ... */ - 1286 8 : /* ... */ - 1287 5 : /* ... */ - 1288 : /* ... */ - 1289 8 : /* ... */ - 1290 8 : /* ... */ - 1291 8 : /* ... */ - 1292 : /* ... */ - 1293 : /* ... */ - 1294 10 : /* ... */ - 1295 5 : /* ... */ - 1296 6 : /* ... */ - 1297 17 : /* ... */ - 1298 : /* ... */ - 1299 : /* ... */ - 1300 : /* ... */ - 1301 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1302 10 : /* (content generated from line coverage data) */ - 1303 15 : /* ... */ - 1304 : /* ... */ - 1305 : /* ... */ - 1306 : /* ... */ - 1307 65677 : /* ... */ - 1308 65677 : /* ... */ - 1309 65677 : /* ... */ - 1310 : /* ... */ - 1311 65677 : /* ... */ - 1312 65677 : /* ... */ - 1313 65677 : /* ... */ - 1314 65677 : /* ... */ - 1315 65677 : /* ... */ - 1316 65677 : /* ... */ - 1317 : /* ... */ - 1318 65677 : /* ... */ - 1319 65677 : /* ... */ - 1320 : /* ... */ - 1321 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1322 1 : /* (content generated from line coverage data) */ - 1323 137 : /* ... */ - 1324 : /* ... */ - 1325 : /* ... */ - 1326 1 : /* ... */ - 1327 : /* ... */ - 1328 : /* ... */ - 1329 : /* ... */ - 1330 : /* ... */ - 1331 : /* ... */ - 1332 : /* ... */ - 1333 : /* ... */ - 1334 : /* ... */ - 1335 : /* ... */ - 1336 : /* ... */ - 1337 : /* ... */ - 1338 : /* ... */ - 1339 1 : /* ... */ - 1340 26 : /* ... */ - 1341 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1342 26 : /* (content generated from line coverage data) */ - 1343 26 : /* ... */ - 1344 26 : /* ... */ - 1345 26 : /* ... */ - 1346 4 : /* ... */ - 1347 : /* ... */ - 1348 22 : /* ... */ - 1349 22 : /* ... */ - 1350 22 : /* ... */ - 1351 22 : /* ... */ - 1352 : /* ... */ - 1353 22 : /* ... */ - 1354 22 : /* ... */ - 1355 22 : /* ... */ - 1356 22 : /* ... */ - 1357 : /* ... */ - 1358 22 : /* ... */ - 1359 17 : /* ... */ - 1360 5 : /* ... */ - 1361 3 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1362 3 : /* (content generated from line coverage data) */ - 1363 2 : /* ... */ - 1364 0 : /* ... */ - 1365 0 : /* ... */ - 1366 0 : /* ... */ - 1367 2 : /* ... */ - 1368 1 : /* ... */ - 1369 1 : /* ... */ - 1370 1 : /* ... */ - 1371 1 : /* ... */ - 1372 1 : /* ... */ - 1373 0 : /* ... */ - 1374 0 : /* ... */ - 1375 0 : /* ... */ - 1376 0 : /* ... */ - 1377 0 : /* ... */ - 1378 1 : /* ... */ - 1379 0 : /* ... */ - 1380 0 : /* ... */ - 1381 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1382 0 : /* (content generated from line coverage data) */ - 1383 0 : /* ... */ - 1384 0 : /* ... */ - 1385 1 : /* ... */ - 1386 0 : /* ... */ - 1387 0 : /* ... */ - 1388 0 : /* ... */ - 1389 0 : /* ... */ - 1390 0 : /* ... */ - 1391 0 : /* ... */ - 1392 0 : /* ... */ - 1393 1 : /* ... */ - 1394 0 : /* ... */ - 1395 0 : /* ... */ - 1396 0 : /* ... */ - 1397 0 : /* ... */ - 1398 0 : /* ... */ - 1399 0 : /* ... */ - 1400 0 : /* ... */ - 1401 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1402 : /* (content generated from line coverage data) */ - 1403 : /* ... */ - 1404 22 : /* ... */ - 1405 17 : /* ... */ - 1406 556 : /* ... */ - 1407 556 : /* ... */ - 1408 26 : /* ... */ - 1409 26 : /* ... */ - 1410 26 : /* ... */ - 1411 18 : /* ... */ - 1412 : /* ... */ - 1413 : /* ... */ - 1414 8 : /* ... */ - 1415 8 : /* ... */ - 1416 8 : /* ... */ - 1417 : /* ... */ - 1418 : /* ... */ - 1419 8 : /* ... */ - 1420 8 : /* ... */ - 1421 8 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1422 8 : /* (content generated from line coverage data) */ - 1423 : /* ... */ - 1424 : /* ... */ - 1425 538 : /* ... */ - 1426 538 : /* ... */ - 1427 : /* ... */ - 1428 538 : /* ... */ - 1429 : /* ... */ - 1430 5 : /* ... */ - 1431 3 : /* ... */ - 1432 7 : /* ... */ - 1433 7 : /* ... */ - 1434 3 : /* ... */ - 1435 3 : /* ... */ - 1436 3 : /* ... */ - 1437 3 : /* ... */ - 1438 : /* ... */ - 1439 : /* ... */ - 1440 0 : /* ... */ - 1441 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1442 0 : /* (content generated from line coverage data) */ - 1443 : /* ... */ - 1444 : /* ... */ - 1445 0 : /* ... */ - 1446 0 : /* ... */ - 1447 0 : /* ... */ - 1448 0 : /* ... */ - 1449 0 : /* ... */ - 1450 : /* ... */ - 1451 : /* ... */ - 1452 4 : /* ... */ - 1453 4 : /* ... */ - 1454 : /* ... */ - 1455 4 : /* ... */ - 1456 : /* ... */ - 1457 2 : /* ... */ - 1458 0 : /* ... */ - 1459 0 : /* ... */ - 1460 0 : /* ... */ - 1461 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1462 0 : /* (content generated from line coverage data) */ - 1463 0 : /* ... */ - 1464 0 : /* ... */ - 1465 : /* ... */ - 1466 : /* ... */ - 1467 0 : /* ... */ - 1468 0 : /* ... */ - 1469 0 : /* ... */ - 1470 : /* ... */ - 1471 : /* ... */ - 1472 0 : /* ... */ - 1473 0 : /* ... */ - 1474 0 : /* ... */ - 1475 0 : /* ... */ - 1476 0 : /* ... */ - 1477 0 : /* ... */ - 1478 : /* ... */ - 1479 : /* ... */ - 1480 0 : /* ... */ - 1481 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1482 : /* (content generated from line coverage data) */ - 1483 0 : /* ... */ - 1484 : /* ... */ - 1485 2 : /* ... */ - 1486 1 : /* ... */ - 1487 2 : /* ... */ - 1488 2 : /* ... */ - 1489 1 : /* ... */ - 1490 1 : /* ... */ - 1491 1 : /* ... */ - 1492 1 : /* ... */ - 1493 : /* ... */ - 1494 : /* ... */ - 1495 0 : /* ... */ - 1496 0 : /* ... */ - 1497 0 : /* ... */ - 1498 : /* ... */ - 1499 : /* ... */ - 1500 0 : /* ... */ - 1501 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1502 0 : /* (content generated from line coverage data) */ - 1503 0 : /* ... */ - 1504 0 : /* ... */ - 1505 0 : /* ... */ - 1506 0 : /* ... */ - 1507 : /* ... */ - 1508 : /* ... */ - 1509 1 : /* ... */ - 1510 1 : /* ... */ - 1511 : /* ... */ - 1512 1 : /* ... */ - 1513 : /* ... */ - 1514 1 : /* ... */ - 1515 0 : /* ... */ - 1516 0 : /* ... */ - 1517 0 : /* ... */ - 1518 0 : /* ... */ - 1519 0 : /* ... */ - 1520 0 : /* ... */ - 1521 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1522 : /* (content generated from line coverage data) */ - 1523 : /* ... */ - 1524 0 : /* ... */ - 1525 0 : /* ... */ - 1526 0 : /* ... */ - 1527 : /* ... */ - 1528 : /* ... */ - 1529 0 : /* ... */ - 1530 0 : /* ... */ - 1531 0 : /* ... */ - 1532 0 : /* ... */ - 1533 0 : /* ... */ - 1534 0 : /* ... */ - 1535 0 : /* ... */ - 1536 0 : /* ... */ - 1537 : /* ... */ - 1538 : /* ... */ - 1539 0 : /* ... */ - 1540 0 : /* ... */ - 1541 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1542 0 : /* (content generated from line coverage data) */ - 1543 : /* ... */ - 1544 1 : /* ... */ - 1545 0 : /* ... */ - 1546 0 : /* ... */ - 1547 0 : /* ... */ - 1548 0 : /* ... */ - 1549 0 : /* ... */ - 1550 0 : /* ... */ - 1551 0 : /* ... */ - 1552 : /* ... */ - 1553 : /* ... */ - 1554 0 : /* ... */ - 1555 0 : /* ... */ - 1556 0 : /* ... */ - 1557 : /* ... */ - 1558 : /* ... */ - 1559 0 : /* ... */ - 1560 0 : /* ... */ - 1561 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1562 0 : /* (content generated from line coverage data) */ - 1563 0 : /* ... */ - 1564 0 : /* ... */ - 1565 0 : /* ... */ - 1566 0 : /* ... */ - 1567 0 : /* ... */ - 1568 : /* ... */ - 1569 : /* ... */ - 1570 0 : /* ... */ - 1571 0 : /* ... */ - 1572 : /* ... */ - 1573 0 : /* ... */ - 1574 : /* ... */ - 1575 1 : /* ... */ - 1576 0 : /* ... */ - 1577 0 : /* ... */ - 1578 0 : /* ... */ - 1579 0 : /* ... */ - 1580 0 : /* ... */ - 1581 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1582 0 : /* (content generated from line coverage data) */ - 1583 : /* ... */ - 1584 : /* ... */ - 1585 0 : /* ... */ - 1586 0 : /* ... */ - 1587 0 : /* ... */ - 1588 : /* ... */ - 1589 : /* ... */ - 1590 0 : /* ... */ - 1591 0 : /* ... */ - 1592 0 : /* ... */ - 1593 0 : /* ... */ - 1594 0 : /* ... */ - 1595 0 : /* ... */ - 1596 0 : /* ... */ - 1597 0 : /* ... */ - 1598 0 : /* ... */ - 1599 0 : /* ... */ - 1600 : /* ... */ - 1601 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1602 0 : /* (content generated from line coverage data) */ - 1603 0 : /* ... */ - 1604 : /* ... */ - 1605 0 : /* ... */ - 1606 : /* ... */ - 1607 1 : /* ... */ - 1608 0 : /* ... */ - 1609 0 : /* ... */ - 1610 0 : /* ... */ - 1611 0 : /* ... */ - 1612 0 : /* ... */ - 1613 0 : /* ... */ - 1614 0 : /* ... */ - 1615 : /* ... */ - 1616 : /* ... */ - 1617 0 : /* ... */ - 1618 0 : /* ... */ - 1619 0 : /* ... */ - 1620 : /* ... */ - 1621 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1622 0 : /* (content generated from line coverage data) */ - 1623 0 : /* ... */ - 1624 0 : /* ... */ - 1625 0 : /* ... */ - 1626 0 : /* ... */ - 1627 0 : /* ... */ - 1628 0 : /* ... */ - 1629 0 : /* ... */ - 1630 0 : /* ... */ - 1631 0 : /* ... */ - 1632 0 : /* ... */ - 1633 : /* ... */ - 1634 : /* ... */ - 1635 0 : /* ... */ - 1636 0 : /* ... */ - 1637 : /* ... */ - 1638 0 : /* ... */ - 1639 : /* ... */ - 1640 : /* ... */ - 1641 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1642 1 : /* (content generated from line coverage data) */ - 1643 2 : /* ... */ - 1644 2 : /* ... */ - 1645 1 : /* ... */ - 1646 1 : /* ... */ - 1647 1 : /* ... */ - 1648 1 : /* ... */ - 1649 : /* ... */ - 1650 : /* ... */ - 1651 0 : /* ... */ - 1652 0 : /* ... */ - 1653 0 : /* ... */ - 1654 : /* ... */ - 1655 : /* ... */ - 1656 0 : /* ... */ - 1657 0 : /* ... */ - 1658 0 : /* ... */ - 1659 : /* ... */ - 1660 : /* ... */ - 1661 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1662 1 : /* (content generated from line coverage data) */ - 1663 : /* ... */ - 1664 1 : /* ... */ - 1665 9 : /* ... */ - 1666 : /* ... */ - 1667 : /* ... */ - 1668 1 : /* ... */ - 1669 : /* ... */ - 1670 : /* ... */ - 1671 : /* ... */ - 1672 22 : /* ... */ - 1673 22 : /* ... */ - 1674 : /* ... */ - 1675 : /* ... */ - 1676 1 : /* ... */ - 1677 20 : /* ... */ - 1678 20 : /* ... */ - 1679 19 : /* ... */ - 1680 : /* ... */ - 1681 20 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1682 : /* (content generated from line coverage data) */ - 1683 : /* ... */ - 1684 1 : /* ... */ - 1685 6 : /* ... */ - 1686 6 : /* ... */ - 1687 6 : /* ... */ - 1688 6 : /* ... */ - 1689 3 : /* ... */ - 1690 3 : /* ... */ - 1691 3 : /* ... */ - 1692 : /* ... */ - 1693 3 : /* ... */ - 1694 3 : /* ... */ - 1695 2 : /* ... */ - 1696 2 : /* ... */ - 1697 : /* ... */ - 1698 : /* ... */ - 1699 : /* ... */ - 1700 3 : /* ... */ - 1701 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1702 : /* (content generated from line coverage data) */ - 1703 : /* ... */ - 1704 2 : /* ... */ - 1705 2 : /* ... */ - 1706 0 : /* ... */ - 1707 : /* ... */ - 1708 2 : /* ... */ - 1709 : /* ... */ - 1710 : /* ... */ - 1711 6 : /* ... */ - 1712 : /* ... */ - 1713 : /* ... */ - 1714 1 : /* ... */ - 1715 1 : /* ... */ - 1716 1 : /* ... */ - 1717 1 : /* ... */ - 1718 : /* ... */ - 1719 1 : /* ... */ - 1720 0 : /* ... */ - 1721 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1722 0 : /* (content generated from line coverage data) */ - 1723 : /* ... */ - 1724 0 : /* ... */ - 1725 0 : /* ... */ - 1726 0 : /* ... */ - 1727 0 : /* ... */ - 1728 : /* ... */ - 1729 : /* ... */ - 1730 : /* ... */ - 1731 0 : /* ... */ - 1732 : /* ... */ - 1733 : /* ... */ - 1734 : /* ... */ - 1735 0 : /* ... */ - 1736 0 : /* ... */ - 1737 0 : /* ... */ - 1738 : /* ... */ - 1739 0 : /* ... */ - 1740 : /* ... */ - 1741 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1742 1 : /* (content generated from line coverage data) */ - 1743 : /* ... */ - 1744 : /* ... */ - 1745 : /* ... */ - 1746 : /* ... */ - 1747 : /* ... */ - 1748 1 : /* ... */ - 1749 5 : /* ... */ - 1750 : /* ... */ - 1751 : /* ... */ - 1752 1 : /* ... */ - 1753 6 : /* ... */ - 1754 6 : /* ... */ - 1755 6 : /* ... */ - 1756 1 : /* ... */ - 1757 : /* ... */ - 1758 5 : /* ... */ - 1759 : /* ... */ - 1760 : /* ... */ - 1761 6 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1762 6 : /* (content generated from line coverage data) */ - 1763 : /* ... */ - 1764 6 : /* ... */ - 1765 6 : /* ... */ - 1766 6 : /* ... */ - 1767 : /* ... */ - 1768 6 : /* ... */ - 1769 6 : /* ... */ - 1770 6 : /* ... */ - 1771 6 : /* ... */ - 1772 6 : /* ... */ - 1773 6 : /* ... */ - 1774 6 : /* ... */ - 1775 : /* ... */ - 1776 6 : /* ... */ - 1777 : /* ... */ - 1778 : /* ... */ - 1779 6 : /* ... */ - 1780 6 : /* ... */ - 1781 6 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1782 6 : /* (content generated from line coverage data) */ - 1783 6 : /* ... */ - 1784 : /* ... */ - 1785 6 : /* ... */ - 1786 6 : /* ... */ - 1787 6 : /* ... */ - 1788 6 : /* ... */ - 1789 : /* ... */ - 1790 : /* ... */ - 1791 6 : /* ... */ - 1792 6 : /* ... */ - 1793 6 : /* ... */ - 1794 6 : /* ... */ - 1795 : /* ... */ - 1796 6 : /* ... */ - 1797 6 : /* ... */ - 1798 6 : /* ... */ - 1799 6 : /* ... */ - 1800 : /* ... */ - 1801 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1802 6 : /* (content generated from line coverage data) */ - 1803 4 : /* ... */ - 1804 : /* ... */ - 1805 : /* ... */ - 1806 6 : /* ... */ - 1807 1 : /* ... */ - 1808 1 : /* ... */ - 1809 1 : /* ... */ - 1810 1 : /* ... */ - 1811 : /* ... */ - 1812 : /* ... */ - 1813 6 : /* ... */ - 1814 6 : /* ... */ - 1815 : /* ... */ - 1816 6 : /* ... */ - 1817 6 : /* ... */ - 1818 : /* ... */ - 1819 6 : /* ... */ - 1820 11 : /* ... */ - 1821 11 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1822 11 : /* (content generated from line coverage data) */ - 1823 1 : /* ... */ - 1824 : /* ... */ - 1825 10 : /* ... */ - 1826 10 : /* ... */ - 1827 10 : /* ... */ - 1828 10 : /* ... */ - 1829 10 : /* ... */ - 1830 6 : /* ... */ - 1831 4 : /* ... */ - 1832 4 : /* ... */ - 1833 4 : /* ... */ - 1834 0 : /* ... */ - 1835 0 : /* ... */ - 1836 0 : /* ... */ - 1837 0 : /* ... */ - 1838 0 : /* ... */ - 1839 0 : /* ... */ - 1840 0 : /* ... */ - 1841 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1842 0 : /* (content generated from line coverage data) */ - 1843 0 : /* ... */ - 1844 0 : /* ... */ - 1845 0 : /* ... */ - 1846 0 : /* ... */ - 1847 0 : /* ... */ - 1848 0 : /* ... */ - 1849 0 : /* ... */ - 1850 0 : /* ... */ - 1851 0 : /* ... */ - 1852 0 : /* ... */ - 1853 0 : /* ... */ - 1854 0 : /* ... */ - 1855 0 : /* ... */ - 1856 0 : /* ... */ - 1857 0 : /* ... */ - 1858 0 : /* ... */ - 1859 0 : /* ... */ - 1860 0 : /* ... */ - 1861 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1862 0 : /* (content generated from line coverage data) */ - 1863 0 : /* ... */ - 1864 0 : /* ... */ - 1865 0 : /* ... */ - 1866 0 : /* ... */ - 1867 0 : /* ... */ - 1868 0 : /* ... */ - 1869 0 : /* ... */ - 1870 0 : /* ... */ - 1871 0 : /* ... */ - 1872 0 : /* ... */ - 1873 : /* ... */ - 1874 : /* ... */ - 1875 10 : /* ... */ - 1876 : /* ... */ - 1877 : /* ... */ - 1878 6 : /* ... */ - 1879 5 : /* ... */ - 1880 11 : /* ... */ - 1881 11 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1882 6 : /* (content generated from line coverage data) */ - 1883 6 : /* ... */ - 1884 6 : /* ... */ - 1885 6 : /* ... */ - 1886 : /* ... */ - 1887 : /* ... */ - 1888 0 : /* ... */ - 1889 0 : /* ... */ - 1890 0 : /* ... */ - 1891 : /* ... */ - 1892 : /* ... */ - 1893 0 : /* ... */ - 1894 0 : /* ... */ - 1895 0 : /* ... */ - 1896 0 : /* ... */ - 1897 : /* ... */ - 1898 : /* ... */ - 1899 5 : /* ... */ - 1900 5 : /* ... */ - 1901 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1902 5 : /* (content generated from line coverage data) */ - 1903 : /* ... */ - 1904 1 : /* ... */ - 1905 1 : /* ... */ - 1906 8 : /* ... */ - 1907 8 : /* ... */ - 1908 4 : /* ... */ - 1909 4 : /* ... */ - 1910 4 : /* ... */ - 1911 4 : /* ... */ - 1912 : /* ... */ - 1913 : /* ... */ - 1914 0 : /* ... */ - 1915 0 : /* ... */ - 1916 0 : /* ... */ - 1917 : /* ... */ - 1918 : /* ... */ - 1919 0 : /* ... */ - 1920 0 : /* ... */ - 1921 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1922 0 : /* (content generated from line coverage data) */ - 1923 0 : /* ... */ - 1924 : /* ... */ - 1925 : /* ... */ - 1926 4 : /* ... */ - 1927 4 : /* ... */ - 1928 : /* ... */ - 1929 4 : /* ... */ - 1930 : /* ... */ - 1931 0 : /* ... */ - 1932 0 : /* ... */ - 1933 0 : /* ... */ - 1934 0 : /* ... */ - 1935 0 : /* ... */ - 1936 0 : /* ... */ - 1937 0 : /* ... */ - 1938 0 : /* ... */ - 1939 : /* ... */ - 1940 : /* ... */ - 1941 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1942 0 : /* (content generated from line coverage data) */ - 1943 0 : /* ... */ - 1944 : /* ... */ - 1945 : /* ... */ - 1946 0 : /* ... */ - 1947 0 : /* ... */ - 1948 0 : /* ... */ - 1949 0 : /* ... */ - 1950 0 : /* ... */ - 1951 0 : /* ... */ - 1952 : /* ... */ - 1953 : /* ... */ - 1954 0 : /* ... */ - 1955 0 : /* ... */ - 1956 : /* ... */ - 1957 0 : /* ... */ - 1958 : /* ... */ - 1959 0 : /* ... */ - 1960 0 : /* ... */ - 1961 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1962 0 : /* (content generated from line coverage data) */ - 1963 0 : /* ... */ - 1964 0 : /* ... */ - 1965 0 : /* ... */ - 1966 0 : /* ... */ - 1967 : /* ... */ - 1968 : /* ... */ - 1969 0 : /* ... */ - 1970 0 : /* ... */ - 1971 0 : /* ... */ - 1972 : /* ... */ - 1973 : /* ... */ - 1974 0 : /* ... */ - 1975 0 : /* ... */ - 1976 0 : /* ... */ - 1977 0 : /* ... */ - 1978 0 : /* ... */ - 1979 0 : /* ... */ - 1980 0 : /* ... */ - 1981 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 1982 : /* (content generated from line coverage data) */ - 1983 0 : /* ... */ - 1984 0 : /* ... */ - 1985 : /* ... */ - 1986 0 : /* ... */ - 1987 : /* ... */ - 1988 0 : /* ... */ - 1989 0 : /* ... */ - 1990 0 : /* ... */ - 1991 0 : /* ... */ - 1992 0 : /* ... */ - 1993 0 : /* ... */ - 1994 0 : /* ... */ - 1995 0 : /* ... */ - 1996 : /* ... */ - 1997 : /* ... */ - 1998 0 : /* ... */ - 1999 0 : /* ... */ - 2000 0 : /* ... */ - 2001 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2002 : /* (content generated from line coverage data) */ - 2003 0 : /* ... */ - 2004 0 : /* ... */ - 2005 0 : /* ... */ - 2006 0 : /* ... */ - 2007 0 : /* ... */ - 2008 0 : /* ... */ - 2009 0 : /* ... */ - 2010 0 : /* ... */ - 2011 : /* ... */ - 2012 : /* ... */ - 2013 0 : /* ... */ - 2014 0 : /* ... */ - 2015 : /* ... */ - 2016 0 : /* ... */ - 2017 : /* ... */ - 2018 0 : /* ... */ - 2019 0 : /* ... */ - 2020 0 : /* ... */ - 2021 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2022 0 : /* (content generated from line coverage data) */ - 2023 0 : /* ... */ - 2024 0 : /* ... */ - 2025 0 : /* ... */ - 2026 : /* ... */ - 2027 : /* ... */ - 2028 0 : /* ... */ - 2029 0 : /* ... */ - 2030 0 : /* ... */ - 2031 : /* ... */ - 2032 : /* ... */ - 2033 0 : /* ... */ - 2034 0 : /* ... */ - 2035 0 : /* ... */ - 2036 0 : /* ... */ - 2037 0 : /* ... */ - 2038 0 : /* ... */ - 2039 0 : /* ... */ - 2040 0 : /* ... */ - 2041 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2042 : /* (content generated from line coverage data) */ - 2043 : /* ... */ - 2044 0 : /* ... */ - 2045 0 : /* ... */ - 2046 : /* ... */ - 2047 0 : /* ... */ - 2048 : /* ... */ - 2049 0 : /* ... */ - 2050 0 : /* ... */ - 2051 0 : /* ... */ - 2052 0 : /* ... */ - 2053 0 : /* ... */ - 2054 0 : /* ... */ - 2055 0 : /* ... */ - 2056 0 : /* ... */ - 2057 : /* ... */ - 2058 : /* ... */ - 2059 0 : /* ... */ - 2060 0 : /* ... */ - 2061 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2062 : /* (content generated from line coverage data) */ - 2063 : /* ... */ - 2064 0 : /* ... */ - 2065 0 : /* ... */ - 2066 0 : /* ... */ - 2067 0 : /* ... */ - 2068 0 : /* ... */ - 2069 0 : /* ... */ - 2070 0 : /* ... */ - 2071 0 : /* ... */ - 2072 0 : /* ... */ - 2073 0 : /* ... */ - 2074 : /* ... */ - 2075 : /* ... */ - 2076 0 : /* ... */ - 2077 0 : /* ... */ - 2078 : /* ... */ - 2079 0 : /* ... */ - 2080 : /* ... */ - 2081 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2082 0 : /* (content generated from line coverage data) */ - 2083 0 : /* ... */ - 2084 0 : /* ... */ - 2085 0 : /* ... */ - 2086 0 : /* ... */ - 2087 0 : /* ... */ - 2088 0 : /* ... */ - 2089 : /* ... */ - 2090 : /* ... */ - 2091 0 : /* ... */ - 2092 0 : /* ... */ - 2093 0 : /* ... */ - 2094 : /* ... */ - 2095 : /* ... */ - 2096 0 : /* ... */ - 2097 0 : /* ... */ - 2098 0 : /* ... */ - 2099 0 : /* ... */ - 2100 0 : /* ... */ - 2101 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2102 0 : /* (content generated from line coverage data) */ - 2103 0 : /* ... */ - 2104 0 : /* ... */ - 2105 0 : /* ... */ - 2106 0 : /* ... */ - 2107 : /* ... */ - 2108 : /* ... */ - 2109 0 : /* ... */ - 2110 0 : /* ... */ - 2111 : /* ... */ - 2112 0 : /* ... */ - 2113 : /* ... */ - 2114 : /* ... */ - 2115 0 : /* ... */ - 2116 0 : /* ... */ - 2117 0 : /* ... */ - 2118 0 : /* ... */ - 2119 0 : /* ... */ - 2120 0 : /* ... */ - 2121 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2122 0 : /* (content generated from line coverage data) */ - 2123 : /* ... */ - 2124 : /* ... */ - 2125 0 : /* ... */ - 2126 0 : /* ... */ - 2127 0 : /* ... */ - 2128 : /* ... */ - 2129 : /* ... */ - 2130 0 : /* ... */ - 2131 0 : /* ... */ - 2132 0 : /* ... */ - 2133 : /* ... */ - 2134 : /* ... */ - 2135 0 : /* ... */ - 2136 0 : /* ... */ - 2137 : /* ... */ - 2138 0 : /* ... */ - 2139 0 : /* ... */ - 2140 0 : /* ... */ - 2141 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2142 0 : /* (content generated from line coverage data) */ - 2143 0 : /* ... */ - 2144 0 : /* ... */ - 2145 0 : /* ... */ - 2146 : /* ... */ - 2147 : /* ... */ - 2148 0 : /* ... */ - 2149 0 : /* ... */ - 2150 : /* ... */ - 2151 : /* ... */ - 2152 0 : /* ... */ - 2153 : /* ... */ - 2154 : /* ... */ - 2155 : /* ... */ - 2156 6 : /* ... */ - 2157 6 : /* ... */ - 2158 6 : /* ... */ - 2159 6 : /* ... */ - 2160 6 : /* ... */ - 2161 6 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2162 : /* (content generated from line coverage data) */ - 2163 : /* ... */ - 2164 1 : /* ... */ - 2165 1 : /* ... */ - 2166 1 : /* ... */ - 2167 1 : /* ... */ - 2168 1 : /* ... */ - 2169 1 : /* ... */ - 2170 1 : /* ... */ - 2171 1 : /* ... */ - 2172 : /* ... */ - 2173 1 : /* ... */ - 2174 33 : /* ... */ - 2175 33 : /* ... */ - 2176 : /* ... */ - 2177 33 : /* ... */ - 2178 : /* ... */ - 2179 33 : /* ... */ - 2180 : /* ... */ - 2181 33 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2182 33 : /* (content generated from line coverage data) */ - 2183 : /* ... */ - 2184 33 : /* ... */ - 2185 33 : /* ... */ - 2186 33 : /* ... */ - 2187 33 : /* ... */ - 2188 33 : /* ... */ - 2189 : /* ... */ - 2190 33 : /* ... */ - 2191 47 : /* ... */ - 2192 47 : /* ... */ - 2193 7 : /* ... */ - 2194 : /* ... */ - 2195 : /* ... */ - 2196 40 : /* ... */ - 2197 27 : /* ... */ - 2198 : /* ... */ - 2199 : /* ... */ - 2200 : /* ... */ - 2201 26 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2202 0 : /* (content generated from line coverage data) */ - 2203 : /* ... */ - 2204 : /* ... */ - 2205 26 : /* ... */ - 2206 48 : /* ... */ - 2207 48 : /* ... */ - 2208 : /* ... */ - 2209 : /* ... */ - 2210 34 : /* ... */ - 2211 : /* ... */ - 2212 34 : /* ... */ - 2213 : /* ... */ - 2214 34 : /* ... */ - 2215 47 : /* ... */ - 2216 47 : /* ... */ - 2217 0 : /* ... */ - 2218 0 : /* ... */ - 2219 : /* ... */ - 2220 : /* ... */ - 2221 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2222 34 : /* (content generated from line coverage data) */ - 2223 : /* ... */ - 2224 : /* ... */ - 2225 : /* ... */ - 2226 34 : /* ... */ - 2227 34 : /* ... */ - 2228 : /* ... */ - 2229 : /* ... */ - 2230 26 : /* ... */ - 2231 : /* ... */ - 2232 : /* ... */ - 2233 1 : /* ... */ - 2234 4 : /* ... */ - 2235 4 : /* ... */ - 2236 0 : /* ... */ - 2237 : /* ... */ - 2238 : /* ... */ - 2239 4 : /* ... */ - 2240 4 : /* ... */ - 2241 4 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2242 4 : /* (content generated from line coverage data) */ - 2243 4 : /* ... */ - 2244 0 : /* ... */ - 2245 : /* ... */ - 2246 : /* ... */ - 2247 4 : /* ... */ - 2248 4 : /* ... */ - 2249 : /* ... */ - 2250 4 : /* ... */ - 2251 24 : /* ... */ - 2252 24 : /* ... */ - 2253 22 : /* ... */ - 2254 22 : /* ... */ - 2255 8 : /* ... */ - 2256 : /* ... */ - 2257 14 : /* ... */ - 2258 14 : /* ... */ - 2259 14 : /* ... */ - 2260 14 : /* ... */ - 2261 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2262 16 : /* (content generated from line coverage data) */ - 2263 16 : /* ... */ - 2264 : /* ... */ - 2265 : /* ... */ - 2266 : /* ... */ - 2267 1 : /* ... */ - 2268 2 : /* ... */ - 2269 : /* ... */ - 2270 : /* ... */ - 2271 : /* ... */ - 2272 : /* ... */ - 2273 : /* ... */ - 2274 : /* ... */ - 2275 : /* ... */ - 2276 : /* ... */ - 2277 : /* ... */ - 2278 : /* ... */ - 2279 : /* ... */ - 2280 : /* ... */ - 2281 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2282 : /* (content generated from line coverage data) */ - 2283 : /* ... */ - 2284 : /* ... */ - 2285 : /* ... */ - 2286 : /* ... */ - 2287 : /* ... */ - 2288 : /* ... */ - 2289 : /* ... */ - 2290 : /* ... */ - 2291 : /* ... */ - 2292 : /* ... */ - 2293 : /* ... */ - 2294 : /* ... */ - 2295 : /* ... */ - 2296 : /* ... */ - 2297 1 : /* ... */ - 2298 1 : /* ... */ - 2299 : /* ... */ - 2300 1 : /* ... */ - 2301 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2302 1 : /* (content generated from line coverage data) */ - 2303 1 : /* ... */ - 2304 1 : /* ... */ - 2305 1 : /* ... */ - 2306 1 : /* ... */ - 2307 1 : /* ... */ - 2308 1 : /* ... */ - 2309 1 : /* ... */ - 2310 1 : /* ... */ - 2311 1 : /* ... */ - 2312 1 : /* ... */ - 2313 1 : /* ... */ - 2314 1 : /* ... */ - 2315 1 : /* ... */ - 2316 : /* ... */ - 2317 1 : /* ... */ - 2318 72 : /* ... */ - 2319 72 : /* ... */ - 2320 72 : /* ... */ - 2321 72 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2322 72 : /* (content generated from line coverage data) */ - 2323 : /* ... */ - 2324 72 : /* ... */ - 2325 72 : /* ... */ - 2326 72 : /* ... */ - 2327 72 : /* ... */ - 2328 72 : /* ... */ - 2329 72 : /* ... */ - 2330 : /* ... */ - 2331 72 : /* ... */ - 2332 72 : /* ... */ - 2333 : /* ... */ - 2334 72 : /* ... */ - 2335 72 : /* ... */ - 2336 : /* ... */ - 2337 72 : /* ... */ - 2338 : /* ... */ - 2339 72 : /* ... */ - 2340 18432 : /* ... */ - 2341 18432 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2342 : /* (content generated from line coverage data) */ - 2343 : /* ... */ - 2344 72 : /* ... */ - 2345 : /* ... */ - 2346 1008 : /* ... */ - 2347 : /* ... */ - 2348 : /* ... */ - 2349 72 : /* ... */ - 2350 72 : /* ... */ - 2351 72 : /* ... */ - 2352 72 : /* ... */ - 2353 72 : /* ... */ - 2354 72 : /* ... */ - 2355 : /* ... */ - 2356 72 : /* ... */ - 2357 72 : /* ... */ - 2358 72 : /* ... */ - 2359 72 : /* ... */ - 2360 72 : /* ... */ - 2361 72 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2362 72 : /* (content generated from line coverage data) */ - 2363 72 : /* ... */ - 2364 72 : /* ... */ - 2365 72 : /* ... */ - 2366 72 : /* ... */ - 2367 72 : /* ... */ - 2368 : /* ... */ - 2369 72 : /* ... */ - 2370 : /* ... */ - 2371 72 : /* ... */ - 2372 : /* ... */ - 2373 : /* ... */ - 2374 1 : /* ... */ - 2375 : /* ... */ - 2376 : /* ... */ - 2377 : /* ... */ - 2378 : /* ... */ - 2379 : /* ... */ - 2380 : /* ... */ - 2381 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2382 : /* (content generated from line coverage data) */ - 2383 : /* ... */ - 2384 : /* ... */ - 2385 : /* ... */ - 2386 : /* ... */ - 2387 : /* ... */ - 2388 : /* ... */ - 2389 : /* ... */ - 2390 : /* ... */ - 2391 : /* ... */ - 2392 : /* ... */ - 2393 : /* ... */ - 2394 : /* ... */ - 2395 : /* ... */ - 2396 : /* ... */ - 2397 : /* ... */ - 2398 : /* ... */ - 2399 : /* ... */ - 2400 : /* ... */ - 2401 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2402 : /* (content generated from line coverage data) */ - 2403 : /* ... */ - 2404 : /* ... */ - 2405 : /* ... */ - 2406 : /* ... */ - 2407 : /* ... */ - 2408 : /* ... */ - 2409 : /* ... */ - 2410 : /* ... */ - 2411 : /* ... */ - 2412 : /* ... */ - 2413 : /* ... */ - 2414 : /* ... */ - 2415 : /* ... */ - 2416 : /* ... */ - 2417 : /* ... */ - 2418 : /* ... */ - 2419 : /* ... */ - 2420 : /* ... */ - 2421 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2422 : /* (content generated from line coverage data) */ - 2423 : /* ... */ - 2424 : /* ... */ - 2425 : /* ... */ - 2426 : /* ... */ - 2427 : /* ... */ - 2428 : /* ... */ - 2429 : /* ... */ - 2430 : /* ... */ - 2431 : /* ... */ - 2432 : /* ... */ - 2433 : /* ... */ - 2434 : /* ... */ - 2435 : /* ... */ - 2436 : /* ... */ - 2437 : /* ... */ - 2438 : /* ... */ - 2439 : /* ... */ - 2440 : /* ... */ - 2441 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2442 : /* (content generated from line coverage data) */ - 2443 : /* ... */ - 2444 : /* ... */ - 2445 : /* ... */ - 2446 : /* ... */ - 2447 : /* ... */ - 2448 : /* ... */ - 2449 : /* ... */ - 2450 : /* ... */ - 2451 : /* ... */ - 2452 : /* ... */ - 2453 : /* ... */ - 2454 : /* ... */ - 2455 : /* ... */ - 2456 : /* ... */ - 2457 : /* ... */ - 2458 : /* ... */ - 2459 : /* ... */ - 2460 : /* ... */ - 2461 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2462 : /* (content generated from line coverage data) */ - 2463 : /* ... */ - 2464 : /* ... */ - 2465 : /* ... */ - 2466 : /* ... */ - 2467 : /* ... */ - 2468 : /* ... */ - 2469 : /* ... */ - 2470 : /* ... */ - 2471 : /* ... */ - 2472 : /* ... */ - 2473 : /* ... */ - 2474 : /* ... */ - 2475 : /* ... */ - 2476 : /* ... */ - 2477 : /* ... */ - 2478 : /* ... */ - 2479 : /* ... */ - 2480 : /* ... */ - 2481 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2482 : /* (content generated from line coverage data) */ - 2483 : /* ... */ - 2484 : /* ... */ - 2485 1 : /* ... */ - 2486 1 : /* ... */ - 2487 1 : /* ... */ - 2488 : /* ... */ - 2489 1 : /* ... */ - 2490 1 : /* ... */ - 2491 1 : /* ... */ - 2492 1 : /* ... */ - 2493 1 : /* ... */ - 2494 1 : /* ... */ - 2495 1 : /* ... */ - 2496 1 : /* ... */ - 2497 1 : /* ... */ - 2498 1 : /* ... */ - 2499 1 : /* ... */ - 2500 1 : /* ... */ - 2501 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2502 : /* (content generated from line coverage data) */ - 2503 1 : /* ... */ - 2504 : /* ... */ - 2505 : /* ... */ - 2506 1 : /* ... */ - 2507 1 : /* ... */ - 2508 1 : /* ... */ - 2509 1 : /* ... */ - 2510 : /* ... */ - 2511 1 : /* ... */ - 2512 : /* ... */ - 2513 1 : /* ... */ - 2514 1 : /* ... */ - 2515 1 : /* ... */ - 2516 1 : /* ... */ - 2517 : /* ... */ - 2518 1 : /* ... */ - 2519 1 : /* ... */ - 2520 1 : /* ... */ - 2521 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2522 1 : /* (content generated from line coverage data) */ - 2523 1 : /* ... */ - 2524 1 : /* ... */ - 2525 1 : /* ... */ - 2526 1 : /* ... */ - 2527 1 : /* ... */ - 2528 1 : /* ... */ - 2529 1 : /* ... */ - 2530 1 : /* ... */ - 2531 1 : /* ... */ - 2532 1 : /* ... */ - 2533 : /* ... */ - 2534 1 : /* ... */ - 2535 : /* ... */ - 2536 1 : /* ... */ - 2537 1 : /* ... */ - 2538 1 : /* ... */ - 2539 1 : /* ... */ - 2540 1 : /* ... */ - 2541 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/jecs.luau not found */ - 2542 1 : /* (content generated from line coverage data) */ - 2543 1 : /* ... */ - 2544 1 : /* ... */ - 2545 1 : /* ... */ - 2546 1 : /* ... */ - 2547 1 : /* ... */ - 2548 : /* ... */ - 2549 1 : /* ... */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
tests.luau | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
tests.luau | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
tests.luau - | -
-
|
- 97.9 % | -1227 | -1201 | -83.6 % | -67 | -56 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
gray:58 | - -0 | - - -
green:38 | - -0 | - - -
green_highlight:54 | - -0 | - - -
name:116 | - -0 | - - -
pe:63 | - -0 | - - -
pp:68 | - -0 | - - -
red:42 | - -0 | - - -
red_highlight:50 | - -0 | - - -
white:34 | - -0 | - - -
white_underline:30 | - -0 | - - -
yellow:46 | - -0 | - - -
<anonymous>:1030 | - -1 | - - -
<anonymous>:1058 | - -1 | - - -
<anonymous>:1095 | - -1 | - - -
<anonymous>:1160 | - -1 | - - -
<anonymous>:1191 | - -1 | - - -
<anonymous>:120 | - -1 | - - -
<anonymous>:1210 | - -1 | - - -
<anonymous>:1221 | - -1 | - - -
<anonymous>:1229 | - -1 | - - -
<anonymous>:1306 | - -1 | - - -
<anonymous>:1311 | - -1 | - - -
<anonymous>:1351 | - -1 | - - -
<anonymous>:136 | - -1 | - - -
<anonymous>:1372 | - -1 | - - -
<anonymous>:1399 | - -1 | - - -
<anonymous>:1428 | - -1 | - - -
<anonymous>:1526 | - -1 | - - -
<anonymous>:1538 | - -1 | - - -
<anonymous>:1543 | - -1 | - - -
<anonymous>:1554 | - -1 | - - -
<anonymous>:1568 | - -1 | - - -
<anonymous>:1584 | - -1 | - - -
<anonymous>:1598 | - -1 | - - -
<anonymous>:1657 | - -1 | - - -
<anonymous>:1707 | - -1 | - - -
<anonymous>:174 | - -1 | - - -
<anonymous>:1776 | - -1 | - - -
<anonymous>:1784 | - -1 | - - -
<anonymous>:1806 | - -1 | - - -
<anonymous>:1826 | - -1 | - - -
<anonymous>:187 | - -1 | - - -
<anonymous>:192 | - -1 | - - -
<anonymous>:243 | - -1 | - - -
<anonymous>:259 | - -1 | - - -
<anonymous>:315 | - -1 | - - -
<anonymous>:389 | - -1 | - - -
<anonymous>:438 | - -1 | - - -
<anonymous>:449 | - -1 | - - -
<anonymous>:456 | - -1 | - - -
<anonymous>:478 | - -1 | - - -
<anonymous>:517 | - -1 | - - -
<anonymous>:575 | - -1 | - - -
<anonymous>:599 | - -1 | - - -
<anonymous>:899 | - -1 | - - -
<main> | - -1 | - - -
columns:86 | - -1 | - - -
records:83 | - -1 | - - -
tuple:94 | - -1 | - - -
getTargets:195 | - -2 | - - -
updateCooldowns:1664 | - -2 | - - -
setAttacksAndEats:215 | - -3 | - - -
archetype:80 | - -4 | - - -
row:89 | - -5 | - - -
debug_world_inspect:73 | - -7 | - - -
tbl:77 | - -12 | - - -
record:74 | - -17 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<anonymous>:1030 | - -1 | - - -
<anonymous>:1058 | - -1 | - - -
<anonymous>:1095 | - -1 | - - -
<anonymous>:1160 | - -1 | - - -
<anonymous>:1191 | - -1 | - - -
<anonymous>:120 | - -1 | - - -
<anonymous>:1210 | - -1 | - - -
<anonymous>:1221 | - -1 | - - -
<anonymous>:1229 | - -1 | - - -
<anonymous>:1306 | - -1 | - - -
<anonymous>:1311 | - -1 | - - -
<anonymous>:1351 | - -1 | - - -
<anonymous>:136 | - -1 | - - -
<anonymous>:1372 | - -1 | - - -
<anonymous>:1399 | - -1 | - - -
<anonymous>:1428 | - -1 | - - -
<anonymous>:1526 | - -1 | - - -
<anonymous>:1538 | - -1 | - - -
<anonymous>:1543 | - -1 | - - -
<anonymous>:1554 | - -1 | - - -
<anonymous>:1568 | - -1 | - - -
<anonymous>:1584 | - -1 | - - -
<anonymous>:1598 | - -1 | - - -
<anonymous>:1657 | - -1 | - - -
<anonymous>:1707 | - -1 | - - -
<anonymous>:174 | - -1 | - - -
<anonymous>:1776 | - -1 | - - -
<anonymous>:1784 | - -1 | - - -
<anonymous>:1806 | - -1 | - - -
<anonymous>:1826 | - -1 | - - -
<anonymous>:187 | - -1 | - - -
<anonymous>:192 | - -1 | - - -
<anonymous>:243 | - -1 | - - -
<anonymous>:259 | - -1 | - - -
<anonymous>:315 | - -1 | - - -
<anonymous>:389 | - -1 | - - -
<anonymous>:438 | - -1 | - - -
<anonymous>:449 | - -1 | - - -
<anonymous>:456 | - -1 | - - -
<anonymous>:478 | - -1 | - - -
<anonymous>:517 | - -1 | - - -
<anonymous>:575 | - -1 | - - -
<anonymous>:599 | - -1 | - - -
<anonymous>:899 | - -1 | - - -
<main> | - -1 | - - -
archetype:80 | - -4 | - - -
columns:86 | - -1 | - - -
debug_world_inspect:73 | - -7 | - - -
getTargets:195 | - -2 | - - -
gray:58 | - -0 | - - -
green:38 | - -0 | - - -
green_highlight:54 | - -0 | - - -
name:116 | - -0 | - - -
pe:63 | - -0 | - - -
pp:68 | - -0 | - - -
record:74 | - -17 | - - -
records:83 | - -1 | - - -
red:42 | - -0 | - - -
red_highlight:50 | - -0 | - - -
row:89 | - -5 | - - -
setAttacksAndEats:215 | - -3 | - - -
tbl:77 | - -12 | - - -
tuple:94 | - -1 | - - -
updateCooldowns:1664 | - -2 | - - -
white:34 | - -0 | - - -
white_underline:30 | - -0 | - - -
yellow:46 | - -0 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* test/tests.luau not found */ - 2 : /* (content generated from line coverage data) */ - 3 1 : /* ... */ - 4 1 : /* ... */ - 5 1 : /* ... */ - 6 1 : /* ... */ - 7 1 : /* ... */ - 8 1 : /* ... */ - 9 1 : /* ... */ - 10 1 : /* ... */ - 11 1 : /* ... */ - 12 1 : /* ... */ - 13 1 : /* ... */ - 14 1 : /* ... */ - 15 1 : /* ... */ - 16 1 : /* ... */ - 17 : /* ... */ - 18 1 : /* ... */ - 19 1 : /* ... */ - 20 1 : /* ... */ - 21 1 : /* test/tests.luau not found */ - 22 1 : /* (content generated from line coverage data) */ - 23 : /* ... */ - 24 1 : /* ... */ - 25 : /* ... */ - 26 : /* ... */ - 27 : /* ... */ - 28 : /* ... */ - 29 1 : /* ... */ - 30 1 : /* ... */ - 31 0 : /* ... */ - 32 : /* ... */ - 33 : /* ... */ - 34 1 : /* ... */ - 35 0 : /* ... */ - 36 : /* ... */ - 37 : /* ... */ - 38 1 : /* ... */ - 39 0 : /* ... */ - 40 : /* ... */ - 41 : /* test/tests.luau not found */ - 42 1 : /* (content generated from line coverage data) */ - 43 0 : /* ... */ - 44 : /* ... */ - 45 : /* ... */ - 46 1 : /* ... */ - 47 0 : /* ... */ - 48 : /* ... */ - 49 : /* ... */ - 50 1 : /* ... */ - 51 0 : /* ... */ - 52 : /* ... */ - 53 : /* ... */ - 54 1 : /* ... */ - 55 0 : /* ... */ - 56 : /* ... */ - 57 : /* ... */ - 58 1 : /* ... */ - 59 0 : /* ... */ - 60 : /* ... */ - 61 : /* test/tests.luau not found */ - 62 : /* (content generated from line coverage data) */ - 63 1 : /* ... */ - 64 0 : /* ... */ - 65 0 : /* ... */ - 66 : /* ... */ - 67 : /* ... */ - 68 1 : /* ... */ - 69 0 : /* ... */ - 70 0 : /* ... */ - 71 : /* ... */ - 72 : /* ... */ - 73 1 : /* ... */ - 74 7 : /* ... */ - 75 17 : /* ... */ - 76 : /* ... */ - 77 7 : /* ... */ - 78 12 : /* ... */ - 79 : /* ... */ - 80 7 : /* ... */ - 81 4 : /* test/tests.luau not found */ - 82 : /* (content generated from line coverage data) */ - 83 7 : /* ... */ - 84 1 : /* ... */ - 85 : /* ... */ - 86 7 : /* ... */ - 87 1 : /* ... */ - 88 : /* ... */ - 89 7 : /* ... */ - 90 5 : /* ... */ - 91 : /* ... */ - 92 : /* ... */ - 93 : /* ... */ - 94 7 : /* ... */ - 95 1 : /* ... */ - 96 2 : /* ... */ - 97 0 : /* ... */ - 98 : /* ... */ - 99 : /* ... */ - 100 1 : /* ... */ - 101 : /* test/tests.luau not found */ - 102 : /* (content generated from line coverage data) */ - 103 7 : /* ... */ - 104 7 : /* ... */ - 105 7 : /* ... */ - 106 7 : /* ... */ - 107 7 : /* ... */ - 108 7 : /* ... */ - 109 7 : /* ... */ - 110 7 : /* ... */ - 111 : /* ... */ - 112 : /* ... */ - 113 : /* ... */ - 114 1 : /* ... */ - 115 : /* ... */ - 116 1 : /* ... */ - 117 0 : /* ... */ - 118 : /* ... */ - 119 : /* ... */ - 120 1 : /* ... */ - 121 1 : /* test/tests.luau not found */ - 122 1 : /* (content generated from line coverage data) */ - 123 : /* ... */ - 124 1 : /* ... */ - 125 1 : /* ... */ - 126 1 : /* ... */ - 127 1 : /* ... */ - 128 1 : /* ... */ - 129 1 : /* ... */ - 130 1 : /* ... */ - 131 1 : /* ... */ - 132 1 : /* ... */ - 133 : /* ... */ - 134 : /* ... */ - 135 : /* ... */ - 136 1 : /* ... */ - 137 1 : /* ... */ - 138 1 : /* ... */ - 139 1 : /* ... */ - 140 1 : /* ... */ - 141 : /* test/tests.luau not found */ - 142 1 : /* (content generated from line coverage data) */ - 143 1 : /* ... */ - 144 1 : /* ... */ - 145 1 : /* ... */ - 146 : /* ... */ - 147 1 : /* ... */ - 148 1 : /* ... */ - 149 : /* ... */ - 150 1 : /* ... */ - 151 2 : /* ... */ - 152 2 : /* ... */ - 153 2 : /* ... */ - 154 2 : /* ... */ - 155 : /* ... */ - 156 2 : /* ... */ - 157 2 : /* ... */ - 158 2 : /* ... */ - 159 1 : /* ... */ - 160 : /* ... */ - 161 1 : /* test/tests.luau not found */ - 162 : /* (content generated from line coverage data) */ - 163 2 : /* ... */ - 164 2 : /* ... */ - 165 : /* ... */ - 166 : /* ... */ - 167 : /* ... */ - 168 1 : /* ... */ - 169 1 : /* ... */ - 170 : /* ... */ - 171 : /* ... */ - 172 1 : /* ... */ - 173 : /* ... */ - 174 1 : /* ... */ - 175 1 : /* ... */ - 176 1 : /* ... */ - 177 1 : /* ... */ - 178 1 : /* ... */ - 179 1 : /* ... */ - 180 1 : /* ... */ - 181 1 : /* test/tests.luau not found */ - 182 1 : /* (content generated from line coverage data) */ - 183 1 : /* ... */ - 184 1 : /* ... */ - 185 1 : /* ... */ - 186 1 : /* ... */ - 187 1 : /* ... */ - 188 1 : /* ... */ - 189 : /* ... */ - 190 : /* ... */ - 191 : /* ... */ - 192 1 : /* ... */ - 193 1 : /* ... */ - 194 : /* ... */ - 195 1 : /* ... */ - 196 2 : /* ... */ - 197 2 : /* ... */ - 198 2 : /* ... */ - 199 2 : /* ... */ - 200 2 : /* ... */ - 201 2 : /* test/tests.luau not found */ - 202 2 : /* (content generated from line coverage data) */ - 203 2 : /* ... */ - 204 2 : /* ... */ - 205 2 : /* ... */ - 206 : /* ... */ - 207 : /* ... */ - 208 : /* ... */ - 209 2 : /* ... */ - 210 : /* ... */ - 211 : /* ... */ - 212 1 : /* ... */ - 213 1 : /* ... */ - 214 : /* ... */ - 215 1 : /* ... */ - 216 3 : /* ... */ - 217 3 : /* ... */ - 218 : /* ... */ - 219 : /* ... */ - 220 1 : /* ... */ - 221 1 : /* test/tests.luau not found */ - 222 1 : /* (content generated from line coverage data) */ - 223 1 : /* ... */ - 224 1 : /* ... */ - 225 1 : /* ... */ - 226 1 : /* ... */ - 227 1 : /* ... */ - 228 1 : /* ... */ - 229 1 : /* ... */ - 230 : /* ... */ - 231 : /* ... */ - 232 1 : /* ... */ - 233 1 : /* ... */ - 234 : /* ... */ - 235 1 : /* ... */ - 236 1 : /* ... */ - 237 : /* ... */ - 238 1 : /* ... */ - 239 1 : /* ... */ - 240 : /* ... */ - 241 : /* test/tests.luau not found */ - 242 : /* (content generated from line coverage data) */ - 243 1 : /* ... */ - 244 1 : /* ... */ - 245 1 : /* ... */ - 246 : /* ... */ - 247 1 : /* ... */ - 248 1 : /* ... */ - 249 1 : /* ... */ - 250 1 : /* ... */ - 251 1 : /* ... */ - 252 : /* ... */ - 253 1 : /* ... */ - 254 1 : /* ... */ - 255 1 : /* ... */ - 256 1 : /* ... */ - 257 : /* ... */ - 258 : /* ... */ - 259 1 : /* ... */ - 260 1 : /* ... */ - 261 1 : /* test/tests.luau not found */ - 262 1 : /* (content generated from line coverage data) */ - 263 1 : /* ... */ - 264 : /* ... */ - 265 1 : /* ... */ - 266 1 : /* ... */ - 267 1 : /* ... */ - 268 : /* ... */ - 269 1 : /* ... */ - 270 : /* ... */ - 271 1 : /* ... */ - 272 1 : /* ... */ - 273 : /* ... */ - 274 : /* ... */ - 275 1 : /* ... */ - 276 1 : /* ... */ - 277 1 : /* ... */ - 278 : /* ... */ - 279 1 : /* ... */ - 280 : /* ... */ - 281 1 : /* test/tests.luau not found */ - 282 1 : /* (content generated from line coverage data) */ - 283 1 : /* ... */ - 284 : /* ... */ - 285 1 : /* ... */ - 286 1 : /* ... */ - 287 1 : /* ... */ - 288 : /* ... */ - 289 1 : /* ... */ - 290 : /* ... */ - 291 1 : /* ... */ - 292 : /* ... */ - 293 1 : /* ... */ - 294 1 : /* ... */ - 295 1 : /* ... */ - 296 : /* ... */ - 297 1 : /* ... */ - 298 1 : /* ... */ - 299 1 : /* ... */ - 300 1 : /* ... */ - 301 1 : /* test/tests.luau not found */ - 302 1 : /* (content generated from line coverage data) */ - 303 1 : /* ... */ - 304 1 : /* ... */ - 305 1 : /* ... */ - 306 1 : /* ... */ - 307 1 : /* ... */ - 308 1 : /* ... */ - 309 1 : /* ... */ - 310 : /* ... */ - 311 : /* ... */ - 312 1 : /* ... */ - 313 1 : /* ... */ - 314 : /* ... */ - 315 1 : /* ... */ - 316 : /* ... */ - 317 1 : /* ... */ - 318 1 : /* ... */ - 319 1 : /* ... */ - 320 1 : /* ... */ - 321 256 : /* test/tests.luau not found */ - 322 256 : /* (content generated from line coverage data) */ - 323 256 : /* ... */ - 324 : /* ... */ - 325 : /* ... */ - 326 : /* ... */ - 327 1 : /* ... */ - 328 1 : /* ... */ - 329 1 : /* ... */ - 330 1 : /* ... */ - 331 1 : /* ... */ - 332 1 : /* ... */ - 333 1 : /* ... */ - 334 : /* ... */ - 335 : /* ... */ - 336 1 : /* ... */ - 337 1 : /* ... */ - 338 1 : /* ... */ - 339 1 : /* ... */ - 340 1 : /* ... */ - 341 : /* test/tests.luau not found */ - 342 : /* (content generated from line coverage data) */ - 343 1 : /* ... */ - 344 : /* ... */ - 345 1 : /* ... */ - 346 1 : /* ... */ - 347 : /* ... */ - 348 1 : /* ... */ - 349 1 : /* ... */ - 350 : /* ... */ - 351 1 : /* ... */ - 352 1 : /* ... */ - 353 1 : /* ... */ - 354 : /* ... */ - 355 1 : /* ... */ - 356 : /* ... */ - 357 : /* ... */ - 358 1 : /* ... */ - 359 1 : /* ... */ - 360 1 : /* ... */ - 361 1 : /* test/tests.luau not found */ - 362 1 : /* (content generated from line coverage data) */ - 363 1 : /* ... */ - 364 1 : /* ... */ - 365 1 : /* ... */ - 366 1 : /* ... */ - 367 1 : /* ... */ - 368 1 : /* ... */ - 369 1 : /* ... */ - 370 : /* ... */ - 371 : /* ... */ - 372 1 : /* ... */ - 373 1 : /* ... */ - 374 1 : /* ... */ - 375 1 : /* ... */ - 376 65535 : /* ... */ - 377 65535 : /* ... */ - 378 : /* ... */ - 379 1 : /* ... */ - 380 1 : /* ... */ - 381 1 : /* test/tests.luau not found */ - 382 1 : /* (content generated from line coverage data) */ - 383 1 : /* ... */ - 384 1 : /* ... */ - 385 1 : /* ... */ - 386 : /* ... */ - 387 : /* ... */ - 388 : /* ... */ - 389 1 : /* ... */ - 390 1 : /* ... */ - 391 : /* ... */ - 392 1 : /* ... */ - 393 : /* ... */ - 394 1 : /* ... */ - 395 : /* ... */ - 396 1 : /* ... */ - 397 1 : /* ... */ - 398 1 : /* ... */ - 399 : /* ... */ - 400 : /* ... */ - 401 1 : /* test/tests.luau not found */ - 402 1 : /* (content generated from line coverage data) */ - 403 : /* ... */ - 404 1 : /* ... */ - 405 : /* ... */ - 406 : /* ... */ - 407 1 : /* ... */ - 408 1 : /* ... */ - 409 1 : /* ... */ - 410 1 : /* ... */ - 411 1 : /* ... */ - 412 1 : /* ... */ - 413 1 : /* ... */ - 414 : /* ... */ - 415 1 : /* ... */ - 416 1 : /* ... */ - 417 : /* ... */ - 418 1 : /* ... */ - 419 : /* ... */ - 420 1 : /* ... */ - 421 : /* test/tests.luau not found */ - 422 : /* (content generated from line coverage data) */ - 423 : /* ... */ - 424 1 : /* ... */ - 425 1 : /* ... */ - 426 : /* ... */ - 427 1 : /* ... */ - 428 1 : /* ... */ - 429 1 : /* ... */ - 430 1 : /* ... */ - 431 : /* ... */ - 432 1 : /* ... */ - 433 : /* ... */ - 434 1 : /* ... */ - 435 1 : /* ... */ - 436 1 : /* ... */ - 437 : /* ... */ - 438 1 : /* ... */ - 439 1 : /* ... */ - 440 : /* ... */ - 441 : /* test/tests.luau not found */ - 442 1 : /* (content generated from line coverage data) */ - 443 1 : /* ... */ - 444 1 : /* ... */ - 445 1 : /* ... */ - 446 : /* ... */ - 447 1 : /* ... */ - 448 : /* ... */ - 449 1 : /* ... */ - 450 1 : /* ... */ - 451 : /* ... */ - 452 1 : /* ... */ - 453 : /* ... */ - 454 : /* ... */ - 455 : /* ... */ - 456 1 : /* ... */ - 457 : /* ... */ - 458 1 : /* ... */ - 459 1 : /* ... */ - 460 : /* ... */ - 461 1 : /* test/tests.luau not found */ - 462 1 : /* (content generated from line coverage data) */ - 463 : /* ... */ - 464 1 : /* ... */ - 465 : /* ... */ - 466 1 : /* ... */ - 467 1 : /* ... */ - 468 : /* ... */ - 469 : /* ... */ - 470 1 : /* ... */ - 471 1 : /* ... */ - 472 : /* ... */ - 473 1 : /* ... */ - 474 1 : /* ... */ - 475 : /* ... */ - 476 : /* ... */ - 477 : /* ... */ - 478 1 : /* ... */ - 479 : /* ... */ - 480 1 : /* ... */ - 481 1 : /* test/tests.luau not found */ - 482 1 : /* (content generated from line coverage data) */ - 483 1 : /* ... */ - 484 : /* ... */ - 485 1 : /* ... */ - 486 1 : /* ... */ - 487 1 : /* ... */ - 488 1 : /* ... */ - 489 1 : /* ... */ - 490 : /* ... */ - 491 : /* ... */ - 492 : /* ... */ - 493 1 : /* ... */ - 494 : /* ... */ - 495 1 : /* ... */ - 496 : /* ... */ - 497 1 : /* ... */ - 498 : /* ... */ - 499 1 : /* ... */ - 500 1 : /* ... */ - 501 : /* test/tests.luau not found */ - 502 : /* (content generated from line coverage data) */ - 503 1 : /* ... */ - 504 1 : /* ... */ - 505 : /* ... */ - 506 1 : /* ... */ - 507 : /* ... */ - 508 1 : /* ... */ - 509 1 : /* ... */ - 510 : /* ... */ - 511 1 : /* ... */ - 512 1 : /* ... */ - 513 : /* ... */ - 514 : /* ... */ - 515 : /* ... */ - 516 : /* ... */ - 517 1 : /* ... */ - 518 1 : /* ... */ - 519 1 : /* ... */ - 520 1 : /* ... */ - 521 1 : /* test/tests.luau not found */ - 522 1 : /* (content generated from line coverage data) */ - 523 1 : /* ... */ - 524 1 : /* ... */ - 525 1 : /* ... */ - 526 1 : /* ... */ - 527 1 : /* ... */ - 528 : /* ... */ - 529 1 : /* ... */ - 530 1 : /* ... */ - 531 1 : /* ... */ - 532 1 : /* ... */ - 533 : /* ... */ - 534 1 : /* ... */ - 535 1 : /* ... */ - 536 1 : /* ... */ - 537 1 : /* ... */ - 538 : /* ... */ - 539 1 : /* ... */ - 540 1 : /* ... */ - 541 1 : /* test/tests.luau not found */ - 542 : /* (content generated from line coverage data) */ - 543 1 : /* ... */ - 544 1 : /* ... */ - 545 1 : /* ... */ - 546 : /* ... */ - 547 1 : /* ... */ - 548 : /* ... */ - 549 1 : /* ... */ - 550 1 : /* ... */ - 551 1 : /* ... */ - 552 1 : /* ... */ - 553 : /* ... */ - 554 1 : /* ... */ - 555 1 : /* ... */ - 556 1 : /* ... */ - 557 1 : /* ... */ - 558 1 : /* ... */ - 559 1 : /* ... */ - 560 1 : /* ... */ - 561 1 : /* test/tests.luau not found */ - 562 1 : /* (content generated from line coverage data) */ - 563 1 : /* ... */ - 564 1 : /* ... */ - 565 : /* ... */ - 566 1 : /* ... */ - 567 1 : /* ... */ - 568 : /* ... */ - 569 1 : /* ... */ - 570 : /* ... */ - 571 1 : /* ... */ - 572 1 : /* ... */ - 573 1 : /* ... */ - 574 1 : /* ... */ - 575 1 : /* ... */ - 576 1 : /* ... */ - 577 : /* ... */ - 578 1 : /* ... */ - 579 1 : /* ... */ - 580 1 : /* ... */ - 581 1 : /* test/tests.luau not found */ - 582 : /* (content generated from line coverage data) */ - 583 1 : /* ... */ - 584 : /* ... */ - 585 1 : /* ... */ - 586 1 : /* ... */ - 587 : /* ... */ - 588 1 : /* ... */ - 589 1 : /* ... */ - 590 1 : /* ... */ - 591 1 : /* ... */ - 592 : /* ... */ - 593 1 : /* ... */ - 594 : /* ... */ - 595 1 : /* ... */ - 596 1 : /* ... */ - 597 1 : /* ... */ - 598 1 : /* ... */ - 599 1 : /* ... */ - 600 1 : /* ... */ - 601 : /* test/tests.luau not found */ - 602 : /* (content generated from line coverage data) */ - 603 1 : /* ... */ - 604 1 : /* ... */ - 605 1 : /* ... */ - 606 1 : /* ... */ - 607 1 : /* ... */ - 608 : /* ... */ - 609 : /* ... */ - 610 : /* ... */ - 611 1 : /* ... */ - 612 : /* ... */ - 613 1 : /* ... */ - 614 1 : /* ... */ - 615 1 : /* ... */ - 616 : /* ... */ - 617 1 : /* ... */ - 618 1 : /* ... */ - 619 256 : /* ... */ - 620 : /* ... */ - 621 256 : /* test/tests.luau not found */ - 622 256 : /* (content generated from line coverage data) */ - 623 251 : /* ... */ - 624 : /* ... */ - 625 256 : /* ... */ - 626 : /* ... */ - 627 : /* ... */ - 628 1 : /* ... */ - 629 256 : /* ... */ - 630 : /* ... */ - 631 : /* ... */ - 632 1 : /* ... */ - 633 : /* ... */ - 634 : /* ... */ - 635 : /* ... */ - 636 1 : /* ... */ - 637 1 : /* ... */ - 638 1 : /* ... */ - 639 1 : /* ... */ - 640 1 : /* ... */ - 641 1 : /* test/tests.luau not found */ - 642 1 : /* (content generated from line coverage data) */ - 643 1 : /* ... */ - 644 1 : /* ... */ - 645 1 : /* ... */ - 646 : /* ... */ - 647 : /* ... */ - 648 1 : /* ... */ - 649 : /* ... */ - 650 1 : /* ... */ - 651 1 : /* ... */ - 652 1 : /* ... */ - 653 2 : /* ... */ - 654 : /* ... */ - 655 1 : /* ... */ - 656 0 : /* ... */ - 657 : /* ... */ - 658 1 : /* ... */ - 659 1 : /* ... */ - 660 : /* ... */ - 661 : /* test/tests.luau not found */ - 662 : /* (content generated from line coverage data) */ - 663 : /* ... */ - 664 1 : /* ... */ - 665 1 : /* ... */ - 666 1 : /* ... */ - 667 1 : /* ... */ - 668 1 : /* ... */ - 669 : /* ... */ - 670 1 : /* ... */ - 671 1 : /* ... */ - 672 : /* ... */ - 673 1 : /* ... */ - 674 1 : /* ... */ - 675 1 : /* ... */ - 676 1 : /* ... */ - 677 : /* ... */ - 678 1 : /* ... */ - 679 1 : /* ... */ - 680 0 : /* ... */ - 681 : /* test/tests.luau not found */ - 682 1 : /* (content generated from line coverage data) */ - 683 : /* ... */ - 684 : /* ... */ - 685 : /* ... */ - 686 1 : /* ... */ - 687 1 : /* ... */ - 688 1 : /* ... */ - 689 : /* ... */ - 690 1 : /* ... */ - 691 9 : /* ... */ - 692 9 : /* ... */ - 693 : /* ... */ - 694 1 : /* ... */ - 695 1 : /* ... */ - 696 9 : /* ... */ - 697 : /* ... */ - 698 : /* ... */ - 699 1 : /* ... */ - 700 1 : /* ... */ - 701 1 : /* test/tests.luau not found */ - 702 1 : /* (content generated from line coverage data) */ - 703 1 : /* ... */ - 704 1 : /* ... */ - 705 1 : /* ... */ - 706 1 : /* ... */ - 707 1 : /* ... */ - 708 1 : /* ... */ - 709 : /* ... */ - 710 : /* ... */ - 711 : /* ... */ - 712 : /* ... */ - 713 1 : /* ... */ - 714 1 : /* ... */ - 715 1 : /* ... */ - 716 1 : /* ... */ - 717 1 : /* ... */ - 718 1 : /* ... */ - 719 1 : /* ... */ - 720 1 : /* ... */ - 721 1 : /* test/tests.luau not found */ - 722 1 : /* (content generated from line coverage data) */ - 723 1 : /* ... */ - 724 1 : /* ... */ - 725 : /* ... */ - 726 1 : /* ... */ - 727 : /* ... */ - 728 1 : /* ... */ - 729 1 : /* ... */ - 730 2 : /* ... */ - 731 1 : /* ... */ - 732 1 : /* ... */ - 733 1 : /* ... */ - 734 : /* ... */ - 735 0 : /* ... */ - 736 : /* ... */ - 737 : /* ... */ - 738 2 : /* ... */ - 739 : /* ... */ - 740 1 : /* ... */ - 741 : /* test/tests.luau not found */ - 742 : /* (content generated from line coverage data) */ - 743 1 : /* ... */ - 744 1 : /* ... */ - 745 1 : /* ... */ - 746 1 : /* ... */ - 747 1 : /* ... */ - 748 : /* ... */ - 749 1 : /* ... */ - 750 1 : /* ... */ - 751 256 : /* ... */ - 752 : /* ... */ - 753 : /* ... */ - 754 : /* ... */ - 755 256 : /* ... */ - 756 256 : /* ... */ - 757 256 : /* ... */ - 758 251 : /* ... */ - 759 : /* ... */ - 760 256 : /* ... */ - 761 : /* test/tests.luau not found */ - 762 : /* (content generated from line coverage data) */ - 763 1 : /* ... */ - 764 1 : /* ... */ - 765 256 : /* ... */ - 766 256 : /* ... */ - 767 : /* ... */ - 768 : /* ... */ - 769 1 : /* ... */ - 770 : /* ... */ - 771 : /* ... */ - 772 : /* ... */ - 773 1 : /* ... */ - 774 1 : /* ... */ - 775 1 : /* ... */ - 776 1 : /* ... */ - 777 : /* ... */ - 778 1 : /* ... */ - 779 1 : /* ... */ - 780 256 : /* ... */ - 781 : /* test/tests.luau not found */ - 782 256 : /* (content generated from line coverage data) */ - 783 256 : /* ... */ - 784 4 : /* ... */ - 785 : /* ... */ - 786 252 : /* ... */ - 787 : /* ... */ - 788 : /* ... */ - 789 : /* ... */ - 790 1 : /* ... */ - 791 4 : /* ... */ - 792 : /* ... */ - 793 : /* ... */ - 794 1 : /* ... */ - 795 : /* ... */ - 796 : /* ... */ - 797 : /* ... */ - 798 1 : /* ... */ - 799 1 : /* ... */ - 800 1 : /* ... */ - 801 1 : /* test/tests.luau not found */ - 802 1 : /* (content generated from line coverage data) */ - 803 : /* ... */ - 804 1 : /* ... */ - 805 1 : /* ... */ - 806 1 : /* ... */ - 807 1 : /* ... */ - 808 : /* ... */ - 809 : /* ... */ - 810 : /* ... */ - 811 : /* ... */ - 812 1 : /* ... */ - 813 1 : /* ... */ - 814 1 : /* ... */ - 815 1 : /* ... */ - 816 1 : /* ... */ - 817 : /* ... */ - 818 1 : /* ... */ - 819 : /* ... */ - 820 1 : /* ... */ - 821 1 : /* test/tests.luau not found */ - 822 1 : /* (content generated from line coverage data) */ - 823 1 : /* ... */ - 824 : /* ... */ - 825 1 : /* ... */ - 826 1 : /* ... */ - 827 1 : /* ... */ - 828 : /* ... */ - 829 : /* ... */ - 830 : /* ... */ - 831 : /* ... */ - 832 1 : /* ... */ - 833 1 : /* ... */ - 834 1 : /* ... */ - 835 1 : /* ... */ - 836 1 : /* ... */ - 837 1 : /* ... */ - 838 1 : /* ... */ - 839 : /* ... */ - 840 1 : /* ... */ - 841 1 : /* test/tests.luau not found */ - 842 : /* (content generated from line coverage data) */ - 843 1 : /* ... */ - 844 1 : /* ... */ - 845 1 : /* ... */ - 846 2 : /* ... */ - 847 2 : /* ... */ - 848 1 : /* ... */ - 849 : /* ... */ - 850 1 : /* ... */ - 851 : /* ... */ - 852 : /* ... */ - 853 : /* ... */ - 854 1 : /* ... */ - 855 1 : /* ... */ - 856 : /* ... */ - 857 1 : /* ... */ - 858 1 : /* ... */ - 859 1 : /* ... */ - 860 : /* ... */ - 861 1 : /* test/tests.luau not found */ - 862 : /* (content generated from line coverage data) */ - 863 : /* ... */ - 864 1 : /* ... */ - 865 1 : /* ... */ - 866 1 : /* ... */ - 867 1 : /* ... */ - 868 1 : /* ... */ - 869 1 : /* ... */ - 870 1 : /* ... */ - 871 : /* ... */ - 872 1 : /* ... */ - 873 1 : /* ... */ - 874 1 : /* ... */ - 875 : /* ... */ - 876 1 : /* ... */ - 877 1 : /* ... */ - 878 : /* ... */ - 879 1 : /* ... */ - 880 1 : /* ... */ - 881 0 : /* test/tests.luau not found */ - 882 : /* (content generated from line coverage data) */ - 883 : /* ... */ - 884 1 : /* ... */ - 885 : /* ... */ - 886 1 : /* ... */ - 887 1 : /* ... */ - 888 : /* ... */ - 889 : /* ... */ - 890 : /* ... */ - 891 : /* ... */ - 892 1 : /* ... */ - 893 1 : /* ... */ - 894 1 : /* ... */ - 895 1 : /* ... */ - 896 1 : /* ... */ - 897 : /* ... */ - 898 1 : /* ... */ - 899 1 : /* ... */ - 900 1 : /* ... */ - 901 : /* test/tests.luau not found */ - 902 : /* (content generated from line coverage data) */ - 903 : /* ... */ - 904 : /* ... */ - 905 1 : /* ... */ - 906 1 : /* ... */ - 907 1 : /* ... */ - 908 : /* ... */ - 909 1 : /* ... */ - 910 : /* ... */ - 911 1 : /* ... */ - 912 1 : /* ... */ - 913 1 : /* ... */ - 914 : /* ... */ - 915 1 : /* ... */ - 916 1 : /* ... */ - 917 1 : /* ... */ - 918 1 : /* ... */ - 919 1 : /* ... */ - 920 : /* ... */ - 921 1 : /* test/tests.luau not found */ - 922 1 : /* (content generated from line coverage data) */ - 923 2 : /* ... */ - 924 : /* ... */ - 925 1 : /* ... */ - 926 : /* ... */ - 927 : /* ... */ - 928 : /* ... */ - 929 1 : /* ... */ - 930 1 : /* ... */ - 931 1 : /* ... */ - 932 1 : /* ... */ - 933 : /* ... */ - 934 1 : /* ... */ - 935 1 : /* ... */ - 936 1 : /* ... */ - 937 1 : /* ... */ - 938 1 : /* ... */ - 939 : /* ... */ - 940 1 : /* ... */ - 941 1 : /* test/tests.luau not found */ - 942 2 : /* (content generated from line coverage data) */ - 943 2 : /* ... */ - 944 : /* ... */ - 945 1 : /* ... */ - 946 : /* ... */ - 947 : /* ... */ - 948 : /* ... */ - 949 1 : /* ... */ - 950 : /* ... */ - 951 1 : /* ... */ - 952 1 : /* ... */ - 953 1 : /* ... */ - 954 1 : /* ... */ - 955 1 : /* ... */ - 956 : /* ... */ - 957 1 : /* ... */ - 958 1 : /* ... */ - 959 1 : /* ... */ - 960 1 : /* ... */ - 961 1 : /* test/tests.luau not found */ - 962 : /* (content generated from line coverage data) */ - 963 1 : /* ... */ - 964 1 : /* ... */ - 965 3 : /* ... */ - 966 : /* ... */ - 967 3 : /* ... */ - 968 : /* ... */ - 969 : /* ... */ - 970 1 : /* ... */ - 971 : /* ... */ - 972 : /* ... */ - 973 : /* ... */ - 974 1 : /* ... */ - 975 1 : /* ... */ - 976 1 : /* ... */ - 977 1 : /* ... */ - 978 : /* ... */ - 979 1 : /* ... */ - 980 1 : /* ... */ - 981 1 : /* test/tests.luau not found */ - 982 1 : /* (content generated from line coverage data) */ - 983 1 : /* ... */ - 984 : /* ... */ - 985 1 : /* ... */ - 986 3 : /* ... */ - 987 3 : /* ... */ - 988 3 : /* ... */ - 989 : /* ... */ - 990 : /* ... */ - 991 1 : /* ... */ - 992 : /* ... */ - 993 : /* ... */ - 994 : /* ... */ - 995 : /* ... */ - 996 1 : /* ... */ - 997 1 : /* ... */ - 998 : /* ... */ - 999 1 : /* ... */ - 1000 1 : /* ... */ - 1001 : /* test/tests.luau not found */ - 1002 1 : /* (content generated from line coverage data) */ - 1003 1 : /* ... */ - 1004 1 : /* ... */ - 1005 : /* ... */ - 1006 1 : /* ... */ - 1007 1 : /* ... */ - 1008 0 : /* ... */ - 1009 : /* ... */ - 1010 : /* ... */ - 1011 1 : /* ... */ - 1012 : /* ... */ - 1013 : /* ... */ - 1014 : /* ... */ - 1015 1 : /* ... */ - 1016 : /* ... */ - 1017 : /* ... */ - 1018 1 : /* ... */ - 1019 1 : /* ... */ - 1020 : /* ... */ - 1021 1 : /* test/tests.luau not found */ - 1022 1 : /* (content generated from line coverage data) */ - 1023 0 : /* ... */ - 1024 : /* ... */ - 1025 1 : /* ... */ - 1026 : /* ... */ - 1027 : /* ... */ - 1028 : /* ... */ - 1029 : /* ... */ - 1030 1 : /* ... */ - 1031 1 : /* ... */ - 1032 1 : /* ... */ - 1033 1 : /* ... */ - 1034 1 : /* ... */ - 1035 : /* ... */ - 1036 1 : /* ... */ - 1037 1 : /* ... */ - 1038 1 : /* ... */ - 1039 : /* ... */ - 1040 1 : /* ... */ - 1041 : /* test/tests.luau not found */ - 1042 1 : /* (content generated from line coverage data) */ - 1043 1 : /* ... */ - 1044 : /* ... */ - 1045 1 : /* ... */ - 1046 1 : /* ... */ - 1047 1 : /* ... */ - 1048 : /* ... */ - 1049 1 : /* ... */ - 1050 3 : /* ... */ - 1051 3 : /* ... */ - 1052 3 : /* ... */ - 1053 : /* ... */ - 1054 0 : /* ... */ - 1055 : /* ... */ - 1056 : /* ... */ - 1057 : /* ... */ - 1058 1 : /* ... */ - 1059 1 : /* ... */ - 1060 1 : /* ... */ - 1061 1 : /* test/tests.luau not found */ - 1062 : /* (content generated from line coverage data) */ - 1063 1 : /* ... */ - 1064 1 : /* ... */ - 1065 : /* ... */ - 1066 1 : /* ... */ - 1067 : /* ... */ - 1068 1 : /* ... */ - 1069 1 : /* ... */ - 1070 : /* ... */ - 1071 1 : /* ... */ - 1072 1 : /* ... */ - 1073 : /* ... */ - 1074 1 : /* ... */ - 1075 1 : /* ... */ - 1076 2 : /* ... */ - 1077 2 : /* ... */ - 1078 2 : /* ... */ - 1079 2 : /* ... */ - 1080 : /* ... */ - 1081 0 : /* test/tests.luau not found */ - 1082 : /* (content generated from line coverage data) */ - 1083 1 : /* ... */ - 1084 : /* ... */ - 1085 1 : /* ... */ - 1086 : /* ... */ - 1087 1 : /* ... */ - 1088 1 : /* ... */ - 1089 1 : /* ... */ - 1090 : /* ... */ - 1091 : /* ... */ - 1092 1 : /* ... */ - 1093 : /* ... */ - 1094 : /* ... */ - 1095 1 : /* ... */ - 1096 : /* ... */ - 1097 1 : /* ... */ - 1098 1 : /* ... */ - 1099 1 : /* ... */ - 1100 1 : /* ... */ - 1101 : /* test/tests.luau not found */ - 1102 1 : /* (content generated from line coverage data) */ - 1103 : /* ... */ - 1104 1 : /* ... */ - 1105 1 : /* ... */ - 1106 : /* ... */ - 1107 1 : /* ... */ - 1108 1 : /* ... */ - 1109 : /* ... */ - 1110 1 : /* ... */ - 1111 1 : /* ... */ - 1112 1 : /* ... */ - 1113 : /* ... */ - 1114 : /* ... */ - 1115 : /* ... */ - 1116 1 : /* ... */ - 1117 1 : /* ... */ - 1118 1 : /* ... */ - 1119 : /* ... */ - 1120 1 : /* ... */ - 1121 1 : /* test/tests.luau not found */ - 1122 : /* (content generated from line coverage data) */ - 1123 1 : /* ... */ - 1124 1 : /* ... */ - 1125 : /* ... */ - 1126 1 : /* ... */ - 1127 1 : /* ... */ - 1128 : /* ... */ - 1129 1 : /* ... */ - 1130 1 : /* ... */ - 1131 : /* ... */ - 1132 1 : /* ... */ - 1133 1 : /* ... */ - 1134 : /* ... */ - 1135 1 : /* ... */ - 1136 1 : /* ... */ - 1137 1 : /* ... */ - 1138 1 : /* ... */ - 1139 1 : /* ... */ - 1140 1 : /* ... */ - 1141 1 : /* test/tests.luau not found */ - 1142 : /* (content generated from line coverage data) */ - 1143 1 : /* ... */ - 1144 : /* ... */ - 1145 1 : /* ... */ - 1146 1 : /* ... */ - 1147 1 : /* ... */ - 1148 1 : /* ... */ - 1149 : /* ... */ - 1150 1 : /* ... */ - 1151 1 : /* ... */ - 1152 : /* ... */ - 1153 1 : /* ... */ - 1154 1 : /* ... */ - 1155 1 : /* ... */ - 1156 1 : /* ... */ - 1157 : /* ... */ - 1158 : /* ... */ - 1159 : /* ... */ - 1160 1 : /* ... */ - 1161 : /* test/tests.luau not found */ - 1162 1 : /* (content generated from line coverage data) */ - 1163 1 : /* ... */ - 1164 : /* ... */ - 1165 1 : /* ... */ - 1166 : /* ... */ - 1167 1 : /* ... */ - 1168 1 : /* ... */ - 1169 : /* ... */ - 1170 1 : /* ... */ - 1171 : /* ... */ - 1172 : /* ... */ - 1173 : /* ... */ - 1174 1 : /* ... */ - 1175 1 : /* ... */ - 1176 : /* ... */ - 1177 1 : /* ... */ - 1178 1 : /* ... */ - 1179 1 : /* ... */ - 1180 1 : /* ... */ - 1181 : /* test/tests.luau not found */ - 1182 1 : /* (content generated from line coverage data) */ - 1183 1 : /* ... */ - 1184 1 : /* ... */ - 1185 1 : /* ... */ - 1186 : /* ... */ - 1187 1 : /* ... */ - 1188 : /* ... */ - 1189 : /* ... */ - 1190 : /* ... */ - 1191 1 : /* ... */ - 1192 : /* ... */ - 1193 1 : /* ... */ - 1194 1 : /* ... */ - 1195 1 : /* ... */ - 1196 1 : /* ... */ - 1197 : /* ... */ - 1198 1 : /* ... */ - 1199 1 : /* ... */ - 1200 : /* ... */ - 1201 : /* test/tests.luau not found */ - 1202 1 : /* (content generated from line coverage data) */ - 1203 1 : /* ... */ - 1204 1 : /* ... */ - 1205 1 : /* ... */ - 1206 1 : /* ... */ - 1207 1 : /* ... */ - 1208 1 : /* ... */ - 1209 1 : /* ... */ - 1210 1 : /* ... */ - 1211 1 : /* ... */ - 1212 : /* ... */ - 1213 : /* ... */ - 1214 1 : /* ... */ - 1215 1 : /* ... */ - 1216 1 : /* ... */ - 1217 1 : /* ... */ - 1218 : /* ... */ - 1219 : /* ... */ - 1220 : /* ... */ - 1221 1 : /* test/tests.luau not found */ - 1222 1 : /* (content generated from line coverage data) */ - 1223 1 : /* ... */ - 1224 : /* ... */ - 1225 1 : /* ... */ - 1226 1 : /* ... */ - 1227 : /* ... */ - 1228 1 : /* ... */ - 1229 1 : /* ... */ - 1230 1 : /* ... */ - 1231 : /* ... */ - 1232 : /* ... */ - 1233 1 : /* ... */ - 1234 1 : /* ... */ - 1235 : /* ... */ - 1236 1 : /* ... */ - 1237 : /* ... */ - 1238 1 : /* ... */ - 1239 1 : /* ... */ - 1240 1 : /* ... */ - 1241 1 : /* test/tests.luau not found */ - 1242 : /* (content generated from line coverage data) */ - 1243 1 : /* ... */ - 1244 1 : /* ... */ - 1245 1 : /* ... */ - 1246 1 : /* ... */ - 1247 1 : /* ... */ - 1248 1 : /* ... */ - 1249 1 : /* ... */ - 1250 1 : /* ... */ - 1251 1 : /* ... */ - 1252 : /* ... */ - 1253 : /* ... */ - 1254 1 : /* ... */ - 1255 1 : /* ... */ - 1256 1 : /* ... */ - 1257 1 : /* ... */ - 1258 : /* ... */ - 1259 1 : /* ... */ - 1260 1 : /* ... */ - 1261 1 : /* test/tests.luau not found */ - 1262 : /* (content generated from line coverage data) */ - 1263 1 : /* ... */ - 1264 1 : /* ... */ - 1265 : /* ... */ - 1266 1 : /* ... */ - 1267 1 : /* ... */ - 1268 1 : /* ... */ - 1269 1 : /* ... */ - 1270 1 : /* ... */ - 1271 1 : /* ... */ - 1272 : /* ... */ - 1273 : /* ... */ - 1274 1 : /* ... */ - 1275 1 : /* ... */ - 1276 : /* ... */ - 1277 1 : /* ... */ - 1278 1 : /* ... */ - 1279 : /* ... */ - 1280 1 : /* ... */ - 1281 1 : /* test/tests.luau not found */ - 1282 1 : /* (content generated from line coverage data) */ - 1283 1 : /* ... */ - 1284 1 : /* ... */ - 1285 1 : /* ... */ - 1286 : /* ... */ - 1287 1 : /* ... */ - 1288 1 : /* ... */ - 1289 1 : /* ... */ - 1290 1 : /* ... */ - 1291 : /* ... */ - 1292 1 : /* ... */ - 1293 1 : /* ... */ - 1294 : /* ... */ - 1295 : /* ... */ - 1296 : /* ... */ - 1297 1 : /* ... */ - 1298 1 : /* ... */ - 1299 : /* ... */ - 1300 1 : /* ... */ - 1301 1 : /* test/tests.luau not found */ - 1302 1 : /* (content generated from line coverage data) */ - 1303 : /* ... */ - 1304 1 : /* ... */ - 1305 1 : /* ... */ - 1306 1 : /* ... */ - 1307 1 : /* ... */ - 1308 : /* ... */ - 1309 1 : /* ... */ - 1310 1 : /* ... */ - 1311 1 : /* ... */ - 1312 1 : /* ... */ - 1313 : /* ... */ - 1314 : /* ... */ - 1315 1 : /* ... */ - 1316 1 : /* ... */ - 1317 1 : /* ... */ - 1318 : /* ... */ - 1319 1 : /* ... */ - 1320 1 : /* ... */ - 1321 1 : /* test/tests.luau not found */ - 1322 : /* (content generated from line coverage data) */ - 1323 1 : /* ... */ - 1324 1 : /* ... */ - 1325 1 : /* ... */ - 1326 1 : /* ... */ - 1327 1 : /* ... */ - 1328 : /* ... */ - 1329 : /* ... */ - 1330 : /* ... */ - 1331 1 : /* ... */ - 1332 1 : /* ... */ - 1333 : /* ... */ - 1334 1 : /* ... */ - 1335 1 : /* ... */ - 1336 1 : /* ... */ - 1337 : /* ... */ - 1338 1 : /* ... */ - 1339 1 : /* ... */ - 1340 1 : /* ... */ - 1341 : /* test/tests.luau not found */ - 1342 1 : /* (content generated from line coverage data) */ - 1343 1 : /* ... */ - 1344 10 : /* ... */ - 1345 10 : /* ... */ - 1346 10 : /* ... */ - 1347 10 : /* ... */ - 1348 10 : /* ... */ - 1349 : /* ... */ - 1350 : /* ... */ - 1351 1 : /* ... */ - 1352 1 : /* ... */ - 1353 : /* ... */ - 1354 : /* ... */ - 1355 1 : /* ... */ - 1356 10 : /* ... */ - 1357 10 : /* ... */ - 1358 10 : /* ... */ - 1359 : /* ... */ - 1360 : /* ... */ - 1361 1 : /* test/tests.luau not found */ - 1362 : /* (content generated from line coverage data) */ - 1363 1 : /* ... */ - 1364 1 : /* ... */ - 1365 10 : /* ... */ - 1366 10 : /* ... */ - 1367 10 : /* ... */ - 1368 10 : /* ... */ - 1369 10 : /* ... */ - 1370 : /* ... */ - 1371 : /* ... */ - 1372 1 : /* ... */ - 1373 1 : /* ... */ - 1374 : /* ... */ - 1375 : /* ... */ - 1376 1 : /* ... */ - 1377 1 : /* ... */ - 1378 10 : /* ... */ - 1379 10 : /* ... */ - 1380 10 : /* ... */ - 1381 : /* test/tests.luau not found */ - 1382 : /* (content generated from line coverage data) */ - 1383 : /* ... */ - 1384 : /* ... */ - 1385 1 : /* ... */ - 1386 1 : /* ... */ - 1387 : /* ... */ - 1388 1 : /* ... */ - 1389 1 : /* ... */ - 1390 1 : /* ... */ - 1391 : /* ... */ - 1392 1 : /* ... */ - 1393 100 : /* ... */ - 1394 100 : /* ... */ - 1395 100 : /* ... */ - 1396 100 : /* ... */ - 1397 : /* ... */ - 1398 : /* ... */ - 1399 1 : /* ... */ - 1400 1 : /* ... */ - 1401 100 : /* test/tests.luau not found */ - 1402 100 : /* (content generated from line coverage data) */ - 1403 : /* ... */ - 1404 : /* ... */ - 1405 : /* ... */ - 1406 1 : /* ... */ - 1407 100 : /* ... */ - 1408 : /* ... */ - 1409 : /* ... */ - 1410 : /* ... */ - 1411 : /* ... */ - 1412 1 : /* ... */ - 1413 1 : /* ... */ - 1414 1 : /* ... */ - 1415 1 : /* ... */ - 1416 1 : /* ... */ - 1417 1 : /* ... */ - 1418 : /* ... */ - 1419 1 : /* ... */ - 1420 1 : /* ... */ - 1421 : /* test/tests.luau not found */ - 1422 1 : /* (content generated from line coverage data) */ - 1423 1 : /* ... */ - 1424 1 : /* ... */ - 1425 : /* ... */ - 1426 : /* ... */ - 1427 : /* ... */ - 1428 1 : /* ... */ - 1429 1 : /* ... */ - 1430 1 : /* ... */ - 1431 1 : /* ... */ - 1432 1 : /* ... */ - 1433 1 : /* ... */ - 1434 1 : /* ... */ - 1435 1 : /* ... */ - 1436 1 : /* ... */ - 1437 1 : /* ... */ - 1438 1 : /* ... */ - 1439 1 : /* ... */ - 1440 1 : /* ... */ - 1441 1 : /* test/tests.luau not found */ - 1442 : /* (content generated from line coverage data) */ - 1443 1 : /* ... */ - 1444 1 : /* ... */ - 1445 1 : /* ... */ - 1446 1 : /* ... */ - 1447 1 : /* ... */ - 1448 1 : /* ... */ - 1449 1 : /* ... */ - 1450 : /* ... */ - 1451 1 : /* ... */ - 1452 1 : /* ... */ - 1453 1 : /* ... */ - 1454 : /* ... */ - 1455 1 : /* ... */ - 1456 1 : /* ... */ - 1457 1 : /* ... */ - 1458 1 : /* ... */ - 1459 1 : /* ... */ - 1460 1 : /* ... */ - 1461 1 : /* test/tests.luau not found */ - 1462 1 : /* (content generated from line coverage data) */ - 1463 1 : /* ... */ - 1464 1 : /* ... */ - 1465 1 : /* ... */ - 1466 1 : /* ... */ - 1467 1 : /* ... */ - 1468 1 : /* ... */ - 1469 1 : /* ... */ - 1470 : /* ... */ - 1471 1 : /* ... */ - 1472 1 : /* ... */ - 1473 1 : /* ... */ - 1474 1 : /* ... */ - 1475 : /* ... */ - 1476 1 : /* ... */ - 1477 1 : /* ... */ - 1478 : /* ... */ - 1479 : /* ... */ - 1480 : /* ... */ - 1481 1 : /* test/tests.luau not found */ - 1482 1 : /* (content generated from line coverage data) */ - 1483 1 : /* ... */ - 1484 1 : /* ... */ - 1485 1 : /* ... */ - 1486 1 : /* ... */ - 1487 1 : /* ... */ - 1488 : /* ... */ - 1489 1 : /* ... */ - 1490 1 : /* ... */ - 1491 1 : /* ... */ - 1492 1 : /* ... */ - 1493 1 : /* ... */ - 1494 : /* ... */ - 1495 1 : /* ... */ - 1496 1 : /* ... */ - 1497 1 : /* ... */ - 1498 : /* ... */ - 1499 : /* ... */ - 1500 : /* ... */ - 1501 1 : /* test/tests.luau not found */ - 1502 1 : /* (content generated from line coverage data) */ - 1503 : /* ... */ - 1504 1 : /* ... */ - 1505 1 : /* ... */ - 1506 1 : /* ... */ - 1507 : /* ... */ - 1508 1 : /* ... */ - 1509 10 : /* ... */ - 1510 10 : /* ... */ - 1511 10 : /* ... */ - 1512 : /* ... */ - 1513 : /* ... */ - 1514 1 : /* ... */ - 1515 1 : /* ... */ - 1516 1 : /* ... */ - 1517 10 : /* ... */ - 1518 10 : /* ... */ - 1519 10 : /* ... */ - 1520 : /* ... */ - 1521 : /* test/tests.luau not found */ - 1522 1 : /* (content generated from line coverage data) */ - 1523 : /* ... */ - 1524 : /* ... */ - 1525 : /* ... */ - 1526 1 : /* ... */ - 1527 1 : /* ... */ - 1528 1 : /* ... */ - 1529 1 : /* ... */ - 1530 : /* ... */ - 1531 : /* ... */ - 1532 1 : /* ... */ - 1533 1 : /* ... */ - 1534 1 : /* ... */ - 1535 : /* ... */ - 1536 : /* ... */ - 1537 : /* ... */ - 1538 1 : /* ... */ - 1539 1 : /* ... */ - 1540 1 : /* ... */ - 1541 1 : /* test/tests.luau not found */ - 1542 1 : /* (content generated from line coverage data) */ - 1543 1 : /* ... */ - 1544 1 : /* ... */ - 1545 : /* ... */ - 1546 1 : /* ... */ - 1547 : /* ... */ - 1548 : /* ... */ - 1549 1 : /* ... */ - 1550 1 : /* ... */ - 1551 1 : /* ... */ - 1552 1 : /* ... */ - 1553 : /* ... */ - 1554 1 : /* ... */ - 1555 1 : /* ... */ - 1556 1 : /* ... */ - 1557 1 : /* ... */ - 1558 : /* ... */ - 1559 1 : /* ... */ - 1560 : /* ... */ - 1561 : /* test/tests.luau not found */ - 1562 1 : /* (content generated from line coverage data) */ - 1563 : /* ... */ - 1564 : /* ... */ - 1565 1 : /* ... */ - 1566 1 : /* ... */ - 1567 1 : /* ... */ - 1568 1 : /* ... */ - 1569 1 : /* ... */ - 1570 1 : /* ... */ - 1571 : /* ... */ - 1572 1 : /* ... */ - 1573 : /* ... */ - 1574 1 : /* ... */ - 1575 1 : /* ... */ - 1576 : /* ... */ - 1577 : /* ... */ - 1578 : /* ... */ - 1579 1 : /* ... */ - 1580 1 : /* ... */ - 1581 1 : /* test/tests.luau not found */ - 1582 1 : /* (content generated from line coverage data) */ - 1583 : /* ... */ - 1584 1 : /* ... */ - 1585 1 : /* ... */ - 1586 1 : /* ... */ - 1587 1 : /* ... */ - 1588 : /* ... */ - 1589 : /* ... */ - 1590 1 : /* ... */ - 1591 1 : /* ... */ - 1592 1 : /* ... */ - 1593 1 : /* ... */ - 1594 : /* ... */ - 1595 : /* ... */ - 1596 : /* ... */ - 1597 : /* ... */ - 1598 1 : /* ... */ - 1599 1 : /* ... */ - 1600 1 : /* ... */ - 1601 1 : /* test/tests.luau not found */ - 1602 1 : /* (content generated from line coverage data) */ - 1603 : /* ... */ - 1604 1 : /* ... */ - 1605 1 : /* ... */ - 1606 1 : /* ... */ - 1607 : /* ... */ - 1608 : /* ... */ - 1609 1 : /* ... */ - 1610 1 : /* ... */ - 1611 1 : /* ... */ - 1612 1 : /* ... */ - 1613 : /* ... */ - 1614 1 : /* ... */ - 1615 1 : /* ... */ - 1616 2 : /* ... */ - 1617 2 : /* ... */ - 1618 : /* ... */ - 1619 : /* ... */ - 1620 1 : /* ... */ - 1621 1 : /* test/tests.luau not found */ - 1622 1 : /* (content generated from line coverage data) */ - 1623 0 : /* ... */ - 1624 0 : /* ... */ - 1625 : /* ... */ - 1626 : /* ... */ - 1627 1 : /* ... */ - 1628 : /* ... */ - 1629 : /* ... */ - 1630 1 : /* ... */ - 1631 1 : /* ... */ - 1632 1 : /* ... */ - 1633 1 : /* ... */ - 1634 1 : /* ... */ - 1635 : /* ... */ - 1636 1 : /* ... */ - 1637 : /* ... */ - 1638 1 : /* ... */ - 1639 : /* ... */ - 1640 1 : /* ... */ - 1641 : /* test/tests.luau not found */ - 1642 1 : /* (content generated from line coverage data) */ - 1643 1 : /* ... */ - 1644 1 : /* ... */ - 1645 1 : /* ... */ - 1646 : /* ... */ - 1647 : /* ... */ - 1648 1 : /* ... */ - 1649 : /* ... */ - 1650 1 : /* ... */ - 1651 0 : /* ... */ - 1652 : /* ... */ - 1653 : /* ... */ - 1654 : /* ... */ - 1655 : /* ... */ - 1656 : /* ... */ - 1657 1 : /* ... */ - 1658 1 : /* ... */ - 1659 1 : /* ... */ - 1660 1 : /* ... */ - 1661 1 : /* test/tests.luau not found */ - 1662 1 : /* (content generated from line coverage data) */ - 1663 : /* ... */ - 1664 1 : /* ... */ - 1665 2 : /* ... */ - 1666 : /* ... */ - 1667 2 : /* ... */ - 1668 2 : /* ... */ - 1669 2 : /* ... */ - 1670 : /* ... */ - 1671 2 : /* ... */ - 1672 1 : /* ... */ - 1673 : /* ... */ - 1674 : /* ... */ - 1675 1 : /* ... */ - 1676 : /* ... */ - 1677 : /* ... */ - 1678 : /* ... */ - 1679 2 : /* ... */ - 1680 1 : /* ... */ - 1681 1 : /* test/tests.luau not found */ - 1682 : /* (content generated from line coverage data) */ - 1683 : /* ... */ - 1684 : /* ... */ - 1685 1 : /* ... */ - 1686 1 : /* ... */ - 1687 : /* ... */ - 1688 : /* ... */ - 1689 1 : /* ... */ - 1690 1 : /* ... */ - 1691 1 : /* ... */ - 1692 1 : /* ... */ - 1693 : /* ... */ - 1694 1 : /* ... */ - 1695 : /* ... */ - 1696 1 : /* ... */ - 1697 1 : /* ... */ - 1698 : /* ... */ - 1699 1 : /* ... */ - 1700 1 : /* ... */ - 1701 0 : /* test/tests.luau not found */ - 1702 : /* (content generated from line coverage data) */ - 1703 1 : /* ... */ - 1704 : /* ... */ - 1705 : /* ... */ - 1706 : /* ... */ - 1707 1 : /* ... */ - 1708 1 : /* ... */ - 1709 1 : /* ... */ - 1710 1 : /* ... */ - 1711 : /* ... */ - 1712 1 : /* ... */ - 1713 1 : /* ... */ - 1714 1 : /* ... */ - 1715 : /* ... */ - 1716 1 : /* ... */ - 1717 1 : /* ... */ - 1718 : /* ... */ - 1719 1 : /* ... */ - 1720 : /* ... */ - 1721 1 : /* test/tests.luau not found */ - 1722 1 : /* (content generated from line coverage data) */ - 1723 1 : /* ... */ - 1724 1 : /* ... */ - 1725 1 : /* ... */ - 1726 : /* ... */ - 1727 1 : /* ... */ - 1728 1 : /* ... */ - 1729 1 : /* ... */ - 1730 : /* ... */ - 1731 1 : /* ... */ - 1732 : /* ... */ - 1733 1 : /* ... */ - 1734 1 : /* ... */ - 1735 1 : /* ... */ - 1736 : /* ... */ - 1737 1 : /* ... */ - 1738 1 : /* ... */ - 1739 1 : /* ... */ - 1740 : /* ... */ - 1741 1 : /* test/tests.luau not found */ - 1742 : /* (content generated from line coverage data) */ - 1743 1 : /* ... */ - 1744 : /* ... */ - 1745 1 : /* ... */ - 1746 : /* ... */ - 1747 1 : /* ... */ - 1748 1 : /* ... */ - 1749 1 : /* ... */ - 1750 : /* ... */ - 1751 1 : /* ... */ - 1752 : /* ... */ - 1753 1 : /* ... */ - 1754 1 : /* ... */ - 1755 1 : /* ... */ - 1756 : /* ... */ - 1757 1 : /* ... */ - 1758 1 : /* ... */ - 1759 1 : /* ... */ - 1760 : /* ... */ - 1761 1 : /* test/tests.luau not found */ - 1762 : /* (content generated from line coverage data) */ - 1763 1 : /* ... */ - 1764 : /* ... */ - 1765 1 : /* ... */ - 1766 1 : /* ... */ - 1767 : /* ... */ - 1768 1 : /* ... */ - 1769 1 : /* ... */ - 1770 1 : /* ... */ - 1771 : /* ... */ - 1772 1 : /* ... */ - 1773 : /* ... */ - 1774 : /* ... */ - 1775 : /* ... */ - 1776 1 : /* ... */ - 1777 1 : /* ... */ - 1778 1 : /* ... */ - 1779 : /* ... */ - 1780 1 : /* ... */ - 1781 1 : /* test/tests.luau not found */ - 1782 : /* (content generated from line coverage data) */ - 1783 1 : /* ... */ - 1784 1 : /* ... */ - 1785 1 : /* ... */ - 1786 : /* ... */ - 1787 : /* ... */ - 1788 1 : /* ... */ - 1789 1 : /* ... */ - 1790 : /* ... */ - 1791 1 : /* ... */ - 1792 : /* ... */ - 1793 1 : /* ... */ - 1794 1 : /* ... */ - 1795 1 : /* ... */ - 1796 : /* ... */ - 1797 1 : /* ... */ - 1798 1 : /* ... */ - 1799 1 : /* ... */ - 1800 : /* ... */ - 1801 1 : /* test/tests.luau not found */ - 1802 : /* (content generated from line coverage data) */ - 1803 1 : /* ... */ - 1804 : /* ... */ - 1805 1 : /* ... */ - 1806 1 : /* ... */ - 1807 1 : /* ... */ - 1808 : /* ... */ - 1809 : /* ... */ - 1810 1 : /* ... */ - 1811 1 : /* ... */ - 1812 : /* ... */ - 1813 1 : /* ... */ - 1814 : /* ... */ - 1815 1 : /* ... */ - 1816 : /* ... */ - 1817 1 : /* ... */ - 1818 1 : /* ... */ - 1819 1 : /* ... */ - 1820 : /* ... */ - 1821 1 : /* test/tests.luau not found */ - 1822 1 : /* (content generated from line coverage data) */ - 1823 1 : /* ... */ - 1824 : /* ... */ - 1825 1 : /* ... */ - 1826 1 : /* ... */ - 1827 1 : /* ... */ - 1828 : /* ... */ - 1829 : /* ... */ - 1830 1 : /* ... */ - 1831 : /* ... */ - 1832 1 : /* ... */ - 1833 : /* ... */ - 1834 1 : /* ... */ - 1835 : /* ... */ - 1836 : /* ... */ - 1837 1 : /* ... */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
gray:30 | - -0 | - - -
green_highlight:26 | - -0 | - - -
red:14 | - -0 | - - -
red_highlight:22 | - -0 | - - -
white:6 | - -0 | - - -
white_underline:2 | - -0 | - - -
<main> | - -1 | - - -
green:10 | - -10 | - - -
yellow:18 | - -10 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<main> | - -1 | - - -
gray:30 | - -0 | - - -
green:10 | - -10 | - - -
green_highlight:26 | - -0 | - - -
red:14 | - -0 | - - -
red_highlight:22 | - -0 | - - -
white:6 | - -0 | - - -
white_underline:2 | - -0 | - - -
yellow:18 | - -10 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/ansi.luau not found */ - 2 1 : /* (content generated from line coverage data) */ - 3 0 : /* ... */ - 4 : /* ... */ - 5 : /* ... */ - 6 1 : /* ... */ - 7 0 : /* ... */ - 8 : /* ... */ - 9 : /* ... */ - 10 1 : /* ... */ - 11 10 : /* ... */ - 12 : /* ... */ - 13 : /* ... */ - 14 1 : /* ... */ - 15 0 : /* ... */ - 16 : /* ... */ - 17 : /* ... */ - 18 1 : /* ... */ - 19 10 : /* ... */ - 20 : /* ... */ - 21 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/ansi.luau not found */ - 22 1 : /* (content generated from line coverage data) */ - 23 0 : /* ... */ - 24 : /* ... */ - 25 : /* ... */ - 26 1 : /* ... */ - 27 0 : /* ... */ - 28 : /* ... */ - 29 : /* ... */ - 30 1 : /* ... */ - 31 0 : /* ... */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<main> | - -1 | - - -
components:15 | - -3 | - - -
pe:6 | - -10 | - - -
name:11 | - -16 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<main> | - -1 | - - -
components:15 | - -3 | - - -
name:11 | - -16 | - - -
pe:6 | - -10 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/entity_visualiser.luau not found */ - 2 1 : /* (content generated from line coverage data) */ - 3 1 : /* ... */ - 4 1 : /* ... */ - 5 : /* ... */ - 6 1 : /* ... */ - 7 10 : /* ... */ - 8 10 : /* ... */ - 9 : /* ... */ - 10 : /* ... */ - 11 1 : /* ... */ - 12 16 : /* ... */ - 13 : /* ... */ - 14 : /* ... */ - 15 1 : /* ... */ - 16 3 : /* ... */ - 17 3 : /* ... */ - 18 0 : /* ... */ - 19 : /* ... */ - 20 : /* ... */ - 21 3 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/entity_visualiser.luau not found */ - 22 3 : /* (content generated from line coverage data) */ - 23 3 : /* ... */ - 24 3 : /* ... */ - 25 3 : /* ... */ - 26 8 : /* ... */ - 27 8 : /* ... */ - 28 8 : /* ... */ - 29 8 : /* ... */ - 30 : /* ... */ - 31 0 : /* ... */ - 32 : /* ... */ - 33 8 : /* ... */ - 34 8 : /* ... */ - 35 : /* ... */ - 36 3 : /* ... */ - 37 3 : /* ... */ - 38 : /* ... */ - 39 : /* ... */ - 40 1 : /* ... */ - 41 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/entity_visualiser.luau not found */ - 42 1 : /* (content generated from line coverage data) */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
ansi.luau | -
-
|
- 64.7 % | -17 | -11 | -33.3 % | -9 | -3 | -|
testkit.luau | -
-
|
- 66.1 % | -319 | -211 | -64.5 % | -31 | -20 | -|
lifetime_tracker.luau | -
-
|
- 49.3 % | -142 | -70 | -72.7 % | -11 | -8 | -|
entity_visualiser.luau | -
-
|
- 93.3 % | -30 | -28 | -100.0 % | -4 | -4 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
lifetime_tracker.luau | -
-
|
- 49.3 % | -142 | -70 | -72.7 % | -11 | -8 | -|
ansi.luau | -
-
|
- 64.7 % | -17 | -11 | -33.3 % | -9 | -3 | -|
testkit.luau | -
-
|
- 66.1 % | -319 | -211 | -64.5 % | -31 | -20 | -|
entity_visualiser.luau | -
-
|
- 93.3 % | -30 | -28 | -100.0 % | -4 | -4 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
- | - | - | - | - | - | - | ||
Filename ![]() |
- Line Coverage ![]() |
- Function Coverage ![]() |
- ||||||
Rate | -Total | -Hit | -Rate | -Total | -Hit | -|||
ansi.luau | -
-
|
- 64.7 % | -17 | -11 | -33.3 % | -9 | -3 | -|
entity_visualiser.luau | -
-
|
- 93.3 % | -30 | -28 | -100.0 % | -4 | -4 | -|
lifetime_tracker.luau | -
-
|
- 49.3 % | -142 | -70 | -72.7 % | -11 | -8 | -|
testkit.luau | -
-
|
- 66.1 % | -319 | -211 | -64.5 % | -31 | -20 | -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<anonymous>:135 | - -0 | - - -
<anonymous>:89 | - -0 | - - -
name:26 | - -0 | - - -
<anonymous>:164 | - -1 | - - -
<anonymous>:175 | - -1 | - - -
<anonymous>:62 | - -1 | - - -
<main> | - -1 | - - -
lifetime_tracker_add:36 | - -1 | - - -
<anonymous>:48 | - -3 | - - -
print_centered_entity:12 | - -3 | - - -
pad:30 | - -5 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<anonymous>:135 | - -0 | - - -
<anonymous>:164 | - -1 | - - -
<anonymous>:175 | - -1 | - - -
<anonymous>:48 | - -3 | - - -
<anonymous>:62 | - -1 | - - -
<anonymous>:89 | - -0 | - - -
<main> | - -1 | - - -
lifetime_tracker_add:36 | - -1 | - - -
name:26 | - -0 | - - -
pad:30 | - -5 | - - -
print_centered_entity:12 | - -3 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 2 1 : /* (content generated from line coverage data) */ - 3 1 : /* ... */ - 4 1 : /* ... */ - 5 1 : /* ... */ - 6 : /* ... */ - 7 1 : /* ... */ - 8 : /* ... */ - 9 1 : /* ... */ - 10 1 : /* ... */ - 11 : /* ... */ - 12 1 : /* ... */ - 13 3 : /* ... */ - 14 3 : /* ... */ - 15 : /* ... */ - 16 3 : /* ... */ - 17 : /* ... */ - 18 3 : /* ... */ - 19 3 : /* ... */ - 20 : /* ... */ - 21 3 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 22 : /* (content generated from line coverage data) */ - 23 3 : /* ... */ - 24 : /* ... */ - 25 : /* ... */ - 26 1 : /* ... */ - 27 0 : /* ... */ - 28 : /* ... */ - 29 1 : /* ... */ - 30 1 : /* ... */ - 31 5 : /* ... */ - 32 0 : /* ... */ - 33 : /* ... */ - 34 : /* ... */ - 35 : /* ... */ - 36 1 : /* ... */ - 37 1 : /* ... */ - 38 1 : /* ... */ - 39 1 : /* ... */ - 40 : /* ... */ - 41 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 42 : /* (content generated from line coverage data) */ - 43 1 : /* ... */ - 44 : /* ... */ - 45 1 : /* ... */ - 46 : /* ... */ - 47 1 : /* ... */ - 48 1 : /* ... */ - 49 3 : /* ... */ - 50 0 : /* ... */ - 51 : /* ... */ - 52 3 : /* ... */ - 53 3 : /* ... */ - 54 3 : /* ... */ - 55 0 : /* ... */ - 56 : /* ... */ - 57 3 : /* ... */ - 58 : /* ... */ - 59 3 : /* ... */ - 60 3 : /* ... */ - 61 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 62 1 : /* (content generated from line coverage data) */ - 63 1 : /* ... */ - 64 1 : /* ... */ - 65 1 : /* ... */ - 66 1 : /* ... */ - 67 : /* ... */ - 68 1 : /* ... */ - 69 1 : /* ... */ - 70 1 : /* ... */ - 71 1 : /* ... */ - 72 2 : /* ... */ - 73 2 : /* ... */ - 74 2 : /* ... */ - 75 : /* ... */ - 76 1 : /* ... */ - 77 : /* ... */ - 78 : /* ... */ - 79 1 : /* ... */ - 80 1 : /* ... */ - 81 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 82 1 : /* (content generated from line coverage data) */ - 83 1 : /* ... */ - 84 : /* ... */ - 85 : /* ... */ - 86 1 : /* ... */ - 87 : /* ... */ - 88 1 : /* ... */ - 89 1 : /* ... */ - 90 0 : /* ... */ - 91 0 : /* ... */ - 92 0 : /* ... */ - 93 : /* ... */ - 94 0 : /* ... */ - 95 0 : /* ... */ - 96 0 : /* ... */ - 97 : /* ... */ - 98 : /* ... */ - 99 0 : /* ... */ - 100 0 : /* ... */ - 101 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 102 0 : /* (content generated from line coverage data) */ - 103 : /* ... */ - 104 0 : /* ... */ - 105 0 : /* ... */ - 106 0 : /* ... */ - 107 : /* ... */ - 108 : /* ... */ - 109 0 : /* ... */ - 110 0 : /* ... */ - 111 0 : /* ... */ - 112 0 : /* ... */ - 113 0 : /* ... */ - 114 0 : /* ... */ - 115 0 : /* ... */ - 116 : /* ... */ - 117 0 : /* ... */ - 118 : /* ... */ - 119 : /* ... */ - 120 : /* ... */ - 121 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 122 : /* (content generated from line coverage data) */ - 123 : /* ... */ - 124 0 : /* ... */ - 125 0 : /* ... */ - 126 0 : /* ... */ - 127 0 : /* ... */ - 128 0 : /* ... */ - 129 : /* ... */ - 130 0 : /* ... */ - 131 : /* ... */ - 132 : /* ... */ - 133 : /* ... */ - 134 : /* ... */ - 135 0 : /* ... */ - 136 0 : /* ... */ - 137 : /* ... */ - 138 : /* ... */ - 139 : /* ... */ - 140 0 : /* ... */ - 141 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 142 0 : /* (content generated from line coverage data) */ - 143 0 : /* ... */ - 144 0 : /* ... */ - 145 0 : /* ... */ - 146 : /* ... */ - 147 0 : /* ... */ - 148 0 : /* ... */ - 149 0 : /* ... */ - 150 0 : /* ... */ - 151 0 : /* ... */ - 152 0 : /* ... */ - 153 : /* ... */ - 154 0 : /* ... */ - 155 : /* ... */ - 156 : /* ... */ - 157 0 : /* ... */ - 158 : /* ... */ - 159 0 : /* ... */ - 160 0 : /* ... */ - 161 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 162 1 : /* (content generated from line coverage data) */ - 163 1 : /* ... */ - 164 1 : /* ... */ - 165 1 : /* ... */ - 166 0 : /* ... */ - 167 0 : /* ... */ - 168 0 : /* ... */ - 169 0 : /* ... */ - 170 0 : /* ... */ - 171 : /* ... */ - 172 : /* ... */ - 173 : /* ... */ - 174 1 : /* ... */ - 175 1 : /* ... */ - 176 1 : /* ... */ - 177 : /* ... */ - 178 1 : /* ... */ - 179 1 : /* ... */ - 180 0 : /* ... */ - 181 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 182 0 : /* (content generated from line coverage data) */ - 183 0 : /* ... */ - 184 : /* ... */ - 185 : /* ... */ - 186 0 : /* ... */ - 187 0 : /* ... */ - 188 : /* ... */ - 189 : /* ... */ - 190 0 : /* ... */ - 191 0 : /* ... */ - 192 0 : /* ... */ - 193 0 : /* ... */ - 194 0 : /* ... */ - 195 0 : /* ... */ - 196 0 : /* ... */ - 197 : /* ... */ - 198 0 : /* ... */ - 199 : /* ... */ - 200 0 : /* ... */ - 201 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/lifetime_tracker.luau not found */ - 202 0 : /* (content generated from line coverage data) */ - 203 : /* ... */ - 204 : /* ... */ - 205 : /* ... */ - 206 : /* ... */ - 207 : /* ... */ - 208 : /* ... */ - 209 : /* ... */ - 210 1 : /* ... */ - 211 1 : /* ... */ - 212 : /* ... */ - 213 1 : /* ... */ - 214 : /* ... */ - 215 : /* ... */ - 216 1 : /* ... */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<anonymous>:240 | - -0 | - - -
<anonymous>:350 | - -0 | - - -
FOCUS:258 | - -0 | - - -
deep_eq:496 | - -0 | - - -
disable_formatting:545 | - -0 | - - -
green_highlight:35 | - -0 | - - -
print2:392 | - -0 | - - -
red_highlight:31 | - -0 | - - -
shallow_eq:476 | - -0 | - - -
tos:397 | - -0 | - - -
white_underline:11 | - -0 | - - -
<main> | - -1 | - - -
FINISH:269 | - -1 | - - -
SKIP:310 | - -1 | - - -
START:326 | - -1 | - - -
benchmark:541 | - -1 | - - -
test:529 | - -1 | - - -
BENCH:338 | - -3 | - - -
convert_units:48 | - -6 | - - -
round:368 | - -6 | - - -
CHECK_EXPECT_ERR:183 | - -9 | - - -
TEST:224 | - -24 | - - -
output_test_result:131 | - -24 | - - -
white:15 | - -24 | - - -
CASE:169 | - -72 | - - -
orange:43 | - -72 | - - -
yellow:27 | - -75 | - - -
green:19 | - -76 | - - -
gray:39 | - -83 | - - -
red:23 | - -144 | - - -
CHECK:201 | - -1173 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
Function Name ![]() |
-
- Hit count ![]() |
-
-
-
<anonymous>:240 | - -0 | - - -
<anonymous>:350 | - -0 | - - -
<main> | - -1 | - - -
BENCH:338 | - -3 | - - -
CASE:169 | - -72 | - - -
CHECK:201 | - -1173 | - - -
CHECK_EXPECT_ERR:183 | - -9 | - - -
FINISH:269 | - -1 | - - -
FOCUS:258 | - -0 | - - -
SKIP:310 | - -1 | - - -
START:326 | - -1 | - - -
TEST:224 | - -24 | - - -
benchmark:541 | - -1 | - - -
convert_units:48 | - -6 | - - -
deep_eq:496 | - -0 | - - -
disable_formatting:545 | - -0 | - - -
gray:39 | - -83 | - - -
green:19 | - -76 | - - -
green_highlight:35 | - -0 | - - -
orange:43 | - -72 | - - -
output_test_result:131 | - -24 | - - -
print2:392 | - -0 | - - -
red:23 | - -144 | - - -
red_highlight:31 | - -0 | - - -
round:368 | - -6 | - - -
shallow_eq:476 | - -0 | - - -
test:529 | - -1 | - - -
tos:397 | - -0 | - - -
white:15 | - -24 | - - -
white_underline:11 | - -0 | - - -
yellow:27 | - -75 | - - -
![]() |
Generated by: LCOV version 2.0-1 |
LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
-
|
- ||||||||||||||||||||||
![]() |
-Line data Source code- - 1 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 2 : /* (content generated from line coverage data) */ - 3 : /* ... */ - 4 : /* ... */ - 5 : /* ... */ - 6 : /* ... */ - 7 : /* ... */ - 8 1 : /* ... */ - 9 : /* ... */ - 10 1 : /* ... */ - 11 1 : /* ... */ - 12 0 : /* ... */ - 13 : /* ... */ - 14 : /* ... */ - 15 1 : /* ... */ - 16 24 : /* ... */ - 17 : /* ... */ - 18 : /* ... */ - 19 1 : /* ... */ - 20 76 : /* ... */ - 21 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 22 : /* (content generated from line coverage data) */ - 23 1 : /* ... */ - 24 144 : /* ... */ - 25 : /* ... */ - 26 : /* ... */ - 27 1 : /* ... */ - 28 75 : /* ... */ - 29 : /* ... */ - 30 : /* ... */ - 31 1 : /* ... */ - 32 0 : /* ... */ - 33 : /* ... */ - 34 : /* ... */ - 35 1 : /* ... */ - 36 0 : /* ... */ - 37 : /* ... */ - 38 : /* ... */ - 39 1 : /* ... */ - 40 83 : /* ... */ - 41 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 42 : /* (content generated from line coverage data) */ - 43 1 : /* ... */ - 44 72 : /* ... */ - 45 : /* ... */ - 46 : /* ... */ - 47 : /* ... */ - 48 1 : /* ... */ - 49 6 : /* ... */ - 50 6 : /* ... */ - 51 : /* ... */ - 52 6 : /* ... */ - 53 6 : /* ... */ - 54 6 : /* ... */ - 55 6 : /* ... */ - 56 6 : /* ... */ - 57 6 : /* ... */ - 58 6 : /* ... */ - 59 6 : /* ... */ - 60 6 : /* ... */ - 61 6 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 62 : /* (content generated from line coverage data) */ - 63 : /* ... */ - 64 6 : /* ... */ - 65 6 : /* ... */ - 66 6 : /* ... */ - 67 6 : /* ... */ - 68 6 : /* ... */ - 69 6 : /* ... */ - 70 6 : /* ... */ - 71 6 : /* ... */ - 72 6 : /* ... */ - 73 6 : /* ... */ - 74 : /* ... */ - 75 : /* ... */ - 76 6 : /* ... */ - 77 : /* ... */ - 78 7 : /* ... */ - 79 1 : /* ... */ - 80 1 : /* ... */ - 81 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 82 : /* (content generated from line coverage data) */ - 83 11 : /* ... */ - 84 7 : /* ... */ - 85 7 : /* ... */ - 86 : /* ... */ - 87 : /* ... */ - 88 6 : /* ... */ - 89 1 : /* ... */ - 90 5 : /* ... */ - 91 1 : /* ... */ - 92 4 : /* ... */ - 93 2 : /* ... */ - 94 : /* ... */ - 95 : /* ... */ - 96 6 : /* ... */ - 97 : /* ... */ - 98 : /* ... */ - 99 1 : /* ... */ - 100 : /* ... */ - 101 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 102 : /* (content generated from line coverage data) */ - 103 : /* ... */ - 104 : /* ... */ - 105 : /* ... */ - 106 : /* ... */ - 107 : /* ... */ - 108 : /* ... */ - 109 : /* ... */ - 110 : /* ... */ - 111 : /* ... */ - 112 : /* ... */ - 113 : /* ... */ - 114 : /* ... */ - 115 : /* ... */ - 116 : /* ... */ - 117 : /* ... */ - 118 : /* ... */ - 119 : /* ... */ - 120 : /* ... */ - 121 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 122 : /* (content generated from line coverage data) */ - 123 : /* ... */ - 124 1 : /* ... */ - 125 : /* ... */ - 126 1 : /* ... */ - 127 1 : /* ... */ - 128 1 : /* ... */ - 129 1 : /* ... */ - 130 : /* ... */ - 131 1 : /* ... */ - 132 24 : /* ... */ - 133 0 : /* ... */ - 134 0 : /* ... */ - 135 0 : /* ... */ - 136 : /* ... */ - 137 : /* ... */ - 138 0 : /* ... */ - 139 0 : /* ... */ - 140 : /* ... */ - 141 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 142 : /* (content generated from line coverage data) */ - 143 24 : /* ... */ - 144 : /* ... */ - 145 24 : /* ... */ - 146 72 : /* ... */ - 147 72 : /* ... */ - 148 72 : /* ... */ - 149 72 : /* ... */ - 150 72 : /* ... */ - 151 72 : /* ... */ - 152 72 : /* ... */ - 153 : /* ... */ - 154 72 : /* ... */ - 155 72 : /* ... */ - 156 : /* ... */ - 157 : /* ... */ - 158 72 : /* ... */ - 159 : /* ... */ - 160 : /* ... */ - 161 24 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 162 0 : /* (content generated from line coverage data) */ - 163 0 : /* ... */ - 164 : /* ... */ - 165 24 : /* ... */ - 166 : /* ... */ - 167 : /* ... */ - 168 : /* ... */ - 169 1 : /* ... */ - 170 72 : /* ... */ - 171 72 : /* ... */ - 172 : /* ... */ - 173 72 : /* ... */ - 174 72 : /* ... */ - 175 72 : /* ... */ - 176 72 : /* ... */ - 177 : /* ... */ - 178 : /* ... */ - 179 72 : /* ... */ - 180 72 : /* ... */ - 181 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 182 : /* (content generated from line coverage data) */ - 183 1 : /* ... */ - 184 9 : /* ... */ - 185 9 : /* ... */ - 186 9 : /* ... */ - 187 0 : /* ... */ - 188 0 : /* ... */ - 189 : /* ... */ - 190 9 : /* ... */ - 191 9 : /* ... */ - 192 9 : /* ... */ - 193 9 : /* ... */ - 194 9 : /* ... */ - 195 0 : /* ... */ - 196 : /* ... */ - 197 9 : /* ... */ - 198 : /* ... */ - 199 : /* ... */ - 200 : /* ... */ - 201 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 202 1173 : /* (content generated from line coverage data) */ - 203 : /* ... */ - 204 1173 : /* ... */ - 205 : /* ... */ - 206 1173 : /* ... */ - 207 9 : /* ... */ - 208 9 : /* ... */ - 209 : /* ... */ - 210 : /* ... */ - 211 1173 : /* ... */ - 212 : /* ... */ - 213 1173 : /* ... */ - 214 1173 : /* ... */ - 215 1173 : /* ... */ - 216 1 : /* ... */ - 217 : /* ... */ - 218 1173 : /* ... */ - 219 : /* ... */ - 220 : /* ... */ - 221 1173 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 222 : /* (content generated from line coverage data) */ - 223 : /* ... */ - 224 1 : /* ... */ - 225 24 : /* ... */ - 226 24 : /* ... */ - 227 : /* ... */ - 228 24 : /* ... */ - 229 24 : /* ... */ - 230 24 : /* ... */ - 231 24 : /* ... */ - 232 24 : /* ... */ - 233 : /* ... */ - 234 24 : /* ... */ - 235 : /* ... */ - 236 24 : /* ... */ - 237 : /* ... */ - 238 24 : /* ... */ - 239 24 : /* ... */ - 240 24 : /* ... */ - 241 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 242 : /* (content generated from line coverage data) */ - 243 24 : /* ... */ - 244 : /* ... */ - 245 24 : /* ... */ - 246 0 : /* ... */ - 247 : /* ... */ - 248 24 : /* ... */ - 249 : /* ... */ - 250 24 : /* ... */ - 251 0 : /* ... */ - 252 0 : /* ... */ - 253 : /* ... */ - 254 : /* ... */ - 255 24 : /* ... */ - 256 : /* ... */ - 257 : /* ... */ - 258 1 : /* ... */ - 259 0 : /* ... */ - 260 : /* ... */ - 261 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 262 0 : /* (content generated from line coverage data) */ - 263 0 : /* ... */ - 264 : /* ... */ - 265 0 : /* ... */ - 266 : /* ... */ - 267 : /* ... */ - 268 : /* ... */ - 269 1 : /* ... */ - 270 1 : /* ... */ - 271 1 : /* ... */ - 272 1 : /* ... */ - 273 1 : /* ... */ - 274 1 : /* ... */ - 275 1 : /* ... */ - 276 : /* ... */ - 277 1 : /* ... */ - 278 24 : /* ... */ - 279 24 : /* ... */ - 280 72 : /* ... */ - 281 72 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 282 0 : /* (content generated from line coverage data) */ - 283 : /* ... */ - 284 72 : /* ... */ - 285 72 : /* ... */ - 286 0 : /* ... */ - 287 : /* ... */ - 288 72 : /* ... */ - 289 : /* ... */ - 290 0 : /* ... */ - 291 : /* ... */ - 292 : /* ... */ - 293 : /* ... */ - 294 24 : /* ... */ - 295 : /* ... */ - 296 : /* ... */ - 297 1 : /* ... */ - 298 1 : /* ... */ - 299 0 : /* ... */ - 300 : /* ... */ - 301 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 302 1 : /* (content generated from line coverage data) */ - 303 : /* ... */ - 304 1 : /* ... */ - 305 : /* ... */ - 306 1 : /* ... */ - 307 1 : /* ... */ - 308 : /* ... */ - 309 : /* ... */ - 310 1 : /* ... */ - 311 1 : /* ... */ - 312 : /* ... */ - 313 : /* ... */ - 314 : /* ... */ - 315 : /* ... */ - 316 : /* ... */ - 317 : /* ... */ - 318 : /* ... */ - 319 : /* ... */ - 320 : /* ... */ - 321 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 322 : /* (content generated from line coverage data) */ - 323 : /* ... */ - 324 1 : /* ... */ - 325 : /* ... */ - 326 1 : /* ... */ - 327 1 : /* ... */ - 328 1 : /* ... */ - 329 1 : /* ... */ - 330 1 : /* ... */ - 331 : /* ... */ - 332 1 : /* ... */ - 333 1 : /* ... */ - 334 1 : /* ... */ - 335 1 : /* ... */ - 336 : /* ... */ - 337 : /* ... */ - 338 1 : /* ... */ - 339 3 : /* ... */ - 340 3 : /* ... */ - 341 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 342 3 : /* (content generated from line coverage data) */ - 343 3 : /* ... */ - 344 3 : /* ... */ - 345 : /* ... */ - 346 3 : /* ... */ - 347 3 : /* ... */ - 348 3 : /* ... */ - 349 : /* ... */ - 350 3 : /* ... */ - 351 0 : /* ... */ - 352 : /* ... */ - 353 : /* ... */ - 354 3 : /* ... */ - 355 3 : /* ... */ - 356 : /* ... */ - 357 3 : /* ... */ - 358 0 : /* ... */ - 359 0 : /* ... */ - 360 : /* ... */ - 361 3 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 362 3 : /* (content generated from line coverage data) */ - 363 : /* ... */ - 364 3 : /* ... */ - 365 3 : /* ... */ - 366 3 : /* ... */ - 367 : /* ... */ - 368 3 : /* ... */ - 369 6 : /* ... */ - 370 5 : /* ... */ - 371 : /* ... */ - 372 : /* ... */ - 373 3 : /* ... */ - 374 3 : /* ... */ - 375 3 : /* ... */ - 376 3 : /* ... */ - 377 3 : /* ... */ - 378 3 : /* ... */ - 379 3 : /* ... */ - 380 3 : /* ... */ - 381 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 382 : /* (content generated from line coverage data) */ - 383 : /* ... */ - 384 : /* ... */ - 385 3 : /* ... */ - 386 : /* ... */ - 387 : /* ... */ - 388 : /* ... */ - 389 : /* ... */ - 390 : /* ... */ - 391 : /* ... */ - 392 1 : /* ... */ - 393 : /* ... */ - 394 : /* ... */ - 395 : /* ... */ - 396 : /* ... */ - 397 0 : /* ... */ - 398 0 : /* ... */ - 399 0 : /* ... */ - 400 : /* ... */ - 401 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 402 0 : /* (content generated from line coverage data) */ - 403 0 : /* ... */ - 404 0 : /* ... */ - 405 0 : /* ... */ - 406 0 : /* ... */ - 407 0 : /* ... */ - 408 0 : /* ... */ - 409 0 : /* ... */ - 410 0 : /* ... */ - 411 0 : /* ... */ - 412 0 : /* ... */ - 413 0 : /* ... */ - 414 0 : /* ... */ - 415 : /* ... */ - 416 0 : /* ... */ - 417 : /* ... */ - 418 0 : /* ... */ - 419 0 : /* ... */ - 420 0 : /* ... */ - 421 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 422 : /* (content generated from line coverage data) */ - 423 0 : /* ... */ - 424 0 : /* ... */ - 425 : /* ... */ - 426 : /* ... */ - 427 0 : /* ... */ - 428 0 : /* ... */ - 429 0 : /* ... */ - 430 0 : /* ... */ - 431 : /* ... */ - 432 0 : /* ... */ - 433 0 : /* ... */ - 434 0 : /* ... */ - 435 0 : /* ... */ - 436 : /* ... */ - 437 0 : /* ... */ - 438 0 : /* ... */ - 439 0 : /* ... */ - 440 0 : /* ... */ - 441 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 442 : /* (content generated from line coverage data) */ - 443 0 : /* ... */ - 444 0 : /* ... */ - 445 : /* ... */ - 446 : /* ... */ - 447 0 : /* ... */ - 448 0 : /* ... */ - 449 : /* ... */ - 450 0 : /* ... */ - 451 : /* ... */ - 452 0 : /* ... */ - 453 : /* ... */ - 454 0 : /* ... */ - 455 0 : /* ... */ - 456 0 : /* ... */ - 457 : /* ... */ - 458 : /* ... */ - 459 0 : /* ... */ - 460 0 : /* ... */ - 461 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 462 0 : /* (content generated from line coverage data) */ - 463 : /* ... */ - 464 : /* ... */ - 465 : /* ... */ - 466 0 : /* ... */ - 467 0 : /* ... */ - 468 0 : /* ... */ - 469 0 : /* ... */ - 470 : /* ... */ - 471 : /* ... */ - 472 : /* ... */ - 473 : /* ... */ - 474 : /* ... */ - 475 : /* ... */ - 476 1 : /* ... */ - 477 0 : /* ... */ - 478 0 : /* ... */ - 479 : /* ... */ - 480 : /* ... */ - 481 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 482 0 : /* (content generated from line coverage data) */ - 483 0 : /* ... */ - 484 : /* ... */ - 485 : /* ... */ - 486 : /* ... */ - 487 0 : /* ... */ - 488 0 : /* ... */ - 489 0 : /* ... */ - 490 : /* ... */ - 491 : /* ... */ - 492 : /* ... */ - 493 0 : /* ... */ - 494 : /* ... */ - 495 : /* ... */ - 496 1 : /* ... */ - 497 0 : /* ... */ - 498 0 : /* ... */ - 499 : /* ... */ - 500 : /* ... */ - 501 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 502 0 : /* (content generated from line coverage data) */ - 503 0 : /* ... */ - 504 0 : /* ... */ - 505 : /* ... */ - 506 0 : /* ... */ - 507 0 : /* ... */ - 508 : /* ... */ - 509 : /* ... */ - 510 : /* ... */ - 511 0 : /* ... */ - 512 0 : /* ... */ - 513 0 : /* ... */ - 514 0 : /* ... */ - 515 : /* ... */ - 516 0 : /* ... */ - 517 0 : /* ... */ - 518 : /* ... */ - 519 : /* ... */ - 520 : /* ... */ - 521 0 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 522 : /* (content generated from line coverage data) */ - 523 : /* ... */ - 524 : /* ... */ - 525 : /* ... */ - 526 : /* ... */ - 527 : /* ... */ - 528 1 : /* ... */ - 529 1 : /* ... */ - 530 1 : /* ... */ - 531 1 : /* ... */ - 532 1 : /* ... */ - 533 1 : /* ... */ - 534 1 : /* ... */ - 535 1 : /* ... */ - 536 1 : /* ... */ - 537 1 : /* ... */ - 538 : /* ... */ - 539 : /* ... */ - 540 : /* ... */ - 541 1 : /* /mnt/c/Users/Marcus/Documents/packages/jecs/tools/testkit.luau not found */ - 542 1 : /* (content generated from line coverage data) */ - 543 : /* ... */ - 544 : /* ... */ - 545 1 : /* ... */ - 546 0 : /* ... */ - 547 : /* ... */ - 548 : /* ... */ - 549 1 : /* ... */ - 550 : /* ... */ - 551 1 : /* ... */ - 552 1 : /* ... */ - 553 : /* ... */ - 554 1 : /* ... */ -- |
-
![]() |
Generated by: LCOV version 2.0-1 |
Function | Hits |
---|---|
1 | |
print_centered_entity:12 | 0 |
name:26 | 0 |
pad:30 | 0 |
lifetime_tracker_add:36 | 0 |
0 | |
0 | |
0 | |
0 | |
0 | |
0 |
Line | Hits | Code |
---|---|---|
1 | 1 | local jecs = require("@jecs") |
2 | 1 | local ECS_GENERATION = jecs.ECS_GENERATION |
3 | 1 | local ECS_ID = jecs.ECS_ID |
4 | 1 | local __ = jecs.Wildcard |
5 | 1 | local pair = jecs.pair |
6 | N/A | > |
7 | 1 | local prettify = require("@tools/entity_visualiser").prettify |
8 | N/A | > |
9 | 1 | local pe = prettify |
10 | 1 | local ansi = require("@tools/ansi") |
11 | N/A | > |
12 | 1 | function print_centered_entity(entity, width: number) |
13 | 0 | local entity_str = tostring(entity) |
14 | 0 | local entity_length = #entity_str |
15 | N/A | > |
16 | 0 | local padding_total = width - 2 - entity_length |
17 | N/A | > |
18 | 0 | local padding_left = math.floor(padding_total / 2) |
19 | 0 | local padding_right = padding_total - padding_left |
20 | N/A | > |
21 | 0 | local centered_str = string.rep(" ", padding_left) .. entity_str .. string.rep(" ", padding_right) |
22 | N/A | > |
23 | 0 | print("|" .. centered_str .. "|") |
24 | N/A | end | >
25 | N/A | > |
26 | 1 | local function name(world, e) |
27 | 0 | return world:get(world, e, jecs.Name) or pe(e) |
28 | N/A | end | >
29 | 1 | local padding_enabled = false |
30 | 1 | local function pad() |
31 | 0 | if padding_enabled then |
32 | 0 | print("") |
33 | N/A | end | >
34 | N/A | end | >
35 | N/A | > |
36 | 1 | local function lifetime_tracker_add(world: jecs.World, opt) |
37 | 0 | local entity_index = world.entity_index |
38 | 0 | local dense_array = entity_index.dense_array |
39 | 0 | local component_index = world.component_index |
40 | N/A | > |
41 | 0 | local ENTITY_RANGE = (jecs.Rest :: any) + 1 |
42 | N/A | > |
43 | 0 | local w = setmetatable({}, { __index = world }) |
44 | N/A | > |
45 | 0 | padding_enabled = opt.padding_enabled |
46 | N/A | > |
47 | 0 | local world_entity = world.entity |
48 | 0 | w.entity = function(self, entity) |
49 | 0 | if entity then |
50 | 0 | return world_entity(world, entity) |
51 | N/A | end | >
52 | 0 | local will_recycle = entity_index.max_id ~= entity_index.alive_count |
53 | 0 | local e = world_entity(world) |
54 | 0 | if will_recycle then |
55 | 0 | print(`*recycled {pe(e)}`) |
56 | 0 | else |
57 | 0 | print(`*created {pe(e)}`) |
58 | N/A | end | >
59 | 0 | pad() |
60 | 0 | return e |
61 | N/A | end | >
62 | 0 | w.print_entity_index = function(self) |
63 | 0 | local max_id = entity_index.max_id |
64 | 0 | local alive_count = entity_index.alive_count |
65 | 0 | local alive = table.move(dense_array, 1 + jecs.Rest :: any, alive_count, 1, {}) |
66 | 0 | local dead = table.move(dense_array, alive_count + 1, max_id, 1, {}) |
67 | N/A | > |
68 | 0 | local sep = "|--------|" |
69 | 0 | if #alive > 0 then |
70 | 0 | print("|-alive--|") |
71 | 0 | for i = 1, #alive do |
72 | 0 | local e = pe(alive[i]) |
73 | 0 | print_centered_entity(e, 32) |
74 | 0 | print(sep) |
75 | N/A | end | >
76 | 0 | print("\n") |
77 | N/A | end | >
78 | N/A | > |
79 | 0 | if #dead > 0 then |
80 | 0 | print("|--dead--|") |
81 | 0 | for i = 1, #dead do |
82 | 0 | print_centered_entity(pe(dead[i]), 32) |
83 | 0 | print(sep) |
84 | N/A | end | >
85 | N/A | end | >
86 | 0 | pad() |
87 | N/A | end | >
88 | 0 | local timelines = {} |
89 | 0 | w.print_snapshot = function(self) |
90 | 0 | local timeline = #timelines + 1 |
91 | 0 | local entity_column_width = 10 |
92 | 0 | local status_column_width = 8 |
93 | N/A | > |
94 | 0 | local header = string.format("| %-" .. entity_column_width .. "s |", "Entity") |
95 | 0 | for i = 1, timeline do |
96 | 0 | header = header .. string.format(" %-" .. status_column_width .. "s |", string.format("T%d", i)) |
97 | N/A | end | >
98 | N/A | > |
99 | 0 | local max_id = entity_index.max_id |
100 | 0 | local alive_count = entity_index.alive_count |
101 | 0 | local alive = table.move(dense_array, 1 + jecs.Rest :: any, alive_count, 1, {}) |
102 | 0 | local dead = table.move(dense_array, alive_count + 1, max_id, 1, {}) |
103 | N/A | > |
104 | 0 | local data = {} |
105 | 0 | print("-------------------------------------------------------------------") |
106 | 0 | print(header) |
107 | N/A | > |
108 | N/A | -- Store the snapshot data for this timeline | >
109 | 0 | for i = ENTITY_RANGE, max_id do |
110 | 0 | if dense_array[i] then |
111 | 0 | local entity = dense_array[i] |
112 | 0 | local id = ECS_ID(entity) |
113 | 0 | local status = "alive" |
114 | 0 | if not world:contains(entity) then |
115 | 0 | status = "dead" |
116 | N/A | end | >
117 | 0 | data[id] = status |
118 | N/A | end | >
119 | N/A | end | >
120 | N/A | > |
121 | 0 | table.insert(timelines, data) |
122 | N/A | > |
123 | N/A | -- Create a table to hold entity data for sorting | >
124 | 0 | local entities = {} |
125 | 0 | for i = ENTITY_RANGE, max_id do |
126 | 0 | if dense_array[i] then |
127 | 0 | local entity = dense_array[i] |
128 | 0 | local id = ECS_ID(entity) |
129 | N/A | -- Push entity and id into the new `entities` table | >
130 | 0 | table.insert(entities, { entity = entity, id = id }) |
131 | N/A | end | >
132 | N/A | end | >
133 | N/A | > |
134 | N/A | -- Sort the entities by ECS_ID | >
135 | 0 | table.sort(entities, function(a, b) |
136 | 0 | return a.id < b.id |
137 | N/A | end) | >
138 | N/A | > |
139 | N/A | -- Print the sorted rows | >
140 | 0 | for _, entity_data in ipairs(entities) do |
141 | 0 | local entity = entity_data.entity |
142 | 0 | local id = entity_data.id |
143 | 0 | local status = "alive" |
144 | 0 | if id > alive_count then |
145 | 0 | status = "dead" |
146 | N/A | end | >
147 | 0 | local row = string.format("| %-" .. entity_column_width .. "s |", pe(entity)) |
148 | 0 | for j = 1, timeline do |
149 | 0 | local timeline_data = timelines[j] |
150 | 0 | local entity_data = timeline_data[id] |
151 | 0 | if entity_data then |
152 | 0 | row = row .. string.format(" %-" .. status_column_width .. "s |", entity_data) |
153 | 0 | else |
154 | 0 | row = row .. string.format(" %-" .. status_column_width .. "s |", "-") |
155 | N/A | end | >
156 | N/A | end | >
157 | 0 | print(row) |
158 | N/A | end | >
159 | 0 | print("-------------------------------------------------------------------") |
160 | 0 | pad() |
161 | N/A | end | >
162 | 0 | local world_add = world.add |
163 | 0 | local relations = {} |
164 | 0 | w.add = function(self, entity: any, component: any) |
165 | 0 | world_add(world, entity, component) |
166 | 0 | if jecs.IS_PAIR(component) then |
167 | 0 | local relation = jecs.pair_first(world, component) |
168 | 0 | local target = jecs.pair_second(world, component) |
169 | 0 | print(`*added ({pe(relation)}, {pe(target)}) to {pe(entity)}`) |
170 | 0 | pad() |
171 | N/A | end | >
172 | N/A | end | >
173 | N/A | > |
174 | 0 | local world_delete = world.delete |
175 | 0 | w.delete = function(self, e) |
176 | 0 | world_delete(world, e) |
177 | N/A | > |
178 | 0 | local idr_t = component_index[pair(__, e)] |
179 | 0 | if idr_t then |
180 | 0 | for archetype_id in idr_t.cache do |
181 | 0 | local archetype = world.archetypes[archetype_id] |
182 | 0 | for _, id in archetype.types do |
183 | 0 | if not jecs.IS_PAIR(id) then |
184 | 0 | continue |
185 | N/A | end | >
186 | 0 | local object = jecs.pair_second(world, id) |
187 | 0 | if object ~= e then |
188 | 0 | continue |
189 | N/A | end | >
190 | 0 | local id_record = component_index[id] |
191 | 0 | local flags = id_record.flags |
192 | 0 | local flags_delete_mask: number = bit32.band(flags, jecs.ECS_ID_DELETE) |
193 | 0 | if flags_delete_mask ~= 0 then |
194 | 0 | for _, entity in archetype.entities do |
195 | 0 | print(`*deleted dependant {pe(entity)} of {pe(e)}`) |
196 | 0 | pad() |
197 | N/A | end | >
198 | 0 | break |
199 | 0 | else |
200 | 0 | for _, entity in archetype.entities do |
201 | 0 | print( |
202 | 0 | `*removed dependency ({pe(jecs.pair_first(world, id))}, {pe(object)}) from {pe(entity)}` |
203 | 0 | ) |
204 | N/A | end | >
205 | N/A | end | >
206 | N/A | end | >
207 | N/A | end | >
208 | N/A | end | >
209 | N/A | > |
210 | 0 | print(`*deleted {pe(e)}`) |
211 | 0 | pad() |
212 | N/A | end | >
213 | 0 | return w |
214 | N/A | end | >
215 | N/A | > |
216 | 1 | return lifetime_tracker_add |
Function | Hits |
---|---|
1 | |
white_underline:11 | 0 |
white:15 | 24 |
green:19 | 77 |
red:23 | 146 |
yellow:27 | 76 |
red_highlight:31 | 0 |
green_highlight:35 | 0 |
gray:39 | 84 |
orange:43 | 73 |
convert_units:48 | 6 |
output_test_result:131 | 24 |
CASE:169 | 64 |
CHECK_EXPECT_ERR:183 | 0 |
CHECK:201 | 9 |
TEST:224 | 24 |
FOCUS:237 | 0 |
FINISH:248 | 0 |
0 | |
SKIP:314 | 1 |
START:330 | 1 |
BENCH:342 | 3 |
0 | |
round:372 | 0 |
print2:396 | 0 |
tos:401 | 0 |
shallow_eq:480 | 0 |
deep_eq:500 | 0 |
test:533 | 1 |
benchmark:545 | 1 |
disable_formatting:549 | 0 |
Line | Hits | Code |
---|---|---|
1 | N/A | -------------------------------------------------------------------------------- | >
2 | N/A | -- testkit.luau | >
3 | N/A | -- v0.7.3 | >
4 | N/A | -- MIT License | >
5 | N/A | -- Copyright (c) 2022 centau | >
6 | N/A | -------------------------------------------------------------------------------- | >
7 | N/A | > |
8 | 1 | local disable_ansi = false |
9 | N/A | > |
10 | 1 | local color = { |
11 | 1 | white_underline = function(s: string): string |
12 | 0 | return if disable_ansi then s else `\27[1;4m{s}\27[0m` |
13 | N/A | end, | >
14 | N/A | > |
15 | 1 | white = function(s: string): string |
16 | 24 | return if disable_ansi then s else `\27[37;1m{s}\27[0m` |
17 | N/A | end, | >
18 | N/A | > |
19 | 1 | green = function(s: string): string |
20 | 77 | return if disable_ansi then s else `\27[32;1m{s}\27[0m` |
21 | N/A | end, | >
22 | N/A | > |
23 | 1 | red = function(s: string): string |
24 | 146 | return if disable_ansi then s else `\27[31;1m{s}\27[0m` |
25 | N/A | end, | >
26 | N/A | > |
27 | 1 | yellow = function(s: string): string |
28 | 76 | return if disable_ansi then s else `\27[33;1m{s}\27[0m` |
29 | N/A | end, | >
30 | N/A | > |
31 | 1 | red_highlight = function(s: string): string |
32 | 0 | return if disable_ansi then s else `\27[41;1;30m{s}\27[0m` |
33 | N/A | end, | >
34 | N/A | > |
35 | 1 | green_highlight = function(s: string): string |
36 | 0 | return if disable_ansi then s else `\27[42;1;30m{s}\27[0m` |
37 | N/A | end, | >
38 | N/A | > |
39 | 1 | gray = function(s: string): string |
40 | 84 | return if disable_ansi then s else `\27[38;1m{s}\27[0m` |
41 | N/A | end, | >
42 | N/A | > |
43 | 1 | orange = function(s: string): string |
44 | 73 | return if disable_ansi then s else `\27[38;5;208m{s}\27[0m` |
45 | N/A | end, | >
46 | 0 | } |
47 | N/A | > |
48 | 1 | local function convert_units(unit: string, value: number): (number, string) |
49 | 6 | local sign = math.sign(value) |
50 | 6 | value = math.abs(value) |
51 | N/A | > |
52 | 6 | local prefix_colors = { |
53 | 6 | [4] = color.red, |
54 | 6 | [3] = color.red, |
55 | 6 | [2] = color.yellow, |
56 | 6 | [1] = color.yellow, |
57 | 6 | [0] = color.green, |
58 | 6 | [-1] = color.red, |
59 | 6 | [-2] = color.yellow, |
60 | 6 | [-3] = color.green, |
61 | 6 | [-4] = color.red, |
62 | 0 | } |
63 | N/A | > |
64 | 6 | local prefixes = { |
65 | 6 | [4] = "T", |
66 | 6 | [3] = "G", |
67 | 6 | [2] = "M", |
68 | 6 | [1] = "k", |
69 | 6 | [0] = " ", |
70 | 6 | [-1] = "m", |
71 | 6 | [-2] = "u", |
72 | 6 | [-3] = "n", |
73 | 6 | [-4] = "p", |
74 | 0 | } |
75 | N/A | > |
76 | 6 | local order = 0 |
77 | N/A | > |
78 | 7 | while value >= 1000 do |
79 | 1 | order += 1 |
80 | 1 | value /= 1000 |
81 | N/A | end | >
82 | N/A | > |
83 | 11 | while value ~= 0 and value < 1 do |
84 | 7 | order -= 1 |
85 | 7 | value *= 1000 |
86 | N/A | end | >
87 | N/A | > |
88 | 6 | if value >= 100 then |
89 | 1 | value = math.floor(value) |
90 | 5 | elseif value >= 10 then |
91 | 1 | value = math.floor(value * 1e1) / 1e1 |
92 | 4 | elseif value >= 1 then |
93 | 2 | value = math.floor(value * 1e2) / 1e2 |
94 | N/A | end | >
95 | N/A | > |
96 | 6 | return value * sign, prefix_colors[order](prefixes[order] .. unit) |
97 | N/A | end | >
98 | N/A | > |
99 | 1 | local WALL = color.gray("│") |
100 | N/A | > |
101 | N/A | -------------------------------------------------------------------------------- | >
102 | N/A | -- Testing | >
103 | N/A | -------------------------------------------------------------------------------- | >
104 | N/A | > |
105 | 0 | type Test = { |
106 | 0 | name: string, |
107 | 0 | case: Case?, |
108 | 0 | cases: { Case }, |
109 | 0 | duration: number, |
110 | 0 | error: { |
111 | 0 | message: string, |
112 | 0 | trace: string, |
113 | 0 | }?, |
114 | 0 | focus: boolean, |
115 | 0 | } |
116 | N/A | > |
117 | 0 | type Case = { |
118 | 0 | name: string, |
119 | 0 | result: number, |
120 | 0 | line: number?, |
121 | 0 | focus: boolean, |
122 | 0 | } |
123 | N/A | > |
124 | 1 | local PASS, FAIL, NONE, ERROR, SKIPPED = 1, 2, 3, 4, 5 |
125 | N/A | > |
126 | 1 | local check_for_focused = false |
127 | 1 | local skip = false |
128 | 1 | local test: Test? |
129 | 1 | local tests: { Test } = {} |
130 | N/A | > |
131 | 1 | local function output_test_result(test: Test) |
132 | 24 | if check_for_focused then |
133 | 0 | local any_focused = test.focus |
134 | 0 | for _, case in test.cases do |
135 | 0 | any_focused = any_focused or case.focus |
136 | N/A | end | >
137 | N/A | > |
138 | 0 | if not any_focused then |
139 | 0 | return |
140 | N/A | end | >
141 | N/A | end | >
142 | N/A | > |
143 | 24 | print(color.white(test.name)) |
144 | N/A | > |
145 | 24 | for _, case in test.cases do |
146 | 73 | local status = ({ |
147 | 73 | [PASS] = color.green("PASS"), |
148 | 73 | [FAIL] = color.red("FAIL"), |
149 | 73 | [NONE] = color.orange("NONE"), |
150 | 73 | [ERROR] = color.red("FAIL"), |
151 | 73 | [SKIPPED] = color.yellow("SKIP"), |
152 | 73 | })[case.result] |
153 | N/A | > |
154 | 73 | local line = case.result == FAIL and color.red(`{case.line}:`) or "" |
155 | 73 | if check_for_focused and case.focus == false and test.focus == false then |
156 | 0 | continue |
157 | N/A | end | >
158 | 73 | print(`{status}{WALL} {line}{color.gray(case.name)}`) |
159 | N/A | end | >
160 | N/A | > |
161 | 24 | if test.error then |
162 | 0 | print(color.gray("error: ") .. color.red(test.error.message)) |
163 | 0 | print(color.gray("trace: ") .. color.red(test.error.trace)) |
164 | 0 | else |
165 | 24 | print() |
166 | N/A | end | >
167 | N/A | end | >
168 | N/A | > |
169 | 1 | local function CASE(name: string) |
170 | 0 | skip = false |
171 | 0 | assert(test, "no active test") |
172 | N/A | > |
173 | 0 | local case = { |
174 | 0 | name = name, |
175 | 0 | result = NONE, |
176 | 0 | focus = false, |
177 | 0 | } |
178 | N/A | > |
179 | 0 | test.case = case |
180 | 0 | table.insert(test.cases, case) |
181 | N/A | end | >
182 | N/A | > |
183 | 1 | local function CHECK_EXPECT_ERR(fn, ...) |
184 | 9 | assert(test, "no active test") |
185 | 9 | local case = test.case |
186 | 9 | if not case then |
187 | 0 | CASE("") |
188 | 0 | case = test.case |
189 | N/A | end | >
190 | 9 | assert(case, "no active case") |
191 | 9 | if case.result ~= FAIL then |
192 | 9 | local ok, err = pcall(fn, ...) |
193 | 9 | case.result = if ok then FAIL else PASS |
194 | 9 | if skip then |
195 | 0 | case.result = SKIPPED |
196 | N/A | end | >
197 | 9 | case.line = debug.info(stack and stack + 1 or 2, "l") |
198 | N/A | end | >
199 | N/A | end | >
200 | N/A | > |
201 | 1 | local function CHECK |
202 | 1195 | assert(test, "no active test") |
203 | N/A | > |
204 | 1195 | local case = test.case |
205 | N/A | > |
206 | 1195 | if not case then |
207 | 9 | CASE("") |
208 | 9 | case = test.case |
209 | N/A | end | >
210 | N/A | > |
211 | 1195 | assert(case, "no active case") |
212 | N/A | > |
213 | 1195 | if case.result ~= FAIL then |
214 | 1195 | case.result = value and PASS or FAIL |
215 | 1195 | if skip then |
216 | 1 | case.result = SKIPPED |
217 | N/A | end | >
218 | 1195 | case.line = debug.info(stack and stack + 1 or 2, "l") |
219 | N/A | end | >
220 | N/A | > |
221 | 1195 | return value |
222 | N/A | end | >
223 | N/A | > |
224 | 1 | local function TEST(name: string, fn: () -> ()) |
225 | N/A | > |
226 | 24 | test = { |
227 | 24 | name = name, |
228 | 24 | cases = {}, |
229 | 24 | duration = 0, |
230 | 24 | focus = false, |
231 | 24 | fn = fn |
232 | 0 | } |
233 | N/A | > |
234 | 24 | table.insert(tests, test) |
235 | N/A | end | >
236 | N/A | > |
237 | 1 | local function FOCUS() |
238 | 0 | assert(test, "no active test") |
239 | N/A | > |
240 | 0 | check_for_focused = true |
241 | 0 | if test.case then |
242 | 0 | test.case.focus = true |
243 | 0 | else |
244 | 0 | test.focus = true |
245 | N/A | end | >
246 | N/A | end | >
247 | N/A | > |
248 | 1 | local function FINISH(): boolean |
249 | 1 | local success = true |
250 | 1 | local total_cases = 0 |
251 | 1 | local passed_cases = 0 |
252 | 1 | local passed_focus_cases = 0 |
253 | 1 | local total_focus_cases = 0 |
254 | 1 | local duration = 0 |
255 | N/A | > |
256 | 1 | for _, t in tests do |
257 | 24 | if check_for_focused and not t.focus then |
258 | 0 | continue |
259 | N/A | end | >
260 | 24 | test = t |
261 | 24 | fn = t.fn |
262 | 24 | local start = os.clock() |
263 | 24 | local err |
264 | 24 | local success = xpcall(fn, function(m: string) |
265 | 0 | err = { message = m, trace = debug.traceback(nil, 2) } |
266 | N/A | end) | >
267 | 24 | test.duration = os.clock() - start |
268 | N/A | > |
269 | 24 | if not test.case then |
270 | 0 | CASE("") |
271 | N/A | end | >
272 | 24 | assert(test.case, "no active case") |
273 | N/A | > |
274 | 24 | if not success then |
275 | 0 | test.case.result = ERROR |
276 | 0 | test.error = err |
277 | N/A | end | >
278 | 24 | collectgarbage() |
279 | N/A | end | >
280 | N/A | > |
281 | 1 | for _, test in tests do |
282 | 24 | duration += test.duration |
283 | 24 | for _, case in test.cases do |
284 | 73 | total_cases += 1 |
285 | 73 | if case.focus or test.focus then |
286 | 0 | total_focus_cases += 1 |
287 | N/A | end | >
288 | 73 | if case.result == PASS or case.result == NONE or case.result == SKIPPED then |
289 | 73 | if case.focus or test.focus then |
290 | 0 | passed_focus_cases += 1 |
291 | N/A | end | >
292 | 73 | passed_cases += 1 |
293 | 0 | else |
294 | 0 | success = false |
295 | N/A | end | >
296 | N/A | end | >
297 | N/A | > |
298 | 24 | output_test_result(test) |
299 | N/A | end | >
300 | N/A | > |
301 | 1 | print(color.gray(string.format(`{passed_cases}/{total_cases} test cases passed in %.3f ms.`, duration * 1e3))) |
302 | 1 | if check_for_focused then |
303 | 0 | print(color.gray(`{passed_focus_cases}/{total_focus_cases} focused test cases passed`)) |
304 | N/A | end | >
305 | N/A | > |
306 | 1 | local fails = total_cases - passed_cases |
307 | N/A | > |
308 | 1 | print((fails > 0 and color.red or color.green)(`{fails} {fails == 1 and "fail" or "fails"}`)) |
309 | N/A | > |
310 | 1 | check_for_focused = false |
311 | 1 | return success, table.clear(tests) |
312 | N/A | end | >
313 | N/A | > |
314 | 1 | local function SKIP() |
315 | 1 | skip = true |
316 | N/A | end | >
317 | N/A | > |
318 | N/A | -------------------------------------------------------------------------------- | >
319 | N/A | -- Benchmarking | >
320 | N/A | -------------------------------------------------------------------------------- | >
321 | N/A | > |
322 | 0 | type Bench = { |
323 | 0 | time_start: number?, |
324 | 0 | memory_start: number?, |
325 | 0 | iterations: number?, |
326 | 0 | } |
327 | N/A | > |
328 | 1 | local bench: Bench? |
329 | N/A | > |
330 | 1 | function START(iter: number?): number |
331 | 1 | local n = iter or 1 |
332 | 1 | assert(n > 0, "iterations must be greater than 0") |
333 | 1 | assert(bench, "no active benchmark") |
334 | 1 | assert(not bench.time_start, "clock was already started") |
335 | N/A | > |
336 | 1 | bench.iterations = n |
337 | 1 | bench.memory_start = gcinfo() |
338 | 1 | bench.time_start = os.clock() |
339 | 1 | return n |
340 | N/A | end | >
341 | N/A | > |
342 | 1 | local function BENCH(name: string, fn: () -> ()) |
343 | 3 | local active = bench |
344 | 3 | assert(not active, "a benchmark is already in progress") |
345 | N/A | > |
346 | 3 | bench = {} |
347 | 3 | assert(bench); |
348 | 3 | (collectgarbage :: any)("collect") |
349 | N/A | > |
350 | 3 | local mem_start = gcinfo() |
351 | 3 | local time_start = os.clock() |
352 | 3 | local err_msg: string? |
353 | N/A | > |
354 | 3 | local success = xpcall(fn, function(m: string) |
355 | 0 | err_msg = m .. debug.traceback(nil, 2) |
356 | N/A | end) | >
357 | N/A | > |
358 | 3 | local time_stop = os.clock() |
359 | 3 | local mem_stop = gcinfo() |
360 | N/A | > |
361 | 3 | if not success then |
362 | 0 | print(`{WALL}{color.red("ERROR")}{WALL} {name}`) |
363 | 0 | print(color.gray(err_msg :: string)) |
364 | 0 | else |
365 | 3 | time_start = bench.time_start or time_start |
366 | 3 | mem_start = bench.memory_start or mem_start |
367 | N/A | > |
368 | 3 | local n = bench.iterations or 1 |
369 | 3 | local d, d_unit = convert_units("s", (time_stop - time_start) / n) |
370 | 3 | local a, a_unit = convert_units("B", math.round((mem_stop - mem_start) / n * 1e3)) |
371 | N/A | > |
372 | 3 | local function round(x: number): string |
373 | 0 | return x > 0 and x < 10 and (x - math.floor(x)) > 0 and string.format("%2.1f", x) |
374 | 0 | or string.format("%3.f", x) |
375 | N/A | end | >
376 | N/A | > |
377 | 3 | print( |
378 | 3 | string.format( |
379 | 3 | `%s %s %s %s{WALL} %s`, |
380 | 3 | color.gray(round(d)), |
381 | 3 | d_unit, |
382 | 3 | color.gray(round(a)), |
383 | 3 | a_unit, |
384 | 3 | color.gray(name) |
385 | 0 | ) |
386 | 0 | ) |
387 | N/A | end | >
388 | N/A | > |
389 | 3 | bench = nil |
390 | N/A | end | >
391 | N/A | > |
392 | N/A | -------------------------------------------------------------------------------- | >
393 | N/A | -- Printing | >
394 | N/A | -------------------------------------------------------------------------------- | >
395 | N/A | > |
396 | 1 | local function print2(v: unknown) |
397 | 0 | type Buffer = { n: number, [number]: string } |
398 | 0 | type Cyclic = { n: number, [{}]: number } |
399 | N/A | > |
400 | N/A | -- overkill concatenationless string buffer | >
401 | 0 | local function tos(value: any, stack: number, str: Buffer, cyclic: Cyclic) |
402 | 0 | local TAB = " " |
403 | 0 | local indent = table.concat(table.create(stack, TAB)) |
404 | N/A | > |
405 | 0 | if type(value) == "string" then |
406 | 0 | local n = str.n |
407 | 0 | str[n + 1] = "\"" |
408 | 0 | str[n + 2] = value |
409 | 0 | str[n + 3] = "\"" |
410 | 0 | str.n = n + 3 |
411 | 0 | elseif type(value) ~= "table" then |
412 | 0 | local n = str.n |
413 | 0 | str[n + 1] = value == nil and "nil" or tostring(value) |
414 | 0 | str.n = n + 1 |
415 | 0 | elseif next(value) == nil then |
416 | 0 | local n = str.n |
417 | 0 | str[n + 1] = "{}" |
418 | 0 | str.n = n + 1 |
419 | 0 | else -- is table |
420 | 0 | local tabbed_indent = indent .. TAB |
421 | N/A | > |
422 | 0 | if cyclic[value] then |
423 | 0 | str.n += 1 |
424 | 0 | str[str.n] = color.gray(`CYCLIC REF {cyclic[value]}`) |
425 | 0 | return |
426 | 0 | else |
427 | 0 | cyclic.n += 1 |
428 | 0 | cyclic[value] = cyclic.n |
429 | N/A | end | >
430 | N/A | > |
431 | 0 | str.n += 3 |
432 | 0 | str[str.n - 2] = "{ " |
433 | 0 | str[str.n - 1] = color.gray(tostring(cyclic[value])) |
434 | 0 | str[str.n - 0] = "\n" |
435 | N/A | > |
436 | 0 | local i, v = next(value, nil) |
437 | 0 | while v ~= nil do |
438 | 0 | local n = str.n |
439 | 0 | str[n + 1] = tabbed_indent |
440 | N/A | > |
441 | 0 | if type(i) ~= "string" then |
442 | 0 | str[n + 2] = "[" |
443 | 0 | str[n + 3] = tostring(i) |
444 | 0 | str[n + 4] = "]" |
445 | 0 | n += 4 |
446 | 0 | else |
447 | 0 | str[n + 2] = tostring(i) |
448 | 0 | n += 2 |
449 | N/A | end | >
450 | N/A | > |
451 | 0 | str[n + 1] = " = " |
452 | 0 | str.n = n + 1 |
453 | N/A | > |
454 | 0 | tos(v, stack + 1, str, cyclic) |
455 | N/A | > |
456 | 0 | i, v = next(value, i) |
457 | N/A | > |
458 | 0 | n = str.n |
459 | 0 | str[n + 1] = v ~= nil and ",\n" or "\n" |
460 | 0 | str.n = n + 1 |
461 | N/A | end | >
462 | N/A | > |
463 | 0 | local n = str.n |
464 | 0 | str[n + 1] = indent |
465 | 0 | str[n + 2] = "}" |
466 | 0 | str.n = n + 2 |
467 | N/A | end | >
468 | N/A | end | >
469 | N/A | > |
470 | 0 | local str = { n = 0 } |
471 | 0 | local cyclic = { n = 0 } |
472 | 0 | tos(v, 0, str, cyclic) |
473 | 0 | print(table.concat(str)) |
474 | N/A | end | >
475 | N/A | > |
476 | N/A | -------------------------------------------------------------------------------- | >
477 | N/A | -- Equality | >
478 | N/A | -------------------------------------------------------------------------------- | >
479 | N/A | > |
480 | 1 | local function shallow_eq(a: {}, b: {}): boolean |
481 | 0 | if #a ~= #b then |
482 | 0 | return false |
483 | N/A | end | >
484 | N/A | > |
485 | 0 | for i, v in next, a do |
486 | 0 | if b[i] ~= v then |
487 | 0 | return false |
488 | N/A | end | >
489 | N/A | end | >
490 | N/A | > |
491 | 0 | for i, v in next, b do |
492 | 0 | if a[i] ~= v then |
493 | 0 | return false |
494 | N/A | end | >
495 | N/A | end | >
496 | N/A | > |
497 | 0 | return true |
498 | N/A | end | >
499 | N/A | > |
500 | 1 | local function deep_eq(a: {}, b: {}): boolean |
501 | 0 | if #a ~= #b then |
502 | 0 | return false |
503 | N/A | end | >
504 | N/A | > |
505 | 0 | for i, v in next, a do |
506 | 0 | if type(b[i]) == "table" and type(v) == "table" then |
507 | 0 | if deep_eq(b[i], v) == false then |
508 | 0 | return false |
509 | N/A | end | >
510 | 0 | elseif b[i] ~= v then |
511 | 0 | return false |
512 | N/A | end | >
513 | N/A | end | >
514 | N/A | > |
515 | 0 | for i, v in next, b do |
516 | 0 | if type(a[i]) == "table" and type(v) == "table" then |
517 | 0 | if deep_eq(a[i], v) == false then |
518 | 0 | return false |
519 | N/A | end | >
520 | 0 | elseif a[i] ~= v then |
521 | 0 | return false |
522 | N/A | end | >
523 | N/A | end | >
524 | N/A | > |
525 | 0 | return true |
526 | N/A | end | >
527 | N/A | > |
528 | N/A | -------------------------------------------------------------------------------- | >
529 | N/A | -- Return | >
530 | N/A | -------------------------------------------------------------------------------- | >
531 | N/A | > |
532 | 1 | return { |
533 | 1 | test = function() |
534 | 1 | return { |
535 | 1 | TEST = TEST, |
536 | 1 | CASE = CASE, |
537 | 1 | CHECK = CHECK, |
538 | 1 | FINISH = FINISH, |
539 | 1 | SKIP = SKIP, |
540 | 1 | FOCUS = FOCUS, |
541 | 1 | CHECK_EXPECT_ERR = CHECK_EXPECT_ERR, |
542 | 0 | } |
543 | N/A | end, | >
544 | N/A | > |
545 | 1 | benchmark = function() |
546 | 1 | return BENCH, START |
547 | N/A | end, | >
548 | N/A | > |
549 | 1 | disable_formatting = function() |
550 | 0 | disable_ansi = true |
551 | N/A | end, | >
552 | N/A | > |
553 | 1 | print = print2, |
554 | N/A | > |
555 | 1 | seq = shallow_eq, |
556 | 1 | deq = deep_eq, |
557 | N/A | > |
558 | 1 | color = color, |
559 | 0 | } |
Function | Hits |
---|---|
1 | |
white_underline:30 | 0 |
white:34 | 0 |
green:38 | 0 |
red:42 | 0 |
yellow:46 | 0 |
red_highlight:50 | 0 |
green_highlight:54 | 0 |
gray:58 | 0 |
pe:63 | 0 |
pp:68 | 0 |
debug_world_inspect:73 | 7 |
record:74 | 0 |
tbl:77 | 6 |
archetype:80 | 4 |
records:83 | 1 |
columns:86 | 0 |
row:89 | 3 |
tuple:94 | 2 |
name:116 | 0 |
1 | |
1 | |
1 | |
1 | |
1 | |
getTargets:192 | 2 |
setAttacksAndEats:212 | 0 |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
updateCooldowns:1777 | 2 |
1 | |
1 | |
1 | |
1 | |
1 |
Line | Hits | Code |
---|---|---|
1 | 1 | local jecs = require("@jecs") |
2 | N/A | > |
3 | 1 | local testkit = require("@testkit") |
4 | 1 | local BENCH, START = testkit.benchmark() |
5 | 1 | local __ = jecs.Wildcard |
6 | 1 | local ECS_ID, ECS_GENERATION = jecs.ECS_ID, jecs.ECS_GENERATION |
7 | 1 | local ECS_GENERATION_INC = jecs.ECS_GENERATION_INC |
8 | 1 | local IS_PAIR = jecs.IS_PAIR |
9 | 1 | local pair = jecs.pair |
10 | 1 | local ecs_pair_first = jecs.pair_first |
11 | 1 | local ecs_pair_second = jecs.pair_second |
12 | 1 | local entity_index_try_get_any = jecs.entity_index_try_get_any |
13 | 1 | local entity_index_get_alive = jecs.entity_index_get_alive |
14 | 1 | local entity_index_is_alive = jecs.entity_index_is_alive |
15 | 1 | local ChildOf = jecs.ChildOf |
16 | 1 | local world_new = jecs.World.new |
17 | N/A | > |
18 | 1 | local it = testkit.test() |
19 | 1 | local TEST, CASE = it.TEST, it.CASE |
20 | 1 | local CHECK, FINISH = it.CHECK, it.FINISH |
21 | 1 | local SKIP, FOCUS = it.SKIP, it.FOCUS |
22 | 1 | local CHECK_EXPECT_ERR = it.CHECK_EXPECT_ERR |
23 | N/A | > |
24 | 1 | local N = 2 ^ 8 |
25 | N/A | > |
26 | 0 | type World = jecs.World |
27 | 0 | type Entity |
28 | N/A | > |
29 | 1 | local c = { |
30 | 1 | white_underline = function(s: any) |
31 | 0 | return `\27[1;4m{s}\27[0m` |
32 | N/A | end, | >
33 | N/A | > |
34 | 1 | white = function(s: any) |
35 | 0 | return `\27[37;1m{s}\27[0m` |
36 | N/A | end, | >
37 | N/A | > |
38 | 1 | green = function(s: any) |
39 | 0 | return `\27[32;1m{s}\27[0m` |
40 | N/A | end, | >
41 | N/A | > |
42 | 1 | red = function(s: any) |
43 | 0 | return `\27[31;1m{s}\27[0m` |
44 | N/A | end, | >
45 | N/A | > |
46 | 1 | yellow = function(s: any) |
47 | 0 | return `\27[33;1m{s}\27[0m` |
48 | N/A | end, | >
49 | N/A | > |
50 | 1 | red_highlight = function(s: any) |
51 | 0 | return `\27[41;1;30m{s}\27[0m` |
52 | N/A | end, | >
53 | N/A | > |
54 | 1 | green_highlight = function(s: any) |
55 | 0 | return `\27[42;1;30m{s}\27[0m` |
56 | N/A | end, | >
57 | N/A | > |
58 | 1 | gray = function(s: any) |
59 | 0 | return `\27[30;1m{s}\27[0m` |
60 | N/A | end, | >
61 | 0 | } |
62 | N/A | > |
63 | 1 | local function pe(e) |
64 | 0 | local gen = ECS_GENERATION(e) |
65 | 0 | return c.green(`e{ECS_ID(e)}`)..c.yellow(`v{gen}`) |
66 | N/A | end | >
67 | N/A | > |
68 | 1 | local function pp(e) |
69 | 0 | local gen = ECS_GENERATION(e) |
70 | 0 | return c.green(`e{ECS_ID(e)}`)..c.yellow(`v{jecs.ECS_ENTITY_T_HI(e)}`) |
71 | N/A | end | >
72 | N/A | > |
73 | 1 | local function debug_world_inspect(world: World) |
74 | 7 | local function record(e): jecs.Record |
75 | 2 | return entity_index_try_get_any(world.entity_index, e) :: any |
76 | N/A | end | >
77 | 7 | local function tbl(e) |
78 | 1 | return record(e).archetype |
79 | N/A | end | >
80 | 7 | local function archetype(e) |
81 | 4 | return tbl(e).type |
82 | N/A | end | >
83 | 7 | local function records(e) |
84 | 1 | return tbl(e).records |
85 | N/A | end | >
86 | 7 | local function columns(e) |
87 | 1 | return tbl(e).columns |
88 | N/A | end | >
89 | 7 | local function row(e) |
90 | 2 | return record(e).row |
91 | N/A | end | >
92 | N/A | > |
93 | N/A | -- Important to order them in the order of their columns | >
94 | 7 | local function tuple(e, ...) |
95 | 1 | for i, column in columns(e) do |
96 | 2 | if select(i, ...) ~= column[row(e)] then |
97 | 0 | return false |
98 | N/A | end | >
99 | N/A | end | >
100 | 1 | return true |
101 | N/A | end | >
102 | N/A | > |
103 | 7 | return { |
104 | 7 | record = record, |
105 | 7 | tbl = tbl, |
106 | 7 | archetype = archetype, |
107 | 7 | records = records, |
108 | 7 | row = row, |
109 | 7 | tuple = tuple, |
110 | 7 | columns = columns |
111 | 0 | } |
112 | N/A | end | >
113 | N/A | > |
114 | 1 | local dwi = debug_world_inspect |
115 | N/A | > |
116 | 1 | local function name(world, e) |
117 | 0 | return world:get(e, jecs.Name) |
118 | N/A | end | >
119 | N/A | > |
120 | 1 | TEST("#adding a recycled target", function() |
121 | 1 | local world = world_new() |
122 | 1 | local R = world:component() |
123 | N/A | > |
124 | 1 | local e = world:entity() |
125 | 1 | local T = world:entity() |
126 | 1 | world:add(e, pair(R, T)) |
127 | 1 | world:delete(T) |
128 | 1 | CHECK(not world:has(e, pair(R, T))) |
129 | 1 | local T2 = world:entity() |
130 | 1 | world:add(e, pair(R, T2)) |
131 | 1 | CHECK(world:target(e, R) ~= T) |
132 | 1 | CHECK(world:target(e, R) ~= 0) |
133 | N/A | > |
134 | N/A | end) | >
135 | N/A | > |
136 | 1 | TEST("#repro2", function() |
137 | 1 | local world = world_new() |
138 | 1 | local Lifetime = world:component() :: jecs.Id |
139 | 1 | local Particle = world:entity() |
140 | 1 | local Beam = world:entity() |
141 | N/A | > |
142 | 1 | local entity = world:entity() |
143 | 1 | world:set(entity, pair(Lifetime, Particle), 1) |
144 | 1 | world:set(entity, pair(Lifetime, Beam), 2) |
145 | 1 | world:set(entity, pair(4, 5), 6) -- noise |
146 | N/A | > |
147 | 1 | local entity_visualizer = require("@tools/entity_visualiser") |
148 | N/A | -- entity_visualizer.components(world, entity) | >
149 | N/A | > |
150 | 1 | for e in world:each(pair(Lifetime, __)) do |
151 | 2 | local i = 0 |
152 | 2 | local nth = world:target(e, Lifetime, i) |
153 | 2 | while nth do |
154 | N/A | -- entity_visualizer.components(world, e) | >
155 | N/A | > |
156 | 2 | local data = world:get(e, pair(Lifetime, nth)) |
157 | 2 | data -= 1 |
158 | 2 | if data <= 0 then |
159 | 1 | world:remove(e, pair(Lifetime, nth)) |
160 | 0 | else |
161 | 1 | world:set(e, pair(Lifetime, nth), data) |
162 | N/A | end | >
163 | 2 | i += 1 |
164 | 2 | nth = world:target(e, Lifetime, i) |
165 | N/A | end | >
166 | N/A | end | >
167 | N/A | > |
168 | 1 | CHECK(not world:has(entity, pair(Lifetime, Particle))) |
169 | 1 | CHECK(world:get(entity, pair(Lifetime, Beam)) == 1) |
170 | N/A | end) | >
171 | N/A | > |
172 | 1 | local lifetime_tracker_add = require("@tools/lifetime_tracker") |
173 | N/A | > |
174 | 1 | TEST("another", function() |
175 | 1 | local world = world_new() |
176 | N/A | -- world = lifetime_tracker_add(world, {padding_enabled=false}) | >
177 | 1 | local e1 = world:entity() |
178 | 1 | local e2 = world:entity() |
179 | 1 | local e3 = world:entity() |
180 | 1 | world:delete(e2) |
181 | 1 | local e2_e3 = pair(e2, e3) |
182 | 1 | CHECK(jecs.pair_first(world, e2_e3) == 0) |
183 | 1 | CHECK(jecs.pair_second(world, e2_e3) == e3) |
184 | 1 | CHECK_EXPECT_ERR(function() |
185 | 1 | world:add(e1, pair(e2, e3)) |
186 | N/A | end) | >
187 | N/A | end) | >
188 | N/A | > |
189 | 1 | TEST("#repro", function() |
190 | 1 | local world = world_new() |
191 | N/A | > |
192 | 1 | local function getTargets(relation) |
193 | 2 | local tgts = {} |
194 | 2 | local pairwildcard = pair(relation, jecs.Wildcard) |
195 | 2 | for _, archetype in world:query(pairwildcard):archetypes() do |
196 | 2 | local tr = archetype.records[pairwildcard] |
197 | 2 | local count = archetype.counts[pairwildcard] |
198 | 2 | local types = archetype.types |
199 | 2 | for _, entity in archetype.entities do |
200 | 2 | for i = 0, count - 1 do |
201 | 2 | local tgt = jecs.pair_second(world, types[i + tr]) |
202 | 2 | table.insert(tgts, tgt) |
203 | N/A | end | >
204 | N/A | end | >
205 | N/A | end | >
206 | 2 | return tgts |
207 | N/A | end | >
208 | N/A | > |
209 | 1 | local Attacks = world:component() |
210 | 1 | local Eats = world:component() |
211 | N/A | > |
212 | 1 | local function setAttacksAndEats(entity1, entity2) |
213 | 0 | world:add(entity1, pair(Attacks, entity2)) |
214 | 0 | world:add(entity1, pair(Eats, entity2)) |
215 | N/A | end | >
216 | N/A | > |
217 | 1 | local e1 = world:entity() |
218 | 1 | local e2 = world:entity() |
219 | 1 | local e3 = world:entity() |
220 | 1 | setAttacksAndEats(e3, e1) |
221 | 1 | setAttacksAndEats(e3, e2) |
222 | 1 | setAttacksAndEats(e1, e2) |
223 | 1 | local d = dwi(world) |
224 | 1 | world:delete(e2) |
225 | 1 | local types1 = { pair(Attacks, e1), pair(Eats, e1) } |
226 | 1 | table.sort(types1) |
227 | N/A | > |
228 | N/A | > |
229 | 1 | CHECK(d.tbl(e1).type == "") |
230 | 1 | CHECK(d.tbl(e3).type == table.concat(types1, "_")) |
231 | N/A | > |
232 | 1 | for _, entity in getTargets(Attacks) do |
233 | 1 | CHECK(entity == e1) |
234 | N/A | end | >
235 | 1 | for _, entity in getTargets(Eats) do |
236 | 1 | CHECK(entity == e1) |
237 | N/A | end | >
238 | N/A | end) | >
239 | N/A | > |
240 | 1 | TEST("archetype", function() |
241 | 1 | local archetype_traverse_add = jecs.archetype_traverse_add |
242 | 1 | local archetype_traverse_remove = jecs.archetype_traverse_remove |
243 | N/A | > |
244 | 1 | local world = world_new() |
245 | 1 | local root = world.ROOT_ARCHETYPE |
246 | 1 | local c1 = world:component() |
247 | 1 | local c2 = world:component() |
248 | 1 | local c3 = world:component() |
249 | N/A | > |
250 | 1 | local a1 = archetype_traverse_add(world, c1, nil :: any) |
251 | 1 | local a2 = archetype_traverse_remove(world, c1, a1) |
252 | 1 | CHECK(root.add[c1].to == a1) |
253 | 1 | CHECK(root == a2) |
254 | N/A | end) | >
255 | N/A | > |
256 | 1 | TEST("world:cleanup()", function() |
257 | 1 | local world = world_new() |
258 | 1 | local A = world:component() :: jecs.Id |
259 | 1 | local B = world:component() :: jecs.Id |
260 | 1 | local C = world:component() :: jecs.Id |
261 | N/A | > |
262 | 1 | local e1 = world:entity() |
263 | 1 | local e2 = world:entity() |
264 | 1 | local e3 = world:entity() |
265 | N/A | > |
266 | 1 | world:set(e1, A, true) |
267 | N/A | > |
268 | 1 | world:set(e2, A, true) |
269 | 1 | world:set(e2, B, true) |
270 | N/A | > |
271 | N/A | > |
272 | 1 | world:set(e3, A, true) |
273 | 1 | world:set(e3, B, true) |
274 | 1 | world:set(e3, C, true) |
275 | N/A | > |
276 | 1 | local archetype_index = world.archetype_index |
277 | N/A | > |
278 | 1 | CHECK(#archetype_index["1"].entities == 1) |
279 | 1 | CHECK(#archetype_index["1_2"].entities == 1) |
280 | 1 | CHECK(#archetype_index["1_2_3"].entities == 1) |
281 | N/A | > |
282 | 1 | world:delete(e1) |
283 | 1 | world:delete(e2) |
284 | 1 | world:delete(e3) |
285 | N/A | > |
286 | 1 | world:cleanup() |
287 | N/A | > |
288 | 1 | archetype_index = world.archetype_index |
289 | N/A | > |
290 | 1 | CHECK((archetype_index["1"] :: jecs.Archetype?) == nil) |
291 | 1 | CHECK((archetype_index["1_2"] :: jecs.Archetype?) == nil) |
292 | 1 | CHECK((archetype_index["1_2_3"] :: jecs.Archetype?) == nil) |
293 | N/A | > |
294 | 1 | local e4 = world:entity() |
295 | 1 | world:set(e4, A, true) |
296 | 1 | CHECK(#archetype_index["1"].entities == 1) |
297 | 1 | CHECK((archetype_index["1_2"] :: jecs.Archetype?) == nil) |
298 | 1 | CHECK((archetype_index["1_2_3"] :: jecs.Archetype?) == nil) |
299 | 1 | world:set(e4, B, true) |
300 | 1 | CHECK(#archetype_index["1"].entities == 0) |
301 | 1 | CHECK(#archetype_index["1_2"].entities == 1) |
302 | 1 | CHECK((archetype_index["1_2_3"] :: jecs.Archetype?) == nil) |
303 | 1 | world:set(e4, C, true) |
304 | 1 | CHECK(#archetype_index["1"].entities == 0) |
305 | 1 | CHECK(#archetype_index["1_2"].entities == 0) |
306 | 1 | CHECK(#archetype_index["1_2_3"].entities == 1) |
307 | N/A | end) | >
308 | N/A | > |
309 | 1 | local pe = require("@tools/entity_visualiser").prettify |
310 | 1 | local lifetime_tracker_add = require("@tools/lifetime_tracker") |
311 | N/A | > |
312 | 1 | TEST("world:entity()", function() |
313 | 0 | do |
314 | 1 | CASE("unique IDs") |
315 | 1 | local world = jecs.World.new() |
316 | 1 | local set = {} |
317 | 1 | for i = 1, N do |
318 | 256 | local e = world:entity() |
319 | 256 | CHECK(not set[e]) |
320 | 256 | set[e] = true |
321 | N/A | end | >
322 | N/A | end | >
323 | 0 | do |
324 | 1 | CASE("generations") |
325 | 1 | local world = jecs.World.new() |
326 | 1 | local e = world:entity() :: number |
327 | 1 | CHECK(ECS_ID(e) == 1 + jecs.Rest :: number) |
328 | 1 | CHECK(ECS_GENERATION(e) == 0) -- 0 |
329 | 1 | e = ECS_GENERATION_INC(e) |
330 | 1 | CHECK(ECS_GENERATION(e) == 1) -- 1 |
331 | N/A | end | >
332 | N/A | > |
333 | 1 | do CASE "pairs" |
334 | 1 | local world = jecs.World.new() |
335 | 1 | local _e = world:entity() |
336 | 1 | local e2 = world:entity() |
337 | 1 | local e3 = world:entity() |
338 | N/A | > |
339 | N/A | -- Incomplete pair, must have a bit flag that notes it is a pair | >
340 | 1 | CHECK(IS_PAIR(world:entity()) == false) |
341 | N/A | > |
342 | 1 | local p = pair(e2, e3) |
343 | 1 | CHECK(IS_PAIR(p) == true) |
344 | N/A | > |
345 | 1 | CHECK(ecs_pair_first(world, p) == e2 :: number) |
346 | 1 | CHECK(ecs_pair_second(world, p) == e3 :: number) |
347 | N/A | > |
348 | 1 | world:delete(e2) |
349 | 1 | local e2v2 = world:entity() |
350 | 1 | CHECK(IS_PAIR(e2v2) == false) |
351 | N/A | > |
352 | 1 | CHECK(IS_PAIR(pair(e2v2, e3)) == true) |
353 | N/A | end | >
354 | N/A | > |
355 | 1 | do CASE "Recycling" |
356 | 1 | local world = world_new() |
357 | 1 | local e = world:entity() |
358 | 1 | world:delete(e) |
359 | 1 | local e1 = world:entity() |
360 | 1 | world:delete(e1) |
361 | 1 | local e2 = world:entity() |
362 | 1 | CHECK(ECS_ID(e2) == e :: number) |
363 | 1 | CHECK(ECS_GENERATION(e2) == 2) |
364 | 1 | CHECK(world:contains(e2)) |
365 | 1 | CHECK(not world:contains(e1)) |
366 | 1 | CHECK(not world:contains(e)) |
367 | N/A | end | >
368 | N/A | > |
369 | 1 | do CASE "Recycling max generation" |
370 | 1 | local world = world_new() |
371 | 1 | local pin = (jecs.Rest :: any) :: number + 1 |
372 | 1 | for i = 1, 2^16-1 do |
373 | 65535 | local e = world:entity() |
374 | 65535 | world:delete(e) |
375 | N/A | end | >
376 | 1 | local e = world:entity() |
377 | 1 | CHECK(ECS_ID(e) == pin) |
378 | 1 | CHECK(ECS_GENERATION(e) == 2^16-1) |
379 | 1 | world:delete(e) |
380 | 1 | e = world:entity() |
381 | 1 | CHECK(ECS_ID(e) == pin) |
382 | 1 | CHECK(ECS_GENERATION(e) == 0) |
383 | N/A | end | >
384 | N/A | end) | >
385 | N/A | > |
386 | 1 | TEST("world:set()", function() |
387 | 1 | do CASE "archetype move" |
388 | 0 | do |
389 | 1 | local world = jecs.World.new() |
390 | N/A | > |
391 | 1 | local d = debug_world_inspect(world) |
392 | N/A | > |
393 | 1 | local _1 = world:component() |
394 | 1 | local _2 = world:component() |
395 | 1 | local e = world:entity() |
396 | N/A | -- An entity starts without an archetype or row | >
397 | N/A | -- should therefore not need to copy over data | >
398 | 1 | CHECK(d.tbl(e) == nil) |
399 | 1 | CHECK(d.row(e) == nil) |
400 | N/A | > |
401 | 1 | local archetypes = #world.archetypes |
402 | N/A | -- This should create a new archetype since it is the first | >
403 | N/A | -- entity to have moved there | >
404 | 1 | world:set(e, _1, 1) |
405 | 1 | local oldRow = d.row(e) |
406 | 1 | local oldArchetype = d.archetype(e) |
407 | 1 | CHECK(#world.archetypes == archetypes + 1) |
408 | 1 | CHECK(oldArchetype == "1") |
409 | 1 | CHECK(d.tbl(e)) |
410 | 1 | CHECK(oldRow == 1) |
411 | N/A | > |
412 | 1 | world:set(e, _2, 2) |
413 | 1 | CHECK(d.archetype(e) == "1_2") |
414 | N/A | -- Should have tuple of fields to the next archetype and set the component data | >
415 | 1 | CHECK(d.tuple(e, 1, 2)) |
416 | N/A | -- Should have moved the data from the old archetype | >
417 | 1 | CHECK(world.archetype_index[oldArchetype].columns[_1][oldRow] == nil) |
418 | N/A | end | >
419 | N/A | end | >
420 | N/A | > |
421 | 1 | do CASE "pairs" |
422 | 1 | local world = jecs.World.new() |
423 | N/A | > |
424 | 1 | local C1 = world:component() |
425 | 1 | local C2 = world:component() |
426 | 1 | local T1 = world:entity() |
427 | 1 | local T2 = world:entity() |
428 | N/A | > |
429 | 1 | local e = world:entity() |
430 | N/A | > |
431 | 1 | world:set(e, pair(C1, C2), true) |
432 | 1 | world:set(e, pair(C1, T1), true) |
433 | 1 | world:set(e, pair(T1, C1), true) |
434 | N/A | > |
435 | 1 | CHECK_EXPECT_ERR(function() |
436 | 1 | world:set(e, pair(T1, T2), true :: any) |
437 | N/A | end) | >
438 | N/A | > |
439 | 1 | CHECK(world:get(e, pair(C1, C2))) |
440 | 1 | CHECK(world:get(e, pair(C1, T1))) |
441 | 1 | CHECK(world:get(e, pair(T1, C1))) |
442 | 1 | CHECK(not world:get(e, pair(T1, T2))) |
443 | N/A | > |
444 | 1 | local e2 = world:entity() |
445 | N/A | > |
446 | 1 | CHECK_EXPECT_ERR(function() |
447 | 1 | world:set(e2, pair(jecs.ChildOf, e), true :: any) |
448 | N/A | end) | >
449 | 1 | CHECK(not world:get(e2, pair(jecs.ChildOf, e))) |
450 | N/A | end | >
451 | N/A | end) | >
452 | N/A | > |
453 | 1 | TEST("world:remove()", function() |
454 | 0 | do |
455 | 1 | CASE("should allow remove a component that doesn't exist on entity") |
456 | 1 | local world = jecs.World.new() |
457 | N/A | > |
458 | 1 | local Health = world:component() |
459 | 1 | local Poison = world:component() |
460 | N/A | > |
461 | 1 | local id = world:entity() |
462 | 0 | do |
463 | 1 | world:remove(id, Poison) |
464 | 1 | CHECK(true) -- Didn't error |
465 | N/A | end | >
466 | N/A | > |
467 | 1 | world:set(id, Health, 50) |
468 | 1 | world:remove(id, Poison) |
469 | N/A | > |
470 | 1 | CHECK(world:get(id, Poison) == nil) |
471 | 1 | CHECK(world:get(id, Health) == 50) |
472 | N/A | end | >
473 | N/A | end) | >
474 | N/A | > |
475 | 1 | TEST("world:add()", function() |
476 | 0 | do |
477 | 1 | CASE("idempotent") |
478 | 1 | local world = jecs.World.new() |
479 | 1 | local d = debug_world_inspect(world) |
480 | 1 | local _1, _2 = world:component(), world:component() |
481 | N/A | > |
482 | 1 | local e = world:entity() |
483 | 1 | world:add(e, _1) |
484 | 1 | world:add(e, _2) |
485 | 1 | world:add(e, _2) -- should have 0 effects |
486 | 1 | CHECK(d.archetype(e) == "1_2") |
487 | N/A | end | >
488 | N/A | > |
489 | 0 | do |
490 | 1 | CASE("archetype move") |
491 | 0 | do |
492 | 1 | local world = jecs.World.new() |
493 | N/A | > |
494 | 1 | local d = debug_world_inspect(world) |
495 | N/A | > |
496 | 1 | local _1 = world:component() |
497 | 1 | local e = world:entity() |
498 | N/A | -- An entity starts without an archetype or row | >
499 | N/A | -- should therefore not need to copy over data | >
500 | 1 | CHECK(d.tbl(e) == nil) |
501 | 1 | CHECK(d.row(e) == nil) |
502 | N/A | > |
503 | 1 | local archetypes = #world.archetypes |
504 | N/A | -- This should create a new archetype | >
505 | 1 | world:add(e, _1) |
506 | 1 | CHECK(#world.archetypes == archetypes + 1) |
507 | N/A | > |
508 | 1 | CHECK(d.archetype(e) == "1") |
509 | 1 | CHECK(d.tbl(e)) |
510 | N/A | end | >
511 | N/A | end | >
512 | N/A | end) | >
513 | N/A | > |
514 | 1 | TEST("world:query()", function() |
515 | 1 | do CASE "cached" |
516 | 1 | local world = world_new() |
517 | 1 | local Foo = world:component() |
518 | 1 | local Bar = world:component() |
519 | 1 | local Baz = world:component() |
520 | 1 | local e = world:entity() |
521 | 1 | local q = world:query(Foo, Bar):without(Baz):cached() |
522 | 1 | world:set(e, Foo, true) |
523 | 1 | world:set(e, Bar, false) |
524 | 1 | local i = 0 |
525 | N/A | > |
526 | 1 | local iter = 0 |
527 | 1 | for _, e in q:iter() do |
528 | 1 | iter += 1 |
529 | 1 | i=1 |
530 | N/A | end | >
531 | 1 | CHECK (iter == 1) |
532 | 1 | CHECK(i == 1) |
533 | 1 | for _, e in q:iter() do |
534 | 1 | i=2 |
535 | N/A | end | >
536 | 1 | CHECK(i == 2) |
537 | 1 | for _, e in q :: any do |
538 | 1 | i=3 |
539 | N/A | end | >
540 | 1 | CHECK(i == 3) |
541 | 1 | for _, e in q :: any do |
542 | 1 | i=4 |
543 | N/A | end | >
544 | 1 | CHECK(i == 4) |
545 | N/A | > |
546 | 1 | CHECK(#q:archetypes() == 1) |
547 | 1 | CHECK(not table.find(q:archetypes(), world.archetype_index[table.concat({Foo, Bar, Baz}, "_")])) |
548 | 1 | world:delete(Foo) |
549 | 1 | CHECK(#q:archetypes() == 0) |
550 | N/A | end | >
551 | 1 | do CASE "multiple iter" |
552 | 1 | local world = jecs.World.new() |
553 | 1 | local A = world:component() |
554 | 1 | local B = world:component() |
555 | 1 | local e = world:entity() |
556 | 1 | world:add(e, A) |
557 | 1 | world:add(e, B) |
558 | 1 | local q = world:query(A, B) |
559 | 1 | local counter = 0 |
560 | 1 | for x in q:iter() do |
561 | 1 | counter += 1 |
562 | N/A | end | >
563 | 1 | for x in q:iter() do |
564 | 1 | counter += 1 |
565 | N/A | end | >
566 | 1 | CHECK(counter == 2) |
567 | N/A | end | >
568 | 1 | do CASE "tag" |
569 | 1 | local world = jecs.World.new() |
570 | 1 | local A = world:entity() |
571 | 1 | local e = world:entity() |
572 | 1 | CHECK_EXPECT_ERR(function() |
573 | 1 | world:set(e, A, "test" :: any) |
574 | N/A | end) | >
575 | 1 | local count = 0 |
576 | 1 | for id, a in world:query(A) :: any do |
577 | 1 | count += 1 |
578 | 1 | CHECK(a == nil) |
579 | N/A | end | >
580 | 1 | CHECK(count == 1) |
581 | N/A | end | >
582 | 1 | do CASE "pairs" |
583 | 1 | local world = jecs.World.new() |
584 | N/A | > |
585 | 1 | local C1 = world:component() :: jecs.Id |
586 | 1 | local C2 = world:component() :: jecs.Id |
587 | 1 | local T1 = world:entity() |
588 | 1 | local T2 = world:entity() |
589 | N/A | > |
590 | 1 | local e = world:entity() |
591 | N/A | > |
592 | 1 | local C1_C2 = pair(C1, C2) |
593 | 1 | world:set(e, C1_C2, true) |
594 | 1 | world:set(e, pair(C1, T1), true) |
595 | 1 | world:set(e, pair(T1, C1), true) |
596 | 1 | CHECK_EXPECT_ERR(function() |
597 | 1 | world:set(e, pair(T1, T2), true :: any) |
598 | N/A | end) | >
599 | N/A | > |
600 | 1 | for id, a, b, c, d in world:query(pair(C1, C2), pair(C1, T1), pair(T1, C1), pair(T1, T2)):iter() do |
601 | 1 | CHECK(a == true) |
602 | 1 | CHECK(b == true) |
603 | 1 | CHECK(c == true) |
604 | 1 | CHECK(d == nil) |
605 | N/A | end | >
606 | N/A | end | >
607 | 0 | do |
608 | 1 | CASE("query single component") |
609 | 0 | do |
610 | 1 | local world = jecs.World.new() |
611 | 1 | local A = world:component() |
612 | 1 | local B = world:component() |
613 | N/A | > |
614 | 1 | local entities = {} |
615 | 1 | for i = 1, N do |
616 | 256 | local id = world:entity() |
617 | N/A | > |
618 | 256 | world:set(id, A, true) |
619 | 256 | if i > 5 then |
620 | 251 | world:set(id, B, true) |
621 | N/A | end | >
622 | 256 | entities[i] = id |
623 | N/A | end | >
624 | N/A | > |
625 | 1 | for id in world:query(A) :: any do |
626 | 256 | table.remove(entities, CHECK(table.find(entities, id))) |
627 | N/A | end | >
628 | N/A | > |
629 | 1 | CHECK(#entities == 0) |
630 | N/A | end | >
631 | N/A | > |
632 | 0 | do |
633 | 1 | local world = jecs.World.new() :: World |
634 | 1 | local A = world:component() |
635 | 1 | local B = world:component() |
636 | 1 | local eA = world:entity() |
637 | 1 | world:set(eA, A, true) |
638 | 1 | local eB = world:entity() |
639 | 1 | world:set(eB, B, true) |
640 | 1 | local eAB = world:entity() |
641 | 1 | world:set(eAB, A, true) |
642 | 1 | world:set(eAB, B, true) |
643 | N/A | > |
644 | N/A | -- Should drain the iterator | >
645 | 1 | local q = world:query(A) |
646 | N/A | > |
647 | 1 | local i = 0 |
648 | 1 | local j = 0 |
649 | 1 | for _ in q :: any do |
650 | 2 | i += 1 |
651 | N/A | end | >
652 | 1 | for _ in q :: any do |
653 | 0 | j += 1 |
654 | N/A | end | >
655 | 1 | CHECK(i == 2) |
656 | 1 | CHECK(j == 0) |
657 | N/A | end | >
658 | N/A | end | >
659 | N/A | > |
660 | 0 | do |
661 | 1 | CASE("query missing component") |
662 | 1 | local world = jecs.World.new() |
663 | 1 | local A = world:component() |
664 | 1 | local B = world:component() |
665 | 1 | local C = world:component() |
666 | N/A | > |
667 | 1 | local e1 = world:entity() |
668 | 1 | local e2 = world:entity() |
669 | N/A | > |
670 | 1 | world:set(e1, A, "abc") |
671 | 1 | world:set(e2, A, "def") |
672 | 1 | world:set(e1, B, 123) |
673 | 1 | world:set(e2, B, 457) |
674 | N/A | > |
675 | 1 | local counter = 0 |
676 | 1 | for _ in world:query(B, C) :: any do |
677 | 0 | counter += 1 |
678 | N/A | end | >
679 | 1 | CHECK(counter == 0) |
680 | N/A | end | >
681 | N/A | > |
682 | 0 | do |
683 | 1 | CASE("query more than 8 components") |
684 | 1 | local world = jecs.World.new() |
685 | 1 | local components = {} |
686 | N/A | > |
687 | 1 | for i = 1, 9 do |
688 | 9 | local id = world:component() |
689 | 9 | components[i] = id |
690 | N/A | end | >
691 | 1 | local e = world:entity() |
692 | 1 | for i, id in components do |
693 | 9 | world:set(e, id, 13 ^ i) |
694 | N/A | end | >
695 | N/A | > |
696 | 1 | for entity, a, b, c, d, e, f, g, h, i in world:query(unpack(components)) :: any do |
697 | 1 | CHECK(a == 13 ^ 1) |
698 | 1 | CHECK(b == 13 ^ 2) |
699 | 1 | CHECK(c == 13 ^ 3) |
700 | 1 | CHECK(d == 13 ^ 4) |
701 | 1 | CHECK(e == 13 ^ 5) |
702 | 1 | CHECK(f == 13 ^ 6) |
703 | 1 | CHECK(g == 13 ^ 7) |
704 | 1 | CHECK(h == 13 ^ 8) |
705 | 1 | CHECK(i == 13 ^ 9) |
706 | N/A | end | >
707 | N/A | end | >
708 | N/A | > |
709 | 0 | do |
710 | 1 | CASE("should be able to get next results") |
711 | 1 | local world = jecs.World.new() :: World |
712 | 1 | world:component() |
713 | 1 | local A = world:component() |
714 | 1 | local B = world:component() |
715 | 1 | local eA = world:entity() |
716 | 1 | world:set(eA, A, true) |
717 | 1 | local eB = world:entity() |
718 | 1 | world:set(eB, B, true) |
719 | 1 | local eAB = world:entity() |
720 | 1 | world:set(eAB, A, true) |
721 | 1 | world:set(eAB, B, true) |
722 | N/A | > |
723 | 1 | local it = world:query(A):iter() |
724 | N/A | > |
725 | 1 | local e: number, data = it() |
726 | 1 | while e do |
727 | 2 | if e == eA :: number then |
728 | 1 | CHECK(data) |
729 | 1 | elseif e == eAB :: number then |
730 | 1 | CHECK(data) |
731 | 0 | else |
732 | 0 | CHECK(false) |
733 | N/A | end | >
734 | N/A | > |
735 | 2 | e, data = it() |
736 | N/A | end | >
737 | 1 | CHECK(true) |
738 | N/A | end | >
739 | N/A | > |
740 | 1 | do CASE "should query all matching entities when irrelevant component is removed" |
741 | 1 | local world = jecs.World.new() |
742 | 1 | local A = world:component() |
743 | 1 | local B = world:component() |
744 | 1 | local C = world:component() |
745 | N/A | > |
746 | 1 | local entities = {} |
747 | 1 | for i = 1, N do |
748 | 256 | local id = world:entity() |
749 | N/A | > |
750 | N/A | -- specifically put them in disorder to track regression | >
751 | N/A | -- https://github.com/Ukendio/jecs/pull/15 | >
752 | 256 | world:set(id, B, true) |
753 | 256 | world:set(id, A, true) |
754 | 256 | if i > 5 then |
755 | 251 | world:remove(id, B) |
756 | N/A | end | >
757 | 256 | entities[i] = id |
758 | N/A | end | >
759 | N/A | > |
760 | 1 | local added = 0 |
761 | 1 | for id in world:query(A) :: any do |
762 | 256 | added += 1 |
763 | 256 | table.remove(entities, CHECK(table.find(entities, id))) |
764 | N/A | end | >
765 | N/A | > |
766 | 1 | CHECK(added == N) |
767 | N/A | end | >
768 | N/A | > |
769 | 0 | do |
770 | 1 | CASE("should query all entities without B") |
771 | 1 | local world = jecs.World.new() |
772 | 1 | local A = world:component() |
773 | 1 | local B = world:component() |
774 | N/A | > |
775 | 1 | local entities = {} |
776 | 1 | for i = 1, N do |
777 | 256 | local id = world:entity() |
778 | N/A | > |
779 | 256 | world:set(id, A, true) |
780 | 256 | if i < 5 then |
781 | 4 | entities[i] = id |
782 | 0 | else |
783 | 252 | world:set(id, B, true) |
784 | N/A | end | >
785 | N/A | end | >
786 | N/A | > |
787 | 1 | for id in world:query(A):without(B) :: any do |
788 | 4 | table.remove(entities, CHECK(table.find(entities, id))) |
789 | N/A | end | >
790 | N/A | > |
791 | 1 | CHECK(#entities == 0) |
792 | N/A | end | >
793 | N/A | > |
794 | 0 | do |
795 | 1 | CASE("should allow querying for relations") |
796 | 1 | local world = jecs.World.new() |
797 | 1 | local Eats = world:component() |
798 | 1 | local Apples = world:component() |
799 | 1 | local bob = world:entity() |
800 | N/A | > |
801 | 1 | world:set(bob, pair(Eats, Apples), true) |
802 | 1 | for e, bool in world:query(pair(Eats, Apples)) :: any do |
803 | 1 | CHECK(e == bob) |
804 | 1 | CHECK(bool) |
805 | N/A | end | >
806 | N/A | end | >
807 | N/A | > |
808 | 0 | do |
809 | 1 | CASE("should allow wildcards in queries") |
810 | 1 | local world = jecs.World.new() |
811 | 1 | local Eats = world:component() |
812 | 1 | local Apples = world:entity() |
813 | 1 | local bob = world:entity() |
814 | N/A | > |
815 | 1 | world:set(bob, pair(Eats, Apples), "bob eats apples") |
816 | N/A | > |
817 | 1 | local w = jecs.Wildcard |
818 | 1 | for e, data in world:query(pair(Eats, w)) :: any do |
819 | 1 | CHECK(e == bob) |
820 | 1 | CHECK(data == "bob eats apples") |
821 | N/A | end | >
822 | 1 | for e, data in world:query(pair(w, Apples)) :: any do |
823 | 1 | CHECK(e == bob) |
824 | 1 | CHECK(data == "bob eats apples") |
825 | N/A | end | >
826 | N/A | end | >
827 | N/A | > |
828 | 0 | do |
829 | 1 | CASE("should match against multiple pairs") |
830 | 1 | local world = jecs.World.new() |
831 | 1 | local Eats = world:component() |
832 | 1 | local Apples = world:entity() |
833 | 1 | local Oranges = world:entity() |
834 | 1 | local bob = world:entity() |
835 | 1 | local alice = world:entity() |
836 | N/A | > |
837 | 1 | world:set(bob, pair(Eats, Apples), "bob eats apples") |
838 | 1 | world:set(alice, pair(Eats, Oranges), "alice eats oranges") |
839 | N/A | > |
840 | 1 | local w = jecs.Wildcard |
841 | 1 | local count = 0 |
842 | 1 | for e, data in world:query(pair(Eats, w)) :: any do |
843 | 2 | count += 1 |
844 | 2 | if e == bob then |
845 | 1 | CHECK(data == "bob eats apples") |
846 | 0 | else |
847 | 1 | CHECK(data == "alice eats oranges") |
848 | N/A | end | >
849 | N/A | end | >
850 | N/A | > |
851 | 1 | CHECK(count == 2) |
852 | 1 | count = 0 |
853 | N/A | > |
854 | 1 | for e, data in world:query(pair(w, Apples)) :: any do |
855 | 1 | count += 1 |
856 | 1 | CHECK(data == "bob eats apples") |
857 | N/A | end | >
858 | 1 | CHECK(count == 1) |
859 | N/A | end | >
860 | N/A | > |
861 | 1 | do CASE "should only relate alive entities" |
862 | 1 | local world = jecs.World.new() |
863 | 1 | local Eats = world:entity() |
864 | 1 | local Apples = world:component() |
865 | 1 | local Oranges = world:component() |
866 | 1 | local bob = world:entity() |
867 | 1 | local alice = world:entity() |
868 | N/A | > |
869 | 1 | world:set(bob, Apples, "apples") |
870 | 1 | world:set(bob, pair(Eats, Apples), "bob eats apples") |
871 | 1 | world:set(alice, pair(Eats, Oranges) :: Entity |
872 | N/A | > |
873 | 1 | world:delete(Apples) |
874 | 1 | local Wildcard = jecs.Wildcard |
875 | N/A | > |
876 | 1 | local count = 0 |
877 | 1 | for _, data in world:query(pair(Wildcard, Apples)) :: any do |
878 | 0 | count += 1 |
879 | N/A | end | >
880 | N/A | > |
881 | 1 | world:delete(pair(Eats, Apples)) |
882 | N/A | > |
883 | 1 | CHECK(count == 0) |
884 | 1 | CHECK(world:get(bob, pair(Eats, Apples)) == nil) |
885 | N/A | > |
886 | N/A | end | >
887 | N/A | > |
888 | 0 | do |
889 | 1 | CASE("should error when setting invalid pair") |
890 | 1 | local world = jecs.World.new() |
891 | 1 | local Eats = world:component() |
892 | 1 | local Apples = world:component() |
893 | 1 | local bob = world:entity() |
894 | N/A | > |
895 | 1 | world:delete(Apples) |
896 | 1 | CHECK_EXPECT_ERR(function() |
897 | 1 | world:set(bob, pair(Eats, Apples), "bob eats apples") |
898 | N/A | end) | >
899 | N/A | end | >
900 | N/A | > |
901 | 0 | do |
902 | 1 | CASE("should find target for ChildOf") |
903 | 1 | local world = jecs.World.new() |
904 | 1 | local ChildOf = jecs.ChildOf |
905 | N/A | > |
906 | 1 | local Name = world:component() |
907 | N/A | > |
908 | 1 | local bob = world:entity() |
909 | 1 | local alice = world:entity() |
910 | 1 | local sara = world:entity() |
911 | N/A | > |
912 | 1 | world:add(bob, pair(ChildOf, alice)) |
913 | 1 | world:set(bob, Name, "bob") |
914 | 1 | world:add(sara, pair(ChildOf, alice)) |
915 | 1 | world:set(sara, Name, "sara") |
916 | 1 | CHECK(world:parent(bob) :: number == alice :: number) -- O(1) |
917 | N/A | > |
918 | 1 | local count = 0 |
919 | 1 | for _, name in world:query(Name, pair(ChildOf, alice)) :: any do |
920 | 2 | count += 1 |
921 | N/A | end | >
922 | 1 | CHECK(count == 2) |
923 | N/A | end | >
924 | N/A | > |
925 | 0 | do |
926 | 1 | CASE("despawning while iterating") |
927 | 1 | local world = jecs.World.new() |
928 | 1 | local A = world:component() |
929 | 1 | local B = world:component() |
930 | N/A | > |
931 | 1 | local e1 = world:entity() |
932 | 1 | local e2 = world:entity() |
933 | 1 | world:add(e1, A) |
934 | 1 | world:add(e2, A) |
935 | 1 | world:add(e2, B) |
936 | N/A | > |
937 | 1 | local count = 0 |
938 | 1 | for id in world:query(A) :: any do |
939 | 2 | world:clear(id) |
940 | 2 | count += 1 |
941 | N/A | end | >
942 | 1 | CHECK(count == 2) |
943 | N/A | end | >
944 | N/A | > |
945 | 1 | do CASE("iterator invalidation") |
946 | 1 | do CASE("adding") |
947 | 1 | SKIP() |
948 | 1 | local world = jecs.World.new() |
949 | 1 | local A = world:component() |
950 | 1 | local B = world:component() |
951 | N/A | > |
952 | 1 | local e1 = world:entity() |
953 | 1 | local e2 = world:entity() |
954 | 1 | world:add(e1, A) |
955 | 1 | world:add(e2, A) |
956 | 1 | world:add(e2, B) |
957 | N/A | > |
958 | 1 | local count = 0 |
959 | 1 | for id in world:query(A) :: any do |
960 | 3 | world:add(id, B) |
961 | N/A | > |
962 | 3 | count += 1 |
963 | N/A | end | >
964 | N/A | > |
965 | 1 | CHECK(count == 2) |
966 | N/A | end | >
967 | N/A | > |
968 | 1 | do CASE("spawning") |
969 | 1 | local world = jecs.World.new() |
970 | 1 | local A = world:component() |
971 | 1 | local B = world:component() |
972 | N/A | > |
973 | 1 | local e1 = world:entity() |
974 | 1 | local e2 = world:entity() |
975 | 1 | world:add(e1, A) |
976 | 1 | world:add(e2, A) |
977 | 1 | world:add(e2, B) |
978 | N/A | > |
979 | 1 | for id in world:query(A) :: any do |
980 | 3 | local e = world:entity() |
981 | 3 | world:add(e, A) |
982 | 3 | world:add(e, B) |
983 | N/A | end | >
984 | N/A | > |
985 | 1 | CHECK(true) |
986 | N/A | end | >
987 | N/A | end | >
988 | N/A | > |
989 | 1 | do CASE("should not find any entities") |
990 | 1 | local world = jecs.World.new() |
991 | N/A | > |
992 | 1 | local Hello = world:component() |
993 | 1 | local Bob = world:component() |
994 | N/A | > |
995 | 1 | local helloBob = world:entity() |
996 | 1 | world:add(helloBob, pair(Hello, Bob)) |
997 | 1 | world:add(helloBob, Bob) |
998 | N/A | > |
999 | 1 | local withoutCount = 0 |
1000 | 1 | for _ in world:query(pair(Hello, Bob)):without(Bob) :: any do |
1001 | 0 | withoutCount += 1 |
1002 | N/A | end | >
1003 | N/A | > |
1004 | 1 | CHECK(withoutCount == 0) |
1005 | N/A | end | >
1006 | N/A | > |
1007 | 1 | do CASE("without") |
1008 | N/A | -- REGRESSION TEST | >
1009 | 1 | local world = jecs.World.new() |
1010 | 1 | local _1, _2, _3 = world:component(), world:component(), world:component() |
1011 | N/A | > |
1012 | 1 | local counter = 0 |
1013 | 1 | for e, a, b in world:query(_1, _2):without(_3) :: any do |
1014 | 0 | counter += 1 |
1015 | N/A | end | >
1016 | 1 | CHECK(counter == 0) |
1017 | N/A | end | >
1018 | N/A | end) | >
1019 | N/A | > |
1020 | 1 | TEST("world:each", function() |
1021 | 1 | local world = world_new() |
1022 | 1 | local A = world:component() |
1023 | 1 | local B = world:component() |
1024 | 1 | local C = world:component() |
1025 | N/A | > |
1026 | 1 | local e3 = world:entity() |
1027 | 1 | local e1 = world:entity() |
1028 | 1 | local e2 = world:entity() |
1029 | N/A | > |
1030 | 1 | world:set(e1, A, true) |
1031 | N/A | > |
1032 | 1 | world:set(e2, A, true) |
1033 | 1 | world:set(e2, B, true) |
1034 | N/A | > |
1035 | 1 | world:set(e3, A, true) |
1036 | 1 | world:set(e3, B, true) |
1037 | 1 | world:set(e3, C, true) |
1038 | N/A | > |
1039 | 1 | for entity: number in world:each(A) do |
1040 | 3 | if entity == e1 :: number or entity == e2 :: number or entity == e3 :: number then |
1041 | 3 | CHECK(true) |
1042 | 3 | continue |
1043 | N/A | end | >
1044 | 0 | CHECK(false) |
1045 | N/A | end | >
1046 | N/A | end) | >
1047 | N/A | > |
1048 | 1 | TEST("world:children", function() |
1049 | 1 | local world = world_new() |
1050 | 1 | local C = world:component() |
1051 | 1 | local T = world:entity() |
1052 | N/A | > |
1053 | 1 | local e1 = world:entity() |
1054 | 1 | world:set(e1, C, true) |
1055 | N/A | > |
1056 | 1 | local e2 = world:entity() :: number |
1057 | N/A | > |
1058 | 1 | world:add(e2, T) |
1059 | 1 | world:add(e2, pair(ChildOf, e1)) |
1060 | N/A | > |
1061 | 1 | local e3 = world:entity() :: number |
1062 | 1 | world:add(e3, pair(ChildOf, e1)) |
1063 | N/A | > |
1064 | 1 | local count = 0 |
1065 | 1 | for entity: number in world:children(e1) do |
1066 | 2 | count += 1 |
1067 | 2 | if entity == e2 or entity == e3 then |
1068 | 2 | CHECK(true) |
1069 | 2 | continue |
1070 | N/A | end | >
1071 | 0 | CHECK(false) |
1072 | N/A | end | >
1073 | 1 | CHECK(count == 2) |
1074 | N/A | > |
1075 | 1 | world:remove(e2, pair(ChildOf, e1)) |
1076 | N/A | > |
1077 | 1 | count = 0 |
1078 | 1 | for entity in world:children(e1) do |
1079 | 1 | count += 1 |
1080 | N/A | end | >
1081 | N/A | > |
1082 | 1 | CHECK(count == 1) |
1083 | N/A | end) | >
1084 | N/A | > |
1085 | 1 | TEST("world:clear()", function() |
1086 | 1 | do CASE("should remove its components") |
1087 | 1 | local world = jecs.World.new() :: World |
1088 | 1 | local A = world:component() |
1089 | 1 | local B = world:component() |
1090 | 1 | local C = world:component() |
1091 | 1 | local D = world:component() |
1092 | N/A | > |
1093 | 1 | local e = world:entity() |
1094 | 1 | local e1 = world:entity() |
1095 | 1 | local e2 = world:entity() |
1096 | N/A | > |
1097 | 1 | world:set(e, A, true) |
1098 | 1 | world:set(e, B, true) |
1099 | N/A | > |
1100 | 1 | world:set(e1, A, true) |
1101 | 1 | world:set(e1, B, true) |
1102 | N/A | > |
1103 | 1 | CHECK(world:get(e, A)) |
1104 | 1 | CHECK(world:get(e, B)) |
1105 | N/A | > |
1106 | 1 | world:clear(A) |
1107 | 1 | CHECK(world:get(e, A) == nil) |
1108 | 1 | CHECK(world:get(e, B)) |
1109 | 1 | CHECK(world:get(e1, A) == nil) |
1110 | 1 | CHECK(world:get(e1, B)) |
1111 | N/A | end | >
1112 | N/A | > |
1113 | 1 | do CASE("remove cleared ID from entities") |
1114 | 1 | local world = world_new() |
1115 | 1 | local A = world:component() |
1116 | 1 | local B = world:component() |
1117 | 1 | local C = world:component() |
1118 | N/A | > |
1119 | 0 | do |
1120 | 1 | local id1 = world:entity() |
1121 | 1 | local id2 = world:entity() |
1122 | 1 | local id3 = world:entity() |
1123 | N/A | > |
1124 | 1 | world:set(id1, A, true) |
1125 | N/A | > |
1126 | 1 | world:set(id2, A, true) |
1127 | 1 | world:set(id2, B, true) |
1128 | N/A | > |
1129 | 1 | world:set(id3, A, true) |
1130 | 1 | world:set(id3, B, true) |
1131 | 1 | world:set(id3, C, true) |
1132 | N/A | > |
1133 | 1 | world:clear(A) |
1134 | N/A | > |
1135 | 1 | CHECK(not world:has(id1, A)) |
1136 | 1 | CHECK(not world:has(id2, A)) |
1137 | 1 | CHECK(not world:has(id3, A)) |
1138 | N/A | > |
1139 | 1 | CHECK(world:has(id2, B)) |
1140 | 1 | CHECK(world:has(id3, B, C)) |
1141 | N/A | > |
1142 | 1 | world:clear(C) |
1143 | N/A | > |
1144 | 1 | CHECK(world:has(id2, B)) |
1145 | 1 | CHECK(world:has(id3, B)) |
1146 | N/A | > |
1147 | 1 | CHECK(world:contains(A)) |
1148 | 1 | CHECK(world:contains(C)) |
1149 | 1 | CHECK(world:has(A, jecs.Component)) |
1150 | 1 | CHECK(world:has(B, jecs.Component)) |
1151 | N/A | end | >
1152 | N/A | > |
1153 | 0 | do |
1154 | 1 | local id1 = world:entity() |
1155 | 1 | local id2 = world:entity() |
1156 | 1 | local id3 = world:entity() |
1157 | N/A | > |
1158 | 1 | local tgt = world:entity() |
1159 | N/A | > |
1160 | 1 | world:add(id1, pair(A, tgt)) |
1161 | 1 | world:add(id1, pair(B, tgt)) |
1162 | 1 | world:add(id1, pair(C, tgt)) |
1163 | N/A | > |
1164 | 1 | world:add(id2, pair(A, tgt)) |
1165 | 1 | world:add(id2, pair(B, tgt)) |
1166 | 1 | world:add(id2, pair(C, tgt)) |
1167 | N/A | > |
1168 | 1 | world:add(id3, pair(A, tgt)) |
1169 | 1 | world:add(id3, pair(B, tgt)) |
1170 | 1 | world:add(id3, pair(C, tgt)) |
1171 | N/A | > |
1172 | 1 | world:clear(B) |
1173 | 1 | CHECK(world:has(id1, pair(A, tgt), pair(C, tgt))) |
1174 | 1 | CHECK(not world:has(id1, pair(B, tgt))) |
1175 | 1 | CHECK(world:has(id2, pair(A, tgt), pair(C, tgt))) |
1176 | 1 | CHECK(not world:has(id1, pair(B, tgt))) |
1177 | 1 | CHECK(world:has(id3, pair(A, tgt), pair(C, tgt))) |
1178 | N/A | > |
1179 | N/A | end | >
1180 | N/A | > |
1181 | N/A | end | >
1182 | N/A | end) | >
1183 | N/A | > |
1184 | 1 | TEST("world:has()", function() |
1185 | 1 | do CASE("should find Tag on entity") |
1186 | 1 | local world = jecs.World.new() |
1187 | N/A | > |
1188 | 1 | local Tag = world:entity() |
1189 | N/A | > |
1190 | 1 | local e = world:entity() |
1191 | 1 | world:add(e, Tag) |
1192 | N/A | > |
1193 | 1 | CHECK(world:has(e, Tag)) |
1194 | N/A | end | >
1195 | N/A | > |
1196 | 1 | do CASE("should return false when missing one tag") |
1197 | 1 | local world = jecs.World.new() |
1198 | N/A | > |
1199 | 1 | local A = world:entity() |
1200 | 1 | local B = world:entity() |
1201 | 1 | local C = world:entity() |
1202 | 1 | local D = world:entity() |
1203 | N/A | > |
1204 | 1 | local e = world:entity() |
1205 | 1 | world:add(e, A) |
1206 | 1 | world:add(e, C) |
1207 | 1 | world:add(e, D) |
1208 | N/A | > |
1209 | 1 | CHECK(world:has(e, A, B, C, D) == false) |
1210 | N/A | end | >
1211 | N/A | end) | >
1212 | N/A | > |
1213 | 1 | TEST("world:component()", function() |
1214 | 1 | do CASE("only components should have EcsComponent trait") |
1215 | 1 | local world = jecs.World.new() :: World |
1216 | 1 | local A = world:component() |
1217 | 1 | local e = world:entity() |
1218 | N/A | > |
1219 | 1 | CHECK(world:has(A, jecs.Component)) |
1220 | 1 | CHECK(not world:has(e, jecs.Component)) |
1221 | N/A | end | >
1222 | N/A | > |
1223 | 1 | do CASE("tag") |
1224 | 1 | local world = jecs.World.new() :: World |
1225 | 1 | local A = world:component() |
1226 | 1 | local B = world:entity() |
1227 | 1 | local C = world:entity() |
1228 | 1 | local e = world:entity() |
1229 | 1 | world:set(e, A, "test") |
1230 | 1 | world:add(e, B) |
1231 | 1 | CHECK_EXPECT_ERR(function() |
1232 | 1 | world:set(e, C, 11 :: any) |
1233 | N/A | end) | >
1234 | N/A | > |
1235 | 1 | CHECK(world:has(e, A)) |
1236 | 1 | CHECK(world:get(e, A) == "test") |
1237 | 1 | CHECK(world:get(e, B) == nil) |
1238 | 1 | CHECK(world:get(e, C) == nil) |
1239 | N/A | end | >
1240 | N/A | end) | >
1241 | N/A | > |
1242 | 1 | TEST("world:delete", function() |
1243 | 1 | do CASE "invoke OnRemove hooks" |
1244 | 1 | local world = world_new() |
1245 | N/A | > |
1246 | 1 | local e1 = world:entity() |
1247 | 1 | local e2 = world:entity() |
1248 | N/A | > |
1249 | 1 | local Stable = world:component() |
1250 | 1 | world:set(Stable, jecs.OnRemove, function(e) |
1251 | 1 | CHECK(e == e1) |
1252 | N/A | end) | >
1253 | N/A | > |
1254 | 1 | world:set(e1, Stable, true) |
1255 | 1 | world:set(e2, Stable, true) |
1256 | N/A | > |
1257 | 1 | world:delete(e1) |
1258 | N/A | end | >
1259 | 1 | do CASE "delete recycled entity id used as component" |
1260 | 1 | local world = world_new() |
1261 | 1 | local id = world:entity() |
1262 | 1 | world:add(id, jecs.Component) |
1263 | N/A | > |
1264 | 1 | local e = world:entity() |
1265 | 1 | world:set(e, id, 1) |
1266 | 1 | CHECK(world:get(e, id) == 1) |
1267 | 1 | world:delete(id) |
1268 | 1 | local recycled = world:entity() |
1269 | 1 | world:add(recycled, jecs.Component) |
1270 | 1 | world:set(e, recycled, 1) |
1271 | 1 | CHECK(world:has(recycled, jecs.Component)) |
1272 | 1 | CHECK(world:get(e, recycled) == 1) |
1273 | N/A | end | >
1274 | 0 | do |
1275 | 1 | CASE("bug: Empty entity does not respect cleanup policy") |
1276 | 1 | local world = world_new() |
1277 | 1 | local parent = world:entity() |
1278 | 1 | local tag = world:entity() |
1279 | N/A | > |
1280 | 1 | local child = world:entity() |
1281 | 1 | world:add(child, jecs.pair(jecs.ChildOf, parent)) |
1282 | 1 | world:delete(parent) |
1283 | N/A | > |
1284 | 1 | CHECK(not world:contains(parent)) |
1285 | 1 | CHECK(not world:contains(child)) |
1286 | N/A | > |
1287 | 1 | local entity = world:entity() |
1288 | 1 | world:add(entity, tag) |
1289 | 1 | world:delete(tag) |
1290 | 1 | CHECK(world:contains(entity)) |
1291 | 1 | CHECK(not world:contains(tag)) |
1292 | 1 | CHECK(not world:has(entity, tag)) -- => true |
1293 | N/A | end | >
1294 | 1 | do CASE("should allow deleting components") |
1295 | 1 | local world = jecs.World.new() |
1296 | N/A | > |
1297 | 1 | local Health = world:component() |
1298 | 1 | local Poison = world:component() |
1299 | N/A | > |
1300 | 1 | local id = world:entity() |
1301 | 1 | world:set(id, Poison, 5) |
1302 | 1 | world:set(id, Health, 50) |
1303 | 1 | local id1 = world:entity() |
1304 | 1 | world:set(id1, Poison, 500) |
1305 | 1 | world:set(id1, Health, 50) |
1306 | N/A | > |
1307 | 1 | world:delete(id) |
1308 | 1 | CHECK(not world:contains(id)) |
1309 | 1 | CHECK(world:get(id, Poison) == nil) |
1310 | 1 | CHECK(world:get(id, Health) == nil) |
1311 | N/A | > |
1312 | 1 | CHECK(world:get(id1, Poison) == 500) |
1313 | 1 | CHECK(world:get(id1, Health) == 50) |
1314 | N/A | end | >
1315 | N/A | > |
1316 | 1 | do CASE("delete entities using another Entity as component with Delete cleanup action") |
1317 | 1 | local world = jecs.World.new() |
1318 | N/A | > |
1319 | 1 | local Health = world:entity() |
1320 | 1 | world:add(Health, pair(jecs.OnDelete, jecs.Delete)) |
1321 | 1 | local Poison = world:component() |
1322 | N/A | > |
1323 | 1 | local id = world:entity() |
1324 | 1 | world:set(id, Poison, 5) |
1325 | 1 | CHECK_EXPECT_ERR(function() |
1326 | 1 | world:set(id, Health, 50 :: any) |
1327 | N/A | end) | >
1328 | 1 | local id1 = world:entity() |
1329 | 1 | world:set(id1, Poison, 500) |
1330 | 1 | CHECK_EXPECT_ERR(function() |
1331 | 1 | world:set(id1, Health, 50 :: any) |
1332 | N/A | end) | >
1333 | N/A | > |
1334 | 1 | CHECK(world:has(id, Poison, Health)) |
1335 | 1 | CHECK(world:has(id1, Poison, Health)) |
1336 | 1 | world:delete(Poison) |
1337 | N/A | > |
1338 | 1 | CHECK(world:contains(id)) |
1339 | 1 | CHECK(not world:has(id, Poison)) |
1340 | 1 | CHECK(not world:has(id1, Poison)) |
1341 | N/A | > |
1342 | 1 | world:delete(Health) |
1343 | 1 | CHECK(not world:contains(id)) |
1344 | 1 | CHECK(not world:contains(id1)) |
1345 | 1 | CHECK(not world:has(id, Health)) |
1346 | 1 | CHECK(not world:has(id1, Health)) |
1347 | N/A | end | >
1348 | N/A | > |
1349 | N/A | > |
1350 | 1 | do CASE("delete children") |
1351 | 1 | local world = jecs.World.new() |
1352 | N/A | > |
1353 | 1 | local Health = world:component() |
1354 | 1 | local Poison = world:component() |
1355 | 1 | local FriendsWith = world:component() |
1356 | N/A | > |
1357 | 1 | local e = world:entity() |
1358 | 1 | world:set(e, Poison, 5) |
1359 | 1 | world:set(e, Health, 50) |
1360 | N/A | > |
1361 | 1 | local children = {} |
1362 | 1 | for i = 1, 10 do |
1363 | 10 | local child = world:entity() |
1364 | 10 | world:set(child, Poison, 9999) |
1365 | 10 | world:set(child, Health, 100) |
1366 | 10 | world:add(child, pair(jecs.ChildOf, e)) |
1367 | 10 | table.insert(children, child) |
1368 | N/A | end | >
1369 | N/A | > |
1370 | 1 | BENCH("delete children of entity", function() |
1371 | 1 | world:delete(e) |
1372 | N/A | end) | >
1373 | N/A | > |
1374 | 1 | for i, child in children do |
1375 | 10 | CHECK(not world:contains(child)) |
1376 | 10 | CHECK(not world:has(child, pair(jecs.ChildOf, e))) |
1377 | 10 | CHECK(not world:has(child, Health)) |
1378 | N/A | end | >
1379 | N/A | > |
1380 | 1 | e = world:entity() |
1381 | N/A | > |
1382 | 1 | local friends = {} |
1383 | 1 | for i = 1, 10 do |
1384 | 10 | local friend = world:entity() |
1385 | 10 | world:set(friend, Poison, 9999) |
1386 | 10 | world:set(friend, Health, 100) |
1387 | 10 | world:add(friend, pair(FriendsWith, e)) |
1388 | 10 | table.insert(friends, friend) |
1389 | N/A | end | >
1390 | N/A | > |
1391 | 1 | BENCH("remove friends of entity", function() |
1392 | 1 | world:delete(e) |
1393 | N/A | end) | >
1394 | N/A | > |
1395 | 1 | local d = debug_world_inspect(world) |
1396 | 1 | for i, friend in friends do |
1397 | 10 | CHECK(not world:has(friend, pair(FriendsWith, e))) |
1398 | 10 | CHECK(world:has(friend, Health)) |
1399 | 10 | CHECK(world:contains(friend)) |
1400 | N/A | end | >
1401 | N/A | end | >
1402 | N/A | > |
1403 | 1 | do CASE("remove deleted ID from entities") |
1404 | 1 | local world = world_new() |
1405 | 0 | do |
1406 | 1 | local A = world:component() |
1407 | 1 | local B = world:component() |
1408 | 1 | local C = world:component() |
1409 | 1 | local id1 = world:entity() |
1410 | 1 | local id2 = world:entity() |
1411 | 1 | local id3 = world:entity() |
1412 | N/A | > |
1413 | 1 | world:set(id1, A, true) |
1414 | N/A | > |
1415 | 1 | world:set(id2, A, true) |
1416 | 1 | world:set(id2, B, true) |
1417 | N/A | > |
1418 | 1 | world:set(id3, A, true) |
1419 | 1 | world:set(id3, B, true) |
1420 | 1 | world:set(id3, C, true) |
1421 | N/A | > |
1422 | 1 | world:delete(A) |
1423 | N/A | > |
1424 | 1 | CHECK(not world:has(id1, A)) |
1425 | 1 | CHECK(not world:has(id2, A)) |
1426 | 1 | CHECK(not world:has(id3, A)) |
1427 | N/A | > |
1428 | 1 | CHECK(world:has(id2, B)) |
1429 | 1 | CHECK(world:has(id3, B, C)) |
1430 | N/A | > |
1431 | 1 | world:delete(C) |
1432 | N/A | > |
1433 | 1 | CHECK(world:has(id2, B)) |
1434 | 1 | CHECK(world:has(id3, B)) |
1435 | N/A | > |
1436 | 1 | CHECK(not world:contains(A)) |
1437 | 1 | CHECK(not world:contains(C)) |
1438 | N/A | end | >
1439 | N/A | > |
1440 | 0 | do |
1441 | 1 | local A = world:component() |
1442 | 1 | world:add(A, pair(jecs.OnDeleteTarget, jecs.Delete)) |
1443 | 1 | local B = world:component() |
1444 | 1 | local C = world:component() |
1445 | 1 | world:add(C, pair(jecs.OnDeleteTarget, jecs.Delete)) |
1446 | N/A | > |
1447 | 1 | local id1 = world:entity() |
1448 | 1 | local id2 = world:entity() |
1449 | 1 | local id3 = world:entity() |
1450 | N/A | > |
1451 | 1 | world:set(id1, C, true) |
1452 | N/A | > |
1453 | 1 | world:set(id2, pair(A, id1), true) |
1454 | 1 | world:set(id2, B, true) |
1455 | N/A | > |
1456 | 1 | world:set(id3, B, true) |
1457 | 1 | world:set(id3, pair(C, id2), true) |
1458 | N/A | > |
1459 | 1 | world:delete(id1) |
1460 | N/A | > |
1461 | 1 | CHECK(not world:contains(id1)) |
1462 | 1 | CHECK(not world:contains(id2)) |
1463 | 1 | CHECK(not world:contains(id3)) |
1464 | N/A | end | >
1465 | N/A | > |
1466 | N/A | > |
1467 | 0 | do |
1468 | 1 | local A = world:component() |
1469 | 1 | local B = world:component() |
1470 | 1 | local C = world:component() |
1471 | 1 | local id1 = world:entity() |
1472 | 1 | local id2 = world:entity() |
1473 | 1 | local id3 = world:entity() |
1474 | N/A | > |
1475 | N/A | > |
1476 | 1 | world:set(id2, A, true) |
1477 | 1 | world:set(id2, pair(B, id1), true) |
1478 | N/A | > |
1479 | 1 | world:set(id3, A, true) |
1480 | 1 | world:set(id3, pair(B, id1), true) |
1481 | 1 | world:set(id3, C, true) |
1482 | N/A | > |
1483 | 1 | world:delete(id1) |
1484 | N/A | > |
1485 | 1 | CHECK(not world:contains(id1)) |
1486 | 1 | CHECK(world:contains(id2)) |
1487 | 1 | CHECK(world:contains(id3)) |
1488 | N/A | > |
1489 | 1 | CHECK(world:has(id2, A)) |
1490 | 1 | CHECK(world:has(id3, A, C)) |
1491 | N/A | > |
1492 | 1 | CHECK(not world:target(id2, B)) |
1493 | 1 | CHECK(not world:target(id3, B)) |
1494 | N/A | end | >
1495 | N/A | end | >
1496 | N/A | > |
1497 | 0 | do |
1498 | 1 | CASE("fast delete") |
1499 | 1 | local world = jecs.World.new() |
1500 | N/A | > |
1501 | 1 | local entities = {} |
1502 | 1 | local Health = world:component() |
1503 | 1 | local Poison = world:component() |
1504 | N/A | > |
1505 | 1 | for i = 1, 100 do |
1506 | 100 | local child = world:entity() |
1507 | 100 | world:set(child, Poison, 9999) |
1508 | 100 | world:set(child, Health, 100) |
1509 | 100 | table.insert(entities, child) |
1510 | N/A | end | >
1511 | N/A | > |
1512 | 1 | BENCH("simple deletion of entity", function() |
1513 | 1 | for i = 1, START(100) do |
1514 | 100 | local e = entities[i] |
1515 | 100 | world:delete(e) |
1516 | N/A | end | >
1517 | N/A | end) | >
1518 | N/A | > |
1519 | 1 | for _, entity in entities do |
1520 | 100 | CHECK(not world:contains(entity)) |
1521 | N/A | end | >
1522 | N/A | end | >
1523 | N/A | > |
1524 | 0 | do |
1525 | 1 | CASE("cycle") |
1526 | 1 | local world = jecs.World.new() |
1527 | 1 | local Likes = world:component() |
1528 | 1 | world:add(Likes, pair(jecs.OnDeleteTarget, jecs.Delete)) |
1529 | 1 | local bob = world:entity() |
1530 | 1 | local alice = world:entity() |
1531 | N/A | > |
1532 | 1 | world:add(bob, pair(Likes, alice)) |
1533 | 1 | world:add(alice, pair(Likes, bob)) |
1534 | N/A | > |
1535 | 1 | world:delete(bob) |
1536 | 1 | CHECK(not world:contains(bob)) |
1537 | 1 | CHECK(not world:contains(alice)) |
1538 | N/A | end | >
1539 | N/A | end) | >
1540 | N/A | > |
1541 | 1 | TEST("world:target", function() |
1542 | 1 | do CASE("nth index") |
1543 | 1 | local world = world_new() |
1544 | 1 | local A = world:component() |
1545 | 1 | world:set(A, jecs.Name, "A") |
1546 | 1 | local B = world:component() |
1547 | 1 | world:set(B, jecs.Name, "B") |
1548 | 1 | local C = world:component() |
1549 | 1 | world:set(C, jecs.Name, "C") |
1550 | 1 | local D = world:component() |
1551 | 1 | world:set(D, jecs.Name, "D") |
1552 | 1 | local E = world:component() |
1553 | 1 | world:set(E, jecs.Name, "E") |
1554 | 1 | local e = world:entity() |
1555 | N/A | > |
1556 | 1 | world:add(e, pair(A, B)) |
1557 | 1 | world:add(e, pair(A, C)) |
1558 | 1 | world:add(e, pair(A, D)) |
1559 | 1 | world:add(e, pair(A, E)) |
1560 | 1 | world:add(e, pair(B, C)) |
1561 | 1 | world:add(e, pair(B, D)) |
1562 | 1 | world:add(e, pair(C, D)) |
1563 | N/A | > |
1564 | 1 | CHECK(pair(A, B) < pair(A, C)) |
1565 | 1 | CHECK(pair(A, C) < pair(A, D)) |
1566 | 1 | CHECK(pair(C, A) < pair(C, D)) |
1567 | N/A | > |
1568 | 1 | local records = debug_world_inspect(world).records(e) |
1569 | 1 | CHECK(jecs.pair_first(world, pair(B, C)) == B) |
1570 | 1 | local r = jecs.entity_index_try_get(world.entity_index, e) |
1571 | 1 | local archetype = r.archetype |
1572 | 1 | local counts = archetype.counts |
1573 | 1 | CHECK(counts[pair(A, __)] == 4) |
1574 | 1 | CHECK(records[pair(B, C)] > records[pair(A, E)]) |
1575 | 1 | CHECK(world:target(e, A, 0) == B) |
1576 | 1 | CHECK(world:target(e, A, 1) == C) |
1577 | 1 | CHECK(world:target(e, A, 2) == D) |
1578 | 1 | CHECK(world:target(e, A, 3) == E) |
1579 | 1 | CHECK(world:target(e, B, 0) == C) |
1580 | 1 | CHECK(world:target(e, B, 1) == D) |
1581 | 1 | CHECK(world:target(e, C, 0) == D) |
1582 | 1 | CHECK(world:target(e, C, 1) == nil) |
1583 | N/A | > |
1584 | 1 | CHECK(archetype.records[pair(A, B)] == 1) |
1585 | 1 | CHECK(archetype.records[pair(A, C)] == 2) |
1586 | 1 | CHECK(archetype.records[pair(A, D)] == 3) |
1587 | 1 | CHECK(archetype.records[pair(A, E)] == 4) |
1588 | N/A | > |
1589 | 1 | CHECK(world:target(e, C, 0) == D) |
1590 | 1 | CHECK(world:target(e, C, 1) == nil) |
1591 | N/A | end | >
1592 | N/A | > |
1593 | 0 | do |
1594 | 1 | CASE("infer index when unspecified") |
1595 | 1 | local world = world_new() |
1596 | 1 | local A = world:component() |
1597 | 1 | local B = world:component() |
1598 | 1 | local C = world:component() |
1599 | 1 | local D = world:component() |
1600 | 1 | local e = world:entity() |
1601 | N/A | > |
1602 | 1 | world:add(e, pair(A, B)) |
1603 | 1 | world:add(e, pair(A, C)) |
1604 | 1 | world:add(e, pair(B, C)) |
1605 | 1 | world:add(e, pair(B, D)) |
1606 | 1 | world:add(e, pair(C, D)) |
1607 | N/A | > |
1608 | 1 | CHECK(world:target(e, A) == world:target(e, A, 0)) |
1609 | 1 | CHECK(world:target(e, B) == world:target(e, B, 0)) |
1610 | 1 | CHECK(world:target(e, C) == world:target(e, C, 0)) |
1611 | N/A | end | >
1612 | N/A | > |
1613 | 0 | do |
1614 | 1 | CASE("loop until no target") |
1615 | 1 | local world = world_new() |
1616 | N/A | > |
1617 | 1 | local ROOT = world:entity() |
1618 | 1 | local e1 = world:entity() |
1619 | 1 | local targets = {} |
1620 | N/A | > |
1621 | 1 | for i = 1, 10 do |
1622 | 10 | local target = world:entity() |
1623 | 10 | targets[i] = target |
1624 | 10 | world:add(e1, pair(ROOT, target)) |
1625 | N/A | end | >
1626 | N/A | > |
1627 | 1 | local i = 0 |
1628 | 1 | local target = world:target(e1, ROOT, 0) |
1629 | 1 | while target do |
1630 | 10 | i += 1 |
1631 | 10 | CHECK(targets[i] == target) |
1632 | 10 | target = world:target(e1, ROOT, i) |
1633 | N/A | end | >
1634 | N/A | > |
1635 | 1 | CHECK(i == 10) |
1636 | N/A | end | >
1637 | N/A | end) | >
1638 | N/A | > |
1639 | 1 | TEST("world:contains", function() |
1640 | 1 | local world = jecs.World.new() |
1641 | 1 | local id = world:entity() |
1642 | 1 | CHECK(world:contains(id)) |
1643 | N/A | > |
1644 | 0 | do |
1645 | 1 | CASE("should not exist after delete") |
1646 | 1 | world:delete(id) |
1647 | 1 | CHECK(not world:contains(id)) |
1648 | N/A | end | >
1649 | N/A | end) | >
1650 | N/A | > |
1651 | 1 | TEST("Hooks", function() |
1652 | 1 | do CASE "OnAdd" |
1653 | 1 | local world = jecs.World.new() |
1654 | 1 | local Transform = world:component() |
1655 | 1 | local e1 = world:entity() |
1656 | 1 | world:set(Transform, jecs.OnAdd, function(entity) |
1657 | 1 | CHECK(e1 == entity) |
1658 | N/A | end) | >
1659 | 1 | world:add(e1, Transform) |
1660 | N/A | end | >
1661 | N/A | > |
1662 | 1 | do CASE "OnSet" |
1663 | 1 | local world = jecs.World.new() |
1664 | 1 | local Number = world:component() |
1665 | 1 | local e1 = world:entity() |
1666 | N/A | > |
1667 | 1 | world:set(Number, jecs.OnSet, function(entity, data) |
1668 | 1 | CHECK(e1 == entity) |
1669 | 1 | CHECK(data == world:get(entity, Number)) |
1670 | 1 | CHECK(data == 1) |
1671 | N/A | end) | >
1672 | 1 | world:set(e1, Number, 1) |
1673 | N/A | end | >
1674 | N/A | > |
1675 | 1 | do CASE("OnRemove") |
1676 | 0 | do |
1677 | N/A | -- basic | >
1678 | 1 | local world = jecs.World.new() |
1679 | 1 | local A = world:component() :: Entity |
1680 | 1 | local e1 = world:entity() |
1681 | 1 | world:set(A, jecs.OnRemove, function(entity) |
1682 | 1 | CHECK(e1 == entity) |
1683 | 1 | CHECK(world:has(e1, A)) |
1684 | N/A | end) | >
1685 | 1 | world:add(e1, A) |
1686 | N/A | > |
1687 | 1 | world:remove(e1, A) |
1688 | 1 | CHECK(not world:has(e1, A)) |
1689 | N/A | end | >
1690 | 0 | do |
1691 | N/A | -- [BUG] https://github.com/Ukendio/jecs/issues/118 | >
1692 | 1 | local world = world_new() |
1693 | 1 | local A = world:component() |
1694 | 1 | local B = world:component() |
1695 | 1 | local e = world:entity() |
1696 | N/A | > |
1697 | 1 | world:set(A, jecs.OnRemove, function(entity) |
1698 | 1 | world:set(entity, B, true) |
1699 | 1 | CHECK(world:get(entity, A)) |
1700 | 1 | CHECK(world:get(entity, B)) |
1701 | N/A | end) | >
1702 | N/A | > |
1703 | 1 | world:set(e, A, true) |
1704 | 1 | world:remove(e, A) |
1705 | 1 | CHECK(not world:get(e, A)) |
1706 | 1 | CHECK(world:get(e, B)) |
1707 | N/A | end | >
1708 | N/A | end | >
1709 | N/A | end) | >
1710 | N/A | > |
1711 | 1 | TEST("change tracking", function() |
1712 | 1 | do CASE "#1" |
1713 | 1 | local world = world_new() |
1714 | 1 | local Foo = world:component() :: Entity |
1715 | 1 | local Previous = jecs.Rest |
1716 | N/A | > |
1717 | 1 | local q1 = world |
1718 | 1 | :query(Foo) |
1719 | 1 | :without(pair(Previous, Foo)) |
1720 | 0 | :cached() |
1721 | N/A | > |
1722 | 1 | local e1 = world:entity() |
1723 | 1 | world:set(e1, Foo, 1) |
1724 | 1 | local e2 = world:entity() |
1725 | 1 | world:set(e2, Foo, 2) |
1726 | N/A | > |
1727 | 1 | local i = 0 |
1728 | 1 | for e, new in q1 :: any do |
1729 | 2 | i += 1 |
1730 | 2 | world:set(e, pair(Previous, Foo), new) |
1731 | N/A | end | >
1732 | N/A | > |
1733 | 1 | CHECK(i == 2) |
1734 | 1 | local j = 0 |
1735 | 1 | for e, new in q1 :: any do |
1736 | 0 | j += 1 |
1737 | 0 | world:set(e, pair(Previous, Foo), new) |
1738 | N/A | end | >
1739 | N/A | > |
1740 | 1 | CHECK(j == 0) |
1741 | N/A | end | >
1742 | N/A | > |
1743 | 1 | do CASE "#2" |
1744 | 1 | local world = world_new() |
1745 | 1 | local component = world:component() :: Entity |
1746 | 1 | local tag = world:entity() |
1747 | 1 | local previous = jecs.Rest |
1748 | N/A | > |
1749 | 1 | local q1 = world:query(component):without(pair(previous, component), tag):cached() |
1750 | N/A | > |
1751 | 1 | local testEntity = world:entity() |
1752 | N/A | > |
1753 | 1 | world:set(testEntity, component, 10) |
1754 | N/A | > |
1755 | 1 | local i = 0 |
1756 | 1 | for entity, number in q1 :: any do |
1757 | 1 | i += 1 |
1758 | 1 | world:add(testEntity, tag) |
1759 | N/A | end | >
1760 | N/A | > |
1761 | 1 | CHECK(i == 1) |
1762 | N/A | > |
1763 | 1 | for e, n in q1 :: any do |
1764 | 0 | world:set(e, pair(previous, component), n) |
1765 | N/A | end | >
1766 | N/A | end | >
1767 | N/A | > |
1768 | N/A | end) | >
1769 | N/A | > |
1770 | 1 | TEST("repro", function() |
1771 | 1 | do CASE "#1" |
1772 | 1 | local world = world_new() |
1773 | 1 | local reproEntity = world:component() |
1774 | 1 | local components = { Cooldown = world:component() :: jecs.Entity |
1775 | 1 | world:set(reproEntity, components.Cooldown, 2) |
1776 | N/A | > |
1777 | 1 | local function updateCooldowns(dt: number) |
1778 | 2 | local toRemove = {} |
1779 | N/A | > |
1780 | 2 | local it = world:query(components.Cooldown):iter() |
1781 | 2 | for id, cooldown in it do |
1782 | 2 | cooldown -= dt |
1783 | N/A | > |
1784 | 2 | if cooldown <= 0 then |
1785 | 1 | table.insert(toRemove, id) |
1786 | N/A | -- world:remove(id, components.Cooldown) | >
1787 | 0 | else |
1788 | 1 | world:set(id, components.Cooldown, cooldown) |
1789 | N/A | end | >
1790 | N/A | end | >
1791 | N/A | > |
1792 | 2 | for _, id in toRemove do |
1793 | 1 | world:remove(id, components.Cooldown) |
1794 | 1 | CHECK(not world:get(id, components.Cooldown)) |
1795 | N/A | end | >
1796 | N/A | end | >
1797 | N/A | > |
1798 | 1 | updateCooldowns(1.5) |
1799 | 1 | updateCooldowns(1.5) |
1800 | N/A | end | >
1801 | N/A | > |
1802 | 1 | do CASE "#2" -- ISSUE #171 |
1803 | 1 | local world = world_new() |
1804 | 1 | local component1 = world:component() |
1805 | 1 | local tag1 = world:entity() |
1806 | N/A | > |
1807 | 1 | local query = world:query(component1):with(tag1):cached() |
1808 | N/A | > |
1809 | 1 | local entity = world:entity() |
1810 | 1 | world:set(entity, component1, "some data") |
1811 | N/A | > |
1812 | 1 | local counter = 0 |
1813 | 1 | for x in query:iter() do |
1814 | 0 | counter += 1 |
1815 | N/A | end | >
1816 | 1 | CHECK(counter == 0) |
1817 | N/A | end | >
1818 | N/A | end) | >
1819 | N/A | > |
1820 | 1 | TEST("wildcard query", function() |
1821 | 1 | do CASE "#1" |
1822 | 1 | local world = world_new() |
1823 | 1 | local pair = jecs.pair |
1824 | N/A | > |
1825 | 1 | local Relation = world:entity() |
1826 | 1 | local Wildcard = jecs.Wildcard |
1827 | 1 | local A = world:entity() |
1828 | N/A | > |
1829 | 1 | local relationship = pair(Relation, Wildcard) |
1830 | 1 | local query = world:query(relationship):cached() |
1831 | N/A | > |
1832 | 1 | local entity = world:entity() |
1833 | N/A | > |
1834 | 1 | local p = pair(Relation, A) |
1835 | 1 | CHECK(jecs.pair_first(world, p) == Relation) |
1836 | 1 | CHECK(jecs.pair_second(world, p) == A) |
1837 | 1 | local w = dwi(world) |
1838 | 1 | world:add(entity, pair(Relation, A)) |
1839 | N/A | > |
1840 | 1 | local counter = 0 |
1841 | 1 | for e in query:iter() do |
1842 | 1 | counter += 1 |
1843 | N/A | end | >
1844 | 1 | CHECK(counter == 1) |
1845 | N/A | end | >
1846 | 1 | do CASE "#2" |
1847 | 1 | local world = world_new() |
1848 | 1 | local pair = jecs.pair |
1849 | N/A | > |
1850 | 1 | local Relation = world:entity() |
1851 | 1 | local Wildcard = jecs.Wildcard |
1852 | 1 | local A = world:entity() |
1853 | N/A | > |
1854 | 1 | local relationship = pair(Relation, Wildcard) |
1855 | N/A | > |
1856 | 1 | local entity = world:entity() |
1857 | N/A | > |
1858 | 1 | world:add(entity, pair(Relation, A)) |
1859 | N/A | > |
1860 | 1 | local counter = 0 |
1861 | 1 | for e in world:query(relationship):iter() do |
1862 | 1 | counter += 1 |
1863 | N/A | end | >
1864 | 1 | CHECK(counter == 1) |
1865 | N/A | end | >
1866 | 1 | do CASE "#3" |
1867 | 1 | local world = world_new() |
1868 | 1 | local pair = jecs.pair |
1869 | N/A | > |
1870 | 1 | local Relation = world:entity() |
1871 | 1 | local Wildcard = jecs.Wildcard |
1872 | 1 | local A = world:entity() |
1873 | N/A | > |
1874 | 1 | local entity = world:entity() |
1875 | N/A | > |
1876 | 1 | world:add(entity, pair(Relation, A)) |
1877 | N/A | > |
1878 | 1 | local relationship = pair(Relation, Wildcard) |
1879 | 1 | local query = world:query(relationship):cached() |
1880 | N/A | > |
1881 | 1 | local counter = 0 |
1882 | 1 | for e in query:iter() do |
1883 | 1 | counter += 1 |
1884 | N/A | end | >
1885 | 1 | CHECK(counter == 1) |
1886 | N/A | end | >
1887 | N/A | end) | >
1888 | N/A | > |
1889 | 1 | TEST("world:delete() invokes OnRemove hook", function() |
1890 | 1 | do CASE "#1" |
1891 | 1 | local world = world_new() |
1892 | N/A | > |
1893 | 1 | local A = world:entity() |
1894 | 1 | local entity = world:entity() |
1895 | N/A | > |
1896 | 1 | local called = false |
1897 | 1 | world:set(A, jecs.OnRemove, function(e) |
1898 | 1 | called = true |
1899 | N/A | end) | >
1900 | N/A | > |
1901 | 1 | world:add(entity, A) |
1902 | 1 | world:delete(entity) |
1903 | N/A | > |
1904 | 1 | CHECK(called) |
1905 | N/A | end | >
1906 | 1 | do CASE "#2" |
1907 | 1 | local world = world_new() |
1908 | 1 | local pair = jecs.pair |
1909 | N/A | > |
1910 | 1 | local Relation = world:entity() |
1911 | 1 | local A = world:entity() |
1912 | 1 | local B = world:entity() |
1913 | N/A | > |
1914 | 1 | world:add(Relation, pair(jecs.OnDelete, jecs.Delete)) |
1915 | N/A | > |
1916 | 1 | local entity = world:entity() |
1917 | N/A | > |
1918 | 1 | local called = false |
1919 | 1 | world:set(A, jecs.OnRemove, function(e) |
1920 | 1 | called = true |
1921 | N/A | end) | >
1922 | N/A | > |
1923 | 1 | world:add(entity, A) |
1924 | 1 | world:add(entity, pair(Relation, B)) |
1925 | N/A | > |
1926 | 1 | world:delete(B) |
1927 | N/A | > |
1928 | 1 | CHECK(called) |
1929 | N/A | end | >
1930 | 1 | do CASE "#3" |
1931 | 1 | local world = world_new() |
1932 | 1 | local pair = jecs.pair |
1933 | N/A | > |
1934 | 1 | local viewingContainer = world:entity() |
1935 | 1 | local character = world:entity() |
1936 | 1 | local container = world:entity() |
1937 | N/A | > |
1938 | 1 | local called = false |
1939 | 1 | world:set(viewingContainer, jecs.OnRemove, function(e) |
1940 | 1 | called = true |
1941 | N/A | end) | >
1942 | N/A | > |
1943 | 1 | world:add(character, pair(viewingContainer, container)) |
1944 | N/A | > |
1945 | 1 | world:delete(container) |
1946 | N/A | > |
1947 | 1 | CHECK(called) |
1948 | N/A | end | >
1949 | N/A | end) | >
1950 | 1 | FINISH() |
Function | Hits |
---|---|
{func["name"]} | ' + f'{func["hits"]} |
Line | Hits | Code |
---|---|---|
{i} | {count_display} | {line.strip()} | >
{i} | {count_display} | {marked_text} |
File | Total Hits | Functions |
---|---|---|
{filename} | {total_hits} | {total_functions} |