@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/covenant.luau +14 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "main": "src/init.luau",
5
5
  "scripts": {
6
6
  "build": "rbxtsc",
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
- local _exp = next(self.undefinedStringifiedComponents) == nil
240
- -- ▼ ReadonlySet.size ▼
241
- local _size = 0
242
- for _ in self.undefinedStringifiedComponents do
243
- _size += 1
244
- end
245
- -- ▲ ReadonlySet.size ▲
246
- local _arg1 = `There are {_size} components that are not defined`
247
- assert(_exp, _arg1)
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 _exp_1 = event
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(_exp_1, systemsOfEvent)
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)