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

Ability for server to override level pages #210

Merged
merged 12 commits into from
Nov 3, 2023

Conversation

jvyden
Copy link
Member

@jvyden jvyden commented Oct 20, 2023

Will let you easily go to a level from the website (I imagine a button that says 'play now!' that will trigger this) or let you jump into a level by its SHA1/GUID as #200 suggests will come in a separate PR

TODO

  • Define basic API and service for overriding level lists
  • Write unit tests
  • Expose this system in the website
  • Test in-game

@jvyden jvyden self-assigned this Oct 20, 2023
@jvyden
Copy link
Member Author

jvyden commented Nov 3, 2023

okay, okay, time to actually finish this instead of clicking pull changes every couple of days

@jvyden jvyden marked this pull request as ready for review November 3, 2023 19:29
@jvyden jvyden requested a review from Beyley November 3, 2023 19:37
Comment on lines +77 to 83
public TService GetService<TService>() where TService : Service
{
List<Service> services = (List<Service>)typeof(BunkumServer).GetField("_services", BindingFlags.Instance | BindingFlags.NonPublic)!
.GetValue(this._server)!;

return (TService)services.First(s => typeof(TService) == s.GetType());
}
Copy link
Member

Choose a reason for hiding this comment

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

Im not sure how i feel about this, this should be something exposed in Bunkum, but since its non-critical test code it should be fine, non-blocking for merge but i'd like to see this more cleanly resolved at some point

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the reasoning behind that behind choice in Bunkum was I wanted to discourage handling of Bunkum's objects, but as Bunkum grew that use-case became more acceptable (think database providers outside of the main BunkumServer for instance). I'll definitely implement this in Bunkum.

@jvyden jvyden merged commit 8ed5bcf into LittleBigRefresh:main Nov 3, 2023
1 check passed
@jvyden jvyden deleted the level-overriding branch November 3, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants