Enable swapping ships when in lobby - #68
Merged
Merged
Conversation
JNProtzman
force-pushed
the
handle-ship-change
branch
from
August 22, 2026 03:54
d63db72 to
4f83c06
Compare
dcrodman
reviewed
Aug 22, 2026
| // IP address and port of the ship server to which the client will connect after | ||
| // disconnecting from this server. | ||
| func (s *CharacterServer) handleShipSelection(ctx context.Context, c *Client, menuSelectionPkt *commands.MenuSelection) error { | ||
| func HandleShipSelection(ctx context.Context, c *Client, menuSelectionPkt *commands.MenuSelection) error { |
Owner
There was a problem hiding this comment.
Mind throwing a comment on here pointing out that this is used by both character and ship since it's the same menu but shared across connections? It just strays from the convention I have around the handle* methods being per-server, which is fine but worth noting
Collaborator
Author
There was a problem hiding this comment.
Rather than add a comment, I've copied the relevant function into the ship server. I do wonder if we should DRY that up but maybe it's not worth it for now?
dcrodman
approved these changes
Aug 22, 2026
dcrodman
left a comment
Owner
There was a problem hiding this comment.
It actually used to support this and I dropped it because so much else needs to change if Archon eventually supports other ships. But sure, doesn't hurt to have it
JNProtzman
force-pushed
the
handle-ship-change
branch
2 times, most recently
from
August 22, 2026 16:27
595a0d2 to
5bd3aae
Compare
JNProtzman
force-pushed
the
handle-ship-change
branch
from
August 23, 2026 05:10
5bd3aae to
476814a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is useless since we have one ship - but I did test adding a second ship and switching between them. And it does prevent a client crash if someone clicks the button.