From d8f91df276fd71812cac9a14e1b8b5019757a7a1 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 15 May 2026 21:23:11 +0300 Subject: [PATCH 1/3] Add system groups --- src/schedule/core/systembuilder.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/schedule/core/systembuilder.js b/src/schedule/core/systembuilder.js index 229fdbe1..04f5fe53 100644 --- a/src/schedule/core/systembuilder.js +++ b/src/schedule/core/systembuilder.js @@ -10,6 +10,12 @@ export class SchedulerBuilder { */ systems = [] + /** + * @private + * @type {SystemGroupConfig[]} + */ + systemGroups = [] + /** * @param {SystemConfig} config */ @@ -17,6 +23,12 @@ export class SchedulerBuilder { this.systems.push(config) } + /** + * @param {SystemGroupConfig} config + */ + addGroup(config) { + this.systemGroups.push(config) + } /** * @param {Scheduler} scheduler */ @@ -32,3 +44,8 @@ export class SchedulerBuilder { } } } + +/** + * @typedef SystemGroupConfig + * @property {import('../../type/index.js').Constructor} label + */ From e6d5d4bf6afa182f268466ce65dc41b411bf2a52 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 15 May 2026 21:23:34 +0300 Subject: [PATCH 2/3] Integrate system groups into system configs --- src/schedule/core/systemconfig.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/schedule/core/systemconfig.js b/src/schedule/core/systemconfig.js index 803248a4..99c2f3a9 100644 --- a/src/schedule/core/systemconfig.js +++ b/src/schedule/core/systemconfig.js @@ -1,6 +1,10 @@ /** @import {SystemFunc} from "../../ecs/index.js" */ export class SystemConfig { + /** + * @type {import("../../type/index.js").Constructor | undefined} + */ + systemGroup /** * @type {SystemFunc} */ @@ -14,9 +18,11 @@ export class SystemConfig { /** * @param {SystemFunc} system * @param {string} schedule + * @param {import("../../type/index.js").Constructor | undefined} [systemGroup] */ - constructor(system, schedule) { + constructor(system, schedule, systemGroup) { this.system = system this.schedule = schedule + this.systemGroup = systemGroup } } From e8f7a4d496613f95cf829c323b09407ae932d48f Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 15 May 2026 21:30:24 +0300 Subject: [PATCH 3/3] Lint files --- src/schedule/core/systembuilder.js | 1 + src/schedule/core/systemconfig.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/schedule/core/systembuilder.js b/src/schedule/core/systembuilder.js index 04f5fe53..d06f17e5 100644 --- a/src/schedule/core/systembuilder.js +++ b/src/schedule/core/systembuilder.js @@ -29,6 +29,7 @@ export class SchedulerBuilder { addGroup(config) { this.systemGroups.push(config) } + /** * @param {Scheduler} scheduler */ diff --git a/src/schedule/core/systemconfig.js b/src/schedule/core/systemconfig.js index 99c2f3a9..fc9f9ebe 100644 --- a/src/schedule/core/systemconfig.js +++ b/src/schedule/core/systemconfig.js @@ -5,6 +5,7 @@ export class SystemConfig { * @type {import("../../type/index.js").Constructor | undefined} */ systemGroup + /** * @type {SystemFunc} */