add ID parameter to onPlayerRequestMods and update Changelog.md

This commit is contained in:
20dka
2022-11-14 00:17:52 +01:00
committed by Lion Kortlepel
parent 468a6b340e
commit 6b65907a7f
2 changed files with 2 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
- ADDED `debug` command, which shows info about connected clients & networking (for developers)
- ADDED `Util.GenerateUUID()`, which generates an RFC4122 UUID (universally unique identifier)
- ADDED `version` command, which shows version information
- ADDED `onPlayerRequestMods` event, letting Lua disallow individual mods from being sent to clients
- CHANGED `onShutdown` to be called before all players are kicked
# v3.1.1

View File

@@ -617,7 +617,7 @@ void TNetwork::SyncResources(TClient& c) {
ModMap TNetwork::GetClientMods(TClient& Client) {
auto AllMods = mResourceManager.FileMap();
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onPlayerRequestMods", "", Client.GetName(), Client.GetRoles(), Client.IsGuest(), Client.GetIdentifiers(), AllMods);
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onPlayerRequestMods", "", Client.GetName(), Client.GetRoles(), Client.IsGuest(), Client.GetIdentifiers(), Client.GetID(), AllMods);
TLuaEngine::WaitForAll(Futures);
ModMap AllowedMods = AllMods;