When I plant a seed using a seed drill or a advanced seed drill the tile will not change into "dirt: seed (plant seed)" like it does with planting manually by player but it stays "mound of dirt: seed (plant seed)".
The plants grow correctly, but one I want to reap them my tractor cant move there because it crashes into the mount of dirt.
This problem started since I recently upgraded my build version. Before this upgrade I could plant and reap as one would expected.
I think with the upgrade the cars no longer can drive over mounds.
Steps to reproduce the behavior:
Expected behavior
I would assume that both of these planting actions would produce same results. Since the vehicle can not drive on mounds of dirt I would assume they both become flat dirt. Or add a vehicle extension that can flatten the mound without destroying the seeds. I tried the large steel drum from road roller which I assumed could work on a bit of dirt XD but I still crashed into it. Like this I have to manually work through the whole field which somehow defeats the automatization of farming.
Versions and configuration(please complete the following information):
I am a bit of a programer so first I tryied to see if i could find the problemthis is where my search ended(I am not very familiar with C++ much and the solutions is a bit too big for my quick look):
seeder:
file: vehicle_use.cpp
function: void vehicle::operate_planter()
line: around 1025 g->m.furn_set( loc, f_plant_seed ); <= this is the only line that is run when the seed is planted by a drill
player examine
file: iexamine.cpp
function: void iexamine::plant_seed( player &p, const tripoint &examp, const itype_id &seed_id )
line: around 1759 g->m.set( examp, t_dirt, f_plant_seed ); <= this seems to be the place where the tile is changed to dirt
PS: Great work guys I love the game this is the first bug I encountered that worsened the game experience for me im about 1-2 years of playing.
@peperov Do you want to take this one? It seems pretty straightforward.
Oh thanks for the highlight. I should be able to take this on, but I am limited in my time due to day job.
If it's no problem that it could take a few days, I'll do it.
EDIT: If it's really only this one line I can do it within today; I like to hands-on test the changes.
Do not worry about time - we have no SLA here.
@Tomas-Waoetfi-Florek I did a quick test run, but something is off: I can't use the seed planter because tractor and also planter ram into the dirt mound instead of rolling over it. So in my case the problem occurs even before the planter can plant a seed.
Maybe I'm using it the wrong way, can you provide a save file of your procedure? I'll add some screenshots of my failed approaches.


Hi,
Ya that is the problem vehicle cannot pass over mound of dirt(parts that contain any sort of frame at least). The seed drill however have PROTRUSION flag so there is no frame needed(or there actualy cant be a frame there) on the place where they are maybe that is why they do not collide.
I have a vehicle which last parts are drills and just before them are plows and as I plow I plant the seeds.

I managed to work around the fact that the mound of dirt is left there like this.
But when reaping I run into the problem you did because I cannot drive over the mounds.
Now I decided to report the bug as seeding inconsistency(which they are as I found out) because I thought that the fact that cars hit the mound is a new feature(there probably was a design decision that vehicles should behave like that). Depending on how "big" the mound is it makes sense. And since there is only one size in the game it is perfectly fine in my opinion.
The other way to look at this is to consider that some cars should be able to run over mound (tractors, SUV, trucks, tanks....) but that makes the solution more complex and probably should be a different feature. For now keeping the planting consistent is a workaround for the farming automatization and seemed as the path of least resistance to me XD.
Ps: Sorry for the late response was a long hectic day and only now I got to my PC
A tractor should definitely be able to drive over a planted mound, maybe we shifted the terrain definition at some point.
Well I don't know the project and only spent few hours looking into it mostly the jsons to see if I could fix it there only for the last hour or so I checked the code(did not even setup an environment just went trough using notepad++). But as far as I know there are no vehicle classes. Or am I mistaken? But the "question" if and what vehicles should go over mound of dirt is not my to answer and as I said before probably a part of another feature/issue/discussion because it will be a much bigger change.
Re-read the issue description, updating the seed drill function to flatten the ground would also work.
Scratch that, being unable to drive over the mounds while planting is also a problem, the setup @peperov is using should definitely work.
Untested, but this should do it:
diff --git a/data/json/terrain.json b/data/json/terrain.json
index 0201e1b0bd..9ad56a8494 100644
--- a/data/json/terrain.json
+++ b/data/json/terrain.json
@@ -363,7 +363,7 @@
"symbol": "#",
"color": "brown",
"move_cost": 3,
- "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE" ],
+ "flags": [ "TRANSPARENT", "DIGGABLE", "MOUNTABLE", "NOCOLLIDE" ],
"bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100 },
"examine_action": "dirtmound"
},
diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp
index ea4ed4bce8..7284873f66 100644
--- a/src/vehicle_use.cpp
+++ b/src/vehicle_use.cpp
@@ -1022,7 +1022,7 @@ void vehicle::operate_planter()
//then don't put the item there.
break;
} else if( g->m.ter( loc ) == t_dirtmound ) {
- g->m.furn_set( loc, f_plant_seed );
+ g->m.set( loc, t_dirt, f_plant_seed );
} else if( !g->m.has_flag( "DIGGABLE", loc ) ) {
//If it isn't diggable terrain, then it will most likely be damaged.
damage( planter_id, rng( 1, 10 ), DT_BASH, false );
That change will make seeding with a vehicle possible, just tested it.
However, reloading the seed-drill with seeds is difficult: There is no related context menu when iexamining the seed drill. The only way I found to reload the drills is by using the (advanced) inventory (dropping them onto the vehicle part). Description of the drill however says that there is supposed to be a context menu entry when examining it: https://github.com/CleverRaven/Cataclysm-DDA/blob/13fce246115514f2ffabe60054fb9e74dc60fdc7/data/json/vehicle_parts.json#L2367
Could go into another PR, but should be an easy fix. I'll have a look when I come home in the evening.
On second thought: It's better to make a new Issue and PR for the iexamine context menu of the seed drill and advanced seed drill.