Page 1 of 1

[posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Sun Dec 17, 2017 10:11 am
by eradicator
Unlike the signal/train stop placement markers the offshore pump placement markers show in every "possible" tile even if a pump can't be placed there due to collision with another pump.
pummmppp.png
pummmppp.png (186.8 KiB) Viewed 9574 times
(The "double" pumpe placement is probably not-a-bug so i'm not reporting that seperately for now.)

Re: [0.16.4] Pump placement marker ignores collision boxes

Posted: Sun Dec 17, 2017 10:17 am
by Zavian
Looking at that picture I actually think the double placement should be a bug, but whichever dev gets this issue can make that call, (and can probably fix both at the same time).

Re: [0.16.4] Pump placement marker ignores collision boxes

Posted: Sun Dec 17, 2017 10:20 am
by posila
I am going to flip this and say the offshore pump placement marker won't be changed to check for entity collisions,
but the double placement should be fixed.

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Sun Dec 17, 2017 10:46 am
by eradicator
@posila:
How do the rail signal markers check for "collision" then? They are aware of neighbouring/opposite side signals. I just said "collision" because that was easiest to describe the behavior.

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Sun Dec 17, 2017 11:10 am
by posila
Rail signal/Train stop markers are rendered by rail entities, so it has to check only positions around the rail.

Offshore pump markers are rendered with tiles - which means they take advantage terrain buffer and not be rechecked and redrawn every tick. If entity collision checks are done too, it would have to invalidate terrain buffer everytime an entity is built or destroyed, or moved (while you are holding an offshore pump in cursor), which I think is not worth it.
Since these markers are between terrain and entities, I don't see problem with having them also on positions that collide with entities.

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Sun Dec 17, 2017 11:45 am
by eradicator
@posila

Well. If you say updating the cache in on_build/mined is too expensive (computaionally/development time wise) i guess it can't be helped.

From a mechanic/didactic point of view i still don't like having a visually "noisy" "Hey! Build stuff here!" marker like that in places where you can't actually build stuff though, especially because all the other "green marker" things in game are always positions where you can actually build. The (novice) player doesn't know/care about the technical background of why those two types of "green markers" behave differently.

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Tue Jan 09, 2018 10:24 pm
by posila
For 0.16.16 I changed offshore pump collision box from 3x1 to 3x2 so they can't be placed so that they overlap.
Thanks for the report.

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Thu Jan 11, 2018 8:51 am
by bobingabout
how will this effect pumps in existing savegames?

Re: [posila][0.16.4] Offshore pumps can be placed one tile opposite of each other

Posted: Thu Jan 11, 2018 8:56 am
by posila
Their collision box will be resized but othewise nothing happens. If a pump collides with something after a migration, it still will be there, will work, but if you remove it you won't be able to place it back.