Added BeforeStateLoaded and AfterStateLoaded and change some method names
RestoreConnection
Don't do some goofy on-demand way to work out the connected stockpile entity. Propagate and cache stockpile connections when a foundation is added, restore them after load
Persistance++ and refactors around persistence