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

Filter input during hero creation #50

Closed
KroArtem opened this issue Jan 13, 2016 · 6 comments
Closed

Filter input during hero creation #50

KroArtem opened this issue Jan 13, 2016 · 6 comments

Comments

@KroArtem
Copy link

It's possible to create custom hero with just spaces, so it looks odd with no name and surname. I suggest trimming spaces or doing a simple check.

@KroArtem KroArtem changed the title Trim spaces in hero options Filter input during hero creation Feb 2, 2016
@KroArtem
Copy link
Author

KroArtem commented Feb 2, 2016

I'm rephrasing this ticket as there could be some problems when creating non-standard heroes. Let's say I want to create a hero with name ../Modsognir, it will rewrite an existing Modsognir hero.

Luckily it's not possible to rewrite savegames as delimiters like \n doesn't seem to work in user input.

Another thing is that when you create an inappropriate hero with name e.g. //\yCoolHero, its' profile won't be created and it will be accessible only during this launch.

@Andrettin
Copy link
Owner

You are right, those are serious concerns. Thanks for bringing this up!

I've fixed the issue now, and also made the check which sees whether another hero of the same name exists case-insensitive (since Windows cannot have two files with the same name even if they are written with letters in different cases).

I've also added a check to see if the name has only spaces in it.

7e7a515
0cdabf5
Andrettin/Wyrmgus@b340336

@KroArtem
Copy link
Author

KroArtem commented Feb 4, 2016

Is it ok that hero can have empty name with space in it and valid surname? Usually name is required, surname is optional. Other cases seem to be covered now.

@Andrettin
Copy link
Owner

Now that you mention it, that shouldn't be possible, thanks for letting me know. I've fixed it now:
Andrettin/Wyrmgus@7b2d306

@KroArtem
Copy link
Author

KroArtem commented Feb 4, 2016

Well, I'm still not satisfied. ;)
If I try to create any hero I don't get anything except "error in error handling" in terminal.

@Andrettin
Copy link
Owner

Ops, I forgot to upload the corresponding Wyrmsun repository commit:
65aa3d3

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

No branches or pull requests

2 participants