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

Part of a small fix on GlobalVariables #1247

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

a851903106
Copy link

@a851903106 a851903106 commented Apr 25, 2024

Previously while using phobos I noticed that the game was passing GlobalVariables with an error. due to a technical glitch I couldn't get to the root of the problem so I opted for an alternative method of exporting globals.ini and re-reading the parameters.

PS: There may be a better way, but that's not something I can do anymore.

Copy link
Contributor

@FS-21 FS-21 left a comment

Choose a reason for hiding this comment

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

Well written, only tweaks and if there are no new reviewers I suggest label it with the "Needs testing"

@@ -301,6 +301,7 @@ This page lists all the individual contributions to the project by their author.
- **FlyStar**
- Campaign load screen PCX support
- New condition for automatic self-destruction logic when TechnoTypes exist/don't exist
- GlobalVariable Passing fix, AltNextScenario fix
Copy link
Contributor

Choose a reason for hiding this comment

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

2 different/unrelated fixes, in 2 lines, not in the same line.

Comment on lines +61 to +64
if (bIsGlobal)
{
ScenarioExt::Global()->LoadVariablesToFile(true);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (bIsGlobal)
{
ScenarioExt::Global()->LoadVariablesToFile(true);
}
if (bIsGlobal)
ScenarioExt::Global()->LoadVariablesToFile(true);

Comment on lines +116 to +120
if (!Phobos::Config::SaveVariablesOnScenarioEnd)
{
// Is it better not to delete the file?
DeleteFileA(fileName);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!Phobos::Config::SaveVariablesOnScenarioEnd)
{
// Is it better not to delete the file?
DeleteFileA(fileName);
}
if (!Phobos::Config::SaveVariablesOnScenarioEnd)
DeleteFileA(fileName); // Is it better not to delete the file?

Comment on lines +97 to +99
ScenarioExt::Global()->LoadVariablesToFile(true);

return 0x4C622F;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ScenarioExt::Global()->LoadVariablesToFile(true);
return 0x4C622F;
ScenarioExt::Global()->LoadVariablesToFile(true);
return 0x4C622F;

Comment on lines +140 to +143
if (strcmp(ScenarioClass::Instance->NextScenario, ""))
{
return NextScenario;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (strcmp(ScenarioClass::Instance->NextScenario, ""))
{
return NextScenario;
}
if (strcmp(ScenarioClass::Instance->NextScenario, ""))
return NextScenario;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants