Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

should fix #7432 #7470

Merged
merged 2 commits into from
Sep 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AIDriver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2194,8 +2194,9 @@ function AIDriver:isFuelLevelOk()
return false
elseif currentFuelPercentage < 20 then
self:setInfoText('FUEL_SHOULD')
elseif currentFuelPercentage < 99.99 then
-- self:setInfoText('FUEL_IS')
else
self:clearInfoText('FUEL_MUST')
self:clearInfoText('FUEL_SHOULD')
end
return true
end
Expand Down
8 changes: 2 additions & 6 deletions courseplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,14 @@ local function setVersionData()
end;

if courseplay.version then
local versionSplitStr = StringUtil.splitString('.', courseplay.version); -- split as strings
versionSplitStr[3] = versionSplitStr[3] or '0000';
courseplay.versionDisplayStr = string.format('v%s.%s\n.%s', versionSplitStr[1], versionSplitStr[2], versionSplitStr[3]); --multiline display string
courseplay.isDevVersion = tonumber(versionSplitStr[3]) > 0;
courseplay.versionDisplayStr = string.format("v%s",courseplay.version)
courseplay.isDevVersion = true
Copy link
Contributor

Choose a reason for hiding this comment

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

The idea here was I think to follow the semantic versioning scheme (major.minor.patch, see https://semver.org/), with the last number of the three being 0 is an official modhub release, incremented between releases as we fix issues, then the next modhub release would increase the minor version. It is a 'dev' release if the patch number is not 0.

With this change we'd always show 'dev', so I'd rather get rid of that 4th number of the version string and return to the major.minor.patch scheme.

Copy link
Contributor

Choose a reason for hiding this comment

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

We must use 4 Numbers for ModHub, due to GIANTS Rules.
I like the old system more too, but GIANTS don't want that...

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see, then either:

  • change this code to check the 4th number instead of the 3rd to decide if 'dev' should be displayed, or
  • just display the version string and nothing else, don't worry about adding 'dev' to it.

if courseplay.isDevVersion then
courseplay.versionDisplayStr = courseplay.versionDisplayStr .. '.dev';
end;
courseplay.versionFlt = tonumber(string.format('%s.%s%s', versionSplitStr[1], versionSplitStr[2], versionSplitStr[3]));
else
courseplay.version = ' [no version specified]';
courseplay.versionDisplayStr = 'no\nversion';
courseplay.versionFlt = 0.00000;
courseplay.isDevVersion = false;
end;
end;
Expand Down