[kovarex] [0.17.49] Removing trains in editor results in not mineable rails

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
TxT
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Jan 27, 2018 9:36 am
Contact:

[kovarex] [0.17.49] Removing trains in editor results in not mineable rails

Post by TxT »

Hi guys,

this is my first report, I hope Im doing everything right ;)

I cloned some rail network in the new editor (rails and trains on some rails), then I used the decon planner to get rid of some parts (including the trains), now I cant mine the rails anymore (neither in editor nor in normal game)!

Even after placing a new train and removing it by hand in the normal game, I cant remove the rails. Taking a look at its properties in the editor it has the not mineable property set.

again I hope I did everything right and this wasnt already reported before!
Attachments
factorio-current.log
(6.27 KiB) Downloaded 130 times

User avatar
TxT
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Jan 27, 2018 9:36 am
Contact:

Re: [0.17.49] Removing trains in editor results in not mineable rails

Post by TxT »

I just played a little more around with and seems to only work when you clone the rail with the train on it first and it only affects the newly created rails

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2227
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.49] Removing trains in editor results in not mineable rails

Post by boskid »

Indeed, can reproduce:
1/ open editor
2/ place 3 straight tracks
3/ place locomotive - this action marks all 3 straight tracks to be "not minable"
4/ in editor select "clone"
5/ mark rails and locomotive
6/ paste clone somewhere else
7/ remove cloned locomotive

What happend:
- rails under removed (clone) locomotive have attribute "not minable" still set
What expected:
- removing clone locomotive should clear "not minable" attribute in clone tracks

---
this feels like

Code: Select all

bool Rail::isNonMinable() {
  if(trainAbove()) {
    return true;
  }
  return this->nonMinable;
}
and in step 3 there is no "not minable" attribute set, it is just dynamicaly computed to show that it should not be minable. However clone uses this "effective non minable attribute value" and sets it as "internal non minable value" so result is set permanently - will not be cleared by removing locomotive because locomotive was never intended to set nonMinable attribute internally.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.49] Removing trains in editor results in not mineable rails

Post by kovarex »

boskid wrote:
Sun Jun 16, 2019 9:12 pm
this feels like

Code: Select all

bool Rail::isNonMinable() {
  if(trainAbove()) {
    return true;
  }
  return this->nonMinable;
}
and in step 3 there is no "not minable" attribute set, it is just dynamicaly computed to show that it should not be minable. However clone uses this "effective non minable attribute value" and sets it as "internal non minable value" so result is set permanently - will not be cleared by removing locomotive because locomotive was never intended to set nonMinable attribute internally.
Yes, this is exactly how it was.

Fixed for the next release.

User avatar
TxT
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Jan 27, 2018 9:36 am
Contact:

Re: [kovarex] [0.17.49] Removing trains in editor results in not mineable rails

Post by TxT »

Dang thats fast thanks for fixing, glad I could help! :)

Post Reply

Return to “Resolved Problems and Bugs”