Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
6.03.00036 Mode 2 and Mode 5 (reversing) fix (#6782)
Browse files Browse the repository at this point in the history
Changed mode configuration, empty configs are allowed by default, this
fixes the reversing with trailer in mode 5 issue (#6777)

Fix unloader going round and round the combine when there's
(incorrectly) fruit detected on both sides (#6778)
  • Loading branch information
pvaiko authored Feb 7, 2021
1 parent fe9e768 commit 84f79d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ValidModeSetupHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ end
---checks if the "mode" is allowed and not disallowed for the vehicle
---@param int : cpMode to check
---@param vehicle : object, implement,vehicle
---@return boolean : isAllowedOkay, boolean : isDisallowedOkay
---@return boolean, boolean : true = setup allows this mode, true = setup does not disable this mode
function ValidModeSetupHandler:isModeValid(mode,object)
local validData = self.modeSetup[mode]
local isAllowedOkay = false
local isAllowedOkay = true
local isDisallowedOkay = true
if validData then
if validData.allowedSetups then
Expand Down
15 changes: 7 additions & 8 deletions config/ValidModeSetup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
A mode is disabled if one of the specializations under disallowedSetups was found, for either the vehicle or the implement, ..
AllowedSetups:
- if empty, or the setup is empty, this mode is enabled
- each Setup represents an AND Gate (the vehicle must have all of the specializations listed in the Setup group)
- multiple Setups represent an OR GATE
- as a combination this work like a "Disjunctive normal form"
Expand Down Expand Up @@ -67,7 +68,7 @@
<Specialization name="spec_trailer"/>
</Setup>
<Setup>
<!-- as an example spezial tools can be enabled by the xml file of the tool
<!-- as an example special tools can be enabled by the xml file of the tool
<SpecialTool name="fieldLinerHTS31.xml"/>
-->
</Setup>
Expand Down Expand Up @@ -100,19 +101,16 @@
</Setup>
</DisallowedSetups>
</Mode>
<!--AIDriver(5)
currently skipped in courseplay:getIsToolCombiValidForCpMode:getIsToolCombiValidForCpMode()!
as every cp driver setup is allowed to use the TransportMode!
-->
<!--AIDriver(5) -->
<Mode>
<AllowedSetups>
<Setup>

<!-- empty enables everything -->
</Setup>
</AllowedSetups>
<DisallowedSetups>
<Setup>

<!-- empty does not disable anything -->
</Setup>
</DisallowedSetups>
</Mode>
Expand Down Expand Up @@ -181,7 +179,8 @@
</AllowedSetups>
<DisallowedSetups>
<Setup>

<!-- this should disable mode 7 for pretty much everything -->
<Specialization name="spec_drivable"/>
</Setup>
</DisallowedSetups>
</Mode>
Expand Down
2 changes: 1 addition & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="47">
<version>6.03.00035</version>
<version>6.03.00036</version>
<author><![CDATA[Courseplay.devTeam]]></author>
<title><!-- en=English de=German fr=French es=Spanish ru=Russian pl=Polish it=Italian br=Brazilian-Portuguese cs=Chinese(Simplified) ct=Chinese(Traditional) cz=Czech nl=Netherlands hu=Hungary jp=Japanese kr=Korean pt=Portuguese ro=Romanian tr=Turkish -->
<en>CoursePlay SIX</en>
Expand Down

0 comments on commit 84f79d2

Please sign in to comment.