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!: remove multi-world support #5116

Merged
merged 25 commits into from
Jul 17, 2023
Merged

Conversation

skaldarnar
Copy link
Member

@skaldarnar skaldarnar commented Jul 10, 2023

Contains

Remove code and abstractions related to mutli-word support during the "Advanced" game creation flow.

Context

The multi-world feature was added as a GSOC project back in 2018 by @TheFlash98. For more information, checkout the original forum post GSOC 2018 - Multiple Worlds or the project page.

While the world generation flow now supports to "create" multiple worlds and configure them separately, these multiple worlds were never experianceable in-game.

How to test

Create a new game via the "Advanced" game setup flow.

Outstanding before merging

  • disallow adding more than one world
  • replace world lists with single WorldSetupWrappers in screen classes
  • remove dropdown related code in universe setup screen
  • remove remaining dropdown related code
  • remove selected world label, deduce selected world from world generator selection
  • don't include "Height Map" world generator as possible selection

Follow-ups

  • merge screens (except for world config screen)
  • merge world config screen in

@github-actions github-actions bot added the Type: Refactoring Request for or implementation of pure and automatic refactorings, e.g. renaming, to improve clarity label Jul 10, 2023
@jdrueckert
Copy link
Member

@skaldarnar refactoring steps so far remove the option to add more than one world and removes respective code, in particular the former world lists are now only single WorldSetupWrappers...
I think a good next step would be to adjust the screens by replacing the world dropdowns by simple fields. That should allow us to get rid of a bunch of ui-related code.

@jdrueckert jdrueckert added this to the 2023 Revive - Milestone 1 milestone Jul 10, 2023
@skaldarnar skaldarnar added the Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience label Jul 13, 2023
@skaldarnar skaldarnar marked this pull request as ready for review July 13, 2023 19:08
@@ -242,4 +180,4 @@
}
]
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

newline

@@ -291,6 +291,7 @@ private void initAssets() {
* in the drop-down.
* @return A list of world names encoded as a String
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

why do we still need this?

@@ -265,4 +263,4 @@
}
]
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

newline

Copy link
Member

@jdrueckert jdrueckert left a comment

Choose a reason for hiding this comment

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

@skaldarnar your changes look fine to me.
can you also review the changes I did so we have a two-way approval?

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member Author

Choose a reason for hiding this comment

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

where does this file come from? should it be committed?

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -70,19 +65,8 @@ public void initialise() {

SimpleUri uri;
WorldInfo worldInfo;
//TODO: if we don't do that here, where do we do it? or does the world not show up in the game manifest?
Copy link
Member Author

Choose a reason for hiding this comment

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

This is done as part of GameManifestProvider#createGameManifest which is called on the other code paths, I think.

We can remove this TODO comment and the line below.

@skaldarnar skaldarnar merged commit 26d5b52 into develop Jul 17, 2023
@skaldarnar skaldarnar deleted the refactor/remove-multi-world branch July 17, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Refactoring Request for or implementation of pure and automatic refactorings, e.g. renaming, to improve clarity
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants