FS#2442 - Wrong slope graphics under industry

Attached to Project: OpenTTD
Opened by George (George) - Sunday, 07 December 2008, 07:48 GMT
Last edited by andythenorth (andythenorth) - Friday, 25 August 2017, 09:57 GMT
Type Feature Request
Category NewGRF
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



steep slopes are displayed incorrectly under industries near water
This task depends upon

Closed by  andythenorth (andythenorth)
Friday, 25 August 2017, 09:57 GMT
Reason for closing:  Implemented
Additional comments about closing:  Shore/river tiles can be detected in varact 2 checks since r20740 or so in 2010 :);a=c ommit;h=c13035bbbb92e7ec57f0eb64c01db1be ddbd7708

Might not be exact right commit - but this feature is now provided and newgrfs can provide appropriate sprites for tile.

Flyspray clean up - closing, thanks.
Comment by frosch (frosch) - Tuesday, 09 December 2008, 21:59 GMT
This is more like a feature request. And the downside is, that it would break other graphics:

So either there are only original shore graphics under industries, or only new.
In "slopes.png" it is even more critical, as the additional shore sprites are not available in industry sprite layouts.
Comment by George (George) - Wednesday, 10 December 2008, 17:26 GMT
Yes, I understand the problem, but I do not know what to do. Could the code understand that a change is required because default land sprite is used? If yes, that would be a solution.
Comment by Remko Bijker (Rubidium) - Monday, 29 December 2008, 12:41 GMT
Now what if someone would make their industry create a pier which does not want the shore graphics on them? The major problem is that it's impossible to always correctly guess what the artist had in mind... and as frosch already said: you can't use the shore graphics in the sprite layout. They are not even part of standard NewGRF free OpenTTD, which makes the problem even bigger. Then there's also the issue of "flooding". We don't know whether the tile should be flooded or not, i.e. whether the default steep slope should be replaced with the flooded steep slope, and then there's no space to store the 'is flooded' information too.
Comment by George (George) - Monday, 29 December 2008, 17:21 GMT
Rubidium, I understand, that this graphics is not accessible.
But I hope devs would suggest the best solution for coding. Grf authors would accept any solution here (new action 2, var cation2, something else, a callback maybe)
If you ask for my opinion about that, than I suppose a tile may have sum property (may be a bit in prop 12) to show, that it INTENDS the replacing. Would that be Ok?
Comment by Peter Nelson (peter1138) - Tuesday, 06 January 2009, 11:17 GMT
Perhaps some special value that means "use a default shore sprite"? We can easily specify that it will not behave like a normal shore tile, because... it's not one.
Comment by George (George) - Tuesday, 06 January 2009, 12:09 GMT
Peter, you mean a bit in prop 12 to specify the behaviour? So, 0 would mean to use replacement, while 1 would mean use default graphics? That's fine :)
Comment by frosch (frosch) - Tuesday, 06 January 2009, 14:02 GMT
I still do not see a way, how OTTD could decide whether a tile is a shore tile or a grass tile. Especially due to autoslope and inner industry tiles, which are only surrounded by other industry tiles, i.e. not connected to water.

Maybe the land info of nearby tiles can be extended to distinguish sea from river/canal. Then the grf could check itself and one would only need a way to specify shore sprites in spritelayouts.

(Btw. when someone thinks about supporting shore sprites in spritelayouts, one could also think about foundations, resp. generally any action5 sprite. Though problem is, that they are not always available)
Comment by George (George) - Tuesday, 06 January 2009, 16:51 GMT
I thought about some flag for industry tile, that would indicate it as water tile. This was needed to prevent rivers to draw river shore near such tiles. Possibly (?) it may lead to a problem with ships pathfinder?
From my point of view, the river idea is very inconvenient in general. Instead of changing water tile (drawing shores), I'd prefer to have the changed shore, the same way as seas do.
Comment by frosch (frosch) - Tuesday, 06 January 2009, 20:04 GMT
River shore is suppressed if the industry tile was build on a water tile.
Comment by George (George) - Tuesday, 06 January 2009, 20:40 GMT
Oh, ..... many bad words. Now, what tests should I do to understand, what graphics should the industry provide? Previously I tested water nearby, but now I also need to test the tile itself, because there can be both variants (with and without shore).
May I ask for a tile flag to force a tile become watered tile if nearby tiles are water (flooding under industry) to force removing river shore :)