Skip to content

Commit

Permalink
Chat system start
Browse files Browse the repository at this point in the history
  • Loading branch information
evolutionleo committed Nov 16, 2024
1 parent 3714ba2 commit de985f3
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 7 deletions.
13 changes: 7 additions & 6 deletions Client/Client.resource_order
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
],
"ResourceOrderSettings":[
{"name":"MultiClient","order":1,"path":"extensions/MultiClient/MultiClient.yy",},
{"name":"oChatManager","order":7,"path":"objects/oChatManager/oChatManager.yy",},
{"name":"oDualInstance","order":1,"path":"objects/oDualInstance/oDualInstance.yy",},
{"name":"oEntityManager","order":2,"path":"objects/oEntityManager/oEntityManager.yy",},
{"name":"oFindingMatch","order":7,"path":"objects/oFindingMatch/oFindingMatch.yy",},
{"name":"oFriendList","order":6,"path":"objects/oFriendList/oFriendList.yy",},
{"name":"oLobbiesDemo","order":2,"path":"objects/oLobbiesDemo/oLobbiesDemo.yy",},
{"name":"oLoginMenu","order":3,"path":"objects/oLoginMenu/oLoginMenu.yy",},
{"name":"oMainMenu","order":4,"path":"objects/oMainMenu/oMainMenu.yy",},
{"name":"oPartyUI","order":5,"path":"objects/oPartyUI/oPartyUI.yy",},
{"name":"oFindingMatch","order":6,"path":"objects/oFindingMatch/oFindingMatch.yy",},
{"name":"oFriendList","order":5,"path":"objects/oFriendList/oFriendList.yy",},
{"name":"oLobbiesDemo","order":1,"path":"objects/oLobbiesDemo/oLobbiesDemo.yy",},
{"name":"oLoginMenu","order":2,"path":"objects/oLoginMenu/oLoginMenu.yy",},
{"name":"oMainMenu","order":3,"path":"objects/oMainMenu/oMainMenu.yy",},
{"name":"oPartyUI","order":4,"path":"objects/oPartyUI/oPartyUI.yy",},
{"name":"oPhysicsEntity","order":1,"path":"objects/oPhysicsEntity/oPhysicsEntity.yy",},
{"name":"oPingManager","order":3,"path":"objects/oPingManager/oPingManager.yy",},
{"name":"oPlayer","order":1,"path":"objects/oPlayer/oPlayer.yy",},
Expand Down
1 change: 1 addition & 0 deletions Client/Client.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Client/objects/oChatManager/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// @desc

messages = []
2 changes: 2 additions & 0 deletions Client/objects/oChatManager/Draw_64.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// @desc

36 changes: 36 additions & 0 deletions Client/objects/oChatManager/oChatManager.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Client/scripts/__WarpConfig/__WarpConfig.gml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// All the macro/config definitions go here
// feather ignore GM1038

#macro WARP_VERSION "v6.0.0"
#macro WARP_VERSION "v7.0.0"
#macro GAME_VERSION "v1.0.0"

trace("Welcome to Warp % by Evoleo!", WARP_VERSION)
Expand Down
69 changes: 69 additions & 0 deletions TypescriptServer/src/concepts/chat.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import Client from "#concepts/client";
import Account, { IProfile } from "#schemas/profile";

import { ObjectId } from "mongoose";


export interface IMessage {
profile_id: ObjectId | string;
name: string;
content: string;
}

export class Message implements IMessage {
id: number;
profile_id: string;
name: string;
content: string;
}

// export class Chat {
// chat_id: string; // id of the chat room
// online_members: Client[];
// members: string[]; // profile_id[]
// messages: Message[];

// constructor(members?: Client[]) {
// if (members) {
// for(let member in members) {
// this.addMember(member);
// }
// }

// }

// async save() {

// }

// addMember(member: Client) {
// this.members.push(member);
// }

// kickMember(member: Client) {
// let idx = this.members.indexOf(member);
// this.members.splice(idx, 1);
// }

// disconnectMember(member: Client) {

// }
// }

// export class GlobalChat extends Chat {
// constructor() {
// super(global.clients);
// }
// }

// export class DirectChat extends Chat {
// constructor(client1:Client, client2:Client) {
// super([client1, client2]);
// }
// }

// export class GroupChat extends Chat {
// constructor(members: Client[]) {
// super(members);
// }
// }

0 comments on commit de985f3

Please sign in to comment.