@rbxts/covenant 1.0.12 → 1.0.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "main": "src/init.luau",
5
5
  "scripts": {
6
6
  "build": "rbxtsc",
package/src/covenant.d.ts CHANGED
@@ -52,10 +52,9 @@ export declare class Covenant {
52
52
  queriedComponents: Entity[][];
53
53
  recipe: (entity: Entity, lastState: T | undefined, updateId: number, hooks: CovenantHooks) => T | undefined;
54
54
  }): void;
55
- defineManagedChildren<T extends defined>({ parentComponent, childIdentityComponent, getIdentifier, queriedComponents, recipe, replicated, predictionValidator, }: {
55
+ defineManagedChildren<T extends defined>({ childIdentityComponent, getIdentifier, queriedComponents, recipe, replicated, predictionValidator, }: {
56
56
  replicated: boolean;
57
57
  predictionValidator: ComponentPredictionValidator | false;
58
- parentComponent: Entity<ReadonlyArray<T>>;
59
58
  childIdentityComponent: Entity<T>;
60
59
  getIdentifier: (state: T) => Discriminator;
61
60
  queriedComponents: Entity[][];
package/src/covenant.luau CHANGED
@@ -434,7 +434,7 @@ do
434
434
  function Covenant:checkComponentDefined(component)
435
435
  local _undefinedStringifiedComponents = self.undefinedStringifiedComponents
436
436
  local _arg0 = tostring(component)
437
- local _arg0_1 = not (_undefinedStringifiedComponents[_arg0] ~= nil)
437
+ local _arg0_1 = _undefinedStringifiedComponents[_arg0] ~= nil
438
438
  local _arg1 = `Component {component} is already defined`
439
439
  assert(_arg0_1, _arg1)
440
440
  local _undefinedStringifiedComponents_1 = self.undefinedStringifiedComponents
@@ -574,16 +574,15 @@ do
574
574
  end)
575
575
  end
576
576
  function Covenant:defineManagedChildren(_param)
577
- local parentComponent = _param.parentComponent
578
577
  local childIdentityComponent = _param.childIdentityComponent
579
578
  local getIdentifier = _param.getIdentifier
580
579
  local queriedComponents = _param.queriedComponents
581
580
  local recipe = _param.recipe
582
581
  local replicated = _param.replicated
583
582
  local predictionValidator = _param.predictionValidator
584
- self:checkComponentDefined(parentComponent)
585
583
  self:checkComponentDefined(childIdentityComponent)
586
584
  local parentEntityTrackerComponent = self:worldInternalComponent()
585
+ local parentComponent = self:worldInternalComponent()
587
586
  self:defineComponentNetworkBehavior(parentComponent, replicated, predictionValidator)
588
587
  local queryParentComponent = self:worldQuery(parentComponent):cached()
589
588
  local willUpdate = true