@rpgjs/server 5.0.0-alpha.5 → 5.0.0-alpha.7
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/Player/BattleManager.d.ts +32 -22
- package/dist/Player/ClassManager.d.ts +31 -18
- package/dist/Player/ComponentManager.d.ts +30 -0
- package/dist/Player/EffectManager.d.ts +40 -0
- package/dist/Player/ElementManager.d.ts +31 -0
- package/dist/Player/GoldManager.d.ts +22 -0
- package/dist/Player/GuiManager.d.ts +31 -0
- package/dist/Player/ItemFixture.d.ts +6 -0
- package/dist/Player/ItemManager.d.ts +27 -13
- package/dist/Player/MoveManager.d.ts +31 -43
- package/dist/Player/ParameterManager.d.ts +27 -19
- package/dist/Player/Player.d.ts +43 -6
- package/dist/Player/SkillManager.d.ts +27 -19
- package/dist/Player/StateManager.d.ts +28 -35
- package/dist/Player/VariableManager.d.ts +30 -0
- package/dist/index.js +984 -536
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Player/BattleManager.ts +97 -38
- package/src/Player/ClassManager.ts +95 -35
- package/src/Player/ComponentManager.ts +63 -21
- package/src/Player/EffectManager.ts +110 -27
- package/src/Player/ElementManager.ts +126 -25
- package/src/Player/GoldManager.ts +32 -35
- package/src/Player/GuiManager.ts +36 -13
- package/src/Player/ItemFixture.ts +4 -5
- package/src/Player/ItemManager.ts +39 -26
- package/src/Player/MoveManager.ts +40 -31
- package/src/Player/ParameterManager.ts +35 -25
- package/src/Player/Player.ts +75 -35
- package/src/Player/SkillManager.ts +44 -23
- package/src/Player/StateManager.ts +210 -95
- package/src/Player/VariableManager.ts +180 -48
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PlayerCtor } from '@rpgjs/common';
|
|
2
|
+
/**
|
|
3
|
+
* Variable Manager Mixin
|
|
4
|
+
*
|
|
5
|
+
* Provides variable management capabilities to any class. Variables are key-value
|
|
6
|
+
* pairs that can store any type of data associated with the player, such as
|
|
7
|
+
* quest progress, game flags, inventory state, and custom game data.
|
|
8
|
+
*
|
|
9
|
+
* @param Base - The base class to extend with variable management
|
|
10
|
+
* @returns Extended class with variable management methods
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* class MyPlayer extends WithVariableManager(BasePlayer) {
|
|
15
|
+
* constructor() {
|
|
16
|
+
* super();
|
|
17
|
+
* // Variables are automatically initialized
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* const player = new MyPlayer();
|
|
22
|
+
* player.setVariable('questCompleted', true);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function WithVariableManager<TBase extends PlayerCtor>(Base: TBase): TBase;
|
|
26
|
+
/**
|
|
27
|
+
* Type helper to extract the interface from the WithVariableManager mixin
|
|
28
|
+
* This provides the type without duplicating method signatures
|
|
29
|
+
*/
|
|
30
|
+
export type IVariableManager = InstanceType<ReturnType<typeof WithVariableManager>>;
|