diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a8cb8a..d2a005f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,5 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
+
+## [1.0.0.0] - {waiting-for-modhub}
- Ported from LS22
- Initial Release
\ No newline at end of file
diff --git a/FS25_BeesRevamp/modDesc.xml b/FS25_BeesRevamp/modDesc.xml
index 6c3eb7b..c276911 100644
--- a/FS25_BeesRevamp/modDesc.xml
+++ b/FS25_BeesRevamp/modDesc.xml
@@ -1,11 +1,11 @@
-
-
- Peppie84
- 1.0.0.0
-
- Bees Revamp
-
-
+
+
+ Peppie84
+ 1.0.0.0
+
+ Bees Revamp
+
+
GitHub.
-]]>
+]]>
GitHub.
-]]>
+]]>
GitHub.
-]]>
-
- icon_BeesRevamp.dds
-
-
-
-
-
-
\ No newline at end of file
+]]>
+
+ icon_BeesRevamp.dds
+
+
+
+
+
+
diff --git a/FS25_BeesRevamp/src/beecare.lua b/FS25_BeesRevamp/src/beecare.lua
index badca5f..26b8a8c 100644
--- a/FS25_BeesRevamp/src/beecare.lua
+++ b/FS25_BeesRevamp/src/beecare.lua
@@ -63,6 +63,7 @@ end
function BeeCare.registerOverwrittenFunctions(placeableType)
SpecializationUtil.registerOverwrittenFunction(placeableType, 'updateInfo', BeeCare.updateInfo)
SpecializationUtil.registerOverwrittenFunction(placeableType, 'updateBeehiveState', BeeCare.updateBeehiveState)
+ SpecializationUtil.registerOverwrittenFunction(placeableType, "canBuy", BeeCare.canBuy)
end
-------------------------------------------------------------------------------
@@ -550,3 +551,14 @@ function BeeCare:updateInfo(overwrittenFunc, infoTable)
overwrittenFunc(self, infoTable)
end
+
+---Can buy
+function BeeCare:canBuy(overwrittenFunc)
+ local spec = self.spec_beecare
+
+ if spec.environment.currentSeason == Season.WINTER or spec.environment.currentSeason == Season.AUTUMN then
+ return false, g_brUtils:getModText('beesrevamp_beecare_warning_hive_placement_only_in_spring_and_summer')
+ end
+
+ return overwrittenFunc(self)
+end
diff --git a/FS25_BeesRevamp/src/beehivesystemextended.lua b/FS25_BeesRevamp/src/beehivesystemextended.lua
index 084f65a..1edee82 100644
--- a/FS25_BeesRevamp/src/beehivesystemextended.lua
+++ b/FS25_BeesRevamp/src/beehivesystemextended.lua
@@ -43,7 +43,7 @@ function BeehiveSystemExtended:updateState()
self.isProductionActive = true
local isRaining = environment.weather:getIsRaining()
- local isTemperaturToFly = environment.weather:getCurrentTemperature() > 10
+ local isTemperaturToFly = environment.weather:getCurrentTemperature() >= 10
local isSunOn = environment.isSunOn
local isWinterSeason = environment.currentSeason == Season.WINTER
@@ -112,7 +112,7 @@ function BeehiveSystemExtended:getBeehiveInfluenceFactorAt(wx, wz)
return 0
end
- local totalFieldArea = farmLand.totalFieldArea or farmLand.areaInHa
+ local totalFieldArea = (farmLand.field ~= nil and farmLand.field.areaHa) or farmLand.areaInHa or farmLand.totalFieldArea
if totalFieldArea == nil then
return 0
end
@@ -167,11 +167,6 @@ function BeehiveSystemExtended:addFieldInfoExtension()
)
end
-function BeehiveSystemExtended:onFieldDataUpdateFinished(data)
- g_brUtils:logDebug('BeehiveSystemExtended:onFieldDataUpdateFinished')
- self.requestedFieldData = true
-end
-
---BeehiveSystemExtended:updateFieldInfoOverPopulation
---@param fieldInfo any
---@param startWorldX any
@@ -182,15 +177,15 @@ end
---@param heightWorldZ any
---@param isColorBlindMode any
function BeehiveSystemExtended:updateFieldInfoOverPopulation(fieldInfo, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, isColorBlindMode)
- if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= self.mission.player.farmId then
+ if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= g_localPlayer.farmId then
return nil
end
- local player = g_currentMission.player
+ local positionX, positionY, positionZ = g_localPlayer.getPosition()
local farmLand = g_farmlandManager:getFarmlandAtWorldPosition(
- player.baseInformation.lastPositionX,
- player.baseInformation.lastPositionZ
+ positionX,
+ positionZ
)
if farmLand == nil then
@@ -230,11 +225,12 @@ end
---@param heightWorldZ any
---@param isColorBlindMode any
function BeehiveSystemExtended:updateFieldInfoDisplayBeeBonus(fieldInfo, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, isColorBlindMode)
- local player = self.mission.player
- if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= player.farmId then
+ if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= g_localPlayer.farmId then
return nil
end
+ local positionX, positionY, positionZ = g_localPlayer.getPosition()
+
if (g_currentMission.environment.timeUpdateTime-self.lastFieldUpdateCache) > 1000 then
return nil
end
@@ -248,8 +244,8 @@ function BeehiveSystemExtended:updateFieldInfoDisplayBeeBonus(fieldInfo, startWo
local fruitYieldBonus = self:getYieldBonusByFruitName(fruitType.name)
local beeHiveYieldBonusAtPlayerPosition = g_currentMission.beehiveSystem:getBeehiveInfluenceFactorAt(
- player.baseInformation.lastPositionX,
- player.baseInformation.lastPositionZ
+ positionX,
+ positionZ
) * fruitType.beeYieldBonusPercentage
fieldInfo.beeHiveYieldBonusAtPlayerPosition = beeHiveYieldBonusAtPlayerPosition
@@ -275,7 +271,7 @@ end
---@param isColorBlindMode any
function BeehiveSystemExtended:updateFieldInfoDisplayInfluenced(fieldInfo, startWorldX, startWorldZ, widthWorldX, widthWorldZ,
heightWorldX, heightWorldZ, isColorBlindMode)
- if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= self.mission.player.farmId then
+ if g_farmlandManager:getOwnerIdAtWorldPosition(startWorldX, startWorldZ) ~= g_localPlayer.farmId then
return nil
end
@@ -305,16 +301,15 @@ end
---@param data table
---@param box table InfoBox
function BeehiveSystemExtended:fieldAddField(data, box)
- local player = g_currentMission.hud.player
- local positionX, positionY, positionZ = player.getPosition()
+ local positionX, positionY, positionZ = g_localPlayer.getPosition()
- if g_farmlandManager:getOwnerIdAtWorldPosition(positionX, positionZ) ~= player.farmId then
+ if g_farmlandManager:getOwnerIdAtWorldPosition(positionX, positionZ) ~= g_localPlayer.farmId then
return
end
local beehiveSystemExtended = g_currentMission.beehiveSystem
local fruitTypeIndex = data.lastFruitTypeIndex
- if fruitTypeIndex == nil then
+ if fruitTypeIndex == nil or fruitTypeIndex == 0 then
return
end
diff --git a/FS25_BeesRevamp/src/main.lua b/FS25_BeesRevamp/src/main.lua
index 485cad1..e447cda 100644
--- a/FS25_BeesRevamp/src/main.lua
+++ b/FS25_BeesRevamp/src/main.lua
@@ -43,11 +43,21 @@ local function load(mission)
['e549aec41dae800a1b62573075a17b13'] = 500, -- Stock lvl 3
['bff790c871a3f21560dc4578d45911f1'] = 4000, -- Stock lvl 4
['6a07bd8c629f80689ce6a79e67693da5'] = 16000, -- Stock lvl 5
+ ['4b9a66f00ce22d729192c5d6cc9bbffd'] = 2800, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['79d09dea1ea492013c71e700f6373914'] = 3200, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['9f1b9ed23bd55b4eccff4283c8190114'] = 200, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['9ad5df30c2f68bf7ac24b1e05fc5cbbd'] = 400, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['98cdfe4ea9e2f01dac978f2892daef26'] = 200, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
+ ['c4011d0e68dc43435cd5ba4c042365ce'] = 1150, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
+ ['5f8c5339e645b43380da721a356ca8b7'] = 450, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
+ ['c1ced218e3b359f60ce4d4f38ebee163'] = 250, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
+ ['d89223518ac45b268ff5807ce19131a8'] = 320, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
+ ['9fff11e7e8c17b430f0b9a6ccf49c864'] = 400, -- https://farming-simulator.com/mod.php?mod_id=304020&title=fs2025
},
PATCHLIST_YIELD_BONUS = {
['CANOLA'] = {
['yieldBonus'] = 0.3,
- ['hivesPerHa'] = 3
+ ['hivesPerHa'] = 4
},
['SUNFLOWER'] = {
['yieldBonus'] = 0.8,
@@ -57,6 +67,14 @@ local function load(mission)
['yieldBonus'] = 0,
['hivesPerHa'] = 0
},
+ ['COTTON'] = {
+ ['yieldBonus'] = 0.35,
+ ['hivesPerHa'] = 3
+ },
+ ['SOYBEAN'] = {
+ ['yieldBonus'] = 0.18,
+ ['hivesPerHa'] = 2
+ },
}
}
diff --git a/FS25_BeesRevamp/src/placeablebeehiveextended.lua b/FS25_BeesRevamp/src/placeablebeehiveextended.lua
index e271f0e..5b17da4 100644
--- a/FS25_BeesRevamp/src/placeablebeehiveextended.lua
+++ b/FS25_BeesRevamp/src/placeablebeehiveextended.lua
@@ -14,16 +14,13 @@
PlaceableBeehiveExtended = {
MOD_NAME = g_currentModName or 'unknown',
PATCHLIST_HIVE_COUNT_ON_RUNTIME = {
- ['fdbb92d36d913c6951195749a923ced0'] = 1, -- LS25 Stock BeeHiveGeneric1
- ['617aab6ddd64e931d7cb2615a6dcfd88'] = 12, -- LS25 Stock BeeHiveGeneric2
- ['a46e311e30b2c796bb535a79130880ef'] = 1, -- LS25 Stock Beehive01
- ['5a463aa504452e923b9366803b897035'] = 4, -- LS25 Stock Beehive02
- ['314b6994bff1068a180931d8f8d0aca4'] = 1, -- LS25 Stock Beehive03
- ['11213f68a4fd2d7020e13aeca9e9d236'] = 1, -- Stock lvl 1
- ['215ebd1eab110e0bf84b958df9cf6695'] = 1, -- Stock lvl 2
- ['e549aec41dae800a1b62573075a17b13'] = 1, -- Stock lvl 3
- ['bff790c871a3f21560dc4578d45911f1'] = 10, -- Stock lvl 4
- ['6a07bd8c629f80689ce6a79e67693da5'] = 33, -- Stock lvl 5
+ ['617aab6ddd64e931d7cb2615a6dcfd88'] = 12, -- LS25 Stock BeeHiveGeneric2
+ ['5a463aa504452e923b9366803b897035'] = 4, -- LS25 Stock Beehive02
+ ['bff790c871a3f21560dc4578d45911f1'] = 10, -- Stock lvl 4
+ ['6a07bd8c629f80689ce6a79e67693da5'] = 33, -- Stock lvl 5
+ ['79d09dea1ea492013c71e700f6373914'] = 10, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['4b9a66f00ce22d729192c5d6cc9bbffd'] = 7, -- https://farming-simulator.com/mod.php?mod_id=304970&title=fs2025
+ ['c4011d0e68dc43435cd5ba4c042365ce'] = 4, -- https://farming-simulator.com/mod.php?mod_id=242870&title=fs2022
},
NECTAR_PER_BEE_IN_MILLILITER = 0.05, -- 50ul (mikroliter)
BEE_FLIGHTS_PER_HOUR = 2.0,
diff --git a/FS25_BeesRevamp/translations/translation_cs.xml b/FS25_BeesRevamp/translations/translation_cs.xml
new file mode 100644
index 0000000..51f42b6
--- /dev/null
+++ b/FS25_BeesRevamp/translations/translation_cs.xml
@@ -0,0 +1,114 @@
+
+
+ orangestar254
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FS25_BeesRevamp/translations/translation_cz.xml b/FS25_BeesRevamp/translations/translation_cz.xml
index 4f37489..9dfd154 100644
--- a/FS25_BeesRevamp/translations/translation_cz.xml
+++ b/FS25_BeesRevamp/translations/translation_cz.xml
@@ -23,6 +23,7 @@
+
@@ -54,7 +55,7 @@ Doufám, že se s tímto modem všichni pobavíte.
- Dennis (Peppie84)"/>
-
+
@@ -86,7 +87,13 @@ Následující tabulka ukazuje, jaké jsou nové výnosové bonusy:
Plodina max. bonus k výnosu kolonie na hektar
Řepka 30% 3 kolonie/ha
Slunečnice 80% 4 kolonie/ha
-Brambory 0% -
+Brambory 0% -
+
+Některé plodiny nejsou přímo opylovány včelami, protože jsou samosprašné. Mnoho studií však ukazuje, že cizosprašné opylení neboli přenos pylu z jedné rostliny na druhou může také zvýšit výnos samosprašných rostlin. Patří sem následující plodiny:
+
+Plodina max. bonus k výnosu kolonie na hektar
+Bavlna 35% 3 kolonie/ha
+Sójové boby 18% 2 kolonie/ha
Včelstva se statusem: mladé včelstvo jsou z tohoto výpočtu zcela vyloučena. To vám zabrání umístit včelstva na pole krátce před sklizní a získat tak bonus."/>
diff --git a/FS25_BeesRevamp/translations/translation_de.xml b/FS25_BeesRevamp/translations/translation_de.xml
index f843d17..251903f 100644
--- a/FS25_BeesRevamp/translations/translation_de.xml
+++ b/FS25_BeesRevamp/translations/translation_de.xml
@@ -23,6 +23,7 @@
+
@@ -54,7 +55,7 @@ Ich wünsche euch allen viel Spaß mit der Mod.
- Dennis (Peppie84)"/>
-
+
@@ -88,6 +89,12 @@ Raps 30% 3 Völker/ha
Sonnenblume 80% 4 Völker/ha
Kartoffel 0% -
+Einige Früchte werden nicht direkt von Honigbienen besteubt, da sie Selbstbesteuber sind. Aber viele Untersuchungen zeigen, dass durch eine Kreuzbesteubung, Pollen von einer Pflanzen zur anderen, ebenfalls bei Selbstbesteuber eine Ertragssteigerung bringen kann. Hierzu zählen folgende Früchte:
+
+Frucht max. Ertragsbonus Völker pro Hektar
+Baumwolle 35% 3 Völker/ha
+Sojabohne 18% 2 Völker/ha
+
Bienenvölker im Status: Jungvolk, fallen aus dieser Berechnung komplett raus. Somit wird verhindert, dass man die Bienenvölker kurz vor der Ernte an das Feld stellt und somit einen Bonus bekommt."/>
diff --git a/FS25_BeesRevamp/translations/translation_en.xml b/FS25_BeesRevamp/translations/translation_en.xml
index b019411..6e0a502 100644
--- a/FS25_BeesRevamp/translations/translation_en.xml
+++ b/FS25_BeesRevamp/translations/translation_en.xml
@@ -23,6 +23,7 @@
+
@@ -54,7 +55,7 @@ I hope you all have fun with this mod.
- Dennis (Peppie84)"/>
-
+
@@ -83,11 +84,17 @@ In real life, the beekeeper should check the colony every 7 days between March a
The following table shows what the new yield bonuses are:
-Fruit max. yield bonus Colonies per hectare
+Crops max. yield bonus Colonies per hectare
Canola 30% 3 colonies/ha
Sunflower 80% 4 colonies/ha
Potato 0% -
+Some crops are not directly pollinated by honeybees because they are self-pollinating. However, many studies show that cross-pollination, transferring pollen from one plant to another, can also increase the yield of self-pollinating plants. These include the following crops:
+
+Crops max. yield bonus Colonies per hectare
+Cotton 35% 3 colonies/ha
+Soybean 18% 2 colonies/ha
+
Bee colonies with the status: young colony are completely excluded from this calculation. This prevents you from placing the bee colonies on the field shortly before the harvest and thus receiving a bonus."/>
diff --git a/FS25_BeesRevamp/translations/translation_it.xml b/FS25_BeesRevamp/translations/translation_it.xml
index b04eaa0..45fa4a0 100644
--- a/FS25_BeesRevamp/translations/translation_it.xml
+++ b/FS25_BeesRevamp/translations/translation_it.xml
@@ -23,6 +23,7 @@
+
@@ -54,7 +55,7 @@ Spero che tutti vi divertiate con questo mod.
- Dennis (Peppie84)"/>
-
+
@@ -84,11 +85,17 @@ Nella vita reale, l'apicoltore dovrebbe controllare la colonia ogni 7 giorni tra
La tabella seguente mostra quali sono i nuovi bonus di resa:
-Frutto max. bonus di resa Colonie per ettaro
+Colture max. bonus di resa Colonie per ettaro
Canola 30% 3 colonie/ha
Girasole 80% 4 colonie/ha
Patata 0% -
+Alcune colture non vengono impollinate direttamente dalle api perché sono autoimpollinanti. Tuttavia, molti studi dimostrano che l'impollinazione incrociata, ovvero il trasferimento del polline da una pianta all'altra, può anche aumentare la resa delle piante autoimpollinanti. Tra queste rientrano le seguenti colture:
+
+Colture max. bonus di resa Colonie per ettaro
+Cotone 35% 3 colonie/ha
+Fagiolo di soia 18% 2 colonie/ha
+
Le colonie di api con lo stato: colonia giovane sono completamente escluse da questo calcolo. Questo impedisce di posizionare le colonie di api sul campo poco prima del raccolto e quindi ricevere un bonus."/>
diff --git a/prepare-release.ps1 b/prepare-release.ps1
index 0550fa5..7fa709c 100644
--- a/prepare-release.ps1
+++ b/prepare-release.ps1
@@ -48,7 +48,7 @@ $xmlStreamWriter.Close()
# Make test run (add testrunner path to your environment path)
New-Item -ItemType Directory -Force -Path "$testRunnerLogPath"
-TestRunner_public --logPath "$testRunnerLogPath" --outputPath "$testRunnerLogPath" --noPause "$modDirectory\"
+LS25TestRunner_public --logPath "$testRunnerLogPath" --outputPath "$testRunnerLogPath" --noPause "$modDirectory\"
# Make zip file
7z a -bd -stl -tzip -mx=9 "$modName.zip" "$modDirectory/."