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
4#include <string>
5#include <string_view>
6#include <vector>
7
8namespace 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. */
14{
15public:
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. */
21
22private:
23 std::vector<std::string> _resources;
24};
25
26} // namespace VoltMod
void Add(std::string_view path)
Definition Precache.cpp:17
void WriteTo(IEntityResourceManifest &manifest) const
Definition Precache.cpp:32
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56