@rbxts/covenant 1.0.13 → 1.0.15

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 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
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,12 +429,13 @@ 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)
435
436
  local _undefinedStringifiedComponents = self.undefinedStringifiedComponents
436
437
  local _arg0 = tostring(component)
437
- local _arg0_1 = not (_undefinedStringifiedComponents[_arg0] ~= nil)
438
+ local _arg0_1 = _undefinedStringifiedComponents[_arg0] ~= nil
438
439
  local _arg1 = `Component {component} is already defined`
439
440
  assert(_arg0_1, _arg1)
440
441
  local _undefinedStringifiedComponents_1 = self.undefinedStringifiedComponents
@@ -584,6 +585,7 @@ do
584
585
  local parentEntityTrackerComponent = self:worldInternalComponent()
585
586
  local parentComponent = self:worldInternalComponent()
586
587
  self:defineComponentNetworkBehavior(parentComponent, replicated, predictionValidator)
588
+ self:defineComponentNetworkBehavior(childIdentityComponent, replicated, false)
587
589
  local queryParentComponent = self:worldQuery(parentComponent):cached()
588
590
  local willUpdate = true
589
591
  local function indicateUpdate()