Skip to content

Commit

Permalink
Port to FS22.
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnwop committed Mar 18, 2022
1 parent 0654381 commit d6a2ad4
Show file tree
Hide file tree
Showing 21 changed files with 329 additions and 276 deletions.
29 changes: 23 additions & 6 deletions README-de.md
@@ -1,5 +1,5 @@
# ProSeed for Farming Simulator 19
![For Farming Simulator 19](https://img.shields.io/badge/Farming%20Simulator-19-FF7C00.svg) [![Releases](https://img.shields.io/github/release/stijnwop/proSeed.svg)](https://github.com/stijnwop/proSeed/releases)
# ProSeed for Farming Simulator 22
![For Farming Simulator 19](https://img.shields.io/badge/Farming%20Simulator-22-10BEFF.svg) [![Releases](https://img.shields.io/github/release/stijnwop/proSeed.svg)](https://github.com/stijnwop/proSeed/releases)

###### Readme in English can be found [here](README.md).

Expand All @@ -10,7 +10,7 @@ Mit ProSeed kannst du Fahrgassen erstellen (optional mit Vorauflaufmarkierung),
Nur Wopster darf jeglichen Code als Mod auf anderen Modseiten oder Dateihostern veröffentlichen. Der Code ist offen für die eigene Nutzung, benenne Mich in den Credits. Ich gebe keine Unterstützung von irgendeiner 'Version' von ProSeed, die von einer dubiosen Modseite kommt. Versionen werden von Mir bestimmt und nicht von irgendeiner anderen Seite. Dies verwirrt nur und hindert die Entwicklung, was mir keinen Spaß macht!

## Danksagung
Besonderen Dank an gotchTOM und webalizer für die Freigabe einer Neuauflage für LS19!
Besonderen Dank an gotchTOM und webalizer für die Freigabe einer Neuauflage für LS19/LS22!

## Warnung!
Bedenke, dies ist eine ***ENTWICKLER VERSION***!
Expand All @@ -29,7 +29,7 @@ Alle offiziellen Veröffentlichungen werden im offizeillen ModHub verfügbar sei

Zur Installation:

Windows: Kopiere die `FS19_proSeed_rc_<version>.zip` in dein `My Games\FarmingSimulator2019\mods` Verzeichnis.
Windows: Kopiere die `FS22_proSeed.zip` in dein `My Games\FarmingSimulator2022\mods` Verzeichnis.

## Dokumentation

Expand Down Expand Up @@ -75,10 +75,27 @@ Beispiel: im HUD Bild oben ist die Gesamtzahl 2 `x / 2` hier sollte man also mit
Benutze die halbseitge Abschaltung um die erste Spur zu erstellen.

Bei Nutzung von GuidanceSteering muss die erste Spur (0) am Feldrand sein (`ALT + HOME`).
Für die zweite Spur verschiebe die GS Spur um die halbe Arbeitsbreite Richtung Feldrand.
Für die zweite Spur verschiebe die GS Spur um die halbe Arbeitsbreite Richtung Feldrand.

Eine Beschreibung von möglichen Arbeitsbreiten und Abständen findest du in diesen PDF Dokumenten: [proSeed.pdf](https://github.com/stijnwop/proSeed/raw/master/docs/ProSeed.pdf) (Page 1: Deutsch; Page 2: Englisch)

#### Using tramline animation
You can trigger an animation once the tramlines are active like so:

```xml
<vehicle>
<proSeed>
<tramLinesAnimation name="tramLines" speed="1"/>
</proSeed>

<animations>
<animation name="tramLines">
<part node="NODE_NAME" startTime="0" endTime="1" startTrans="0 1 0" endTrans="0 0 0" />
</animation>
</animations>
</vehicle>
```

## Copyright
Copyright (c) 2020 [Wopster](https://github.com/stijnwop).
Copyright (c) 2022 [Wopster](https://github.com/stijnwop).
Alle Rechte vorbehalten.
34 changes: 26 additions & 8 deletions README.md
@@ -1,5 +1,5 @@
# ProSeed for Farming Simulator 19
![For Farming Simulator 19](https://img.shields.io/badge/Farming%20Simulator-19-FF7C00.svg) [![Releases](https://img.shields.io/github/release/stijnwop/proSeed.svg)](https://github.com/stijnwop/proSeed/releases)
# ProSeed for Farming Simulator 22
![For Farming Simulator 22](https://img.shields.io/badge/Farming%20Simulator-22-10BEFF.svg) [![Releases](https://img.shields.io/github/release/stijnwop/proSeed.svg)](https://github.com/stijnwop/proSeed/releases)

###### Readme in German can be found [here](README-de.md).

Expand All @@ -11,7 +11,7 @@ Only Wopster is allowed to publish any of this code as a mod to any mod site, or


## Special thanks to
Special thanks to gotchTOM and webalizer for allowing me to redo the mod for FS19!
Special thanks to gotchTOM and webalizer for allowing me to redo the mod for FS19/FS22!

## Warning!
Please be aware that this is a ***DEVELOPMENT VERSION***!
Expand All @@ -30,7 +30,7 @@ All official releases will be available at the offical Farming Simulator ModHub.

For installing the release:

Windows: Copy the `FS19_proSeed_rc_<version>.zip` into your `My Games\FarmingSimulator2019\mods` directory.
Windows: Copy the `FS22_proSeed.zip` into your `My Games\FarmingSimulator2022\mods` directory.

## Documentation

Expand Down Expand Up @@ -72,14 +72,32 @@ In the table below the possible modes are explained. You can toggle the modes by
> **NOTE: In order to use the mode `Auto` the [GuidanceSteering](https://www.farming-simulator.com/mod.php?mod_id=140328&title=fs2019) mod is required!**
#### How to start
If the number of total amount of lanes is even, always start with a half track otherwise the distance to the edge of the field will not be valid.
If the number of total amount of lanes is even, always start with a half track otherwise the distance to the edge of the field will not be valid.
E.g. in the HUD above you have a total of 2 lanes `x / 2` so in this case you start with a half line.

Use the halfside shutoff function for creating the first track.
When using GuidanceSteering, the first track of GS must be aligned at the edge of the field and set to zero (`ALT + HOME`).
Use the halfside shutoff function for creating the first track.
When using GuidanceSteering, the first track of GS must be aligned at the edge of the field and set to zero (`ALT + HOME`).
For the second track shift the GS track by half the working width towards the field edge.

A description of possible working widths and distances is given in this neat PDF file: [proSeed.pdf](https://github.com/stijnwop/proSeed/raw/master/docs/ProSeed.pdf) (Page 1: German; Page 2: English)

#### Using tramline animation
You can trigger an animation once the tramlines are active like so:

```xml
<vehicle>
<proSeed>
<tramLinesAnimation name="tramLines" speed="1"/>
</proSeed>

<animations>
<animation name="tramLines">
<part node="NODE_NAME" startTime="0" endTime="1" startTrans="0 1 0" endTrans="0 0 0" />
</animation>
</animations>
</vehicle>
```

## Copyright
Copyright (c) 2020 [Wopster](https://github.com/stijnwop).
Copyright (c) 2022 [Wopster](https://github.com/stijnwop).
All rights reserved.
Binary file modified icon.dds
Binary file not shown.
33 changes: 7 additions & 26 deletions modDesc.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="51">
<modDesc descVersion="64">
<author>Wopster</author>
<version>1.0.0.1</version>
<version>2.0.0.0</version>
<title>
<en>ProSeed</en>
</title>
Expand All @@ -10,70 +10,51 @@
<![CDATA[ProSeed adds a bundle of functionality to enhance sowing machines in the game.
With ProSeed you're able to create tramlines (with optional pre-emergence marking), halfside shutoff for creating the perfect tramlines, fertilizer shutoff and active feedback with sounds.
NOTE: In order to use the mode "Auto" the Guidance Steering mod is required!
For more information and how to use it read <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">the manual on my GitHub</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</en>
<de>
<![CDATA[ProSeed erweitert Sähmaschinen mit neuen Funktionen um sie zu weiter zu verbessern.
Mit ProSeed kannst du Fahrgassen erstellen (optional mit Vorauflaufmarkierung), Sähmaschinen halbseitig abschalten um perfekte Fahrgassen erstellen zu können, die Unterfußdüngung kann optional deaktiviert werden und es gibt aktives feedback mit Sounds.
<![CDATA[ProSeed erweitert Sämaschinen mit neuen Funktionen um sie zu weiter zu verbessern.
Mit ProSeed kannst du Fahrgassen erstellen (optional mit Vorauflaufmarkierung), Sämaschinen halbseitig abschalten um perfekte Fahrgassen erstellen zu können. Die Unterfußdüngung kann optional deaktiviert werden und es gibt dir Rückmeldung durch akustische Signale.
HINWEIS: Um den "Auto" Modus zu verwenden, ist der Mod Guidance Steering notwendig!
Für weitere Informationen, lese dir die <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">manual aus dem Github durch</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</de>
<fr>
<![CDATA[ProSeed ajoute un ensemble de fonctionnalités pour améliorer les semoirs dans le jeu.
Avec ProSeed, vous pouvez créer des lignes de passage (avec marquage de pré-levée en option), une fermeture à mi-chemin pour créer des lignes de passage parfaites, une coupure des fertilisants et un retour d'information actif avec des sons.
Pour plus d'informations, veuillez lire le manuel sur mon <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">Github</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</fr>
<nl>
<![CDATA[ProSeed voegt een bundel aan functies toe om zaaimachines in het spel te verbeteren.
Met ProSeed heb je de mogelijkheid om rijpaden te maken (met optionele voor-opkomst markering), halfzijdige uitschakeling om perfecte rijpaden te creëren, bemesting van kunstmest uit te schakelen en actieve feedback met geluid.
Voor meer informatie, lees de handleiding op mijn <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">GitHub</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</nl>
<it>
<![CDATA[La mod ProSeed aggiunge un pacchetto di funzionalità per migliorare le seminatrici nel gioco.
Con ProSeed è possibile creare delle carreggiate (opzionalmente per trattamenti di pre-emergenza), spegnere elementi di semina, disattivare il fertilizzante e avere un feedback sonoro.
For more information and how to use it read <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">the manual on my GitHub</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</it>
<ru>
<![CDATA[ProSeed добавляет набор функций для улучшения сеялок в игре.
С помощью ProSeed вы можете создавать технологические колеи (с опциональной маркировкой до появления всходов), отключение половины сеялки для создания идеальных технологических колей, отключение подачи удобрения и активную обратную связь со звуками.
For more information and how to use it read <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">the manual on my GitHub</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</ru>
<cz>
<![CDATA[ProSeed přidává mnoho funkcí pro vylepšení secích strojů ve hře.
S ProSeed můžete vytvořit kolejové řádky (s volitelným nastavením), vypnout polovinu secího stroje pro vytvoření dokonalého kolejového řádku, vypnout přihnojování hnojivem a aktivovat zpětnou vazbu se zvuky.
For more information and how to use it read <a href="https://github.com/stijnwop/proSeed/blob/master/README.md">the manual on my GitHub</a>.
Changelog:
- Hotfix for tramline activation on wrong track number for even amount of lanes.
]]>
</cz>
<hu>
Expand All @@ -88,7 +69,7 @@ További információért, és a kezelési útmutató elolvasásához látogasd
<multiplayer supported="true"/>

<extraSourceFiles>
<sourceFile filename="src/loader.lua"/>
<sourceFile filename="src/main.lua"/>
</extraSourceFiles>

<actions>
Expand Down
6 changes: 3 additions & 3 deletions src/ProSeed.lua
Expand Up @@ -11,7 +11,7 @@ ProSeed = {}

local ProSeed_mt = Class(ProSeed)

function ProSeed:new(mission, i18n, inputBinding, gui, soundManager, modDirectory, modName)
function ProSeed.new(mission, i18n, inputBinding, gui, soundManager, modDirectory, modName)
local self = setmetatable({}, ProSeed_mt)

self.version = 1.0
Expand All @@ -27,7 +27,7 @@ function ProSeed:new(mission, i18n, inputBinding, gui, soundManager, modDirector
self.soundManager = soundManager

local uiFilename = Utils.getFilename("resources/hud/proSeed.png", modDirectory)
self.hud = InteractiveHUD:new(mission, i18n, inputBinding, gui, modDirectory, uiFilename)
self.hud = InteractiveHUD.new(mission, i18n, inputBinding, gui, modDirectory, uiFilename)

self:loadSamples()

Expand Down Expand Up @@ -79,7 +79,7 @@ function ProSeed.installSpecializations(vehicleTypeManager, specializationManage
specializationManager:addSpecialization("proSeedTramLines", "ProSeedTramLines", Utils.getFilename("src/vehicle/ProSeedTramLines.lua", modDirectory), nil)
specializationManager:addSpecialization("proSeedSowingExtension", "ProSeedSowingExtension", Utils.getFilename("src/vehicle/ProSeedSowingExtension.lua", modDirectory), nil)

for typeName, typeEntry in pairs(vehicleTypeManager:getVehicleTypes()) do
for typeName, typeEntry in pairs(vehicleTypeManager:getTypes()) do
if SpecializationUtil.hasSpecialization(SowingMachine, typeEntry.specializations) then
vehicleTypeManager:addSpecialization(typeName, modName .. ".proSeedTramLines")
vehicleTypeManager:addSpecialization(typeName, modName .. ".proSeedSowingExtension")
Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedCreateTramLineEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedCreateTramLineEvent, "ProSeedCreateTramLineEvent")

---@return ProSeedCreateTramLineEvent
function ProSeedCreateTramLineEvent:emptyNew()
local self = Event:new(ProSeedCreateTramLineEvent_mt)
local self = Event.new(ProSeedCreateTramLineEvent_mt)
return self
end

Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedDataEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedDataEvent, "ProSeedDataEvent")

---@return ProSeedDataEvent
function ProSeedDataEvent:emptyNew()
local self = Event:new(ProSeedDataEvent_mt)
local self = Event.new(ProSeedDataEvent_mt)
return self
end

Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedHalfSideShutoffEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedHalfSideShutoffEvent, "ProSeedHalfSideShutoffEvent")

---@return ProSeedHalfSideShutoffEvent
function ProSeedHalfSideShutoffEvent:emptyNew()
local self = Event:new(ProSeedHalfSideShutoffEvent_mt)
local self = Event.new(ProSeedHalfSideShutoffEvent_mt)
return self
end

Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedModeEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedModeEvent, "ProSeedModeEvent")

---@return ProSeedModeEvent
function ProSeedModeEvent:emptyNew()
local self = Event:new(ProSeedModeEvent_mt)
local self = Event.new(ProSeedModeEvent_mt)
return self
end

Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedResetHectareSessionEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedResetHectareSessionEvent, "ProSeedResetHectareSessionEvent

---@return ProSeedResetHectareSessionEvent
function ProSeedResetHectareSessionEvent:emptyNew()
local self = Event:new(ProSeedResetHectareSessionEvent_mt)
local self = Event.new(ProSeedResetHectareSessionEvent_mt)
return self
end

Expand Down
2 changes: 1 addition & 1 deletion src/events/ProSeedTramLineDataEvent.lua
Expand Up @@ -15,7 +15,7 @@ InitEventClass(ProSeedTramLineDataEvent, "ProSeedTramLineDataEvent")

---@return ProSeedTramLineDataEvent
function ProSeedTramLineDataEvent:emptyNew()
local self = Event:new(ProSeedTramLineDataEvent_mt)
local self = Event.new(ProSeedTramLineDataEvent_mt)
return self
end

Expand Down

0 comments on commit d6a2ad4

Please sign in to comment.