-
Notifications
You must be signed in to change notification settings - Fork 68
add heist modifier #181
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
base: enhanced
Are you sure you want to change the base?
add heist modifier #181
Conversation
@@ -65,6 +73,18 @@ namespace YimMenu | |||
return *static_cast<std::add_pointer_t<std::remove_reference_t<T>>>(Get()); | |||
} | |||
|
|||
template<typename T> |
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 just use At() and get/set the pointer instead of using these helper functions. Same goes for the globals
if (0 <= primary_target && primary_target <= 3) | ||
{ | ||
switch (primary_target) | ||
{ |
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.
Consider using Tunables::GetTunable
instead
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.
Iterate all players and modify this field in GlobalPlayerBD instead. Modifying others' broadcast stuff is generally bad practice, but you should be fine for this one (assuming you are the script host)
{ | ||
ScriptGlobal(1929794 + 1 + 1).SetValue<int>(100 - (_ApartmentHeistCut1.GetState() + _ApartmentHeistCut2.GetState() + _ApartmentHeistCut3.GetState() + _ApartmentHeistCut4.GetState())); | ||
ScriptGlobal(1929794 + 1 + 2).SetValue<int>(_ApartmentHeistCut2.GetState()); | ||
ScriptGlobal(1929794 + 1 + 3).SetValue<int>(_ApartmentHeistCut3.GetState()); |
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.
You should use At(offset, size_per_element) to access arrays and At(offset) to access struct fields instead of adding stuff in the ScriptGlobal ctor. This applies to most globals and locals in this PR
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.
alright 😊
LGTM for the most part. I'm just worried about how these globals and locals would be updated because there are a lot, but I'm sure we'll figure something out |
great work @kurumimeow, can't wait for this to be added to the menu |
|
u r wrong |
I hope im wrong cuz i rlly want it lol |
hm you should know that Heists Money has daily Limit like Nightclub Safe etc the get safe i recommend you the get know what the daily limit is bcs over daily limit it will be risky |
on second thoughts i quit from this conservation cause it got away from the main point of this pull request and this should not happen again |
@kurumimeow smth i found that when using instant finish for casino heist the money does not appear in the transaction log neither added to total money earned. i'm sure this aint right |
how do i add this to my menu? |
You can do whatever you want under the terms of the GPL-2 license |
This comment was marked as spam.
This comment was marked as spam.
u have to wait until @kurumimeow make the changes and it will be approved |
Please have patience guys, it requires some changes as @maybegreat48 mentioned. Globals and Locals mostly changes after game update so we need to overcome that as much as we can so that it can be easy to manage. |
I've marked this PR as a draft. When you're ready to work on it, feel free to mark it as ready for review and request a review from anyone with write access to this repo |
added apartment, diamond casino, cayo perico and doomsday heist modifier
