bard-legends-framework 0.0.0 → 0.0.2
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/dist/_interfaces/index.d.ts +0 -1
- package/dist/game-entities/attachable/attachable.d.ts +1 -0
- package/dist/game-entities/attachable/attachable.js +5 -0
- package/dist/game-entities/attachable/attachable.js.map +1 -1
- package/dist/game-entities/index.d.ts +1 -0
- package/dist/game-entities/index.js +3 -1
- package/dist/game-entities/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ declare module 'actions-lib' {
|
|
|
11
11
|
export type CanBeAttached = Destroyable | Unsubscribable | CanBeAttached[] | Variable<CanBeAttached>;
|
|
12
12
|
export declare abstract class Attachable implements Destroyable {
|
|
13
13
|
private static nextAvailableIds;
|
|
14
|
+
static getAttachableOrFail(parent: Attachable | string): Attachable;
|
|
14
15
|
readonly id: string;
|
|
15
16
|
protected destroyed: boolean;
|
|
16
17
|
protected childDestroy: () => void;
|
|
@@ -4,6 +4,7 @@ exports.Attachable = void 0;
|
|
|
4
4
|
const actions_lib_1 = require("actions-lib");
|
|
5
5
|
const helpers_lib_1 = require("helpers-lib");
|
|
6
6
|
const update_loop_1 = require("../../lib/update-loop");
|
|
7
|
+
const entity_store_helper_1 = require("../entity/helpers/entity-store.helper");
|
|
7
8
|
actions_lib_1.ActionSubscription.prototype.attach = function (parent) {
|
|
8
9
|
parent['setAttachment'](this);
|
|
9
10
|
return this;
|
|
@@ -14,6 +15,10 @@ actions_lib_1.ReducerEffectChannel.prototype.attach = function (parent) {
|
|
|
14
15
|
};
|
|
15
16
|
class Attachable {
|
|
16
17
|
static { this.nextAvailableIds = new Map(); }
|
|
18
|
+
static getAttachableOrFail(parent) {
|
|
19
|
+
// TODO: this functionality is incomplete. If parent is a string, it only returns Entities, not all Attachables.
|
|
20
|
+
return entity_store_helper_1.EntityStoreHelper.getAttachableOrFail(parent);
|
|
21
|
+
}
|
|
17
22
|
constructor() {
|
|
18
23
|
this.id = '';
|
|
19
24
|
this.destroyed = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachable.js","sourceRoot":"","sources":["../../../src/game-entities/attachable/attachable.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AACjF,6CAAyC;AAGzC,uDAAoD;
|
|
1
|
+
{"version":3,"file":"attachable.js","sourceRoot":"","sources":["../../../src/game-entities/attachable/attachable.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AACjF,6CAAyC;AAGzC,uDAAoD;AACpD,+EAA0E;AAY1E,gCAAkB,CAAC,SAAS,CAAC,MAAM,GAAG,UAAU,MAAkB;IAChE,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kCAAoB,CAAC,SAAS,CAAC,MAAM,GAAG,UACtC,MAAkB;IAElB,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAIF,MAAsB,UAAU;aACf,qBAAgB,GAAG,IAAI,GAAG,EAAkB,AAA5B,CAA6B;IAE5D,MAAM,CAAC,mBAAmB,CAAC,MAA2B;QACpD,gHAAgH;QAChH,OAAO,uCAAiB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IAcD;QAZS,OAAE,GAAW,EAAE,CAAC;QAEf,cAAS,GAAG,KAAK,CAAC;QAClB,iBAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,sBAAiB,GAAG,GAAS,EAAE;YACvC,IAAI,gBAAgB,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7C,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;YAC/D,IAAI,CAAC,WAAW,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,IAAI,MAAM,YAAY,sBAAQ,EAAE,CAAC;YAC/B,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,MAAM,YAAY,KAAK,EAAE,CAAC;YACnC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,CAAC;aAAM,IAAI,wBAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,IAAI,IAAI,GAAQ,MAAM,CAAC;YACvB,IAAI,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBACxC,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,CAAC;iBAAM,IAAI,wBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBACnD,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,2EAA2E,MAAM,GAAG,CAAC,CAAC;QACxG,CAAC;IACH,CAAC;;AApEH,gCAqEC;AAED,yBAAW,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;IACzC,UAAU,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,CAAC;AACzC,CAAC,CAAC,CAAC"}
|
|
@@ -3,3 +3,4 @@ export { View, ViewDecorator, ViewDecoratorMeta } from './view/view';
|
|
|
3
3
|
export { Service, ServiceDecorator } from './service/service';
|
|
4
4
|
export { ControllerDecorator, ControllerLink, ControllerDecoratorMeta } from './controller/controller';
|
|
5
5
|
export { Scene, SceneDecorator } from './scene/scene';
|
|
6
|
+
export { Attachable } from './attachable/attachable';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SceneDecorator = exports.Scene = exports.ControllerLink = exports.ControllerDecorator = exports.ServiceDecorator = exports.Service = exports.ViewDecorator = exports.View = exports.EntityDecorator = exports.Entity = void 0;
|
|
3
|
+
exports.Attachable = exports.SceneDecorator = exports.Scene = exports.ControllerLink = exports.ControllerDecorator = exports.ServiceDecorator = exports.Service = exports.ViewDecorator = exports.View = exports.EntityDecorator = exports.Entity = void 0;
|
|
4
4
|
var entity_1 = require("./entity/entity");
|
|
5
5
|
Object.defineProperty(exports, "Entity", { enumerable: true, get: function () { return entity_1.Entity; } });
|
|
6
6
|
Object.defineProperty(exports, "EntityDecorator", { enumerable: true, get: function () { return entity_1.EntityDecorator; } });
|
|
@@ -16,4 +16,6 @@ Object.defineProperty(exports, "ControllerLink", { enumerable: true, get: functi
|
|
|
16
16
|
var scene_1 = require("./scene/scene");
|
|
17
17
|
Object.defineProperty(exports, "Scene", { enumerable: true, get: function () { return scene_1.Scene; } });
|
|
18
18
|
Object.defineProperty(exports, "SceneDecorator", { enumerable: true, get: function () { return scene_1.SceneDecorator; } });
|
|
19
|
+
var attachable_1 = require("./attachable/attachable");
|
|
20
|
+
Object.defineProperty(exports, "Attachable", { enumerable: true, get: function () { return attachable_1.Attachable; } });
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/game-entities/index.ts"],"names":[],"mappings":";;;AAAA,0CAA0D;AAAjD,gGAAA,MAAM,OAAA;AAAE,yGAAA,eAAe,OAAA;AAChC,oCAAqE;AAA5D,4FAAA,IAAI,OAAA;AAAE,qGAAA,aAAa,OAAA;AAC5B,6CAA8D;AAArD,kGAAA,OAAO,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAClC,sDAAuG;AAA9F,iHAAA,mBAAmB,OAAA;AAAE,4GAAA,cAAc,OAAA;AAC5C,uCAAsD;AAA7C,8FAAA,KAAK,OAAA;AAAE,uGAAA,cAAc,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/game-entities/index.ts"],"names":[],"mappings":";;;AAAA,0CAA0D;AAAjD,gGAAA,MAAM,OAAA;AAAE,yGAAA,eAAe,OAAA;AAChC,oCAAqE;AAA5D,4FAAA,IAAI,OAAA;AAAE,qGAAA,aAAa,OAAA;AAC5B,6CAA8D;AAArD,kGAAA,OAAO,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAClC,sDAAuG;AAA9F,iHAAA,mBAAmB,OAAA;AAAE,4GAAA,cAAc,OAAA;AAC5C,uCAAsD;AAA7C,8FAAA,KAAK,OAAA;AAAE,uGAAA,cAAc,OAAA;AAC9B,sDAAqD;AAA5C,wGAAA,UAAU,OAAA"}
|