Skip to content

Instantly share code, notes, and snippets.

@wrygiel
Created February 16, 2025 10:04
Show Gist options
  • Save wrygiel/ff5727b598d1f58ddb4c2a7d59491470 to your computer and use it in GitHub Desktop.
Save wrygiel/ff5727b598d1f58ddb4c2a7d59491470 to your computer and use it in GitHub Desktop.
timer T
// Controls the stack size for certain stack inserters for Gleba. The inserters
// get stuck when handling items of different type (they keep waiting for items
// which do not exist, blocking the delivery of other types of items). To avoid
// this, we temporarily set the stack size to 1 every minute or so, to force
// unblocking such inserters.
// Outputs:
// X - the stack size to currently be used.
10:
reset T
X = 99 // max stack size
=> 20
20:
// Triggered after one minute
T > 3600 => 30
30:
X = 1 // for one tick only
=> 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment