Skip to content

Commit

Permalink
Some adjustements and WIP translation
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Apr 5, 2024
1 parent 9c43bf1 commit c4a920f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 6 deletions.
50 changes: 50 additions & 0 deletions config/MasterTranslations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,56 @@
<Text language="en"><![CDATA[Unloads to an unload trigger]]></Text>
</Translation>
</Category>
<Category name="Hud settings">
<Translation name="CP_hud_settings_hudStartAt_title">
<Text language="de"><![CDATA[TODO: CP AI Job:]]></Text>
<Text language="en"><![CDATA[TODO: CP AI Job:]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_fieldWork_first">
<Text language="de"><![CDATA[TODO: Feldarbeit: erster Wegpunkt]]></Text>
<Text language="en"><![CDATA[TODO: Feldarbeit: erster Wegpunkt]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_fieldWork_nearest">
<Text language="de"><![CDATA[TODO: Feldarbeit: nächster Wegpunkt]]></Text>
<Text language="en"><![CDATA[TODO: Feldarbeit: nächster Wegpunkt]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_fieldWork_last">
<Text language="de"><![CDATA[TODO: Feldarbeit: letzter Wegpunkt]]></Text>
<Text language="en"><![CDATA[TODO: Feldarbeit: letzter Wegpunkt]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_baleFinder">
<Text language="de"><![CDATA[TODO: Ballen sammeln]]></Text>
<Text language="en"><![CDATA[TODO: Ballen sammeln]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_bunkerSilo">
<Text language="de"><![CDATA[TODO: Bunkersilo]]></Text>
<Text language="en"><![CDATA[TODO: Bunkersilo]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_siloLoader">
<Text language="de"><![CDATA[TODO: Silo Lader]]></Text>
<Text language="en"><![CDATA[TODO: Silo Lader]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_unloader_harvester">
<Text language="de"><![CDATA[TODO: Drescher abladen]]></Text>
<Text language="en"><![CDATA[TODO: Drescher abladen]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_unloader_loader">
<Text language="de"><![CDATA[TODO: Lader abladen]]></Text>
<Text language="en"><![CDATA[TODO: Lader abladen]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_street_driveTo">
<Text language="de"><![CDATA[TODO: Drive to]]></Text>
<Text language="en"><![CDATA[TODO: Drive to]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_street_unloadOrRefill">
<Text language="de"><![CDATA[TODO: Unload or refill]]></Text>
<Text language="en"><![CDATA[TODO: Unload or refill]]></Text>
</Translation>
<Translation name="CP_hud_settings_hudStartAt_street_loadAndUnload">
<Text language="de"><![CDATA[TODO: Load and unload]]></Text>
<Text language="en"><![CDATA[TODO: Load and unload]]></Text>
</Translation>
</Category>
<Category name="Vehicle settings">
<Translation name="CP_vehicle_setting_title">
<Text language="de"><![CDATA[Fahrzeugeinstellungen für (%s)]]></Text>
Expand Down
6 changes: 0 additions & 6 deletions config/jobParameters/FieldWorkJobParameterSetup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,11 @@
<Value name="START_AT_NEAREST_POINT" isDisabled="isFieldWorkHudModeDisabled">1</Value>
<Value name="START_AT_FIRST_POINT" isDisabled="isFieldWorkHudModeDisabled">2</Value>
<Value name="START_AT_LAST_POINT" isDisabled="isFieldWorkHudModeDisabled">3</Value>
<!-- <Value name="START_AT_BUNKER_SILO" isDisabled="isBunkerSiloHudModeDisabled">4</Value> -->
<!-- Only for bunker silo mode in the hud!-->
<!-- <Value name="START_AT_SILO_LOADING" isDisabled="isSiloLoadingHudModeDisabled">5</Value> -->
<!-- Only for shovel silo loadings mode in the hud!-->
</Values>
<Texts>
<Text>nearest</Text>
<Text>first</Text>
<Text>last</Text>
<!-- <Text>bunkerSilo</Text>
<Text>siloLoader</Text> -->
</Texts>
</Setting>
</SettingSubTitle>
Expand Down
5 changes: 5 additions & 0 deletions scripts/specializations/CpAICombineUnloader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ end
function CpAICombineUnloader:getCpStartableJob(superFunc, isStartedByHud)
local spec = self.spec_cpAICombineUnloader
if isStartedByHud and self:cpIsHudUnloaderJobSelected() then
if self:cpGetHudStartingPointSetting():getValue() == CpHud.hudSettings.START_AT_UNLOADER_HARVESTER then
spec.cpJob:getCpJobParameters().unloadTarget:setValue(CpCombineUnloaderJobParameters.UNLOAD_COMBINE)
else
spec.cpJob:getCpJobParameters().unloadTarget:setValue(CpCombineUnloaderJobParameters.UNLOAD_SILO_LOADER)
end
return self:getCanStartCpCombineUnloader() and spec.cpJob
end
return superFunc(self, isStartedByHud) or self:getCanStartCpCombineUnloader() and spec.cpJob
Expand Down
7 changes: 7 additions & 0 deletions scripts/specializations/CpAIFieldWorker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ end
function CpAIFieldWorker:getCpStartableJob(superFunc, isStartedByHud)
local spec = self.spec_cpAIFieldWorker
if isStartedByHud and self:cpIsHudFieldWorkJobSelected() then
if self:cpGetHudStartingPointSetting():getValue() == CpHud.hudSettings.START_AT_FIELDWORK_FIRST_POINT then
spec.cpJob:getCpJobParameters().startAt:setValue(CpFieldWorkJobParameters.START_AT_FIRST_POINT)
elseif self:cpGetHudStartingPointSetting():getValue() == CpHud.hudSettings.START_AT_FIELDWORK_NEAREST_POINT then
spec.cpJob:getCpJobParameters().startAt:setValue(CpFieldWorkJobParameters.START_AT_NEAREST_POINT)
else
spec.cpJob:getCpJobParameters().startAt:setValue(CpFieldWorkJobParameters.START_AT_LAST_POINT)
end
return self:getCanStartCpFieldWork() and self:hasCpCourse() and spec.cpJob
end
return superFunc(self, isStartedByHud) or self:getCanStartCpFieldWork() and self:hasCpCourse() and spec.cpJob
Expand Down

0 comments on commit c4a920f

Please sign in to comment.