Details
Target: Obenseuer 0.5.08 (buildid 25969064), Unity 6000.0.77f1 Mono, BepInEx 6 Unity.Mono (be.788, the tested build) or BepInEx 5 (5.4.23 or later). Namespace: ObenseuerCore. File: src/Api/BaseShops.cs.
Everything not listed in this reference is internal and may change without notice. Items marked experimental may change too.
The framework changes no game method for this API, so it has no IsAvailable and no feature group. The name obenseuer.moddingframework.baseshops is the one you will see in the log.
When you can call it
- Call everything from your mod’s normal code (
OnLoad, event handlers,Update), not from a background thread you started. The game and Unity only run safely on the main thread (see the glossary). - It is safe to call any of it at any time. With no save loaded,
Allgives an empty list,SetMoneyandRestockgivefalse, andBuyandSellgiveBusyorUnavailable. - Your
BoughtandSoldhandlers run one at a time. If one throws an error, the framework logs it and still runs the others. - The framework does not hold back
BoughtandSoldwhile a save is loading or being written. A handler that should ignore those moments can checkSaveData.Busy, which istrueduring a load or a save.
What to check for and what comes back
- Nothing here throws an error. A null or empty id finds no shop.
SetMoneyandRestockgivefalsewhile a save is loading or being written, andBuyandSellgiveBusythen. - If the game itself fails while the framework works, you get an empty answer or
Failedinstead of an error. The first failure of each member goes to the log as an error. Later failures of that member are not logged again.