mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 02:05:28 +00:00
revert(world): the edit mode world
This reverts commit f6914940. The client's level editor builds a zone's objects
itself from its own files, so a world server that constructs none of them has no use.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@ set(DGAME_DUTILITIES_SOURCES "BrickDatabase.cpp"
|
||||
"CheatDetection.cpp"
|
||||
"DashboardActions.cpp"
|
||||
"EconomyLedger.cpp"
|
||||
"EditMode.cpp"
|
||||
"DashboardNotify.cpp"
|
||||
"GUID.cpp"
|
||||
"LiveEvents.cpp"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "EditMode.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "CharacterComponent.h"
|
||||
#include "Game.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "dConfig.h"
|
||||
|
||||
eGameMasterLevel EditMode::RequiredLevel() {
|
||||
const auto level = GeneralUtils::TryParse<uint32_t>(Game::config->GetValue("editor_gm_level")).value_or(CharacterComponent::DEFAULT_EDITOR_GM_LEVEL);
|
||||
return static_cast<eGameMasterLevel>(std::clamp<uint32_t>(level, 1, 9));
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "eGameMasterLevel.h"
|
||||
|
||||
/**
|
||||
* Edit mode (docs/EditMode.md): a private instance of a zone whose world server constructs none of the zone's level
|
||||
* objects, spawners or triggers, for editing the zone in the game client. Only the plumbing is here; nothing starts
|
||||
* such an instance yet.
|
||||
*/
|
||||
namespace EditMode {
|
||||
// Whether an account may be in an edit mode instance
|
||||
inline bool MayEnter(const eGameMasterLevel accountLevel, const eGameMasterLevel requiredLevel) {
|
||||
return accountLevel != eGameMasterLevel::CIVILIAN && accountLevel >= requiredLevel;
|
||||
}
|
||||
|
||||
// The account GM level an edit mode instance lets in: editor_gm_level (9 unless set)
|
||||
eGameMasterLevel RequiredLevel();
|
||||
}
|
||||
Reference in New Issue
Block a user