VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
ServerAssets.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
VoltMod/Engine/EngineTypes.hpp
>
4
#include <functional>
5
#include <map>
6
#include <string>
7
#include <string_view>
8
9
namespace
VoltMod
10
{
11
12
/** Each plugin's `server-assets` folder on the game's search path while the plugin is loaded, ahead of
13
* the game's VPKs, which beat loose files under `game/csgo`. Weapon subclasses apply from the next map. */
14
class
ServerAssets
15
{
16
public
:
17
/** Null @p files mounts nothing. */
18
explicit
ServerAssets
(
IFileSystem
*
files
) : _files(
files
) {}
19
20
void
Mount
(std::string_view
plugin
);
21
void
Unmount
(std::string_view
plugin
);
22
23
private
:
24
IFileSystem
* _files;
25
std::map<std::string, std::string, std::less<>> _mounted;
///< plugin -> folder
26
};
27
28
}
// namespace VoltMod
EngineTypes.hpp
VoltMod::ServerAssets
Definition
ServerAssets.hpp:15
VoltMod::ServerAssets::ServerAssets
ServerAssets(IFileSystem *files)
Definition
ServerAssets.hpp:18
VoltMod::ServerAssets::Mount
void Mount(std::string_view plugin)
Definition
ServerAssets.cpp:11
VoltMod::ServerAssets::Unmount
void Unmount(std::string_view plugin)
Definition
ServerAssets.cpp:24
VoltMod
Definition
Options.hpp:13
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
src
Host
Files
ServerAssets.hpp
Generated by
1.9.8