VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Precache.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
VoltMod/Engine/EngineTypes.hpp
>
4
#include <string>
5
#include <string_view>
6
#include <vector>
7
8
namespace
VoltMod
9
{
10
11
/** The models, particles and sound events a plugin ships, loaded with every map. A path loads from
12
* the next map on, and clients need the file too, such as from a workshop addon. */
13
class
Precache
14
{
15
public
:
16
/** Queues @p path, such as "particles/foo.vpcf". Empty paths and repeats are skipped. */
17
void
Add
(std::string_view path);
18
19
/** Lists every queued path in @p manifest; the framework calls it as the engine builds a map's. */
20
void
WriteTo
(
IEntityResourceManifest
&
manifest
)
const
;
21
22
private
:
23
std::vector<std::string> _resources;
24
};
25
26
}
// namespace VoltMod
EngineTypes.hpp
IEntityResourceManifest
Definition
Precache.cpp:7
VoltMod::Precache
Definition
Precache.hpp:14
VoltMod::Precache::Add
void Add(std::string_view path)
Definition
Precache.cpp:17
VoltMod::Precache::WriteTo
void WriteTo(IEntityResourceManifest &manifest) const
Definition
Precache.cpp:32
VoltMod
Definition
Options.hpp:13
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
include
VoltMod
Engine
Server
Precache.hpp
Generated by
1.9.8