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

Refactor global and related scripts #119

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

juliohq
Copy link
Contributor

@juliohq juliohq commented Sep 3, 2023

This PR refactors some things in the global autoload script:

  • Remove editor hint check (Engine.is_editor_hint), because the global autoload is not a tool script.
  • Move gameplay controls input handling (reload current scene, etc.) to the Game script.
  • Rename the Game script mentioned above to World in order to better match its node name in the World.tscn scene.
  • Save factions as resources (.tres files), which is handy to edit properties in the editor (name, emblem and color).

Copy link
Contributor

@pingwindev pingwindev left a comment

Choose a reason for hiding this comment

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

Overall it looks fine. Merging the faction parts into one resource seems reasonable as well as renaming Game to World (this wasn't possible in Godot 3 as World was a built-in resource).

@pingwindev pingwindev added the code Programming code and game logic label Sep 3, 2023
@juliohq juliohq force-pushed the refactor-global-script branch from 53abdb9 to cc9d1ee Compare September 4, 2023 14:11
@juliohq juliohq requested a review from pingwindev September 6, 2023 10:02
Copy link
Contributor

@pingwindev pingwindev left a comment

Choose a reason for hiding this comment

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

Looks good to me. Please squash all commits to a single readable one before merging.

@juliohq juliohq force-pushed the refactor-global-script branch from cc9d1ee to 8a1991e Compare September 16, 2023 18:40
@pingwindev pingwindev changed the title Refactor global script Refactor global and related scripts Sep 16, 2023
@pingwindev pingwindev merged commit 844ace7 into unknown-horizons:develop Sep 16, 2023
@juliohq juliohq deleted the refactor-global-script branch March 10, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Programming code and game logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants