add event 'onPlayerRequestMods', restructure modloading

now every player has their own list of allowed client mods, this can be modified by lua upon joining and is later used as a whitelist to ensure only those files can be sent to each client
This commit is contained in:
20dka
2022-11-14 00:10:36 +01:00
committed by Lion Kortlepel
parent 056827546e
commit 468a6b340e
10 changed files with 140 additions and 50 deletions

View File

@@ -35,14 +35,15 @@ namespace fs = std::filesystem;
/**
* std::variant means, that TLuaArgTypes may be one of the Types listed as template args
*/
using TLuaValue = std::variant<std::string, int, JsonString, bool, std::unordered_map<std::string, std::string>, float>;
using TLuaValue = std::variant<std::string, int, JsonString, bool, std::unordered_map<std::string, std::string>, std::unordered_map<std::string, size_t>, float>;
enum TLuaType {
String = 0,
Int = 1,
Json = 2,
Bool = 3,
StringStringMap = 4,
Float = 5,
StringSizeTMap = 5,
Float = 6,
};
class TLuaPlugin;