by Ter13
Essential standardized features for use in any DM project.
Thanks to work in the background on EffectLib and CooldownLib, some of my private changes have been made public.

Updates have been noted in the documentation and feature requests forums.

But a quick summary:

  • screen2coord() and screen2world() have been added, useful functions for getting pixel data out of screen_loc strings returned by mouse procs. Please note that these start at TILE_WIDTH/TILE_HEIGHT instead of 0 to simplify the math later on when turning them back into locs or screen locs.
  • Common definitions for working with timestamp offsets have been added. These are meant to deal with preservation of time-based offsets. Mobs will now store the real and world time offsets of the last time they were saved via a tiny Write() override in StdLib.
  • singleton_init() has been added, which lets you quickly get an associative list of identified single-instance objects defined in the project's type tree. This function expects all singletons to have an id variable, and will use that to identify which objects to initialize when passed a root type path. This feature is more a personal time-saver.