Skip to content

--setup-create-override-cfg cli arg #99

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

Merged
merged 11 commits into from
Feb 9, 2023
Merged

--setup-create-override-cfg cli arg #99

merged 11 commits into from
Feb 9, 2023

Conversation

KANAjetzt
Copy link
Member

Adds cmd arg:

--setup-create-override-cfg

Forces the setup to create the override.cfg in the game base directory.
Skips the project.binary injection.

The project binary injection is skipped in that case.

	if is_setup_create_override_cfg:
		handle_override_cfg()
	else:
		handle_project_binary()

@KANAjetzt KANAjetzt requested review from Qubus0 and a team February 6, 2023 20:12
@KANAjetzt KANAjetzt added enhancement New feature or request installation labels Feb 6, 2023
@@ -58,7 +59,11 @@ func try_setup_modloader() -> void:
if is_loader_set_up() and not is_loader_setup_applied():
modloaderutils.log_info("ModLoader is set up, but the game needs to be restarted", LOG_NAME)
ProjectSettings.set_setting(settings.IS_LOADER_SETUP_APPLIED, true)
var _savecustom_error: int = ProjectSettings.save_custom(modloaderutils.get_override_path())

if is_setup_create_override_cfg:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this here and not only in setup_modloader? shouldn't everything be set up already?

Copy link
Member Author

Choose a reason for hiding this comment

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

ProjectSettings.set_setting(settings.IS_LOADER_SETUP_APPLIED, true)

Only to save this setting.
This will be fixed in one of the next PRs by using the method of #96

@KANAjetzt
Copy link
Member Author

We can leave this open until I fixed the double pck patching.
( I hope I get to this tomorrow - possibly Friday )

ithinkandicode and others added 7 commits February 8, 2023 09:53
Previously this func would not log to the file, which means it wouldn't show in the godot.log during mod development. Note: Unlike the `"error"` condition, I've only used `push_error` instead of also using `printerr`, because `push_error` also seems to print the error already (incl. the `ERROR: ` prefix, which `printerr` doesn't include)
…elog

`log_fatal` - add the missing log to file
@KANAjetzt KANAjetzt merged commit 10b03ab into GodotModding:develop Feb 9, 2023
@KANAjetzt KANAjetzt deleted the setup_create_override_cfg_cli_arg branch February 9, 2023 06:03
@KANAjetzt KANAjetzt mentioned this pull request Feb 15, 2023
@KANAjetzt KANAjetzt mentioned this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request installation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants