forked from zombieb/galvanic-corrosion-rewrite
Initial commit
This commit is contained in:
23
src/server/server.ts
Normal file
23
src/server/server.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { EventManager } from "./baseevent.ts";
|
||||
import { CommandsBase } from "./commands/commands.ts";
|
||||
import GameConfigsBase from "./gameconfigs/base.ts";
|
||||
import { PlatformsManager } from "./platforms/base.ts";
|
||||
import { type ProfileUpdateEvent } from "./profiles/events/ProfileUpdate.ts";
|
||||
import { type RoleUpdateEvent } from "./profiles/events/RoleUpdate.ts";
|
||||
import ProfileManagerBase from "./profiles/manager.ts";
|
||||
|
||||
interface ServerEvents {
|
||||
'profile.roleupdate': RoleUpdateEvent,
|
||||
'profile.update': ProfileUpdateEvent
|
||||
}
|
||||
|
||||
class ServerBase extends EventManager<ServerEvents> {
|
||||
Profiles = new ProfileManagerBase(this, 'profiles', true);
|
||||
GameConfigs = new GameConfigsBase(this, 'gameconfigs', true);
|
||||
Commands = new CommandsBase(this, 'commands');
|
||||
Platforms = new PlatformsManager(this, 'platforms', true);
|
||||
}
|
||||
|
||||
const Server = new ServerBase();
|
||||
export { ServerBase };
|
||||
export default Server;
|
||||
Reference in New Issue
Block a user