alle keno city bulds + zip buildtool
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
@echo off
|
||||||
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0build.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")"
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Kohlemine produziert Kohle</function>
|
<function>Kohlemine produziert Kohle</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>65000</price>
|
<price>600000</price>
|
||||||
<dailyUpkeep>160</dailyUpkeep>
|
<dailyUpkeep>500</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
<silo>
|
<silo>
|
||||||
<loadingStation node="loadingTrigger" supportsExtension="true" storageRadius="50">
|
<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 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" />
|
<effectNode effectNode="pipeEffectSmoke" materialType="unloadingSmoke" fadeTime="0.5" />
|
||||||
<sounds>
|
<sounds>
|
||||||
@@ -88,11 +88,11 @@
|
|||||||
</loadingStation>
|
</loadingStation>
|
||||||
|
|
||||||
<!-- <unloadingStation supportsExtension="true" storageRadius="50">
|
<!-- <unloadingStation supportsExtension="true" storageRadius="50">
|
||||||
<unloadTrigger exactFillRootNode="exactFillRootNode" fillTypes="MININGCOAL" aiNode="aiUnloadingNode"/>
|
<unloadTrigger exactFillRootNode="exactFillRootNode" fillTypes="DIRT" aiNode="aiUnloadingNode"/>
|
||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="MININGCOAL" capacity="400000" isExtension="false"/>
|
<storage node="storage" fillTypes="DIRT" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Erde mine produziert Erde</function>
|
<function>Erde mine produziert Erde</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>65000</price>
|
<price>180000</price>
|
||||||
<dailyUpkeep>160</dailyUpkeep>
|
<dailyUpkeep>150</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="DIRT" capacity="1000000" isExtension="false"/>
|
<storage node="storage" fillTypes="DIRT" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
<?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">
|
<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>
|
<storeData>
|
||||||
<name>LS25 Eisenmine</name>
|
<name>LS25 Eisenmine</name>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Eisenmine produziert Eisen</function>
|
<function>Eisenmine produziert Eisen</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>65000</price>
|
<price>1200000</price>
|
||||||
<dailyUpkeep>160</dailyUpkeep>
|
<dailyUpkeep>1000</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="IRONORE" capacity="600000" isExtension="false"/>
|
<storage node="storage" fillTypes="IRONORE" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Mine produziert PAYDIRT</function>
|
<function>Mine produziert PAYDIRT</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>80000</price>
|
<price>250000</price>
|
||||||
<dailyUpkeep>120</dailyUpkeep>
|
<dailyUpkeep>200</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="PAYDIRT" capacity="200000" isExtension="false"/>
|
<storage node="storage" fillTypes="PAYDIRT" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
<?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">
|
<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>
|
<storeData>
|
||||||
<name>LS25 Silbermine</name>
|
<name>LS25 Silbermine</name>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Silbermine produziert Silber</function>
|
<function>Silbermine produziert Silber</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>65000</price>
|
<price>1500000</price>
|
||||||
<dailyUpkeep>160</dailyUpkeep>
|
<dailyUpkeep>1200</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="SILVERORE" capacity="600000" isExtension="false"/>
|
<storage node="storage" fillTypes="SILVERORE" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<function>Steinbruch produziert STONE</function>
|
<function>Steinbruch produziert STONE</function>
|
||||||
</functions>
|
</functions>
|
||||||
<image>placeables/mine/store_mine.dds</image>
|
<image>placeables/mine/store_mine.dds</image>
|
||||||
<price>95000</price>
|
<price>250000</price>
|
||||||
<dailyUpkeep>160</dailyUpkeep>
|
<dailyUpkeep>200</dailyUpkeep>
|
||||||
<lifetime>1000</lifetime>
|
<lifetime>1000</lifetime>
|
||||||
<rotation>0</rotation>
|
<rotation>0</rotation>
|
||||||
<brand>NONE</brand>
|
<brand>NONE</brand>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</unloadingStation> -->
|
</unloadingStation> -->
|
||||||
|
|
||||||
<storages>
|
<storages>
|
||||||
<storage node="storage" fillTypes="STONE" capacity="200000" isExtension="false"/>
|
<storage node="storage" fillTypes="STONE" capacity="1500000" isExtension="false"/>
|
||||||
</storages>
|
</storages>
|
||||||
</silo>
|
</silo>
|
||||||
|
|
||||||
|
|||||||
+2
-19
@@ -1,4 +1,4 @@
|
|||||||
-- Variablen
|
-- Variablen
|
||||||
|
|
||||||
Produktion = {}
|
Produktion = {}
|
||||||
|
|
||||||
@@ -42,12 +42,6 @@ end
|
|||||||
function Produktion:onLoad(savegame)
|
function Produktion:onLoad(savegame)
|
||||||
local xmlFillType = self.xmlFile:getValue("placeable.produktion#fillType", Produktion.fillType)
|
local xmlFillType = self.xmlFile:getValue("placeable.produktion#fillType", Produktion.fillType)
|
||||||
local xmlAmountPerHour = self.xmlFile:getValue("placeable.produktion#amountPerHour", Produktion.amountPerHour)
|
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
|
if self.produktionFillType == nil or self.produktionFillType == "" then
|
||||||
self.produktionFillType = Produktion.fillType
|
self.produktionFillType = Produktion.fillType
|
||||||
@@ -57,8 +51,6 @@ function Produktion:onLoad(savegame)
|
|||||||
if self.produktionAmountPerHour == nil then
|
if self.produktionAmountPerHour == nil then
|
||||||
self.produktionAmountPerHour = Produktion.amountPerHour
|
self.produktionAmountPerHour = Produktion.amountPerHour
|
||||||
end
|
end
|
||||||
|
|
||||||
self.produktionFirstUpdatePrinted = false
|
|
||||||
self.produktionAnimationSpeed = 0
|
self.produktionAnimationSpeed = 0
|
||||||
self.produktionAnimationTargetSpeed = 0
|
self.produktionAnimationTargetSpeed = 0
|
||||||
self.produktionWasFull = false
|
self.produktionWasFull = false
|
||||||
@@ -72,7 +64,6 @@ function Produktion:onLoad(savegame)
|
|||||||
|
|
||||||
if Produktion.debug then
|
if Produktion.debug then
|
||||||
print(Produktion.debugPrefix .. "Konfiguration: " .. tostring(self.produktionFillType) .. " / " .. tostring(self.produktionAmountPerHour) .. " L/h")
|
print(Produktion.debugPrefix .. "Konfiguration: " .. tostring(self.produktionFillType) .. " / " .. tostring(self.produktionAmountPerHour) .. " L/h")
|
||||||
print(Produktion.debugPrefix .. "Produktion.lua wurde geladen")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,7 +73,7 @@ function Produktion:onFinalizePlacement()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Produktion.debug then
|
if Produktion.debug then
|
||||||
print(Produktion.debugPrefix .. "Mine platziert, Produktion aktiv")
|
print(Produktion.debugPrefix .. "Placeable aktiv: " .. tostring(self.produktionFillType))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -90,14 +81,6 @@ end
|
|||||||
-- Update
|
-- Update
|
||||||
|
|
||||||
function Produktion:onUpdate(dt)
|
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
|
if g_currentMission ~= nil and g_currentMission.missionInfo ~= nil and g_currentMission.missionInfo.timeScale ~= nil then
|
||||||
|
|||||||
Reference in New Issue
Block a user