feat(Hotkey): Add Repair PV hotkey (#1138)
This commit is contained in:
parent
b603173788
commit
5144d6ce45
16
src/backend/commands/self/repair_vehicle.cpp
Normal file
16
src/backend/commands/self/repair_vehicle.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "backend/command.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
|
||||
namespace big
|
||||
{
|
||||
class repairpv : command
|
||||
{
|
||||
using command::command;
|
||||
virtual void execute(const std::vector<std::uint64_t>&, const std::shared_ptr<command_context> ctx)
|
||||
{
|
||||
vehicle::repair(self::veh);
|
||||
}
|
||||
};
|
||||
repairpv g_repairpv("repairpv", "Repair PV", "Repairs your currently active personal vehicle", 0);
|
||||
}
|
@ -68,10 +68,8 @@ namespace big
|
||||
{
|
||||
bool enabled = false;
|
||||
} cmd_executor{};
|
||||
|
||||
rage::scrThread* m_modshop_thread = nullptr;
|
||||
bool in_script_vm = false;
|
||||
|
||||
struct debug
|
||||
{
|
||||
struct logs
|
||||
@ -396,8 +394,9 @@ namespace big
|
||||
int fill_ammo = 0;
|
||||
int fast_quit = 0;
|
||||
int cmd_excecutor = 0x55;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor)
|
||||
int repairpv = 0;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor, repairpv)
|
||||
} hotkeys{};
|
||||
|
||||
bool dev_dlc = false;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "hotkey_service.hpp"
|
||||
|
||||
#include "fiber_pool.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "network/ChatData.hpp"
|
||||
@ -25,6 +26,7 @@ namespace big
|
||||
register_hotkey("fastquit", g.settings.hotkeys.fast_quit, RAGE_JOAAT("fastquit"));
|
||||
register_hotkey("fillammo", g.settings.hotkeys.fill_ammo, RAGE_JOAAT("fillammo"));
|
||||
register_hotkey("quicksearch", g.settings.hotkeys.cmd_excecutor, RAGE_JOAAT("cmdexecutor"));
|
||||
register_hotkey("repairpv", g.settings.hotkeys.repairpv, RAGE_JOAAT("repairpv"));
|
||||
|
||||
g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
||||
wndproc(static_cast<eKeyState>(msg), wparam);
|
||||
|
@ -46,6 +46,8 @@ namespace big
|
||||
g_hotkey_service->update_hotkey("fastquit", g.settings.hotkeys.fast_quit);
|
||||
if (ImGui::Hotkey("Toggle Command Executor", &g.settings.hotkeys.cmd_excecutor))
|
||||
g_hotkey_service->update_hotkey("cmdexecutor", g.settings.hotkeys.cmd_excecutor);
|
||||
if (ImGui::Hotkey("Repair PV", &g.settings.hotkeys.repairpv))
|
||||
g_hotkey_service->update_hotkey("repairpv", g.settings.hotkeys.repairpv);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
}
|
||||
|
Reference in New Issue
Block a user