From b7ed14eabf4ee0555ddef9de85892a25855ef876 Mon Sep 17 00:00:00 2001 From: BrentVL-1952840 <70229620+Brentdevent@users.noreply.github.com> Date: Mon, 24 Apr 2023 23:39:58 +0200 Subject: [PATCH] Add command to reload mods/usermaps --- src/client/component/workshop.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/component/workshop.cpp b/src/client/component/workshop.cpp index 2d2b2acc..4a859acb 100644 --- a/src/client/component/workshop.cpp +++ b/src/client/component/workshop.cpp @@ -4,6 +4,7 @@ #include "game/game.hpp" #include "game/utils.hpp" +#include "command.hpp" #include #include @@ -316,6 +317,11 @@ namespace workshop public: void post_unpack() override { + command::add("userContentReload", [](const command::params& params) + { + game::reloadUserContent(); + }); + enable_zone_folder = game::register_dvar_bool("enable_zone_folder", false, game::DVAR_ARCHIVE, "Load custom zones from the zone folder within the usermaps/mods folder"); utils::hook::jump(game::select(0x1420D6A99, 0x1404E2929), utils::hook::assemble(override_path_mods_stub));