Skip to content

Conversation

@Nad42
Copy link

@Nad42 Nad42 commented Sep 29, 2021

For issue #2013
Added in a small piece of code to check and select which cover needs to be opened depending on the selected fill type for multi-fillType Seeders (for example).

I don't think this is a complete solution to the larger issue however as this will not allow filling of both the fert and the seed on the same trip automatically (which it doesn't do currently anyway)…. I have no idea how to do that, it needs a "both" option adding to the fillType selection list I would guess.

Fix for bug #2013
@Nad42 Nad42 changed the title Update TrailerUtil.lua fo fix Issue #2013 Update TrailerUtil.lua to fix Issue #2013 Sep 29, 2021
@Axel32019
Copy link
Collaborator

Hallo @Nad42, Thanks for your time and effort to contribute to this project!
I had a look, short test and found the following:

  1. local coverToOpen = fillUnitIndex or #trailer.spec_cover.covers cause LUA error "attempt to index field 'spec_cover' (a nil value)"
    Did you test this?
  2. In general it is not that easy to only open the cover of the fillUnit with the selected fillType in AD HUD.
    It is common for AD to fill seeders with seeds, liquid- and fertilizer with only 1 load at 1 trigger if possible by that trigger, irrelevant if seeds or fertilizer is selected.
    To do so you have to open the 1st cover in driving direction first and activate the trigger with the fillType of this fillUnit, which might not be the 1st in spec_fillUnit.fillUnits.
    If filled or not, continue with 2nd cover and fillUnit...
    It has to be considered the drive speed as well to not miss the trigger and fillUnit.
    You may find this by a search for: fillTypeName == 'SEEDS' or fillTypeName == 'FERTILIZER' or fillTypeName == 'LIQUIDFERTILIZER'
    If you want to further work on this, I would say it has to be implemented somehow in TrailerModule.lua, but might require more modifications elsewhere.
    You see somethimes things are not that easy as it looks first, but feel free to continue - Support is always welcome :-)

@Nad42
Copy link
Author

Nad42 commented Oct 1, 2021

  1. Hmmm thats odd, I've been using it and tested it with a number of trailers. The main thing I cared about was that it allows my seeder to keep filling with seeds. Under what conditions did it throw that error?

  2. I totally understand this but it would take weeks to really get a hang of the full workings of AD scripting... and to be honest I don't really look forward to it because lua seems to be a horrendous language. In my opinion the whole pick up and deliver script needs a lot of rework to make it actually do a lot more checks, it is currently very hackish in the way it works, by passing lots of checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants