mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 10:45:27 +00:00
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>
This commit is contained in:
@@ -23,6 +23,9 @@ private:
|
||||
void LoadWorldConfig();
|
||||
|
||||
public:
|
||||
// The zone control object's ID, the same fixed value in the client (LevelManager::LoadZoneControlObject, 0x01082660)
|
||||
static constexpr LWOOBJID ZONE_CONTROL_OBJECT_ID = 0x3FFF'FFFFFFFELL;
|
||||
|
||||
void Initialize(const LWOZONEID& zoneID);
|
||||
~dZoneManager();
|
||||
|
||||
@@ -30,6 +33,13 @@ public:
|
||||
Zone* GetZoneMut() const;
|
||||
const Zone* GetZone() const { return GetZoneMut(); };
|
||||
bool HasZone() const { return m_pZone != nullptr; };
|
||||
|
||||
/**
|
||||
* A GM's edit mode (docs/EditMode.md): the zone's level objects, spawners, spawner networks and triggers are not
|
||||
* loaded, so the GM's client is the only one that has them. Set before Initialize.
|
||||
*/
|
||||
bool GetEditMode() const { return m_EditMode; }
|
||||
void SetEditMode(bool value) { m_EditMode = value; }
|
||||
void LoadZone(const LWOZONEID& zoneID); //Discard the current zone (if any) and loads a new zone.
|
||||
|
||||
/* Adds a spawner to the zone with the specified ID. */
|
||||
@@ -103,6 +113,7 @@ private:
|
||||
bool m_PlayerLoseCoinsOnDeath = false;
|
||||
bool m_DisableSaveLocation = false;
|
||||
bool m_MountsAllowed = true;
|
||||
bool m_EditMode = false;
|
||||
bool m_PetsAllowed = true;
|
||||
std::map<LWOOBJID, Spawner*> m_Spawners;
|
||||
std::optional<WorldConfig> m_WorldConfig = std::nullopt;
|
||||
|
||||
Reference in New Issue
Block a user