Change: Support extended DCxx string range, and station names for IDs > 255#293
Change: Support extended DCxx string range, and station names for IDs > 255#293glx22 merged 2 commits intoOpenTTD:masterfrom
Conversation
|
For the extended string range there also needs to be a way to reference them from a switch block. As far as I can tell, a |
|
Yeah it allocates in D0 range and does some magic to return the unprefixed ID. Then authors have to readd the prefix in some cases (can't remember exactly where and why, but I'm sure I saw this being done) Edit: found where I saw it (see https://github.com/andythenorth/firs/blob/main/src/templates/extra_text_informative.pynml#L42-L47) |
Station names use C5xx range for first 256 IDs, and DCxx range for the rest. As classnames are most likely to be shared they use only DCxx range.
|
I used a very simple mechanism to switch range for station names depending on IDs. Regarding the D0xx range and switches, I think it's very difficult to determine if you are in the callback result case (which means allocate in D000 range and return |
Implements support for OpenTTD/OpenTTD@f5394ed and OpenTTD/OpenTTD@bc7dfd7.
Draft because only half of it is done.For stations I have 2 options, just switch to DCxx range, or use a mechanism to still use C5xx and C6xx ranges for IDs < 256 then fallback to DCxx.