generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated add weather changer and time changer and force lighting flash (…
…#79) * Update Menu.cpp * Add files via upload * Update world.cpp * Create weather.hpp * Update weather.hpp * Update world.cpp * Update world.hpp * Update world.cpp * Update world.cpp * Update weather.hpp * Update world.cpp * Update weather.hpp added the force light that i thought i added * Update world.cpp * Update weather.hpp * Update weather.hpp * Update weather.hpp * Update weather.hpp * Update world.cpp * Update world.hpp
- Loading branch information
1 parent
8ed259c
commit f0c61ae
Showing
4 changed files
with
147 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
#include "core/commands/LoopedCommand.hpp" | ||
#include "game/features/Features.hpp" | ||
#include "game/rdr/Enums.hpp" | ||
#include "game/rdr/Natives.hpp" | ||
|
||
inline const char* WeatherTypes[]{ | ||
|
||
"BLIZZARD", | ||
"CLOUDS", | ||
"DRIZZLE", | ||
"FOG", | ||
"GROUNDBLIZZARD", | ||
"HAIL", | ||
"HIGHPRESSURE", | ||
"HURRICANE", | ||
"MISTY", | ||
"OVERCAST", | ||
"OVERCASTDARK", | ||
"RAIN", | ||
"SANDSTORM", | ||
"SHOWER", | ||
"SLEET", | ||
"SNOW", | ||
"SNOWLIGHT", | ||
"SUNNY", | ||
"THUNDER", | ||
"THUNDERSTORM", | ||
"WHITEOUT", | ||
}; | ||
|
||
void ChangeWeather(const char* weather) | ||
{ | ||
MISC::_SET_OVERRIDE_WEATHER(MISC::GET_HASH_KEY(weather)); | ||
} | ||
void ChangeTime(int H = 12, int M = 0, int S = 0, int transition = 0, bool freeze = false) | ||
{ | ||
NETWORK::_NETWORK_CLOCK_TIME_OVERRIDE(H, M, S, transition, freeze); | ||
} | ||
|
||
namespace YimMenu | ||
{ | ||
namespace Features | ||
{ | ||
class ForceLightning: public Command | ||
{ | ||
public: | ||
using Command::Command; | ||
|
||
virtual void OnCall() override | ||
{ | ||
MISC::FORCE_LIGHTNING_FLASH(); | ||
} | ||
|
||
}; | ||
|
||
|
||
static ForceLightning _forcelighting{"forcelighting", "force lighting", "spawn's lighting "}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include "world.hpp" | ||
#include "game/backend/FiberPool.hpp" | ||
#include "core/commands/Commands.hpp" | ||
#include "core/commands/HotkeySystem.hpp" | ||
#include "core/commands/LoopedCommand.hpp" | ||
#include "World/weather.hpp" | ||
#include "game/frontend/items/Items.hpp" | ||
#include "game/backend/ScriptMgr.hpp" | ||
#include <game/rdr/Natives.hpp> | ||
#include <imgui.h> // Include for ImGui | ||
#include <memory> // Include for std::make_shared | ||
#include "features.hpp" | ||
|
||
namespace YimMenu::Submenus | ||
{ | ||
World::World() : | ||
Submenu::Submenu("World") | ||
{ | ||
auto main = std::make_shared<Category>("Main"); | ||
auto weather = std::make_shared<Category>("Weather"); | ||
|
||
|
||
|
||
|
||
main->AddItem(std::make_shared<ImGuiItem>([] { | ||
static std::string hour, minute, second; | ||
InputTextWithHint("Hour", "Enter Hour", &hour).Draw(); | ||
InputTextWithHint("Minute", "Enter Minute", &minute).Draw(); | ||
InputTextWithHint("Second", "Enter Second", &second).Draw(); | ||
if (ImGui::Button("Change Time")) | ||
{ | ||
int h = std::stoi(hour); | ||
int m = std::stoi(minute); | ||
int s = std::stoi(second); | ||
FiberPool::Push([=] { | ||
ChangeTime(h, m, s); | ||
}); | ||
} | ||
})); | ||
|
||
|
||
|
||
weather->AddItem(std::make_shared<ImGuiItem>([] { | ||
static const char* current_weather = WeatherTypes[0]; // Default weather | ||
if (ImGui::BeginCombo("Weather Types", current_weather)) | ||
{ | ||
for (auto& weather_type : WeatherTypes) | ||
{ | ||
bool is_selected = (current_weather == weather_type); | ||
if (ImGui::Selectable(weather_type, is_selected)) | ||
{ | ||
current_weather = weather_type; | ||
FiberPool::Push([=] { | ||
|
||
ChangeWeather(weather_type); | ||
}); | ||
} | ||
if (is_selected) | ||
ImGui::SetItemDefaultFocus(); | ||
} | ||
ImGui::EndCombo(); | ||
} | ||
})); | ||
|
||
|
||
main->AddItem(std::make_shared<CommandItem>("forcelighting"_J)); | ||
AddCategory(std::move(main)); | ||
AddCategory(std::move(weather)); | ||
|
||
|
||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
#include "core/frontend/manager/UIManager.hpp" | ||
|
||
namespace YimMenu::Submenus | ||
{ | ||
class World : public Submenu | ||
{ | ||
public: | ||
World(); | ||
}; | ||
} |