Skip to content

Commit

Permalink
Show the remaining mission time more precisely
Browse files Browse the repository at this point in the history
  • Loading branch information
robothauler authored and sturnclaw committed Jan 8, 2025
1 parent 8ddc5ba commit 48b5a2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/lang/ui-core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@
},
"D_DAYS_LEFT": {
"description": "",
"message": "Days left: %d"
"message": "Time left:"
},
"ECONOMY_TRADE": {
"description": "",
Expand Down
3 changes: 1 addition & 2 deletions data/pigui/modules/info-view/04-missions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ local function makeMissionRows()
end

local playerSystem = Game.system or Game.player:GetHyperspaceTarget():GetStarSystem()
local days = math.max(0, (mission.due - Game.time) / (24*60*60))

-- Use AU for interplanetary, LY for interstellar distances
local dist, dist_display
Expand All @@ -123,7 +122,7 @@ local function makeMissionRows()
mission:GetTypeDescription(),
mission.client.name,
locationName .. dist_display,
ui.Format.Date(mission.due) .."\n".. string.format(l.D_DAYS_LEFT, days),
ui.Format.Date(mission.due) .."\n".. l.D_DAYS_LEFT .." ".. ui.Format.Duration(mission.due - Game.time, 2),
ui.Format.Money(mission.reward),
}

Expand Down

0 comments on commit 48b5a2a

Please sign in to comment.