Skip to content
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

Merged
merged 19 commits into from
May 28, 2024

Conversation

theofficialhackclean
Copy link
Contributor

No description provided.

"WHITEOUT",
};

void RDR2_ChangeWeather(const char* weather)
Copy link
Contributor

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

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too

Copy link
Contributor Author

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[]{
Copy link
Contributor

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Keep the array
  2. Inline is required (not here in this specific case but it's a good thing to remember due to how header files work)

Copy link
Contributor

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.

@Rxann
Copy link
Contributor

Rxann commented Mar 15, 2024

other than that the code looks good to me

@@ -0,0 +1,34 @@
#include <game/rdr/Natives.hpp>
Copy link
Contributor

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

Copy link
Contributor

@Rxann Rxann left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turn into a command

Copy link
Contributor Author

@theofficialhackclean theofficialhackclean Mar 18, 2024

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

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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 "};
Copy link
Contributor

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
Copy link
Contributor

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

@theofficialhackclean
Copy link
Contributor Author

everything should be fixed

@dwsiddall
Copy link

dwsiddall commented Mar 21, 2024

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.

@Rxann
Copy link
Contributor

Rxann commented Mar 21, 2024

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.

@GrymRpr
Copy link

GrymRpr commented Mar 21, 2024

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.

@theofficialhackclean
Copy link
Contributor Author

theofficialhackclean commented Mar 22, 2024

fixed 👍 I'm a dummy lol

@Deadlineem Deadlineem mentioned this pull request Mar 29, 2024



weather->AddItem(std::make_shared<ImGuiItem>([] {
Copy link
Contributor

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 @@

Copy link
Contributor

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

@MarkEcza MarkEcza merged commit f0c61ae into YimMenu:master May 28, 2024
@Rxann Rxann mentioned this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants