OpenTTD / nml

NewGRF Meta Language
GNU General Public License v2.0
44 stars 36 forks source link

Change: add vehicle 'refit' callback (cb 0x163) and cargo class filter prop (0x28 for trains etc) #344

Open andythenorth opened 2 weeks ago

andythenorth commented 2 weeks ago

See https://github.com/OpenTTD/OpenTTD/pull/13090

glx22 commented 2 weeks ago

And the props ?

andythenorth commented 2 weeks ago

And the props ?

OpenTTD PR might be split, so I thought two nml PRs maybe? :)

andythenorth commented 2 weeks ago

13090 is merged including props and cb. I'll do the nml as a single PR.

andythenorth commented 1 week ago

Added https://github.com/glx22/nml/commit/411fe8286ce6e98bc284e9ec6d7a96f6cd3ae52d

andythenorth commented 1 week ago

Have tested the static prop, appears to work. Iron Horse nfo output from nmlc appears correct.

Train nml:

refittable_cargo_classes: [bitmask(6), bitmask(1, 7, 9)];

Action 0 prop output:

28 \wx0040
32 \wx0282
andythenorth commented 4 days ago

nml docs for the callback can be adapted from the nfo docs: https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Custom_refit_.28163.29