Skip to content

Callback improvements

Alex Ksandra requested to merge 0player/t-engine4:callback_improvements into master

Some touches on the callback system:

  • callback adding/removing is factored out so that the same loop isn't just written everywhere;
  • priorities can now be specified for callbacks (default 0), callbacks with lower priorities get called first. (By a popular IRC request.) Of course this involves sorting but measures are taken to do actual sorting as rarely as possible. (As a side-effect, callback-order is now well-defined, being sorted by type ("effect", "object", "talent") and implementing object (taking its .name or tostring()).)
  • sustained talents can now be made to behave like passive ones in terms of callbacks, by specifying passive_callbacks=true in talent definition.

Merge request reports

Loading