Skip to content

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

Draft
wants to merge 2 commits into
base: enhanced
Choose a base branch
from
Draft

add heist modifier #181

wants to merge 2 commits into from

Conversation

kurumimeow
Copy link
Contributor

added apartment, diamond casino, cayo perico and doomsday heist modifier
_

@@ -65,6 +73,18 @@ namespace YimMenu
return *static_cast<std::add_pointer_t<std::remove_reference_t<T>>>(Get());
}

template<typename T>
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

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)
{
Copy link
Collaborator

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
{
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

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());
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alright 😊

@maybegreat48
Copy link
Collaborator

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

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

great work @kurumimeow, can't wait for this to be added to the menu

@boxlemons21
Copy link

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

u r wrong

@boxlemons21
Copy link

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

u r wrong

I hope im wrong cuz i rlly want it lol

@CSY0N
Copy link
Contributor

CSY0N commented Apr 14, 2025

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

@boxlemons21
Copy link

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

IMG_2889

Sm1 already mentioned

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

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

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

@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

@Matze6239
Copy link

how do i add this to my menu?

@maybegreat48
Copy link
Collaborator

Can i add all this to my menu now or do i have to wait until you approve it?

You can do whatever you want under the terms of the GPL-2 license

@boxlemons21

This comment was marked as spam.

@xZueS19
Copy link

xZueS19 commented Apr 15, 2025

Can i add all this to my menu now or do i have to wait until you approve it?

You can do whatever you want under the terms of the GPL-2 license

Accept it already 😭😭🙏

u have to wait until @kurumimeow make the changes and it will be approved

@kurumimeow
Copy link
Contributor Author

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.

@maybegreat48 maybegreat48 marked this pull request as draft April 16, 2025 00:06
@maybegreat48
Copy link
Collaborator

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

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.

6 participants