|
VoltMod
C++23 framework for CS2 server plugins
|
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/" |
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.
|
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.
|
static |
Definition at line 15 of file LayoutPath.cpp.
References Directory, VoltMod::Error::Invalid(), VoltMod::NotSourceXml(), VoltMod::ReadFile(), and VoltMod::SourceExtension.
|
inlinenoexcept |
The resource name that goes on the entity.
Definition at line 26 of file LayoutPath.hpp.
|
staticconstexpr |
The only directory gameinfo.gi's addon whitelist allows Panorama layouts in.
Definition at line 21 of file LayoutPath.hpp.
Referenced by Parse().