[RFC] MelonInfo constructor with `(int, int, int)` versioning
See original GitHub issueMelonLoader’s preferred versioning system is SemVer, which commonly uses 3 integers delimited by periods.
Some creators have accidentally put a v
into their version number not expecting ML to add one.
Using an integer tuple would prevent this.
Since this would be an override, it shouldn’t break old mods using the old constructor.
Additionally, this would allow in the future for MelonLoader to check if a dependency’s version meets the minimum that a mod requires.
Example:
[assembly: MelonInfo(typeof(...), "Name", "1.2.3", "Author", "Link")]
could be converted to
[assembly: MelonInfo(typeof(...), "Name", (1, 2, 3), "Author", "Link")]
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Version Constructor (System)
Initializes a new instance of the Version class using the specified major, minor, and build values. public: Version(int major, int minor, int build);....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Why not
(int, int, int)
or(int, int, int, string)
, then the string just gets appended to the end when it is written to console or printed?Ex:
[assembly: MelonInfo(typeof(...), "Name", (1, 2, 3, "-beta"), "Author", "Link")]
which would print version as1.2.3-beta
. The string parameter could be calledcomment
,branch
, or something along those lines.Edit: It may also be helpful to add a method into
MelonUtils
that converts SemVer strings into the int/string representation of it.Moving this back to v0.6.0 as the recent attempt for v0.5.7 caused Melon compilation issues.