Files
DarkflameServer/dGame/dUtilities/EditMode.h
Aaron Kimbrell f6914940c1 feat(world): an edit mode world constructs none of the zone's objects
With -editmode 1 the world loads the zone file, terrain scene map, navmesh and
level revisions, but makes no level objects, carver blockers, spawners, spawner
networks, triggers, vanity objects or live event objects. The zone control
object stays with the zone's own template, as the client makes the same one
itself (LevelManager::LoadZoneControlObject, 0x01082660); its server script
does nothing and a race track's does not take the player into a race. Such a
world lets in only accounts at editor_gm_level.

Plumbing only: no command starts an edit mode instance yet (docs/EditMode.md).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 17:34:13 -06:00

19 lines
701 B
C++

#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();
}