Class GameState
- Namespace
- SuzerainModdingKit
- Assembly
- SuzerainModdingKit.dll
Static interface for querying and modifying the current state of the game.
public static class GameState
- Inheritance
-
GameState
- Inherited Members
Properties
CurrentStepName
The current step name (eg. "Sordland_Turn_2_Step_3"). Note that the format of step names may vary between story packs.
public static string CurrentStepName { get; }
Property Value
CurrentStepNum
The current step number.
public static int? CurrentStepNum { get; }
Property Value
- int?
CurrentStoryPackName
The name of the current story pack.
public static string CurrentStoryPackName { get; }
Property Value
CurrentTurnName
The current turn name (eg. "Sordland_Turn_2"). Note that the format of step names may vary between story packs.
public static string CurrentTurnName { get; }
Property Value
CurrentTurnNum
The current turn number.
public static int? CurrentTurnNum { get; }
Property Value
- int?
IsGameActive
Is the game active? The game is "active" when the current step name is not null.
public static bool IsGameActive { get; }
Property Value
Methods
AddCustomReport(CustomReportData)
Add a custom report to the current turn.
public static bool AddCustomReport(CustomReportData customReportData)
Parameters
customReportDataCustomReportDataThe custom report data.
Returns
- bool
A boolean indicating whether the operation succeeded or not.
Exceptions
- ArgumentNullException
Thrown if any required arguments are null.
- InvalidOperationException
Thrown if the game is not active.
AddCustomStoryFragment(CustomStoryFragmentData)
Add a custom story fragment to the current step.
public static bool AddCustomStoryFragment(CustomStoryFragmentData customStoryFragmentData)
Parameters
customStoryFragmentDataCustomStoryFragmentDataThe custom story fragment data.
Returns
- bool
A boolean indicating whether the operation succeeded or not.
Exceptions
- ArgumentNullException
Thrown if any required arguments are null.
- InvalidOperationException
Thrown if the game is not active.
IsCurrentStoryPack(StoryPackInfo)
Check if the current story pack matches the given
StoryPackInfo.
public static bool IsCurrentStoryPack(StoryPackInfo storyPack)
Parameters
storyPackStoryPackInfoThe
StoryPackInfoto test against.
Returns
- bool
A boolean indicating whether the current story pack matches the given
StoryPackInfo.
ReportExistsInCurrentTurn(string)
Check if a report exists in the current turn.
public static bool ReportExistsInCurrentTurn(string name)
Parameters
namestringThe name of the report.
Returns
- bool
A boolean indicating whether the report exists in the current turn.
StoryFragmentExistsInCurrentStep(string)
Check if a story fragment exists in the current step.
public static bool StoryFragmentExistsInCurrentStep(string name)
Parameters
namestringThe name of the story fragment.
Returns
- bool
A boolean indicating whether the story fragment exists in the current step.