Skip to content

Commit 7002b56

Browse files
authored
Release v1.1.0.0
Release v1.1.0.0
2 parents 2ba5773 + 4bed24b commit 7002b56

6 files changed

Lines changed: 59 additions & 25 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
## [Unreleased]
77

88

9+
## [v1.1.0.0] - 2025-02-22
10+
- Added `l10n_uk.xml` by Gonimy-Vetrom
11+
- Fixed temperature misalignment for widesceen resolutions for [#3](https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay/issues/3)
12+
- Added `l10n_tr.xml` by [RuyaSavascisi](https://github.com/RuyaSavascisi)
13+
- Fixed next weather icon glitch for [#11](https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay/issues/11)
14+
- Fixed rounding problem for current temperature for [#10](https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay/issues/10)
15+
916
## [v1.0.0.0] - 2025-01-09
1017
- Ported from LS22 to LS25
11-
- Initial release
18+
- Initial release

FS25_ExtendedGameInfoDisplay/modDesc.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2-
<modDesc descVersion="92">
2+
<modDesc descVersion="94">
33
<author>Peppie84</author>
4-
<version>1.0.0.0</version>
4+
<version>1.1.0.0</version>
55
<title>
66
<en>Extended Game Infodisplay</en>
77
<de>Erweiterte Spiel-Infodarstellung</de>
@@ -10,11 +10,25 @@
1010
<en><![CDATA[
1111
Expands the current GameInfoDisplay in the upper right corner by displaying the current year under the date and a temperature feature with an indicator of whether the temperature is falling, staying constant or rising, the display of the current temperature. I also added the min/max temperature of the day.
1212
13+
Changelog v1.1.0.0:
14+
- Moddesc update
15+
- Added translation for uk and tr
16+
- Fixed temperature misalignment for widesceen resolutions
17+
- Fixed next weather icon glitch
18+
- Fixed rounding for current temperature
19+
1320
For more information, help and reporting issues please visit <a href='https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay'>GitHub</a>.
1421
]]></en>
1522
<de><![CDATA[
1623
Erweitert die aktuelle GameInfoDisplay oben rechts um die Anzeige des aktuellen Jahres unter dem Datum und einem Temperaturfeature mit einem Indikator ob die Temepratur fällt, gleich bleibt oder steigt, die Anzeige der aktuellen Temperatur und der min/max Temperatur des Tages.
1724
25+
Changelog v1.1.0.0:
26+
- Moddesc aktualisiert
27+
- Übersetzung für uk und tr hinzugefügt
28+
- Fehlerhafte Ausrichtung der Temperatur bei Widescreen-Auflösungen behoben
29+
- Glitch beim forecast Wetter behoben
30+
- Rundung bei der aktuellen Temperatur eingebaut
31+
1832
Weitere Informationen, Hilfe und Probleme melden findest Du unter <a href='https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay'>GitHub</a>.
1933
]]></de>
2034
</description>

FS25_ExtendedGameInfoDisplay/src/extendedgameinfodisplay.lua

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,25 @@ end
4747
---Overwrite GameInfoDisplay.draw()
4848
---@param overwrittenFunc function
4949
function ExtendedGameInfoDisplay:gameinfodisplay__draw(overwrittenFunc)
50-
overwrittenFunc(self)
51-
52-
local weatherType = g_currentMission.environment.weather:getCurrentWeatherType()
53-
local forcastDayTime = math.floor(g_currentMission.environment.dayTime + ExtendedGameInfoDisplay.WEATHER_HOURS_FORECAST )
54-
local forcastDay = g_currentMission.environment.currentDay
55-
if forcastDayTime > ExtendedGameInfoDisplay.HOURS_A_DAY then
56-
forcastDayTime = forcastDayTime - ExtendedGameInfoDisplay.HOURS_A_DAY
57-
forcastDay = forcastDay + 1
58-
end
50+
local environment = g_currentMission.environment
51+
local weatherType = environment.weather:getCurrentWeatherType()
52+
local forcastDayTime = environment.dayTime + ExtendedGameInfoDisplay.WEATHER_HOURS_FORECAST
53+
local forcastDay = environment.currentMonotonicDay
54+
forcastDayTime, forcastDay = environment:getDayAndDayTime(forcastDayTime, forcastDay)
55+
local nextWeatherType = environment.weather:getNextWeatherType(forcastDayTime, forcastDay)
5956

60-
local nextWeatherType = g_currentMission.environment.weather:getNextWeatherType(forcastDay, forcastDayTime )
57+
overwrittenFunc(self)
6158

6259
-- Strech the background and render new!
6360
self.infoBgScale.width = self:scalePixelToScreenWidth(ExtendedGameInfoDisplay.STRECH_GAME_INFO_DISPLAY)
6461
self.infoBgScale.offsetX = -self:scalePixelToScreenWidth(ExtendedGameInfoDisplay.STRECH_GAME_INFO_DISPLAY)
6562
self.infoBgScale:render()
6663

6764
-- ReRender to bring it back to top
65+
if weatherType ~= nextWeatherType then
66+
self.weatherNextIcon:render()
67+
end
6868
self.weatherIcon:render()
69-
self.weatherNextIcon:render()
70-
self.weatherNextIcon:setVisible(weatherType ~= nextWeatherType)
7169

7270
ExtendedGameInfoDisplay:setTemperaturePosition(self)
7371
ExtendedGameInfoDisplay:setTemperatureTrendAndDraw(self)
@@ -76,7 +74,7 @@ function ExtendedGameInfoDisplay:gameinfodisplay__draw(overwrittenFunc)
7674
end
7775

7876
function ExtendedGameInfoDisplay:setTemperaturePosition(gameInfoDisplay)
79-
local referencePositionX = gameInfoDisplay.calendarIcon.x - gameInfoDisplay:scalePixelToScreenHeight(65)
77+
local referencePositionX = gameInfoDisplay.calendarIcon.x - gameInfoDisplay:scalePixelToScreenWidth(115)
8078
gameInfoDisplay.temperature.x = referencePositionX
8179
gameInfoDisplay.temperatureUp.x = referencePositionX
8280
gameInfoDisplay.temperatureDown.x = referencePositionX
@@ -93,20 +91,20 @@ function ExtendedGameInfoDisplay:setTemperatureTrendAndDraw(gameInfoDisplay)
9391
gameInfoDisplay.temperatureUp:draw()
9492
gameInfoDisplay.temperatureDown:draw()
9593

96-
local seperatorPosX = gameInfoDisplay.temperature.x - gameInfoDisplay:scalePixelToScreenWidth(5)
94+
local seperatorPosX = gameInfoDisplay.temperature.x - gameInfoDisplay:scalePixelToScreenWidth(10)
9795
local seperatorPosYStart = gameInfoDisplay.temperature.y + gameInfoDisplay:scalePixelToScreenHeight(ExtendedGameInfoDisplay.TEMPERATURE_ICON_SIZE-1)
9896
local seperatorPosYEnd = gameInfoDisplay.temperature.y + gameInfoDisplay:scalePixelToScreenHeight(4)
9997

100-
drawLine2D(seperatorPosX, seperatorPosYStart, seperatorPosX, seperatorPosYEnd, gameInfoDisplay.separatorWidth, 1,1,1,0.2)
98+
drawLine2D(seperatorPosX, seperatorPosYStart, seperatorPosX, seperatorPosYEnd, gameInfoDisplay.separatorWidth, 1,1,1, 0.2)
10199
end
102100

103101
function ExtendedGameInfoDisplay:drawTemperatureText(gameInfoDisplay)
104102
local minTemperatureInC, maxTemperatureInC = g_currentMission.environment.weather:getCurrentMinMaxTemperatures()
105-
local currentTemperatureInC = g_currentMission.environment.weather:getCurrentTemperature()
103+
local currentTemperatureInC = g_currentMission.environment.weather.forecast:getCurrentWeather()
106104

107-
local minTemperatureExpanded = g_i18n:getTemperature(minTemperatureInC)
108-
local maxTemperatureExpanded = g_i18n:getTemperature(maxTemperatureInC)
109-
local currentTemperatureExpanded = g_i18n:getTemperature(currentTemperatureInC)
105+
local minTemperatureExpanded = MathUtil.round(g_i18n:getTemperature(minTemperatureInC), 0)
106+
local maxTemperatureExpanded = MathUtil.round(g_i18n:getTemperature(maxTemperatureInC), 0)
107+
local currentTemperatureExpanded = MathUtil.round(g_i18n:getTemperature(currentTemperatureInC.temperature), 0)
110108

111109
local scaledTextSizeForCurrentTemperature = gameInfoDisplay:scalePixelToScreenHeight(19)
112110
local scaledTextSizeForTemperature = gameInfoDisplay:scalePixelToScreenHeight(14)
@@ -125,7 +123,7 @@ function ExtendedGameInfoDisplay:drawYearText(gameInfoDisplay)
125123
local monthTextSize = gameInfoDisplay:scalePixelToScreenHeight(10)
126124
local scaledTextSizeForYear = gameInfoDisplay:scalePixelToScreenHeight(12)
127125

128-
local gameInfoDisplayPosX, gameInfoDisplayPosY = gameInfoDisplay:getPosition()
126+
local _, gameInfoDisplayPosY = gameInfoDisplay:getPosition()
129127
local posX = gameInfoDisplay.calendarIcon.x + gameInfoDisplay.calendarIcon.width + gameInfoDisplay:scalePixelToScreenWidth(2)
130128
local posY = gameInfoDisplayPosY - gameInfoDisplay.calendarTextOffsetY - monthTextSize
131129

@@ -139,7 +137,6 @@ end
139137

140138
--- Initialize the mod
141139
local function init()
142-
--HUD.new = Utils.prependedFunction(HUD.new, newHud)
143140
HUD.createDisplayComponents = Utils.overwrittenFunction(HUD.createDisplayComponents, ExtendedGameInfoDisplay.hud__createDisplayComponents)
144141
GameInfoDisplay.draw = Utils.overwrittenFunction(GameInfoDisplay.draw, ExtendedGameInfoDisplay.gameinfodisplay__draw)
145142
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
2+
<l10n>
3+
<translationContributors>RuyaSavascisi</translationContributors>
4+
<elements>
5+
<e k="mod_title" v="Genişletilmiş Oyun Bilgi Ekranı"/>
6+
<e k="yearinfo_current_year" v="Yıl"/>
7+
</elements>
8+
</l10n>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
2+
<l10n>
3+
<translationContributors>Gonimy_Vetrom, garik-59</translationContributors>
4+
<elements>
5+
<e k="mod_title" v="Розширений інформаційний дисплей гри"/>
6+
<e k="yearinfo_current_year" v="Рік"/>
7+
</elements>
8+
</l10n>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![FarmingSimulator-25](https://img.shields.io/badge/FarmingSimulator-25-73A302?style=flat-square)](https://www.farming-simulator.com/mods.php?title=fs2025)
66
[![Last commit](https://img.shields.io/github/last-commit/Peppie84/FS25_ExtendedGameInfoDisplay?style=flat-square&color=important)](https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay/commits/development)
7-
[![Modhub Version](https://img.shields.io/badge/Modhub-v1.0.0.0-green?style=flat-square)](https://www.farming-simulator.com/mod.php?mod_id=306015&title=fs2025)
7+
[![Modhub Version](https://img.shields.io/badge/Modhub-v1.1.0.0-green?style=flat-square)](https://www.farming-simulator.com/mod.php?mod_id=306015&title=fs2025)
88
[![GitHub issues](https://img.shields.io/github/issues/Peppie84/FS25_ExtendedGameInfoDisplay?style=flat-square)](https://github.com/Peppie84/FS25_ExtendedGameInfoDisplay/issues)
99
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)
1010
[![Top language](https://img.shields.io/github/languages/top/Peppie84/FS25_ExtendedGameInfoDisplay?style=flat-square&color=blueviolet)](https://github.com/search?q=repo%3APeppie84%FS25_ExtendedGameInfoDisplay++language%3ALua&type=code)

0 commit comments

Comments
 (0)