Initial commit.

This commit is contained in:
Signal 2026-02-22 17:45:44 -05:00
commit 82b4f23c06
56 changed files with 3485 additions and 0 deletions

37
Server/Server.cpp Normal file
View file

@ -0,0 +1,37 @@
#include "Server.h"
#include "Network.h"
#include "World/WorldManager.h"
namespace Artifact {
void Server::init() {
for (auto & system : subsystems) {
system->init();
system->reload();
}
}
void Server::tick() {
for (auto & system : subsystems) {
system->tick();
}
}
void Server::run() {
init();
auto time = std::chrono::steady_clock::now();
while (true) {
auto now = std::chrono::steady_clock::now();
if (time - now > std::chrono::milliseconds(50)) {
tick();
}
}
}
void Server::addDefaultSubsystems() {
addSubsystem<ServerNetwork>();
addSubsystem<WorldManager>();
}
}