The ContainerFilled event
Things to know
ContainerFilledfires 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 afterStorage.SpawnItems. With no subscriber the framework does almost nothing extra: one check fornull.)- 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.)