Conversation
|
Probably needs documenting somewhere (newgrf-wiki?) and ideally it should be tested as well... |
| 'max_length' : { 'num': 0x0A, 'size': 1 }, | ||
| # 0x0B - cost factor (old way) | ||
| 'speed_limit' : { 'num': 0x0C, 'size': 2, 'unit_type': 'speed', 'unit_conversion': (5000, 1397), 'adjust_value': lambda val, unit: ottd_display_speed(val, 1, unit)}, | ||
| 'sprite' : { 'num': 0x0D, 'size': 2 }, |
There was a problem hiding this comment.
This seems wrong, based on my reading of the specs.
There was a problem hiding this comment.
Hmm... I did it based on https://newgrf-specs.tt-wiki.net/wiki/Action0/Bridges
What is wrong according to you?
There was a problem hiding this comment.
prop 0D is not a simple 2 bytes value, it's more complex. See the example at the bottom of the page.
There was a problem hiding this comment.
Sprites are clearly wrong... Need to find some to generate output, will be able to share full version then.
There was a problem hiding this comment.
Any progress on this in last 5 years? @werbfred you seem inactive since 2021.
There was a problem hiding this comment.
Sorry. Had been looking at this 5 years ago. In the meanwhile many personal things occured... Anyway, did not deep dive into this during that period. If I remember the 2 bytes part was to link the bridge with different pictures depending on the orientation of it. So much more complictaed than what I saw...
I've tested all except
spriteandflags...The code to edit a bridge becomes 👍
name,description_rail_bridgeanddescription_road_bridgehave also been tested and working fine.