VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::LayoutPath Class Reference

A layout resource the client will accept, checked before anything is spawned. More...

#include <LayoutPath.hpp>

Public Member Functions

const std::string & Resource () const noexcept
 
std::string_view Name () const noexcept
 

Static Public Member Functions

static Result< LayoutPath > Parse (std::string_view layout)
 

Static Public Attributes

static constexpr std::string_view Directory = "panorama/layout/custom_game/"
 

Detailed Description

A layout resource the client will accept, checked before anything is spawned.

welcome and welcome.xml both become panorama/layout/custom_game/welcome.xml; a full path must already be under Directory and name the source .xml. A bad name renders nothing and says so only on the client console, so it is refused here instead. SDK-free for its tests.

Definition at line 17 of file LayoutPath.hpp.

Member Function Documentation

◆ Name()

std::string_view VoltMod::LayoutPath::Name ( ) const
noexcept

The file name without directory or extension: the layout's root element id.

Definition at line 49 of file LayoutPath.cpp.

References VoltMod::SourceExtension.

◆ Parse()

Result< LayoutPath > VoltMod::LayoutPath::Parse ( std::string_view  layout)
static

◆ Resource()

const std::string & VoltMod::LayoutPath::Resource ( ) const
inlinenoexcept

The resource name that goes on the entity.

Definition at line 26 of file LayoutPath.hpp.

Member Data Documentation

◆ Directory

constexpr std::string_view VoltMod::LayoutPath::Directory = "panorama/layout/custom_game/"
staticconstexpr

The only directory gameinfo.gi's addon whitelist allows Panorama layouts in.

Definition at line 21 of file LayoutPath.hpp.

Referenced by Parse().


The documentation for this class was generated from the following files: