Infinite iterator - Oinite12/tiwmig-mod GitHub Wiki

TIWMIG adds an Event that loops indefinitely, entirely contained in items/inf_iter.lua; functions can be added to the Event function so that they are repeatedly called. This Event pauses when the game is paused.

Infinite iterator functions

tiwmig_inf_j_iter

  • Arguments: None
  • Output: None

On each frame, given an index i NUMBER, this function iterates through each Joker in the ith group of at most 5 Jokers, after which it increments i by 1. This method is done to prevent potential performance drops caused by large numbers of Jokers - each frame iterates through 5 Jokers at a time. The group size is configured with G_TWMG.inf_j_iter.group_size.

Currently, it is used for Commenting Out functionality.

tiwmig_inf_collection_j_iter

  • Arguments: None
  • Output: None

Iterates through each row of the Joker Collection; in each, iterates through each Joker. Currently, it is used for Commenting Out functionality so that it can debuff the right Joker in the Collection.