Which calls throw and which return false
This is the full list of what the API gives you. Text in brackets at the end of a note is extra detail for experienced modders, and you can skip it on a first read.
ScreenFx whether the field of view override works
IsAvailable tells you whether the field of view override works. Every ScreenFx call returns false when it could not do its job, and throws only for a bad value.
public static class ScreenFx
{
public static bool IsAvailable { get; }
}
| Property | Type | What it means |
|---|---|---|
IsAvailable | bool | false when the field of view override could not be set up. |
Things to know
- Every call returns
truewhen it did its job andfalsewhen it could not. It returnsfalsewhen the game part it needs is not there yet, for example on the main menu or while a level is loading. (The missing parts areCameraShake.instance,BlackCanvas.instance,BlackCanvas.fadeCanvasGroupandDeathMessage.instance.) Shake,FadeToBlackandSetDeathMessagealso returnfalsewhile a save is loading or being written.FadeInalways runs, so the screen can clear during a save.
Limits
- A bad value throws an
ArgumentException.durationmust be above 0,amountmust not be negative,speedmust be above 0, andtextmust not benull. Numbers must be real numbers. Anownermust be a valid mod id, 1 to 64 letters, digits, dots, underscores or dashes (Mod.Idalways is). Nothing else is thrown to you. - If the game itself fails, you get
falseand one line in the log. The call does not throw.