From 87ba0f58afa1b44eb900e88fee96f4c057d40fc2 Mon Sep 17 00:00:00 2001 From: Jari van der Kaap Date: Mon, 28 Nov 2022 00:30:29 +0100 Subject: [PATCH] Enabled Blackjack & first test for enabling DLC weapons --- src/client/component/loot.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/client/component/loot.cpp diff --git a/src/client/component/loot.cpp b/src/client/component/loot.cpp new file mode 100644 index 00000000..d5636269 --- /dev/null +++ b/src/client/component/loot.cpp @@ -0,0 +1,34 @@ +#include +#include "loader/component_loader.hpp" + +#include +#include + +#include +#include "game/game.hpp" + +namespace loot +{ + namespace + { + void set_dvars_on_startup() + { + game::Dvar_SetFromStringByName("ui_enableAllHeroes", "1", true); + game::Dvar_SetFromStringByName("allItemsUnlocked", "1", true); + game::Dvar_SetFromStringByName("allItemsPurchased", "1", true); + game::Dvar_SetFromStringByName("ui_allLootUnlocked", "1", true); + } + }; + + class component final : public component_interface + { + public: + void post_unpack() override + { + scheduler::once(set_dvars_on_startup, scheduler::pipeline::main); + } + }; +}; + + +REGISTER_COMPONENT(loot::component) \ No newline at end of file