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. Logs go to BepInEx\logs\obenseuer.moddingframework.phones.log. Source files: src/Api/PhoneLines.cs and src/Api/PhoneLinesPatches.cs.
Everything not listed in this reference is internal and may change without notice.
When you can call it
- Call everything from your mod’s normal code, not from a background thread you started. The game only runs safely on the main thread (see the glossary). This goes for the code that handles the events and your
answeredcode too. - It is safe to call any of it at any time, even on the main menu or with no save loaded.
All()gives an empty list,IsBusygivesfalse, and the calls that change a phone givefalse. Anullor empty id simply finds nothing. - The only call that throws is
Ringwith anullanswered. - Your event handlers run inside the game’s own call. If one throws an error, the framework logs it and still runs the other handlers.
If something fails to set up
The framework changes some of the game’s methods when it starts, so it can tell your mod about calls and rings. If a game update breaks one of them, the framework turns off the feature group that depends on it, and writes error lines to the group’s log file in BepInEx\logs. The rest of the framework keeps working. The name you will see in the log is the feature group obenseuer.moddingframework.phones.
- If a needed part is missing, the whole feature group turns off and
IsAvailableisfalse. (The framework needs five private fields onPhone:callActive,incomingCall,conversationTrigger,interactableTalkandhangupTimer. It changes four game methods:StartCall(PhoneNumber)(before it runs),OnCallStarted()andOnCallEnded()(after they run), andReceiveCall(PhoneNumber, int, Action, Action)(before and after).)