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

Maniac: Implement CallCommand and String Vars #3140

Merged
merged 8 commits into from
Nov 20, 2023

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Oct 30, 2023

No description provided.

@Ghabry Ghabry added this to the 0.8.1 milestone Oct 30, 2023
@Ghabry Ghabry added the Has PR Dependencies This PR depends on another PR label Nov 2, 2023
@Ghabry
Copy link
Member Author

Ghabry commented Nov 2, 2023

Pending final change that depends on #3141

if (com.parameters.size() >= 5) {
    cmd.string = Main_Data::game_strings->GetWithModeBitfield(com.string, com.parameters[0], 3, com.parameters[4]);
} else {
    cmd.string = com.string;
}

btw, such code will be also needed for other commands just with a different index:

if (Player::IsPatchManiac() && com.parameters.size() >= A) {
    cmd.string = Main_Data::game_strings->GetWithModeBitfield(com.string, com.parameters[0], B, com.parameters[A - 1]);
} else {
    cmd.string = com.string;
}

Could need a helper function 🤔

Makes implementing string variables for command simpler.
@Ghabry Ghabry removed the Has PR Dependencies This PR depends on another PR label Nov 2, 2023
@Ghabry Ghabry changed the title Maniac: Implement CallCommand Maniac: Implement CallCommand and String Vars Nov 2, 2023
@Ghabry
Copy link
Member Author

Ghabry commented Nov 2, 2023

I added variable lookup to commands that support this with Maniac Patch. Please review carefully that I did not mess up the numbers.

(Fortunately the hard part of this was already solved)
Is irrelevant for us and results in output spam
@fdelapena fdelapena merged commit 34ccc7f into EasyRPG:master Nov 20, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants