@rpgjs/server 5.0.0-alpha.10 → 5.0.0-alpha.12
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/Gui/DialogGui.d.ts +4 -0
- package/dist/Gui/index.d.ts +1 -0
- package/dist/Player/ParameterManager.d.ts +348 -27
- package/dist/Player/Player.d.ts +11 -30
- package/dist/index.d.ts +2 -0
- package/dist/index.js +615 -170
- package/dist/index.js.map +1 -1
- package/dist/rooms/map.d.ts +8 -0
- package/package.json +6 -6
- package/src/Gui/DialogGui.ts +7 -2
- package/src/Gui/index.ts +3 -1
- package/src/Player/ParameterManager.ts +493 -103
- package/src/Player/Player.ts +40 -45
- package/src/index.ts +3 -1
- package/src/module.ts +11 -0
- package/src/rooms/map.ts +25 -1
package/dist/rooms/map.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export declare class RpgMap extends RpgCommonMap<RpgPlayer> implements RoomOnJoi
|
|
|
101
101
|
getEvent<T extends RpgPlayer>(eventId: string): T | undefined;
|
|
102
102
|
getPlayer(playerId: string): RpgPlayer | undefined;
|
|
103
103
|
getEvents(): RpgEvent[];
|
|
104
|
+
getEventBy(cb: (event: RpgEvent) => boolean): RpgEvent | undefined;
|
|
105
|
+
getEventsBy(cb: (event: RpgEvent) => boolean): RpgEvent[];
|
|
104
106
|
removeEvent(eventId: string): void;
|
|
105
107
|
/**
|
|
106
108
|
* Display a component animation at a specific position on the map
|
|
@@ -172,8 +174,14 @@ export declare class RpgMap extends RpgCommonMap<RpgPlayer> implements RoomOnJoi
|
|
|
172
174
|
x: number;
|
|
173
175
|
y: number;
|
|
174
176
|
}, graphic: string, animationName?: string): void;
|
|
177
|
+
/**
|
|
178
|
+
* Set the sync schema for the map
|
|
179
|
+
* @param schema - The schema to set
|
|
180
|
+
*/
|
|
181
|
+
setSync(schema: any): void;
|
|
175
182
|
}
|
|
176
183
|
export interface RpgMap {
|
|
177
184
|
$send: (conn: MockConnection, data: any) => void;
|
|
178
185
|
$broadcast: (data: any) => void;
|
|
186
|
+
$sessionTransfer: (userOrPublicId: any | string, targetRoomId: string) => void;
|
|
179
187
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/server",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.12",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"description": "",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@rpgjs/common": "5.0.0-alpha.
|
|
14
|
+
"@rpgjs/common": "5.0.0-alpha.12",
|
|
15
15
|
"@rpgjs/database": "^4.3.0",
|
|
16
|
-
"@signe/di": "^2.
|
|
17
|
-
"@signe/reactive": "^2.
|
|
18
|
-
"@signe/room": "^2.
|
|
19
|
-
"@signe/sync": "^2.
|
|
16
|
+
"@signe/di": "^2.4.0",
|
|
17
|
+
"@signe/reactive": "^2.4.0",
|
|
18
|
+
"@signe/room": "^2.4.0",
|
|
19
|
+
"@signe/sync": "^2.4.0",
|
|
20
20
|
"rxjs": "^7.8.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
package/src/Gui/DialogGui.ts
CHANGED
|
@@ -18,7 +18,11 @@ export interface DialogOptions {
|
|
|
18
18
|
autoClose?: boolean,
|
|
19
19
|
tranparent?: boolean,
|
|
20
20
|
typewriterEffect?: boolean,
|
|
21
|
-
talkWith?: RpgPlayer
|
|
21
|
+
talkWith?: RpgPlayer,
|
|
22
|
+
face?: {
|
|
23
|
+
id: string,
|
|
24
|
+
expression: string
|
|
25
|
+
},
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
export class DialogGui extends Gui {
|
|
@@ -47,7 +51,8 @@ export class DialogGui extends Gui {
|
|
|
47
51
|
// remove value property. It is not useful to know this on the client side.
|
|
48
52
|
choices: options.choices.map(choice => ({
|
|
49
53
|
text: choice.text
|
|
50
|
-
}))
|
|
54
|
+
})),
|
|
55
|
+
face: options.face
|
|
51
56
|
}
|
|
52
57
|
return super.open({
|
|
53
58
|
message,
|