8000 More diverse launch options by maitovelkkis · Pull Request #20 · PhilippvK/playforia-minigolf · GitHub
[go: up one dir, main page]

Skip to content

More diverse launch options - #20

Merged
PhilippvK merged 5 commits into
PhilippvK:masterfrom
maitovelkkis:master
May 9, 2020
Merged

PhilippvK merged 5 commits into
PhilippvK:masterfrom
maitovelkkis:master

Conversation

@maitovelkkis
Copy link
Copy Markdown

Slightly more diverse launch options solutions which allows custom server ip, selecting game language and potentially more.

@PhilippvK
Copy link
Copy Markdown
Owner

Thank you very much. I will check it out over the weekend!

@PhilippvK PhilippvK left a comment
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I left some feedback but I am open for discussions. Do not feel obliged to implement all the requested changes.

String server = "127.0.0.1"; //dafault server ip
String lang = "en_US"; //dafault language package (comes with en_US, fi_FI and sv_SE)

if(args.length==1){ //support for "legacy" .bats where only ip provided after jar
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Great idea!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks!

server=args[0];
}

for(int i = 0;i<args.length ; i++)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Some error checking would be useful here.

  • Out of bounds possible if there is a missing value for an argument
  • check if lang has a valid format and maybe give an error message when there is not localization for a given country code
  • Optional: server should bei either localhost, an IPv4 Adress or a Domain/Hostname

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have made sure out of bounds shouldn't be possible now... But haven't implemented any kind of format checking at least yet.

8000
@PhilippvK
Copy link
Copy Markdown
Owner

Great work!

@PhilippvK
PhilippvK merged commit a480abe into PhilippvK:master May 9, 2020
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

0