fix(lagre): 'rækker til' regnes på nettoforbrug (+ 'stiger'), bredere beholdningskolonne, kort tooltip (v1.16.1.0)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- AD Storage Stats
|
||||
-- Rene beregninger (ingen spil-API) til fanen Lagre: pr. vare i en bygning fyldning, værdi nu og
|
||||
-- ved årets toppris, gårdens samlede beholdning og hvor mange døgn den rækker ved gårdens forbrug.
|
||||
-- ved årets toppris, gårdens samlede beholdning og hvor mange døgn den rækker ved gårdens nettoforbrug.
|
||||
|
||||
ADStorageStats = {}
|
||||
|
||||
@@ -22,7 +22,9 @@ function ADStorageStats.itemStats(item, farmTotal, rate, quote)
|
||||
consumption = consumption,
|
||||
production = production,
|
||||
net = production - consumption,
|
||||
days = consumption > 0 and (farmTotal or level) / consumption or nil,
|
||||
-- døgn til tom ved gårdens NETTO-forbrug; produktion ≥ forbrug = beholdningen stiger
|
||||
days = consumption > production and (farmTotal or level) / (consumption - production) or nil,
|
||||
rising = consumption > 0 and production >= consumption,
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
</Bitmap>
|
||||
<!-- Lagre: statistik-tabel (vare · i bygningen · værdi nu · ved toppris · gården · rækker til · forbrug/prod.) -->
|
||||
<Bitmap profile="fs25_multiTextOptionContainer" id="statPrefab">
|
||||
<Text profile="spuCellBold" name="c1" position="20px 0px" size="145px 40px"/>
|
||||
<Text profile="spuCell" name="c2" position="165px 0px" size="135px 40px"/>
|
||||
<Text profile="spuCell" name="c3" position="300px 0px" size="200px 40px"/>
|
||||
<Text profile="spuCell" name="c4" position="400px 0px" size="100px 40px"/>
|
||||
<Text profile="spuCell" name="c5" position="500px 0px" size="70px 40px"/>
|
||||
<Text profile="spuCell" name="c6" position="570px 0px" size="85px 40px"/>
|
||||
<Text profile="spuCell" name="c7" position="655px 0px" size="155px 40px"/>
|
||||
<Text profile="spuCellBold" name="c1" position="20px 0px" size="140px 40px"/>
|
||||
<Text profile="spuCell" name="c2" position="160px 0px" size="145px 40px"/>
|
||||
<Text profile="spuCell" name="c3" position="305px 0px" size="200px 40px"/>
|
||||
<Text profile="spuCell" name="c4" position="405px 0px" size="100px 40px"/>
|
||||
<Text profile="spuCell" name="c5" position="505px 0px" size="65px 40px"/>
|
||||
<Text profile="spuCell" name="c6" position="570px 0px" size="80px 40px"/>
|
||||
<Text profile="spuCell" name="c7" position="650px 0px" size="160px 40px"/>
|
||||
</Bitmap>
|
||||
<!-- Lagre: gårdens beholdning som gitter (bygning · 2 varer pr. række). Rækken er ~815 px bred. -->
|
||||
<Bitmap profile="fs25_multiTextOptionContainer" id="gridPrefab">
|
||||
|
||||
@@ -98,7 +98,12 @@ function SmartPickupFrame:statCells(stat)
|
||||
if stat.valueNow ~= nil then
|
||||
now, top = SmartPickupFrame.formatMoney(stat.valueNow), SmartPickupFrame.formatMoney(stat.valueTop)
|
||||
end
|
||||
local days = stat.days ~= nil and string.format(i18n:getText("spu_stat_days"), stat.days) or "-"
|
||||
local days = "-"
|
||||
if stat.days ~= nil then
|
||||
days = string.format(i18n:getText("spu_stat_days"), stat.days)
|
||||
elseif stat.rising then
|
||||
days = i18n:getText("spu_stat_rising")
|
||||
end
|
||||
return {self:fillTypeTitle(stat.fillType), here, now, top, fc(stat.farmTotal), days, ADStorageStats.rateText(stat.consumption, stat.production, fc)}
|
||||
end
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<text name="spu_stat_use" text="forbrug %s/døgn"/>
|
||||
<text name="spu_stat_prod" text="prod. %s/døgn"/>
|
||||
<text name="spu_stat_total" text="Bygningen i alt"/>
|
||||
<text name="spu_stat_rising" text="stiger"/>
|
||||
<text name="spu_tab_factories" text="Fabrikker"/>
|
||||
<text name="spu_tab_silos" text="Siloer"/>
|
||||
<text name="spu_tab_barns" text="Stalde"/>
|
||||
@@ -149,6 +150,6 @@
|
||||
<text name="spu_col_farm" text="Gården"/>
|
||||
<text name="spu_col_lasts" text="Rækker til"/>
|
||||
<text name="spu_col_rate" text="Forbrug/prod. døgn"/>
|
||||
<text name="spu_storage_select_tooltip" text="Vælg en bygning for at se værdi, gårdens samlede beholdning og forbrug og produktion pr. døgn for hver vare."/>
|
||||
<text name="spu_storage_select_tooltip" text="Vælg bygningen tabellen viser."/>
|
||||
</texts>
|
||||
</l10n>
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<text name="spu_stat_use" text="use %s/day"/>
|
||||
<text name="spu_stat_prod" text="prod. %s/day"/>
|
||||
<text name="spu_stat_total" text="Building total"/>
|
||||
<text name="spu_stat_rising" text="rising"/>
|
||||
<text name="spu_tab_factories" text="Factories"/>
|
||||
<text name="spu_tab_silos" text="Silos"/>
|
||||
<text name="spu_tab_barns" text="Barns"/>
|
||||
@@ -149,6 +150,6 @@
|
||||
<text name="spu_col_farm" text="Farm"/>
|
||||
<text name="spu_col_lasts" text="Lasts"/>
|
||||
<text name="spu_col_rate" text="Use/prod. per day"/>
|
||||
<text name="spu_storage_select_tooltip" text="Pick a building to see value, the farm total and daily use and production for each item."/>
|
||||
<text name="spu_storage_select_tooltip" text="Choose the building shown in the table."/>
|
||||
</texts>
|
||||
</l10n>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.16.0.0</version>
|
||||
<version>1.16.1.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AD Smart Pickup — brugermanual
|
||||
|
||||
Version 1.16.0 · Farming Simulator 25 · tillæg til AutoDrive
|
||||
Version 1.16.1 · Farming Simulator 25 · tillæg til AutoDrive
|
||||
|
||||
*English version: [USER_MANUAL.md](USER_MANUAL.md)*
|
||||
|
||||
@@ -418,7 +418,7 @@ kolonneoverskrifter øverst:
|
||||
| **Værdi nu** | Værdien ved den bedste pris lige nu, blandt alle salgssteder på kortet |
|
||||
| **Ved toppris** | Værdien, hvis du sælger ved årets højeste pris |
|
||||
| **Gården** | Gårdens samlede beholdning af varen i alle bygninger, også dem på de andre faner |
|
||||
| **Rækker til** | Hvor mange døgn gårdens beholdning holder ved det nuværende forbrug |
|
||||
| **Rækker til** | Hvor mange døgn gårdens beholdning holder ved forbrug minus produktion. *stiger* betyder, at gården producerer mindst lige så meget, som den bruger |
|
||||
| **Forbrug/prod. døgn** | Forbrug pr. døgn med minus og produktion pr. døgn med plus |
|
||||
|
||||
Nederst står **Bygningen i alt** med bygningens samlede værdi nu og ved toppris.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# AD Smart Pickup — user manual
|
||||
|
||||
Version 1.16.0 · Farming Simulator 25 · add-on for AutoDrive
|
||||
Version 1.16.1 · Farming Simulator 25 · add-on for AutoDrive
|
||||
|
||||
*Dansk version: [BRUGERMANUAL.md](BRUGERMANUAL.md)*
|
||||
|
||||
@@ -422,7 +422,7 @@ one row per good:
|
||||
| **Value now** | The value at the best price right now, across all selling points on the map |
|
||||
| **At top price** | The value if you sell at the year's highest price |
|
||||
| **Farm** | The farm's total amount of the good across all buildings, including those on the other tabs |
|
||||
| **Lasts** | How many days the farm's stock lasts at the current use |
|
||||
| **Lasts** | How many days the farm's stock lasts at use minus production. *rising* means the farm produces at least as much as it uses |
|
||||
| **Use/prod. per day** | Daily use with a minus sign and daily production with a plus sign |
|
||||
|
||||
At the bottom, **Building total** shows the building's total value now and at top price.
|
||||
|
||||
@@ -15,7 +15,7 @@ check("ST1 procent", st.percent, 83)
|
||||
check("ST1 værdi nu", st.valueNow, 240000)
|
||||
check("ST1 værdi top", st.valueTop, 300000)
|
||||
check("ST1 gårdens beholdning", st.farmTotal, 412000)
|
||||
check("ST1 dage", math.floor(st.days * 10 + 0.5) / 10, 3.2)
|
||||
check("ST1 dage på netto (412k / 82k)", math.floor(st.days * 10 + 0.5) / 10, 5.0)
|
||||
check("ST1 netto pr. døgn", st.net, -82000)
|
||||
|
||||
-- ST2: ingen salgssted, intet forbrug, ingen kapacitet
|
||||
@@ -63,5 +63,12 @@ check("ST8 to siloer", #silos, 2)
|
||||
check("ST8 rækkefølge", silos[2].name, "C")
|
||||
check("ST8 ingen stalde", #S.filterKind(inv, "husbandry"), 0)
|
||||
|
||||
-- ST9: produktion ≥ forbrug -> beholdningen stiger, ingen dage
|
||||
local rising = S.itemStats({fillType = 8, level = 1000, capacity = 2000}, 6700000, {consumption = 11500000, production = 19200000}, nil)
|
||||
check("ST9 stiger -> dage nil", rising.days, nil)
|
||||
check("ST9 stiger-flag", rising.rising, true)
|
||||
check("ST1 falder -> ikke stiger", st.rising, false)
|
||||
check("ST2 intet forbrug -> ikke stiger", st2.rising, false)
|
||||
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
os.exit(failures == 0 and 0 or 1)
|
||||
|
||||
Reference in New Issue
Block a user