The ContainerFilled event

Things to know

  • ContainerFilled fires after a container has been filled with at least one stack. It covers the first fill, the refills when a save loads and on a timer, and any other fill of a container, whether it draws from a pool or not. (It is raised after Storage.SpawnItems. With no subscriber the framework does almost nothing extra: one check for null.)
  • Your handlers run one at a time. If one throws an error, the framework logs it and still runs the others.

Limits

  • It does not fire for some ways items appear. That covers the janitors’ fills, items the player moves between containers, the contents of storage packages, and items that collectible spawners put into the world. (The janitor fills are StorageJanitorAction.)