alle keno city bulds + zip buildtool

This commit is contained in:
2026-07-03 23:55:57 +02:00
parent cb703bd5c0
commit bd63215a8e
10 changed files with 97 additions and 43 deletions
BIN
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0build.ps1" %*
+69
View File
@@ -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")"
+5 -5
View File
@@ -9,8 +9,8 @@
<function>Kohlemine produziert Kohle</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>65000</price>
<dailyUpkeep>160</dailyUpkeep>
<price>600000</price>
<dailyUpkeep>500</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -78,7 +78,7 @@
<silo>
<loadingStation node="loadingTrigger" supportsExtension="true" storageRadius="50">
<loadTrigger triggerNode="loadingTrigger" fillLitersPerSecond="2000" dischargeNode="dischargeNode" fillTypes="MININGCOAL" aiNode="aiLoadingNode">
<loadTrigger triggerNode="loadingTrigger" fillLitersPerSecond="2000" dischargeNode="dischargeNode" fillTypes="DIRT" aiNode="aiLoadingNode">
<effectNode effectClass="PipeEffect" effectNode="pipeEffect" materialType="pipe" fadeTime="0.5" maxBending="0" controlPoint="4.8 0 0 0" />
<effectNode effectNode="pipeEffectSmoke" materialType="unloadingSmoke" fadeTime="0.5" />
<sounds>
@@ -88,11 +88,11 @@
</loadingStation>
<!-- <unloadingStation supportsExtension="true" storageRadius="50">
<unloadTrigger exactFillRootNode="exactFillRootNode" fillTypes="MININGCOAL" aiNode="aiUnloadingNode"/>
<unloadTrigger exactFillRootNode="exactFillRootNode" fillTypes="DIRT" aiNode="aiUnloadingNode"/>
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="MININGCOAL" capacity="400000" isExtension="false"/>
<storage node="storage" fillTypes="DIRT" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+3 -3
View File
@@ -9,8 +9,8 @@
<function>Erde mine produziert Erde</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>65000</price>
<dailyUpkeep>160</dailyUpkeep>
<price>180000</price>
<dailyUpkeep>150</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -92,7 +92,7 @@
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="DIRT" capacity="1000000" isExtension="false"/>
<storage node="storage" fillTypes="DIRT" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+4 -4
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable type="mineSilo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/placeable.xsd">
<produktion fillType="IRONORE" amountPerHour="120000" />
<produktion fillType="IRONORE" amountPerHour="45000" />
<storeData>
<name>LS25 Eisenmine</name>
@@ -9,8 +9,8 @@
<function>Eisenmine produziert Eisen</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>65000</price>
<dailyUpkeep>160</dailyUpkeep>
<price>1200000</price>
<dailyUpkeep>1000</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -92,7 +92,7 @@
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="IRONORE" capacity="600000" isExtension="false"/>
<storage node="storage" fillTypes="IRONORE" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+3 -3
View File
@@ -9,8 +9,8 @@
<function>Mine produziert PAYDIRT</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>80000</price>
<dailyUpkeep>120</dailyUpkeep>
<price>250000</price>
<dailyUpkeep>200</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -92,7 +92,7 @@
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="PAYDIRT" capacity="200000" isExtension="false"/>
<storage node="storage" fillTypes="PAYDIRT" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+4 -4
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable type="mineSilo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/placeable.xsd">
<produktion fillType="SILVERORE" amountPerHour="90000" />
<produktion fillType="SILVERORE" amountPerHour="50000" />
<storeData>
<name>LS25 Silbermine</name>
@@ -9,8 +9,8 @@
<function>Silbermine produziert Silber</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>65000</price>
<dailyUpkeep>160</dailyUpkeep>
<price>1500000</price>
<dailyUpkeep>1200</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -92,7 +92,7 @@
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="SILVERORE" capacity="600000" isExtension="false"/>
<storage node="storage" fillTypes="SILVERORE" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+3 -3
View File
@@ -9,8 +9,8 @@
<function>Steinbruch produziert STONE</function>
</functions>
<image>placeables/mine/store_mine.dds</image>
<price>95000</price>
<dailyUpkeep>160</dailyUpkeep>
<price>250000</price>
<dailyUpkeep>200</dailyUpkeep>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>NONE</brand>
@@ -92,7 +92,7 @@
</unloadingStation> -->
<storages>
<storage node="storage" fillTypes="STONE" capacity="200000" isExtension="false"/>
<storage node="storage" fillTypes="STONE" capacity="1500000" isExtension="false"/>
</storages>
</silo>
+4 -21
View File
@@ -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