RealismusModding / FS17_seasons

Farming Simulator 17 seasons mod
https://www.realismusmodding.com/mods/seasons
75 stars 55 forks source link

Compacting chaff after snowfall #722

Closed joskuijpers closed 6 years ago

joskuijpers commented 6 years ago

Anyone have problems compacting the chaff when it's after snowing and the ground is full of snow? It's on The Valley 490k of chaff in the silo and it's staying at 37% compacted it won't go any higher

joskuijpers commented 6 years ago

Confirmed: snow breaks compacting

joskuijpers commented 6 years ago

Not at 37% per se. I got it stuck at 29%.

After removing all snow, still can't continue compacting.

Save + Restart the game is a workaround.

joskuijpers commented 6 years ago

After touching snow with the tractor, compaction stops working. The code seems to think the vehicle wheels do not touch the material.

@stijnwop

stijnwop commented 6 years ago

Mm good catch, i believe the silo looks at the contact value of every wheel. As workaround on the snowTracks to avoid fast color switches (when leaving the snow) in the track color i forced the .contact value on WHEEL_NO_CONTACT.

https://github.com/RealismusModding/FS17_seasons/blob/7176cce7f85e6648d748702ef496cbe3908b0507/src/vehicles/specializations/ssSnowTracks.lua#L97

Big chance that's affecting it. Need to look into it a bit more..

joskuijpers commented 6 years ago

wheel.contact = Vehicle.WHEEL_NO_CONTACT is true, being the issue.

So yes that is a very good guess.

joskuijpers commented 6 years ago

I guess what you are doing there is nothing something we should be doing 😛

stijnwop commented 6 years ago

Delete it before it lays eggs!! 😄

joskuijpers commented 6 years ago

Will do, but go to figure out why it was needed and find a way to 'fix' that without this nasty hack.

joskuijpers commented 6 years ago

I wonder if there is a cleaner way to do all these track things...

joskuijpers commented 6 years ago

Removed that line: now compacting snow also counts as compacting chaff. heh.

EDIT: If you are not used a massively scaled compactor like I do, it remains the same amount of work though..

stijnwop commented 6 years ago

The thing is that its all happening before all the specs all called. So the color will always change every frame before we reset it to white again. Since Giants did not make a separate function on this it's really hard todo a clean hook on this.

Yeah there probably was a "small" reason why i put that in the code. But as soon the vehicle lost contact to snow it should just reset.. 🤔

joskuijpers commented 6 years ago

You can figure this out,. :)

joskuijpers commented 6 years ago

Fixed