fix(salg): fremmede produktioner (kortets mejeri, ejer 0) er salgssteder; kun gårdens egne fabrikker/stalde udelukkes; '>=' i stedet for '≥' (mangler i fonten) (v1.17.1.0)
This commit is contained in:
@@ -75,13 +75,30 @@ function ADPrices.isSellingStation(station)
|
||||
if station.isSellingPoint ~= true or station.hideFromPricesMenu then
|
||||
return false
|
||||
end
|
||||
-- Afleveringer til GÅRDENS EGNE fabrikker/stalde er ikke salg. En fremmed produktion (fx kortets
|
||||
-- mejeri, ejer 0) køber varen og er et rigtigt salgssted. Ukendt ejer = regnes som egen.
|
||||
local placeable = station.owningPlaceable
|
||||
if placeable ~= nil and (placeable.spec_productionPoint ~= nil or placeable.getHusbandryFillLevel ~= nil) then
|
||||
return false
|
||||
return not ADPrices.isOwnedByPlayer(placeable)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function ADPrices.isOwnedByPlayer(placeable)
|
||||
local owner = nil
|
||||
if placeable.getOwnerFarmId ~= nil then
|
||||
local ok, value = pcall(placeable.getOwnerFarmId, placeable)
|
||||
if ok then owner = value end
|
||||
elseif placeable.ownerFarmId ~= nil then
|
||||
owner = placeable.ownerFarmId
|
||||
end
|
||||
if owner == nil then
|
||||
return true
|
||||
end
|
||||
local farmId = g_currentMission ~= nil and g_currentMission.getFarmId ~= nil and g_currentMission:getFarmId() or 1
|
||||
return owner == farmId
|
||||
end
|
||||
|
||||
local function getCurrentPeriod()
|
||||
local environment = g_currentMission ~= nil and g_currentMission.environment or nil
|
||||
return environment ~= nil and environment.currentPeriod or nil
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<text name="spu_flow_noSource" text="(ingen kilde)"/>
|
||||
<text name="spu_flow_noTarget" text="(intet mål)"/>
|
||||
<text name="spu_flow_noVehicle" text="(ingen traktor)"/>
|
||||
<text name="spu_flow_ruleOut" text="pris ≥ %d %%, lager > %d %%"/>
|
||||
<text name="spu_flow_ruleOut" text="pris >= %d %%, lager > %d %%"/>
|
||||
<text name="spu_flow_round" text="runde"/>
|
||||
<text name="spu_flow_ruleIn" text="behov"/>
|
||||
<text name="spu_flow_ruleInLoops" text="behov, %d ture"/>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<text name="spu_flow_noSource" text="(no source)"/>
|
||||
<text name="spu_flow_noTarget" text="(no target)"/>
|
||||
<text name="spu_flow_noVehicle" text="(no tractor)"/>
|
||||
<text name="spu_flow_ruleOut" text="price ≥ %d %%, storage > %d %%"/>
|
||||
<text name="spu_flow_ruleOut" text="price >= %d %%, storage > %d %%"/>
|
||||
<text name="spu_flow_round" text="round"/>
|
||||
<text name="spu_flow_ruleIn" text="need"/>
|
||||
<text name="spu_flow_ruleInLoops" text="need, %d loops"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.17.0.0</version>
|
||||
<version>1.17.1.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AD Smart Pickup — brugermanual
|
||||
|
||||
Version 1.17.0 · Farming Simulator 25 · tillæg til AutoDrive
|
||||
Version 1.17.1 · Farming Simulator 25 · tillæg til AutoDrive
|
||||
|
||||
*English version: [USER_MANUAL.md](USER_MANUAL.md)*
|
||||
|
||||
@@ -128,7 +128,7 @@ Tryk **ESC** og vælg fanen **Smart Pickup**. Fanen har fem underfaner:
|
||||
Øverst står én linje pr. flow. Det valgte flow er markeret med `>`.
|
||||
|
||||
```
|
||||
> Mælkesalg: Mælk · Cow Barn 1 + Cow Barn 2 → Salg · pris ≥ 90 %, lager > 80 % · Virtus · Kører (1/1)
|
||||
> Mælkesalg: Mælk · Cow Barn 1 + Cow Barn 2 → Salg · pris >= 90 %, lager > 80 % · Virtus · Kører (1/1)
|
||||
Foder stald: efter behov · alle siloer → Cow Barn 1 · behov · JCB 1 + JCB 2 · Stoppet (2 traktorer)
|
||||
```
|
||||
|
||||
@@ -305,7 +305,9 @@ Før hver pålæsning, og hvert femte sekund mens traktoren holder, vurderer mod
|
||||
|
||||
### Prisen
|
||||
|
||||
Pris-% er varens nuværende pris i forhold til årets højeste. Moden bruger den samme sæsonkurve som
|
||||
Salgssteder er kortets rigtige salgssteder og fabrikker, som gården ikke ejer, fx kortets mejeri.
|
||||
Afleveringer til gårdens egne fabrikker og stalde tæller ikke som salg. Pris-% er varens nuværende
|
||||
pris i forhold til årets højeste. Moden bruger den samme sæsonkurve som
|
||||
spillets prisgraf. Varer med flad kurve regnes altid som 100 %. Salgsstedet med den bedste pris vinder,
|
||||
så længe vejnettet når derhen.
|
||||
|
||||
|
||||
+5
-3
@@ -1,6 +1,6 @@
|
||||
# AD Smart Pickup — user manual
|
||||
|
||||
Version 1.17.0 · Farming Simulator 25 · add-on for AutoDrive
|
||||
Version 1.17.1 · Farming Simulator 25 · add-on for AutoDrive
|
||||
|
||||
*Dansk version: [BRUGERMANUAL.md](BRUGERMANUAL.md)*
|
||||
|
||||
@@ -130,7 +130,7 @@ Press **ESC** and open the **Smart Pickup** tab. It has five sub-tabs:
|
||||
At the top there is one line per flow. The selected flow is marked with `>`.
|
||||
|
||||
```
|
||||
> Milk sale: Milk · Cow Barn 1 + Cow Barn 2 → Sell · price ≥ 90 %, storage > 80 % · Virtus · Running (1/1)
|
||||
> Milk sale: Milk · Cow Barn 1 + Cow Barn 2 → Sell · price >= 90 %, storage > 80 % · Virtus · Running (1/1)
|
||||
Barn feed: by need · all silos → Cow Barn 1 · need · JCB 1 + JCB 2 · Stopped (2 tractors)
|
||||
```
|
||||
|
||||
@@ -308,7 +308,9 @@ Before each loading, and every five seconds while the tractor waits, the mod che
|
||||
|
||||
### The price
|
||||
|
||||
The price share is the good's current price compared with the yearly high. The mod uses the same
|
||||
Selling points are the map's real selling points and factories the farm does not own, such as the
|
||||
map's dairy. Deliveries to the farm's own factories and barns do not count as sales. The price share
|
||||
is the good's current price compared with the yearly high. The mod uses the same
|
||||
seasonal curve as the game's price graph. Goods with a flat curve always count as 100 %. The selling
|
||||
point with the best price wins, as long as the road network reaches it.
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ check("P4 fabrik-station = ikke salgssted", ADPrices.isSellingStation({isa = fun
|
||||
-- in-game (23/9): TMR-fabrikkens indlevering er en SellingStation med isSellingPoint=true -> blev regnet som marked
|
||||
check("P4 fabrikkens egen station = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {spec_productionPoint = {}}}), false)
|
||||
check("P4 staldens egen station = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {getHusbandryFillLevel = function() end}}), false)
|
||||
-- P4b: fremmed produktion (kortets mejeri, ejer 0) køber varen = salgssted; gårdens egen fabrik er ikke
|
||||
check("P4b fremmed mejeri = salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {spec_productionPoint = {}, getOwnerFarmId = function() return 0 end}}), true)
|
||||
check("P4b egen fabrik (ejer 1) = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {spec_productionPoint = {}, getOwnerFarmId = function() return 1 end}}), false)
|
||||
check("P4b fremmed stald-felt ownerFarmId", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {getHusbandryFillLevel = function() end, ownerFarmId = 0}}), true)
|
||||
check("P4 rigtigt salgssted med placeable", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {}}), true)
|
||||
|
||||
-- P5: uden stationens grundpris: kun kurven tæller (faktor nu ÷ faktor max)
|
||||
|
||||
Reference in New Issue
Block a user