mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-15 11:13:45 +00:00
Add new type Settings & refactor TSettings behavior
into Settings by adding getters/setters Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "TPluginMonitor.h"
|
||||
#include "TResourceManager.h"
|
||||
#include "TServer.h"
|
||||
#include "TSettings.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
@@ -165,6 +166,10 @@ int BeamMPServerMain(MainArguments Arguments) {
|
||||
|
||||
SetupSignalHandlers();
|
||||
|
||||
Settings settings {};
|
||||
settings.SettingsMap.emplace(Settings::Key::General_Name, Settings::SettingsTypeVariant { "Your mom" });
|
||||
beammp_infof("Server name set in new impl: {}", settings.getAsString(Settings::Key::General_Name));
|
||||
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] {
|
||||
beammp_info("If this takes too long, you can press Ctrl+C repeatedly to force a shutdown.");
|
||||
|
||||
Reference in New Issue
Block a user