@sharpee/core 1.0.0 → 1.1.0
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 +1 -1
- package/rules/compatibility.d.ts +0 -46
- package/rules/compatibility.d.ts.map +0 -1
- package/rules/compatibility.js +0 -62
- package/rules/compatibility.js.map +0 -1
- package/rules/condition-builder.d.ts +0 -23
- package/rules/condition-builder.d.ts.map +0 -1
- package/rules/condition-builder.js +0 -16
- package/rules/condition-builder.js.map +0 -1
- package/rules/helpers.d.ts +0 -51
- package/rules/helpers.d.ts.map +0 -1
- package/rules/helpers.js +0 -111
- package/rules/helpers.js.map +0 -1
- package/rules/index.d.ts +0 -12
- package/rules/index.d.ts.map +0 -1
- package/rules/index.js +0 -34
- package/rules/index.js.map +0 -1
- package/rules/rule-system.d.ts +0 -6
- package/rules/rule-system.d.ts.map +0 -1
- package/rules/rule-system.js +0 -10
- package/rules/rule-system.js.map +0 -1
- package/rules/rule-world-adapter.d.ts +0 -43
- package/rules/rule-world-adapter.d.ts.map +0 -1
- package/rules/rule-world-adapter.js +0 -74
- package/rules/rule-world-adapter.js.map +0 -1
- package/rules/simple-rule-system.d.ts +0 -36
- package/rules/simple-rule-system.d.ts.map +0 -1
- package/rules/simple-rule-system.js +0 -135
- package/rules/simple-rule-system.js.map +0 -1
- package/rules/types.d.ts +0 -64
- package/rules/types.d.ts.map +0 -1
- package/rules/types.js +0 -6
- package/rules/types.js.map +0 -1
- package/sharpee-core-0.9.107.tgz +0 -0
- package/sharpee-core-0.9.113.tgz +0 -0
- package/sharpee-core-0.9.97.tgz +0 -0
- package/sharpee-core-0.9.99.tgz +0 -0
package/package.json
CHANGED
package/rules/compatibility.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compatibility adapter for the old RuleSystem interface
|
|
3
|
-
* This allows existing code to work with the new simple rule system
|
|
4
|
-
*/
|
|
5
|
-
import { ISemanticEvent } from '../events/types';
|
|
6
|
-
import { SimpleRuleSystemImpl } from './simple-rule-system';
|
|
7
|
-
/**
|
|
8
|
-
* Game context interface that the old system expects
|
|
9
|
-
*/
|
|
10
|
-
interface GameContext {
|
|
11
|
-
worldState: any;
|
|
12
|
-
player: any;
|
|
13
|
-
currentLocation: any;
|
|
14
|
-
getEntity: (id: string) => any;
|
|
15
|
-
updateWorldState?: (updater: (state: any) => any) => GameContext;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Result interface that the old system expects
|
|
20
|
-
*/
|
|
21
|
-
interface OldRuleResult {
|
|
22
|
-
prevented: boolean;
|
|
23
|
-
preventMessage?: string;
|
|
24
|
-
events: ISemanticEvent[];
|
|
25
|
-
context: GameContext;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Old RuleSystem interface for compatibility
|
|
29
|
-
*/
|
|
30
|
-
export interface IRuleSystem {
|
|
31
|
-
processEvent(event: ISemanticEvent, context: GameContext): OldRuleResult;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Adapter that makes the new SimpleRuleSystem compatible with old interfaces
|
|
35
|
-
*/
|
|
36
|
-
export declare class RuleSystemAdapter implements IRuleSystem {
|
|
37
|
-
private simpleRuleSystem;
|
|
38
|
-
constructor(simpleRuleSystem: SimpleRuleSystemImpl);
|
|
39
|
-
processEvent(event: ISemanticEvent, context: GameContext): OldRuleResult;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Create a compatible rule system
|
|
43
|
-
*/
|
|
44
|
-
export declare function createRuleSystem(): IRuleSystem;
|
|
45
|
-
export {};
|
|
46
|
-
//# sourceMappingURL=compatibility.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/compatibility.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;GAEG;AACH,UAAU,WAAW;IACnB,UAAU,EAAE,GAAG,CAAC;IAChB,MAAM,EAAE,GAAG,CAAC;IACZ,eAAe,EAAE,GAAG,CAAC;IACrB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,GAAG,CAAC;IAC/B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,KAAK,WAAW,CAAC;IACjE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,aAAa;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,aAAa,CAAC;CAC1E;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IACvC,OAAO,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,oBAAoB;IAE1D,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,aAAa;CAezE;AAwBD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAG9C"}
|
package/rules/compatibility.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Compatibility adapter for the old RuleSystem interface
|
|
4
|
-
* This allows existing code to work with the new simple rule system
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.RuleSystemAdapter = void 0;
|
|
8
|
-
exports.createRuleSystem = createRuleSystem;
|
|
9
|
-
const simple_rule_system_1 = require("./simple-rule-system");
|
|
10
|
-
/**
|
|
11
|
-
* Adapter that makes the new SimpleRuleSystem compatible with old interfaces
|
|
12
|
-
*/
|
|
13
|
-
class RuleSystemAdapter {
|
|
14
|
-
simpleRuleSystem;
|
|
15
|
-
constructor(simpleRuleSystem) {
|
|
16
|
-
this.simpleRuleSystem = simpleRuleSystem;
|
|
17
|
-
}
|
|
18
|
-
processEvent(event, context) {
|
|
19
|
-
// Create a RuleWorld adapter from the GameContext
|
|
20
|
-
const world = createRuleWorldFromGameContext(context);
|
|
21
|
-
// Process through the simple rule system
|
|
22
|
-
const result = this.simpleRuleSystem.processEvent(event, world);
|
|
23
|
-
// Convert back to old format
|
|
24
|
-
return {
|
|
25
|
-
prevented: result.prevent || false,
|
|
26
|
-
preventMessage: result.message,
|
|
27
|
-
events: result.events || [],
|
|
28
|
-
context: context // Return original context for now
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.RuleSystemAdapter = RuleSystemAdapter;
|
|
33
|
-
/**
|
|
34
|
-
* Create a RuleWorld from a GameContext
|
|
35
|
-
*/
|
|
36
|
-
function createRuleWorldFromGameContext(context) {
|
|
37
|
-
return {
|
|
38
|
-
getEntity: (id) => context.getEntity(id),
|
|
39
|
-
updateEntity: (id, changes) => {
|
|
40
|
-
// For now, just update the entity directly
|
|
41
|
-
const entity = context.getEntity(id);
|
|
42
|
-
if (entity) {
|
|
43
|
-
if (entity.attributes) {
|
|
44
|
-
Object.assign(entity.attributes, changes);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
Object.assign(entity, changes);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
getPlayer: () => context.player,
|
|
52
|
-
getCurrentLocation: () => context.currentLocation
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Create a compatible rule system
|
|
57
|
-
*/
|
|
58
|
-
function createRuleSystem() {
|
|
59
|
-
const simpleRuleSystem = new simple_rule_system_1.SimpleRuleSystemImpl();
|
|
60
|
-
return new RuleSystemAdapter(simpleRuleSystem);
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=compatibility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/compatibility.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmFH,4CAGC;AAnFD,6DAA4D;AAgC5D;;GAEG;AACH,MAAa,iBAAiB;IACR;IAApB,YAAoB,gBAAsC;QAAtC,qBAAgB,GAAhB,gBAAgB,CAAsB;IAAG,CAAC;IAE9D,YAAY,CAAC,KAAqB,EAAE,OAAoB;QACtD,kDAAkD;QAClD,MAAM,KAAK,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;QAEtD,yCAAyC;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAEhE,6BAA6B;QAC7B,OAAO;YACL,SAAS,EAAE,MAAM,CAAC,OAAO,IAAI,KAAK;YAClC,cAAc,EAAE,MAAM,CAAC,OAAO;YAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;YAC3B,OAAO,EAAE,OAAO,CAAC,kCAAkC;SACpD,CAAC;IACJ,CAAC;CACF;AAlBD,8CAkBC;AAED;;GAEG;AACH,SAAS,8BAA8B,CAAC,OAAoB;IAC1D,OAAO;QACL,SAAS,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAChD,YAAY,EAAE,CAAC,EAAU,EAAE,OAA4B,EAAE,EAAE;YACzD,2CAA2C;YAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;oBACtB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBAC5C,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC;QACH,CAAC;QACD,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM;QAC/B,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe;KAClD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,gBAAgB,GAAG,IAAI,yCAAoB,EAAE,CAAC;IACpD,OAAO,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Condition builder utilities
|
|
3
|
-
* TODO: Implement proper condition builders
|
|
4
|
-
*/
|
|
5
|
-
export declare const player: (property: string) => {
|
|
6
|
-
type: string;
|
|
7
|
-
property: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const item: (property: string) => {
|
|
10
|
-
type: string;
|
|
11
|
-
property: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const location: (property: string) => {
|
|
14
|
-
type: string;
|
|
15
|
-
property: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const direction: (property: string) => {
|
|
18
|
-
type: string;
|
|
19
|
-
property: string;
|
|
20
|
-
};
|
|
21
|
-
export type EntityReference = ReturnType<typeof player | typeof item | typeof location>;
|
|
22
|
-
export type ValueReference = string | number | boolean;
|
|
23
|
-
//# sourceMappingURL=condition-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"condition-builder.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/condition-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM,GAAI,UAAU,MAAM;;;CAAmC,CAAC;AAC3E,eAAO,MAAM,IAAI,GAAI,UAAU,MAAM;;;CAAiC,CAAC;AACvE,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM;;;CAAqC,CAAC;AAC/E,eAAO,MAAM,SAAS,GAAI,UAAU,MAAM;;;CAAsC,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,MAAM,GAAG,OAAO,IAAI,GAAG,OAAO,QAAQ,CAAC,CAAC;AACxF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Condition builder utilities
|
|
4
|
-
* TODO: Implement proper condition builders
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.direction = exports.location = exports.item = exports.player = void 0;
|
|
8
|
-
const player = (property) => ({ type: 'player', property });
|
|
9
|
-
exports.player = player;
|
|
10
|
-
const item = (property) => ({ type: 'item', property });
|
|
11
|
-
exports.item = item;
|
|
12
|
-
const location = (property) => ({ type: 'location', property });
|
|
13
|
-
exports.location = location;
|
|
14
|
-
const direction = (property) => ({ type: 'direction', property });
|
|
15
|
-
exports.direction = direction;
|
|
16
|
-
//# sourceMappingURL=condition-builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"condition-builder.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/condition-builder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEI,MAAM,MAAM,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AAA9D,QAAA,MAAM,UAAwD;AACpE,MAAM,IAAI,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AAA1D,QAAA,IAAI,QAAsD;AAChE,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAlE,QAAA,QAAQ,YAA0D;AACxE,MAAM,SAAS,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;AAApE,QAAA,SAAS,aAA2D"}
|
package/rules/helpers.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper functions for common rule patterns
|
|
3
|
-
*/
|
|
4
|
-
import { EntityId } from '../types/entity';
|
|
5
|
-
import { ISemanticEvent } from '../events/types';
|
|
6
|
-
import { IRuleWorld, IEntityChange } from './types';
|
|
7
|
-
/**
|
|
8
|
-
* Helper to get the target item from an event
|
|
9
|
-
*/
|
|
10
|
-
export declare function getTargetItem(event: ISemanticEvent, world: IRuleWorld): any;
|
|
11
|
-
/**
|
|
12
|
-
* Helper to get the actor from an event
|
|
13
|
-
*/
|
|
14
|
-
export declare function getActor(event: ISemanticEvent, world: IRuleWorld): any;
|
|
15
|
-
/**
|
|
16
|
-
* Helper to check if entity has a specific name/id
|
|
17
|
-
*/
|
|
18
|
-
export declare function entityIs(entity: any, nameOrId: string): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Helper to get entity attribute value
|
|
21
|
-
*/
|
|
22
|
-
export declare function getAttribute(entity: any, attribute: string): any;
|
|
23
|
-
/**
|
|
24
|
-
* Helper to check if entity has an ability
|
|
25
|
-
*/
|
|
26
|
-
export declare function hasAbility(entity: any, ability: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Helper to create an entity change that gives an ability
|
|
29
|
-
*/
|
|
30
|
-
export declare function giveAbility(entityId: EntityId, ability: string): IEntityChange;
|
|
31
|
-
/**
|
|
32
|
-
* Helper to create an entity change that removes an ability
|
|
33
|
-
*/
|
|
34
|
-
export declare function removeAbility(entityId: EntityId, ability: string): IEntityChange;
|
|
35
|
-
/**
|
|
36
|
-
* Helper to create an entity change that sets an attribute
|
|
37
|
-
*/
|
|
38
|
-
export declare function setAttribute(entityId: EntityId, attribute: string, value: any): IEntityChange;
|
|
39
|
-
/**
|
|
40
|
-
* Common condition: item weight vs player strength
|
|
41
|
-
*/
|
|
42
|
-
export declare function itemTooHeavy(event: ISemanticEvent, world: IRuleWorld): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Common condition: check if taking a specific item
|
|
45
|
-
*/
|
|
46
|
-
export declare function isTaking(itemNameOrId: string): (event: ISemanticEvent, world: IRuleWorld) => boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Common condition: player has specific ability
|
|
49
|
-
*/
|
|
50
|
-
export declare function playerHasAbility(ability: string): (event: ISemanticEvent, world: IRuleWorld) => boolean;
|
|
51
|
-
//# sourceMappingURL=helpers.d.ts.map
|
package/rules/helpers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,OAOrE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,OAGhE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CAEhE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAM9E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAMhF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,aAAa,CAM7F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAQ9E;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,IACnC,OAAO,cAAc,EAAE,OAAO,UAAU,KAAG,OAAO,CAI3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,IACtC,OAAO,cAAc,EAAE,OAAO,UAAU,KAAG,OAAO,CAI3D"}
|
package/rules/helpers.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Helper functions for common rule patterns
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTargetItem = getTargetItem;
|
|
7
|
-
exports.getActor = getActor;
|
|
8
|
-
exports.entityIs = entityIs;
|
|
9
|
-
exports.getAttribute = getAttribute;
|
|
10
|
-
exports.hasAbility = hasAbility;
|
|
11
|
-
exports.giveAbility = giveAbility;
|
|
12
|
-
exports.removeAbility = removeAbility;
|
|
13
|
-
exports.setAttribute = setAttribute;
|
|
14
|
-
exports.itemTooHeavy = itemTooHeavy;
|
|
15
|
-
exports.isTaking = isTaking;
|
|
16
|
-
exports.playerHasAbility = playerHasAbility;
|
|
17
|
-
/**
|
|
18
|
-
* Helper to get the target item from an event
|
|
19
|
-
*/
|
|
20
|
-
function getTargetItem(event, world) {
|
|
21
|
-
const targetId = event.entities.target || event.data?.itemId;
|
|
22
|
-
// Ensure targetId is a string before passing to getEntity
|
|
23
|
-
if (typeof targetId === 'string') {
|
|
24
|
-
return world.getEntity(targetId);
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Helper to get the actor from an event
|
|
30
|
-
*/
|
|
31
|
-
function getActor(event, world) {
|
|
32
|
-
const actorId = event.entities.actor;
|
|
33
|
-
return actorId ? world.getEntity(actorId) : undefined;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Helper to check if entity has a specific name/id
|
|
37
|
-
*/
|
|
38
|
-
function entityIs(entity, nameOrId) {
|
|
39
|
-
return entity?.id === nameOrId || entity?.attributes?.name === nameOrId;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Helper to get entity attribute value
|
|
43
|
-
*/
|
|
44
|
-
function getAttribute(entity, attribute) {
|
|
45
|
-
return entity?.attributes?.[attribute];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Helper to check if entity has an ability
|
|
49
|
-
*/
|
|
50
|
-
function hasAbility(entity, ability) {
|
|
51
|
-
return entity?.attributes?.[`ability_${ability}`] === true;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Helper to create an entity change that gives an ability
|
|
55
|
-
*/
|
|
56
|
-
function giveAbility(entityId, ability) {
|
|
57
|
-
return {
|
|
58
|
-
entityId,
|
|
59
|
-
attribute: `ability_${ability}`,
|
|
60
|
-
value: true
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Helper to create an entity change that removes an ability
|
|
65
|
-
*/
|
|
66
|
-
function removeAbility(entityId, ability) {
|
|
67
|
-
return {
|
|
68
|
-
entityId,
|
|
69
|
-
attribute: `ability_${ability}`,
|
|
70
|
-
value: undefined
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Helper to create an entity change that sets an attribute
|
|
75
|
-
*/
|
|
76
|
-
function setAttribute(entityId, attribute, value) {
|
|
77
|
-
return {
|
|
78
|
-
entityId,
|
|
79
|
-
attribute,
|
|
80
|
-
value
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Common condition: item weight vs player strength
|
|
85
|
-
*/
|
|
86
|
-
function itemTooHeavy(event, world) {
|
|
87
|
-
const item = getTargetItem(event, world);
|
|
88
|
-
const player = world.getPlayer();
|
|
89
|
-
const itemWeight = getAttribute(item, 'weight') || 0;
|
|
90
|
-
const playerStrength = getAttribute(player, 'strength') || 10;
|
|
91
|
-
return itemWeight > playerStrength;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Common condition: check if taking a specific item
|
|
95
|
-
*/
|
|
96
|
-
function isTaking(itemNameOrId) {
|
|
97
|
-
return (event, world) => {
|
|
98
|
-
const item = getTargetItem(event, world);
|
|
99
|
-
return entityIs(item, itemNameOrId);
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Common condition: player has specific ability
|
|
104
|
-
*/
|
|
105
|
-
function playerHasAbility(ability) {
|
|
106
|
-
return (event, world) => {
|
|
107
|
-
const player = world.getPlayer();
|
|
108
|
-
return hasAbility(player, ability);
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=helpers.js.map
|
package/rules/helpers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/helpers.ts"],"names":[],"mappings":";AAAA;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AAC;IACrC,CAAC,CAAC;AACJ,CAAC"}
|
package/rules/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simple Rule System v2 - Main exports
|
|
3
|
-
*/
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './simple-rule-system';
|
|
6
|
-
export * from './helpers';
|
|
7
|
-
export * from './rule-world-adapter';
|
|
8
|
-
export * from './compatibility';
|
|
9
|
-
export { createSimpleRuleSystem } from './simple-rule-system';
|
|
10
|
-
export { createSimpleRuleWorld } from './rule-world-adapter';
|
|
11
|
-
export { IRuleSystem, createRuleSystem } from './compatibility';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/rules/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/rules/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Simple Rule System v2 - Main exports
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.createRuleSystem = exports.createSimpleRuleWorld = exports.createSimpleRuleSystem = void 0;
|
|
21
|
-
__exportStar(require("./types"), exports);
|
|
22
|
-
__exportStar(require("./simple-rule-system"), exports);
|
|
23
|
-
__exportStar(require("./helpers"), exports);
|
|
24
|
-
__exportStar(require("./rule-world-adapter"), exports);
|
|
25
|
-
__exportStar(require("./compatibility"), exports);
|
|
26
|
-
// Re-export for convenience
|
|
27
|
-
var simple_rule_system_1 = require("./simple-rule-system");
|
|
28
|
-
Object.defineProperty(exports, "createSimpleRuleSystem", { enumerable: true, get: function () { return simple_rule_system_1.createSimpleRuleSystem; } });
|
|
29
|
-
var rule_world_adapter_1 = require("./rule-world-adapter");
|
|
30
|
-
Object.defineProperty(exports, "createSimpleRuleWorld", { enumerable: true, get: function () { return rule_world_adapter_1.createSimpleRuleWorld; } });
|
|
31
|
-
// Compatibility exports for old code
|
|
32
|
-
var compatibility_1 = require("./compatibility");
|
|
33
|
-
Object.defineProperty(exports, "createRuleSystem", { enumerable: true, get: function () { return compatibility_1.createRuleSystem; } });
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
package/rules/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,uDAAqC;AACrC,4CAA0B;AAC1B,uDAAqC;AACrC,kDAAgC;AAEhC,4BAA4B;AAC5B,2DAA8D;AAArD,4HAAA,sBAAsB,OAAA;AAC/B,2DAA6D;AAApD,2HAAA,qBAAqB,OAAA;AAE9B,qCAAqC;AACrC,iDAAgE;AAA1C,iHAAA,gBAAgB,OAAA"}
|
package/rules/rule-system.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-system.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/rule-system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/rules/rule-system.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Create a rule system
|
|
4
|
-
* This is a re-export from compatibility for backward compatibility
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.createRuleSystem = void 0;
|
|
8
|
-
var compatibility_1 = require("./compatibility");
|
|
9
|
-
Object.defineProperty(exports, "createRuleSystem", { enumerable: true, get: function () { return compatibility_1.createRuleSystem; } });
|
|
10
|
-
//# sourceMappingURL=rule-system.js.map
|
package/rules/rule-system.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-system.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/rule-system.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAAgE;AAA1C,iHAAA,gBAAgB,OAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter to make existing world model work with simple rule system
|
|
3
|
-
*/
|
|
4
|
-
import { EntityId } from '../types/entity';
|
|
5
|
-
import { IRuleWorld } from './types';
|
|
6
|
-
/**
|
|
7
|
-
* Simple adapter for any object-based world state
|
|
8
|
-
*/
|
|
9
|
-
export declare class SimpleRuleWorldAdapter implements IRuleWorld {
|
|
10
|
-
private worldState;
|
|
11
|
-
private playerId;
|
|
12
|
-
private currentLocationId?;
|
|
13
|
-
constructor(worldState: any, playerId?: EntityId, currentLocationId?: EntityId | undefined);
|
|
14
|
-
/**
|
|
15
|
-
* Get an entity by ID
|
|
16
|
-
*/
|
|
17
|
-
getEntity(id: EntityId): any;
|
|
18
|
-
/**
|
|
19
|
-
* Update an entity with new attributes
|
|
20
|
-
*/
|
|
21
|
-
updateEntity(id: EntityId, changes: Record<string, any>): void;
|
|
22
|
-
/**
|
|
23
|
-
* Get the player entity
|
|
24
|
-
*/
|
|
25
|
-
getPlayer(): any;
|
|
26
|
-
/**
|
|
27
|
-
* Get the current location entity
|
|
28
|
-
*/
|
|
29
|
-
getCurrentLocation(): any;
|
|
30
|
-
/**
|
|
31
|
-
* Set the player ID
|
|
32
|
-
*/
|
|
33
|
-
setPlayerId(playerId: EntityId): void;
|
|
34
|
-
/**
|
|
35
|
-
* Set the current location ID
|
|
36
|
-
*/
|
|
37
|
-
setCurrentLocationId(locationId: EntityId): void;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Create a simple rule world from basic state
|
|
41
|
-
*/
|
|
42
|
-
export declare function createSimpleRuleWorld(worldState: any, playerId?: EntityId, currentLocationId?: EntityId): IRuleWorld;
|
|
43
|
-
//# sourceMappingURL=rule-world-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-world-adapter.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/rule-world-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,qBAAa,sBAAuB,YAAW,UAAU;IAErD,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,iBAAiB,CAAC;gBAFlB,UAAU,EAAE,GAAG,EACf,QAAQ,GAAE,QAAmB,EAC7B,iBAAiB,CAAC,EAAE,QAAQ,YAAA;IAGtC;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,QAAQ,GAAG,GAAG;IAI5B;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAa9D;;OAEG;IACH,SAAS,IAAI,GAAG;IAIhB;;OAEG;IACH,kBAAkB,IAAI,GAAG;IAIzB;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAIrC;;OAEG;IACH,oBAAoB,CAAC,UAAU,EAAE,QAAQ,GAAG,IAAI;CAGjD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,GAAG,EACf,QAAQ,GAAE,QAAmB,EAC7B,iBAAiB,CAAC,EAAE,QAAQ,GAC3B,UAAU,CAEZ"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Adapter to make existing world model work with simple rule system
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SimpleRuleWorldAdapter = void 0;
|
|
7
|
-
exports.createSimpleRuleWorld = createSimpleRuleWorld;
|
|
8
|
-
/**
|
|
9
|
-
* Simple adapter for any object-based world state
|
|
10
|
-
*/
|
|
11
|
-
class SimpleRuleWorldAdapter {
|
|
12
|
-
worldState;
|
|
13
|
-
playerId;
|
|
14
|
-
currentLocationId;
|
|
15
|
-
constructor(worldState, playerId = 'player', currentLocationId) {
|
|
16
|
-
this.worldState = worldState;
|
|
17
|
-
this.playerId = playerId;
|
|
18
|
-
this.currentLocationId = currentLocationId;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get an entity by ID
|
|
22
|
-
*/
|
|
23
|
-
getEntity(id) {
|
|
24
|
-
return this.worldState.entities?.[id] || this.worldState[id];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Update an entity with new attributes
|
|
28
|
-
*/
|
|
29
|
-
updateEntity(id, changes) {
|
|
30
|
-
const entity = this.getEntity(id);
|
|
31
|
-
if (entity) {
|
|
32
|
-
if (entity.attributes) {
|
|
33
|
-
// For entities with attributes object
|
|
34
|
-
Object.assign(entity.attributes, changes);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// For flat entity objects
|
|
38
|
-
Object.assign(entity, changes);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Get the player entity
|
|
44
|
-
*/
|
|
45
|
-
getPlayer() {
|
|
46
|
-
return this.getEntity(this.playerId);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Get the current location entity
|
|
50
|
-
*/
|
|
51
|
-
getCurrentLocation() {
|
|
52
|
-
return this.currentLocationId ? this.getEntity(this.currentLocationId) : undefined;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Set the player ID
|
|
56
|
-
*/
|
|
57
|
-
setPlayerId(playerId) {
|
|
58
|
-
this.playerId = playerId;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Set the current location ID
|
|
62
|
-
*/
|
|
63
|
-
setCurrentLocationId(locationId) {
|
|
64
|
-
this.currentLocationId = locationId;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.SimpleRuleWorldAdapter = SimpleRuleWorldAdapter;
|
|
68
|
-
/**
|
|
69
|
-
* Create a simple rule world from basic state
|
|
70
|
-
*/
|
|
71
|
-
function createSimpleRuleWorld(worldState, playerId = 'player', currentLocationId) {
|
|
72
|
-
return new SimpleRuleWorldAdapter(worldState, playerId, currentLocationId);
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=rule-world-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-world-adapter.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/rule-world-adapter.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsEH,sDAMC;AAvED;;GAEG;AACH,MAAa,sBAAsB;IAEvB;IACA;IACA;IAHV,YACU,UAAe,EACf,WAAqB,QAAQ,EAC7B,iBAA4B;QAF5B,eAAU,GAAV,UAAU,CAAK;QACf,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,sBAAiB,GAAjB,iBAAiB,CAAW;IACnC,CAAC;IAEJ;;OAEG;IACH,SAAS,CAAC,EAAY;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,EAAY,EAAE,OAA4B;QACrD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;gBACtB,sCAAsC;gBACtC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACN,0BAA0B;gBAC1B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,QAAkB;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,UAAoB;QACvC,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC;IACtC,CAAC;CACF;AAzDD,wDAyDC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CACnC,UAAe,EACf,WAAqB,QAAQ,EAC7B,iBAA4B;IAE5B,OAAO,IAAI,sBAAsB,CAAC,UAAU,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simple Rule System Implementation
|
|
3
|
-
*/
|
|
4
|
-
import { ISemanticEvent } from '../events/types';
|
|
5
|
-
import { IRule, IRuleResult, IRuleWorld, ISimpleRuleSystem } from './types';
|
|
6
|
-
/**
|
|
7
|
-
* Simple rule system implementation
|
|
8
|
-
*/
|
|
9
|
-
export declare class SimpleRuleSystemImpl implements ISimpleRuleSystem {
|
|
10
|
-
private rules;
|
|
11
|
-
/**
|
|
12
|
-
* Add a rule to the system
|
|
13
|
-
*/
|
|
14
|
-
addRule(rule: IRule): void;
|
|
15
|
-
/**
|
|
16
|
-
* Remove a rule from the system
|
|
17
|
-
*/
|
|
18
|
-
removeRule(ruleId: string): void;
|
|
19
|
-
/**
|
|
20
|
-
* Get all rules
|
|
21
|
-
*/
|
|
22
|
-
getRules(): IRule[];
|
|
23
|
-
/**
|
|
24
|
-
* Process an event through all matching rules
|
|
25
|
-
*/
|
|
26
|
-
processEvent(event: ISemanticEvent, world: IRuleWorld): IRuleResult;
|
|
27
|
-
/**
|
|
28
|
-
* Find rules that match the given event
|
|
29
|
-
*/
|
|
30
|
-
private getMatchingRules;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create a new simple rule system
|
|
34
|
-
*/
|
|
35
|
-
export declare function createSimpleRuleSystem(): ISimpleRuleSystem;
|
|
36
|
-
//# sourceMappingURL=simple-rule-system.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-rule-system.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/simple-rule-system.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAiB,MAAM,SAAS,CAAC;AAE3F;;GAEG;AACH,qBAAa,oBAAqB,YAAW,iBAAiB;IAC5D,OAAO,CAAC,KAAK,CAAiC;IAE9C;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IAI1B;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIhC;;OAEG;IACH,QAAQ,IAAI,KAAK,EAAE;IAInB;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW;IA8FnE;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAezB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,iBAAiB,CAE1D"}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Simple Rule System Implementation
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SimpleRuleSystemImpl = void 0;
|
|
7
|
-
exports.createSimpleRuleSystem = createSimpleRuleSystem;
|
|
8
|
-
const event_system_1 = require("../events/event-system");
|
|
9
|
-
const standard_events_1 = require("../events/standard-events");
|
|
10
|
-
/**
|
|
11
|
-
* Simple rule system implementation
|
|
12
|
-
*/
|
|
13
|
-
class SimpleRuleSystemImpl {
|
|
14
|
-
rules = new Map();
|
|
15
|
-
/**
|
|
16
|
-
* Add a rule to the system
|
|
17
|
-
*/
|
|
18
|
-
addRule(rule) {
|
|
19
|
-
this.rules.set(rule.id, rule);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Remove a rule from the system
|
|
23
|
-
*/
|
|
24
|
-
removeRule(ruleId) {
|
|
25
|
-
this.rules.delete(ruleId);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Get all rules
|
|
29
|
-
*/
|
|
30
|
-
getRules() {
|
|
31
|
-
return Array.from(this.rules.values());
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Process an event through all matching rules
|
|
35
|
-
*/
|
|
36
|
-
processEvent(event, world) {
|
|
37
|
-
// Find matching rules
|
|
38
|
-
const matchingRules = this.getMatchingRules(event);
|
|
39
|
-
// Sort by priority (higher first)
|
|
40
|
-
matchingRules.sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
41
|
-
let prevented = false;
|
|
42
|
-
let message;
|
|
43
|
-
const allEvents = [];
|
|
44
|
-
const allChanges = [];
|
|
45
|
-
// Process each matching rule
|
|
46
|
-
for (const rule of matchingRules) {
|
|
47
|
-
// Check condition if present
|
|
48
|
-
if (rule.condition && !rule.condition(event, world)) {
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
// Execute the rule
|
|
52
|
-
let result;
|
|
53
|
-
try {
|
|
54
|
-
result = rule.action(event, world);
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
console.error(`Error executing rule ${rule.id}:`, error);
|
|
58
|
-
continue; // Skip this rule and continue with others
|
|
59
|
-
}
|
|
60
|
-
// Handle prevention (first rule to prevent wins)
|
|
61
|
-
if (result.prevent && !prevented) {
|
|
62
|
-
prevented = true;
|
|
63
|
-
message = result.message;
|
|
64
|
-
// Create a narrative event for the prevent message
|
|
65
|
-
if (result.message) {
|
|
66
|
-
allEvents.push((0, event_system_1.createEvent)(standard_events_1.StandardEventTypes.NARRATIVE, { message: result.message }, {
|
|
67
|
-
actor: event.entities.actor,
|
|
68
|
-
location: event.entities.location
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
// When prevented, stop processing more rules
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
// Collect events
|
|
75
|
-
if (result.events) {
|
|
76
|
-
allEvents.push(...result.events);
|
|
77
|
-
}
|
|
78
|
-
// Handle message (create narrative event)
|
|
79
|
-
if (result.message && !result.prevent) {
|
|
80
|
-
// Keep the message for the result
|
|
81
|
-
if (!message) {
|
|
82
|
-
message = result.message;
|
|
83
|
-
}
|
|
84
|
-
allEvents.push((0, event_system_1.createEvent)(standard_events_1.StandardEventTypes.NARRATIVE, { message: result.message }, {
|
|
85
|
-
actor: event.entities.actor,
|
|
86
|
-
location: event.entities.location
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
// Collect entity changes
|
|
90
|
-
if (result.changes) {
|
|
91
|
-
allChanges.push(...result.changes);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Apply entity changes to the world
|
|
95
|
-
for (const change of allChanges) {
|
|
96
|
-
const entity = world.getEntity(change.entityId);
|
|
97
|
-
if (entity) {
|
|
98
|
-
world.updateEntity(change.entityId, {
|
|
99
|
-
[change.attribute]: change.value
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return {
|
|
104
|
-
prevent: prevented,
|
|
105
|
-
message,
|
|
106
|
-
events: allEvents,
|
|
107
|
-
changes: allChanges
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Find rules that match the given event
|
|
112
|
-
*/
|
|
113
|
-
getMatchingRules(event) {
|
|
114
|
-
return Array.from(this.rules.values()).filter(rule => {
|
|
115
|
-
// Handle wildcards
|
|
116
|
-
if (rule.eventType === '*')
|
|
117
|
-
return true;
|
|
118
|
-
// Handle category wildcards (e.g., 'item:*')
|
|
119
|
-
if (rule.eventType.endsWith(':*')) {
|
|
120
|
-
const category = rule.eventType.split(':')[0];
|
|
121
|
-
return event.type.startsWith(`${category}:`);
|
|
122
|
-
}
|
|
123
|
-
// Exact match
|
|
124
|
-
return rule.eventType === event.type;
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
exports.SimpleRuleSystemImpl = SimpleRuleSystemImpl;
|
|
129
|
-
/**
|
|
130
|
-
* Create a new simple rule system
|
|
131
|
-
*/
|
|
132
|
-
function createSimpleRuleSystem() {
|
|
133
|
-
return new SimpleRuleSystemImpl();
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=simple-rule-system.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-rule-system.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/simple-rule-system.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA0JH,wDAEC;AAzJD,yDAAqD;AACrD,+DAA+D;AAG/D;;GAEG;AACH,MAAa,oBAAoB;IACvB,KAAK,GAAuB,IAAI,GAAG,EAAE,CAAC;IAE9C;;OAEG;IACH,OAAO,CAAC,IAAW;QACjB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,MAAc;QACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,KAAqB,EAAE,KAAiB;QACnD,sBAAsB;QACtB,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEnD,kCAAkC;QAClC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC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,gBAAgB,CAAC,KAAqB;QAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACnD,mBAAmB;YACnB,IAAI,IAAI,CAAC,SAAS,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;YAExC,6CAA6C;YAC7C,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC;YAC/C,CAAC;YAED,cAAc;YACd,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA3ID,oDA2IC;AAED;;GAEG;AACH,SAAgB,sBAAsB;IACpC,OAAO,IAAI,oBAAoB,EAAE,CAAC;AACpC,CAAC"}
|
package/rules/types.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simple Rule System v2 - Clean, functional design
|
|
3
|
-
*/
|
|
4
|
-
import { EntityId } from '../types/entity';
|
|
5
|
-
import { ISemanticEvent } from '../events/types';
|
|
6
|
-
/**
|
|
7
|
-
* Simple world interface for rules - no complex abstractions
|
|
8
|
-
*/
|
|
9
|
-
export interface IRuleWorld {
|
|
10
|
-
getEntity(id: EntityId): any;
|
|
11
|
-
updateEntity(id: EntityId, changes: Record<string, any>): void;
|
|
12
|
-
getPlayer(): any;
|
|
13
|
-
getCurrentLocation(): any;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Result of executing a rule
|
|
17
|
-
*/
|
|
18
|
-
export interface IRuleResult {
|
|
19
|
-
/** Prevent the original action from happening */
|
|
20
|
-
prevent?: boolean;
|
|
21
|
-
/** Message to display to the player */
|
|
22
|
-
message?: string;
|
|
23
|
-
/** Additional events to generate */
|
|
24
|
-
events?: ISemanticEvent[];
|
|
25
|
-
/** Entity changes to apply */
|
|
26
|
-
changes?: IEntityChange[];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A change to apply to an entity
|
|
30
|
-
*/
|
|
31
|
-
export interface IEntityChange {
|
|
32
|
-
entityId: EntityId;
|
|
33
|
-
attribute: string;
|
|
34
|
-
value: any;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A simple rule definition
|
|
38
|
-
*/
|
|
39
|
-
export interface IRule {
|
|
40
|
-
/** Unique identifier for the rule */
|
|
41
|
-
id: string;
|
|
42
|
-
/** Event type this rule responds to (e.g., 'item:taking') */
|
|
43
|
-
eventType: string;
|
|
44
|
-
/** Optional condition - if false, rule doesn't fire */
|
|
45
|
-
condition?: (event: ISemanticEvent, world: IRuleWorld) => boolean;
|
|
46
|
-
/** Action to take when rule fires */
|
|
47
|
-
action: (event: ISemanticEvent, world: IRuleWorld) => IRuleResult;
|
|
48
|
-
/** Priority (higher = runs first) */
|
|
49
|
-
priority?: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Simple rule system interface
|
|
53
|
-
*/
|
|
54
|
-
export interface ISimpleRuleSystem {
|
|
55
|
-
/** Add a rule */
|
|
56
|
-
addRule(rule: IRule): void;
|
|
57
|
-
/** Remove a rule */
|
|
58
|
-
removeRule(ruleId: string): void;
|
|
59
|
-
/** Process an event through all matching rules */
|
|
60
|
-
processEvent(event: ISemanticEvent, world: IRuleWorld): IRuleResult;
|
|
61
|
-
/** Get all rules */
|
|
62
|
-
getRules(): IRule[];
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=types.d.ts.map
|
package/rules/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot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GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iBAAiB;IACjB,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,oBAAoB;IACpB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kDAAkD;IAClD,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC;IACpE,oBAAoB;IACpB,QAAQ,IAAI,KAAK,EAAE,CAAC;CACrB"}
|
package/rules/types.js
DELETED
package/rules/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../repos/sharpee/packages/core/src/rules/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/sharpee-core-0.9.107.tgz
DELETED
|
Binary file
|
package/sharpee-core-0.9.113.tgz
DELETED
|
Binary file
|
package/sharpee-core-0.9.97.tgz
DELETED
|
Binary file
|
package/sharpee-core-0.9.99.tgz
DELETED
|
Binary file
|