diff --git a/FS25_Mine.zip b/FS25_Mine.zip
index 325efc1..f227633 100644
Binary files a/FS25_Mine.zip and b/FS25_Mine.zip differ
diff --git a/build.cmd b/build.cmd
new file mode 100644
index 0000000..2eef71f
--- /dev/null
+++ b/build.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0build.ps1" %*
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
new file mode 100644
index 0000000..932b8e1
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1,69 @@
+param(
+ [string]$ModsPath = ""
+)
+
+$ErrorActionPreference = "Stop"
+
+$modName = "FS25_Mine"
+$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
+$projectZip = Join-Path $projectRoot "$modName.zip"
+$tempZip = Join-Path ([System.IO.Path]::GetTempPath()) "$modName-build.zip"
+
+if ([string]::IsNullOrWhiteSpace($ModsPath)) {
+ $candidates = @(
+ (Join-Path $env:USERPROFILE "OneDrive\Dokumente\My Games\FarmingSimulator2025\mods"),
+ (Join-Path $env:USERPROFILE "Documents\My Games\FarmingSimulator2025\mods")
+ )
+
+ foreach ($candidate in $candidates) {
+ if (Test-Path -LiteralPath $candidate) {
+ $ModsPath = $candidate
+ break
+ }
+ }
+}
+
+if ([string]::IsNullOrWhiteSpace($ModsPath)) {
+ throw "Kein FarmingSimulator2025 mods Ordner gefunden. Starte z.B.: .\build.ps1 -ModsPath 'C:\Users\pasca\OneDrive\Dokumente\My Games\FarmingSimulator2025\mods'"
+}
+
+if (-not (Test-Path -LiteralPath $ModsPath)) {
+ New-Item -ItemType Directory -Force -Path $ModsPath | Out-Null
+}
+
+Add-Type -AssemblyName System.IO.Compression
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+if (Test-Path -LiteralPath $tempZip) {
+ Remove-Item -LiteralPath $tempZip -Force
+}
+
+if (Test-Path -LiteralPath $projectZip) {
+ Remove-Item -LiteralPath $projectZip -Force
+}
+
+$zip = [System.IO.Compression.ZipFile]::Open($tempZip, [System.IO.Compression.ZipArchiveMode]::Create)
+try {
+ $files = Get-ChildItem -LiteralPath $projectRoot -Recurse -File -Force | Where-Object {
+ $relative = $_.FullName.Substring($projectRoot.Length + 1)
+ -not ($relative -like ".git\*") -and
+ -not ($relative -like ".vscode\*") -and
+ $relative -ne "$modName.zip" -and
+ $relative -ne "build.ps1" -and
+ $relative -ne "build.cmd"
+ }
+
+ foreach ($file in $files) {
+ $relative = $file.FullName.Substring($projectRoot.Length + 1).Replace("\", "/")
+ [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, $file.FullName, $relative, [System.IO.Compression.CompressionLevel]::Optimal) | Out-Null
+ }
+}
+finally {
+ $zip.Dispose()
+}
+
+Move-Item -LiteralPath $tempZip -Destination $projectZip -Force
+Copy-Item -LiteralPath $projectZip -Destination (Join-Path $ModsPath "$modName.zip") -Force
+
+Write-Host "Build fertig: $projectZip"
+Write-Host "Kopiert nach: $(Join-Path $ModsPath "$modName.zip")"
\ No newline at end of file
diff --git a/placeables/coalmine/coalmine.xml b/placeables/coalmine/coalmine.xml
index 9d73dfe..97340ba 100644
--- a/placeables/coalmine/coalmine.xml
+++ b/placeables/coalmine/coalmine.xml
@@ -9,8 +9,8 @@
Kohlemine produziert Kohle
placeables/mine/store_mine.dds
- 65000
- 160
+ 600000
+ 500
1000
0
NONE
@@ -78,7 +78,7 @@
-
+
@@ -88,11 +88,11 @@
-
+
diff --git a/placeables/dirt/dirt.xml b/placeables/dirt/dirt.xml
index 8484aa3..7e6ba6b 100644
--- a/placeables/dirt/dirt.xml
+++ b/placeables/dirt/dirt.xml
@@ -9,8 +9,8 @@
Erde mine produziert Erde
placeables/mine/store_mine.dds
- 65000
- 160
+ 180000
+ 150
1000
0
NONE
@@ -92,7 +92,7 @@
-->
-
+
diff --git a/placeables/ironore/iron.xml b/placeables/ironore/iron.xml
index 7cb81e6..4c6deec 100644
--- a/placeables/ironore/iron.xml
+++ b/placeables/ironore/iron.xml
@@ -1,7 +1,7 @@
-
+
LS25 Eisenmine
@@ -9,8 +9,8 @@
Eisenmine produziert Eisen
placeables/mine/store_mine.dds
- 65000
- 160
+ 1200000
+ 1000
1000
0
NONE
@@ -92,7 +92,7 @@
-->
-
+
diff --git a/placeables/mine/mine.xml b/placeables/mine/mine.xml
index 0297c91..da8a236 100644
--- a/placeables/mine/mine.xml
+++ b/placeables/mine/mine.xml
@@ -9,8 +9,8 @@
Mine produziert PAYDIRT
placeables/mine/store_mine.dds
- 80000
- 120
+ 250000
+ 200
1000
0
NONE
@@ -92,7 +92,7 @@
-->
-
+
diff --git a/placeables/silverore/silver.xml b/placeables/silverore/silver.xml
index 4c04c0b..9f3c361 100644
--- a/placeables/silverore/silver.xml
+++ b/placeables/silverore/silver.xml
@@ -1,7 +1,7 @@
-
+
LS25 Silbermine
@@ -9,8 +9,8 @@
Silbermine produziert Silber
placeables/mine/store_mine.dds
- 65000
- 160
+ 1500000
+ 1200
1000
0
NONE
@@ -92,7 +92,7 @@
-->
-
+
diff --git a/placeables/stoneQuarry/stoneQuarry.xml b/placeables/stoneQuarry/stoneQuarry.xml
index 85ce03b..004d94f 100644
--- a/placeables/stoneQuarry/stoneQuarry.xml
+++ b/placeables/stoneQuarry/stoneQuarry.xml
@@ -9,8 +9,8 @@
Steinbruch produziert STONE
placeables/mine/store_mine.dds
- 95000
- 160
+ 250000
+ 200
1000
0
NONE
@@ -92,7 +92,7 @@
-->
-
+
diff --git a/scripts/produktion.lua b/scripts/produktion.lua
index 1631aa2..8ed7818 100644
--- a/scripts/produktion.lua
+++ b/scripts/produktion.lua
@@ -1,4 +1,4 @@
--- Variablen
+-- Variablen
Produktion = {}
@@ -42,13 +42,7 @@ end
function Produktion:onLoad(savegame)
local xmlFillType = self.xmlFile:getValue("placeable.produktion#fillType", Produktion.fillType)
local xmlAmountPerHour = self.xmlFile:getValue("placeable.produktion#amountPerHour", Produktion.amountPerHour)
- if Produktion.debug then
- local debugCapacity = self.xmlFile:getValue("placeable.silo.storages.storage(0)#capacity")
- print(Produktion.debugPrefix .. "XML-Test amount raw: " .. tostring(xmlAmountPerHour))
- print(Produktion.debugPrefix .. "XML-Test capacity: " .. tostring(debugCapacity))
- end
-
- self.produktionFillType = xmlFillType
+self.produktionFillType = xmlFillType
if self.produktionFillType == nil or self.produktionFillType == "" then
self.produktionFillType = Produktion.fillType
end
@@ -57,8 +51,6 @@ function Produktion:onLoad(savegame)
if self.produktionAmountPerHour == nil then
self.produktionAmountPerHour = Produktion.amountPerHour
end
-
- self.produktionFirstUpdatePrinted = false
self.produktionAnimationSpeed = 0
self.produktionAnimationTargetSpeed = 0
self.produktionWasFull = false
@@ -72,7 +64,6 @@ function Produktion:onLoad(savegame)
if Produktion.debug then
print(Produktion.debugPrefix .. "Konfiguration: " .. tostring(self.produktionFillType) .. " / " .. tostring(self.produktionAmountPerHour) .. " L/h")
- print(Produktion.debugPrefix .. "Produktion.lua wurde geladen")
end
end
@@ -82,7 +73,7 @@ function Produktion:onFinalizePlacement()
end
if Produktion.debug then
- print(Produktion.debugPrefix .. "Mine platziert, Produktion aktiv")
+ print(Produktion.debugPrefix .. "Placeable aktiv: " .. tostring(self.produktionFillType))
end
end
@@ -90,15 +81,7 @@ end
-- Update
function Produktion:onUpdate(dt)
- if self.produktionFirstUpdatePrinted ~= true then
- self.produktionFirstUpdatePrinted = true
-
- if Produktion.debug then
- print(Produktion.debugPrefix .. "onUpdate läuft")
- end
- end
-
- local timeScale = 1
+local timeScale = 1
if g_currentMission ~= nil and g_currentMission.missionInfo ~= nil and g_currentMission.missionInfo.timeScale ~= nil then
timeScale = g_currentMission.missionInfo.timeScale