Skip to content
Snippets Groups Projects

feat: Making the default config file empty, writing checks of its values

Merged Griefed requested to merge github/fork/whitebear60/patch-2 into main

Created by: whitebear60

  • Make the default config file empty
  • Write checks of the String config values
  • Write checks of the List config values
  • Check that the mod pack directory exists before creating a server pack; throw an exception if it doesn't exist.
  • Write checks of the Boolean config values
  • Write checks for Minecraft and mod loader versions

Implementing the feature described in #13 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Owner

    Going to review these changes on saturday. Thanks!

  • Author Owner

    Created by: whitebear60

    Going to review these changes on saturday. Thanks!

    This pull request is WIP, I haven't implemented checks for Minecraft and mod loader versions and for boolean config values, so currently, it doesn't ready for review.

  • Author Owner

    Ah okay, then I'll just take a peek on saturday. Curious as to what you've come up with. Thanks for your hard work. :)

  • Author Owner

    Heya @whitebear60, I've noticed you've added a config variable to the config file relating to client mods. May I ask that you remove said variable and leave the config file unchanged? The reason behind this is that I want users to be able to update to newer versions of SPC without having to manually migrate their config file. Also, it is safe to assume that a given modpack has client mods in it. If it doesn't, then SPC will simply not delete any files, therefore rendering the clientModsExist obsolete.

    Completely my fault, as it didn't occur to me to include it in Contributing.md. I've added that a couple of minutes ago. There's no way you could've known that I want users to be able to update their SPC version without touching their config file.

    Cheers, Griefed

  • Author Owner

    Created by: whitebear60

    Understood.

  • Author Owner

    Created by: whitebear60

    Wrote Minecraft version checks, if I will have time next week, I will try to write Fabric and Forge version checks.

  • Author Owner

    Created by: whitebear60

    Don't understand why Github marks my files as ones that have conflicts, please help me to decide what to do with that.

  • Author Owner

    Created by: whitebear60

    Also removed my version of Java path check as it is already implemented in 0437577d

  • Author Owner

    Don't understand why Github marks my files as ones that have conflicts, please help me to decide what to do with that.

    Started checking the files. GitHub errors probably due to both of us working on the same files and our changes clashing, so git doesn't know what to do.

  • Author Owner

    Resolved conflicts. Re-organized a couple of checks in Main. Used the opportunity to fix smaller erros in ServerSetup Added documentation for your new isMinecraftVersionCorrect

  • Author Owner

    Created by: whitebear60

    Thanks. I haven't written checks for empty Boolean values, as if they will be empty, config parse exception will be thrown by config library.

  • Author Owner

    Yup, I've taken a look at this myself just now. It's good that the application exits if the boolean is set incorrectly, but it would be nice if we could swap that with a more nicer looking error message. Gotta say, your changes are great. I had great fun going through them and they gave me a couple of ideas. Thank you very much for your contributions! :metal:

  • Author Owner

    Created by: whitebear60

    Yup, I've taken a look at this myself just now. It's good that the application exits if the boolean is set incorrectly, but it would be nice if we could swap that with a more nicer looking error message. Gotta say, your changes are great. I had great fun going through them and they gave me a couple of ideas. Thank you very much for your contributions! :metal:

    Just surround config parsing instructions with try/catch and write in catch block a message and then sys.exit(1).

  • Author Owner

    headdesk Of course, why didn't I think of that. :joy: Thanks man!

  • Author Owner

    Created by: whitebear60

    Now will be trying to implement #8 (closed) , but I haven't worked with Java arguments before, so it could waste too many time. Now you can close #13 (closed) and assign me to #8 (closed).

  • Author Owner

    Created by: whitebear60

    I have started programming in Java just recently too :)

Please register or sign in to reply
Loading