Hey, great to see some of you are still interested in these patches I made some time back
As you may have noticed I've pretty much shifted my attention away from OpenTTD towards other projects nowadays (rarely posting in these forums, just lurking mostly).
ChillCore wrote:Roujin, could you please adjust table/sprites.h, that is if you want to do so.
Umm, I'm not sure what you mean with that. You changed the order of some things there, but it does work, so isn't it fine? What should I want to change?
Devs, is there something in particular that is holding this patch away from trunk? Besides extensive testing and the fact that the sprites are not added to the openttd.grf(*).
Of course first at least one dev must be convinced that this is a valuable addition to OpenTTD gameplay and be interested enough and have enough time to review the patch.
Then he must after review agree with both the implementation of things, and the coding style. I'm sure there would be some stuff disagreed with..
Some things I found myself while doing a quick scan through the .diff:
*STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD should be renamed to something generic. The string (at least in english and back when I wrote the patch) doesn't contain drive through anywhere, so I reused it for the TLs instead of making a new one.
*The debug sprite (yellow tile outline) and the respective code to draw it should be taken out, as It's rather unnecessary. Moreover, the debug category "tl" I invented there and the few debug messages should probably be removed. Or extended with additional debug messages that actually make sense and justify that whole new category (I doubt it).
*SetBit(_me[t].m7, 4) -- is this still free? Are devs willing to sacrifice that bit in the map array for traffic lights? If not how else should it be stored?
*ClearAllTrafficLights() -- This is called when trafficlights setting is set from true to false midgame. It looks a bit as if it could be broken for multiplayer (only executed on server), not sure though. Should be checked.
*I feel the "towns build traffic lights during road construction" setting does not make too much sense without the "random road construction" patch I made originally as part of this patch, but split off later. Because without that, towns will only ever have road construction if a player funds it. So either take that feature out or also add the random road construction back into the patch. Unfortunately, this adds new problems: road constructions happen on all roads roads near/inside a town, also player owned ones. With the random road construction + traffic lights patches, players complain that towns will do road construction and place traffic lights on players' "highways" that happen to be too close to the town...
In vanilla OpenTTD, nobody complains about that fact, because (I reckon) the fund road construction option is really really rarely used.
Problem is that it's not trivial to fix. Allow towns only to do road construction on self-owned roads? Bad idea because towns grow into roads placed by players, but never "annex" those roads, so such a mechanic would be needed first. This on the other hand could lead to new griefing possibilities in multiplayer.
So all in all this is opening a can of worms...
(note that my knowledge about implementation of e.g. the roadworks in OpenTTD is from back when I did these patches, so stuff may be different now than how I remember it)
* I don't know if devs agree with my idea and/or its implementation of the traffic light
consists (adjacent tiles with traffic lights placed on them are merged to one big crossing) at all. I thought I was pretty clever with how I implemented them back then

However looking at it now I'm not fully satisfied, there may be better ways of implementing them.
[edit some more just came to my mind:]
* devs would maybe want newgrf control over more than the sprites (which would come with properly including them in openttd.grf), say tl phases controllable via newgrf callbacks, or such.
* Maybe take out the hardcoded offsets for left-and-right roadside, specify the sprites relative to tile normally. Double the amount of sprites to have left-side-driving and right-side-driving variants (e.g. for half-arc-type TLs that bend over the road, the current offset scheme won't do).
Well that's all I can think of right now.
Of course that's all just my opinion. Devs of course might have a completely different one on which things must be changed for trunk (if any of them considers the whole idea as interesting for trunk, at all). Just giving my own guess.
Unfortunately I'm not really interested in picking up work on this patch again, but if anyone else is (well ChillCore, you're already at it it seems), be my guest
