-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated add weather changer and time changer and force lighting flash #79
Conversation
"WHITEOUT", | ||
}; | ||
|
||
void RDR2_ChangeWeather(const char* weather) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the rdr2 at the beginning of the function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
{ | ||
MISC::_SET_OVERRIDE_WEATHER(MISC::GET_HASH_KEY(weather)); | ||
} | ||
void RDR2_ChangeTime(int H = 12, int M = 0, int S = 0, int transition = 0, bool freeze = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it
@@ -0,0 +1,34 @@ | |||
#include <game/rdr/Natives.hpp> | |||
inline const char* WeatherTypes[]{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe turn this into an unordered_map and i don't believe the inlining is required I could be wrong though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Keep the array
- Inline is required (not here in this specific case but it's a good thing to remember due to how header files work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will remeber the inlining. I am curious, why would an array be better here? I guess an array and unordered_map are pretty close to the same thing.
other than that the code looks good to me |
@@ -0,0 +1,34 @@ | |||
#include <game/rdr/Natives.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be converted to commands. You can inline them in world.cpp
if you don't know how for now
added the force light that i thought i added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are my observations
{ | ||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turn into a command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well not everything needs to be a command for example where you play the animations you could say to make the a command so yeah i think that is fine i put every thing else as a command because i thought it was right but i don't think that the time changer has to be a command or change weather has to it can be one but at the end it doesn't have too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree here, because there are not methods to pass arguments to commands(minutes, hours, etc) so that makes sense.
NETWORK::_NETWORK_CLOCK_TIME_OVERRIDE(H, M, S, transition, freeze); | ||
} | ||
|
||
namespace yimmenu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YimMenu
{ | ||
namespace Features | ||
{ | ||
class forcelighting: public Command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ForceLightning <- correct case and correct spelling
}; | ||
|
||
|
||
static forcelighting _forcelighting{"forcelighting", "force lighting", "spawn lighting "}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ForceLightning
public: | ||
using Command::Command; | ||
|
||
virtual void OnCall() override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont known how this native works, but if it only works once, you could turn this into a looped command to make it happen more than just once per button press. just an idea tho
everything should be fixed |
Sorry to be a big dummy, but how do I integrate this change into the menu? Or is it that once it's approved it will be integrated into an updated DLL? I would really like to be able to control the time and weather. |
Once the change is approved, known more commonly as mergered, an automatic process will run everyday that checks to see if a new DLL needs to be built and then your change will be built into that. This pr currently adds this so once this is approved, it will be in the menu. |
Thanks. |
fixed 👍 I'm a dummy lol |
|
||
|
||
|
||
weather->AddItem(std::make_shared<ImGuiItem>([] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea to mention that this is purely local
@@ -0,0 +1,60 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a #pragma once
here
No description provided.