Spaces:
Sleeping
Sleeping
role
Browse files
patches/convex/aiTown/player.ts
CHANGED
@@ -172,6 +172,7 @@ export class Player {
|
|
172 |
character: string,
|
173 |
description: string,
|
174 |
tokenIdentifier?: string,
|
|
|
175 |
) {
|
176 |
if (tokenIdentifier) {
|
177 |
let numHumans = 0;
|
@@ -231,6 +232,7 @@ export class Player {
|
|
231 |
character,
|
232 |
description,
|
233 |
name,
|
|
|
234 |
}),
|
235 |
);
|
236 |
game.descriptionsModified = true;
|
@@ -270,9 +272,10 @@ export const playerInputs = {
|
|
270 |
character: v.string(),
|
271 |
description: v.string(),
|
272 |
tokenIdentifier: v.optional(v.string()),
|
|
|
273 |
},
|
274 |
handler: (game, now, args) => {
|
275 |
-
Player.join(game, now, args.name, args.character, args.description, args.tokenIdentifier);
|
276 |
return null;
|
277 |
},
|
278 |
}),
|
|
|
172 |
character: string,
|
173 |
description: string,
|
174 |
tokenIdentifier?: string,
|
175 |
+
role?:string
|
176 |
) {
|
177 |
if (tokenIdentifier) {
|
178 |
let numHumans = 0;
|
|
|
232 |
character,
|
233 |
description,
|
234 |
name,
|
235 |
+
role,
|
236 |
}),
|
237 |
);
|
238 |
game.descriptionsModified = true;
|
|
|
272 |
character: v.string(),
|
273 |
description: v.string(),
|
274 |
tokenIdentifier: v.optional(v.string()),
|
275 |
+
role:v.string(),
|
276 |
},
|
277 |
handler: (game, now, args) => {
|
278 |
+
Player.join(game, now, args.name, args.character, args.description,args.role, args.tokenIdentifier);
|
279 |
return null;
|
280 |
},
|
281 |
}),
|
patches/convex/aiTown/playerDescription.ts
CHANGED
@@ -6,6 +6,7 @@ export const serializedPlayerDescription = {
|
|
6 |
name: v.string(),
|
7 |
description: v.string(),
|
8 |
character: v.string(),
|
|
|
9 |
};
|
10 |
export type SerializedPlayerDescription = ObjectType<typeof serializedPlayerDescription>;
|
11 |
|
|
|
6 |
name: v.string(),
|
7 |
description: v.string(),
|
8 |
character: v.string(),
|
9 |
+
role:v.string()
|
10 |
};
|
11 |
export type SerializedPlayerDescription = ObjectType<typeof serializedPlayerDescription>;
|
12 |
|