Skip to content

Commit

Permalink
6.01.00209 Remove 'return to first point' from course generator Cours…
Browse files Browse the repository at this point in the history
…eplay#3739

Vehicles (except combines) will always return to first point now if the
course starts on the headland. This will later become an option on the
HUD so you will be able to turn it off.

Implements are turned off and folded on the way back to the first point.
  • Loading branch information
pvaiko committed May 6, 2019
1 parent c8ea554 commit 01c03c4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
14 changes: 0 additions & 14 deletions course-generator/CourseGeneratorScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -365,20 +365,6 @@ function CourseGeneratorScreen:onClickSkipRows( state )
self.vehicle.cp.courseGeneratorSettings.nRowsToSkip = state - 1
end

-----------------------------------------------------------------------------------------------------
-- Return to first point
function CourseGeneratorScreen:onOpenReturnToFirstPoint( element, parameter )
local texts = {}
table.insert( texts, courseplay:loc( 'COURSEPLAY_DEACTIVATED'))
table.insert( texts, courseplay:loc( 'COURSEPLAY_ACTIVATED'))
element:setTexts( texts )
element:setState( self.vehicle.cp.returnToFirstPoint and 2 or 1 )
end

function CourseGeneratorScreen:onClickReturnToFirstPoint( state )
self.vehicle.cp.returnToFirstPoint = state == 2
end

-----------------------------------------------------------------------------------------------------
-- Multiple tools
function CourseGeneratorScreen:onOpenMultiTools( element, parameter )
Expand Down
10 changes: 1 addition & 9 deletions course-generator/CourseGeneratorScreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<GuiElement type="text" profile="cpHeader" position="20px -10px" text="$l10n_COURSEPLAY_ADVANCED_COURSE_GENERATOR_SETTINGS" />
<GuiElement type="bitmap" profile="cpSettingsBg" position="20px -60px" id="settingsContainer">

<GuiElement type="boxLayout" profile="cpSettingsLayout" size="600px 550px" id="boxLayoutTop">
<GuiElement type="boxLayout" profile="cpSettingsLayout" size="600px 500px" id="boxLayoutTop">

<GuiElement type="multiTextOption" profile="cpMultiTextOption" id="fieldSelector" toolTip="$l10n_COURSEPLAY_FIELD_EDGE_PATH" onOpen="onOpenFieldSelector" onClick="onClickFieldSelector">
<GuiElement type="button" profile="cpMultiTextOptionLeft" />
Expand Down Expand Up @@ -62,14 +62,6 @@
<GuiElement type="bitmap" profile="cpMultiTextOptionBg" />
</GuiElement>

<GuiElement type="multiTextOption" profile="cpMultiTextOption" id="returnToFirstPoint" toolTip="$l10n_COURSEPLAY_RETURN_TO_FIRST_POINT" onOpen="onOpenReturnToFirstPoint" onClick="onClickReturnToFirstPoint">
<GuiElement type="button" profile="cpMultiTextOptionLeft" />
<GuiElement type="button" profile="cpMultiTextOptionRight"/>
<GuiElement type="text" profile="cpMultiTextOptionText" />
<GuiElement type="text" profile="cpMultiTextOptionTitle" text="$l10n_COURSEPLAY_RETURN_TO_FIRST_POINT"/>
<GuiElement type="bitmap" profile="cpMultiTextOptionBg" />
</GuiElement>

<GuiElement type="multiTextOption" profile="cpMultiTextOption" id="multiTools" toolTip="$l10n_COURSEPLAY_MULTI_TOOLS" onOpen="onOpenMultiTools" onClick="onClickMultiTools" wrap="false">
<GuiElement type="button" profile="cpMultiTextOptionLeft"/>
<GuiElement type="button" profile="cpMultiTextOptionRight"/>
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="40">
<version>6.01.00208</version>
<version>6.01.00209</version>
<author><![CDATA[Courseplay.devTeam]]></author>
<title>
<br>CoursePlay SIX</br>
Expand Down

0 comments on commit 01c03c4

Please sign in to comment.