Skip to content

Commit de985f3

Browse files
committed
Chat system start
1 parent 3714ba2 commit de985f3

File tree

7 files changed

+119
-7
lines changed

7 files changed

+119
-7
lines changed

Client/Client.resource_order

+7-6
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@
2929
],
3030
"ResourceOrderSettings":[
3131
{"name":"MultiClient","order":1,"path":"extensions/MultiClient/MultiClient.yy",},
32+
{"name":"oChatManager","order":7,"path":"objects/oChatManager/oChatManager.yy",},
3233
{"name":"oDualInstance","order":1,"path":"objects/oDualInstance/oDualInstance.yy",},
3334
{"name":"oEntityManager","order":2,"path":"objects/oEntityManager/oEntityManager.yy",},
34-
{"name":"oFindingMatch","order":7,"path":"objects/oFindingMatch/oFindingMatch.yy",},
35-
{"name":"oFriendList","order":6,"path":"objects/oFriendList/oFriendList.yy",},
36-
{"name":"oLobbiesDemo","order":2,"path":"objects/oLobbiesDemo/oLobbiesDemo.yy",},
37-
{"name":"oLoginMenu","order":3,"path":"objects/oLoginMenu/oLoginMenu.yy",},
38-
{"name":"oMainMenu","order":4,"path":"objects/oMainMenu/oMainMenu.yy",},
39-
{"name":"oPartyUI","order":5,"path":"objects/oPartyUI/oPartyUI.yy",},
35+
{"name":"oFindingMatch","order":6,"path":"objects/oFindingMatch/oFindingMatch.yy",},
36+
{"name":"oFriendList","order":5,"path":"objects/oFriendList/oFriendList.yy",},
37+
{"name":"oLobbiesDemo","order":1,"path":"objects/oLobbiesDemo/oLobbiesDemo.yy",},
38+
{"name":"oLoginMenu","order":2,"path":"objects/oLoginMenu/oLoginMenu.yy",},
39+
{"name":"oMainMenu","order":3,"path":"objects/oMainMenu/oMainMenu.yy",},
40+
{"name":"oPartyUI","order":4,"path":"objects/oPartyUI/oPartyUI.yy",},
4041
{"name":"oPhysicsEntity","order":1,"path":"objects/oPhysicsEntity/oPhysicsEntity.yy",},
4142
{"name":"oPingManager","order":3,"path":"objects/oPingManager/oPingManager.yy",},
4243
{"name":"oPlayer","order":1,"path":"objects/oPlayer/oPlayer.yy",},

Client/Client.yyp

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// @desc
2+
3+
messages = []
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// @desc
2+

Client/objects/oChatManager/oChatManager.yy

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Client/scripts/__WarpConfig/__WarpConfig.gml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// All the macro/config definitions go here
22
// feather ignore GM1038
33

4-
#macro WARP_VERSION "v6.0.0"
4+
#macro WARP_VERSION "v7.0.0"
55
#macro GAME_VERSION "v1.0.0"
66

77
trace("Welcome to Warp % by Evoleo!", WARP_VERSION)

TypescriptServer/src/concepts/chat.ts

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import Client from "#concepts/client";
2+
import Account, { IProfile } from "#schemas/profile";
3+
4+
import { ObjectId } from "mongoose";
5+
6+
7+
export interface IMessage {
8+
profile_id: ObjectId | string;
9+
name: string;
10+
content: string;
11+
}
12+
13+
export class Message implements IMessage {
14+
id: number;
15+
profile_id: string;
16+
name: string;
17+
content: string;
18+
}
19+
20+
// export class Chat {
21+
// chat_id: string; // id of the chat room
22+
// online_members: Client[];
23+
// members: string[]; // profile_id[]
24+
// messages: Message[];
25+
26+
// constructor(members?: Client[]) {
27+
// if (members) {
28+
// for(let member in members) {
29+
// this.addMember(member);
30+
// }
31+
// }
32+
33+
// }
34+
35+
// async save() {
36+
37+
// }
38+
39+
// addMember(member: Client) {
40+
// this.members.push(member);
41+
// }
42+
43+
// kickMember(member: Client) {
44+
// let idx = this.members.indexOf(member);
45+
// this.members.splice(idx, 1);
46+
// }
47+
48+
// disconnectMember(member: Client) {
49+
50+
// }
51+
// }
52+
53+
// export class GlobalChat extends Chat {
54+
// constructor() {
55+
// super(global.clients);
56+
// }
57+
// }
58+
59+
// export class DirectChat extends Chat {
60+
// constructor(client1:Client, client2:Client) {
61+
// super([client1, client2]);
62+
// }
63+
// }
64+
65+
// export class GroupChat extends Chat {
66+
// constructor(members: Client[]) {
67+
// super(members);
68+
// }
69+
// }

0 commit comments

Comments
 (0)