citymania-org / grf-py

A Python framework for making NewGRFs for OpenTTD
GNU General Public License v2.0
15 stars 5 forks source link

Support setting "split" cbs and properties #4

Closed ahyangyi closed 1 year ago

ahyangyi commented 1 year ago

Yeah... I know the implementation looks like a bit WET. Feel free to reorganize the things a bit. Needed that interface though.

ldpl commented 1 year ago

Looking at this PR, there are many more things to consider, like:

I need some time to think how to handle it the best and will probably end up implementing it myself.

ahyangyi commented 1 year ago

Yeah, and I think the need for object properties could also help eliminate the code smell that is the passing dictionaries everywhere (and having different behaviors depending on types).

ldpl commented 1 year ago

Superseded by b388165e8e0860e1f6bd44902a32606e4a0c73b3 Look into https://github.com/citymania-org/grf-py/blob/main/tests/test_lib_callback_manager.py for usage examples.