@rbxts/covenant 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/covenant.luau +14 -11
package/package.json
CHANGED
package/src/covenant.luau
CHANGED
|
@@ -236,23 +236,23 @@ do
|
|
|
236
236
|
function Covenant:start()
|
|
237
237
|
local _arg0 = not self.started
|
|
238
238
|
assert(_arg0, "Already started")
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
239
|
+
if not (next(self.undefinedStringifiedComponents) == nil) then
|
|
240
|
+
-- ▼ ReadonlySet.size ▼
|
|
241
|
+
local _size = 0
|
|
242
|
+
for _ in self.undefinedStringifiedComponents do
|
|
243
|
+
_size += 1
|
|
244
|
+
end
|
|
245
|
+
-- ▲ ReadonlySet.size ▲
|
|
246
|
+
warn(`There are {_size} components that are not defined`)
|
|
247
|
+
end
|
|
248
248
|
self.started = true
|
|
249
249
|
self.systems:forEach(function(systemsOfEvent, event)
|
|
250
250
|
local _systems = self.systems
|
|
251
|
-
local
|
|
251
|
+
local _exp = event
|
|
252
252
|
table.sort(systemsOfEvent, function(a, b)
|
|
253
253
|
return a.priority < b.priority
|
|
254
254
|
end)
|
|
255
|
-
return _systems:set(
|
|
255
|
+
return _systems:set(_exp, systemsOfEvent)
|
|
256
256
|
end)
|
|
257
257
|
self.systems:forEach(function(systemsOfEvent, event)
|
|
258
258
|
event:Connect(function()
|
|
@@ -429,6 +429,7 @@ do
|
|
|
429
429
|
return c
|
|
430
430
|
end
|
|
431
431
|
function Covenant:worldInternalComponent()
|
|
432
|
+
self:preventPostStartCall()
|
|
432
433
|
return self._world:component()
|
|
433
434
|
end
|
|
434
435
|
function Covenant:checkComponentDefined(component)
|
|
@@ -470,6 +471,7 @@ do
|
|
|
470
471
|
local function indicateUpdate()
|
|
471
472
|
willUpdate = true
|
|
472
473
|
end
|
|
474
|
+
self:subscribeComponent(component, indicateUpdate)
|
|
473
475
|
local hooks = createHooks({
|
|
474
476
|
indicateUpdate = indicateUpdate,
|
|
475
477
|
subscribeComponent = function(component, subscriber)
|
|
@@ -589,6 +591,7 @@ do
|
|
|
589
591
|
local function indicateUpdate()
|
|
590
592
|
willUpdate = true
|
|
591
593
|
end
|
|
594
|
+
self:subscribeComponent(parentComponent, indicateUpdate)
|
|
592
595
|
local hooks = createHooks({
|
|
593
596
|
indicateUpdate = indicateUpdate,
|
|
594
597
|
subscribeComponent = function(component, subscriber)
|