-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
okay, okay, time to actually finish this instead of clicking pull changes every couple of days |
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()); | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 suggestswill come in a separate PRTODO