Class Events
The main class in ItemChanger for organizing events. Some specific events are defined in AbstractPlacement and AbstractItem instead.
Inheritance
Inherited Members
Namespace: ItemChanger
Assembly: ItemChanger.dll
Syntax
public static class Events
Methods
| Improve this Doc View SourceAddFsmEdit(FsmID, Action<PlayMakerFSM>)
The action will be invoked on any fsm matching the id.
Declaration
public static void AddFsmEdit(FsmID id, Action<PlayMakerFSM> action)
Parameters
Type | Name | Description |
---|---|---|
FsmID | id | |
Action<PlayMakerFSM> | action |
AddFsmEdit(String, FsmID, Action<PlayMakerFSM>)
The action will be invoked on any fsm matching the id in the specified scene.
Declaration
public static void AddFsmEdit(string sceneName, FsmID id, Action<PlayMakerFSM> action)
Parameters
Type | Name | Description |
---|---|---|
System.String | sceneName | |
FsmID | id | |
Action<PlayMakerFSM> | action |
AddLanguageEdit(LanguageKey, Events.LanguageEdit)
Hooks LanguageGet for the given key.
Declaration
public static void AddLanguageEdit(LanguageKey key, Events.LanguageEdit func)
Parameters
Type | Name | Description |
---|---|---|
LanguageKey | key | |
Events.LanguageEdit | func |
AddSceneChangeEdit(String, Action<Scene>)
The action will be invoked whenever sceneName becomes the name of the active scene.
Declaration
public static void AddSceneChangeEdit(string sceneName, Action<Scene> action)
Parameters
Type | Name | Description |
---|---|---|
System.String | sceneName | |
Action<Scene> | action |
RemoveFsmEdit(FsmID, Action<PlayMakerFSM>)
Removes the action from the global hook associated to the FsmID.
Declaration
public static void RemoveFsmEdit(FsmID id, Action<PlayMakerFSM> action)
Parameters
Type | Name | Description |
---|---|---|
FsmID | id | |
Action<PlayMakerFSM> | action |
RemoveFsmEdit(String, FsmID, Action<PlayMakerFSM>)
Removes the action from the scene-specific hook associated to the FsmID.
Declaration
public static void RemoveFsmEdit(string sceneName, FsmID id, Action<PlayMakerFSM> action)
Parameters
Type | Name | Description |
---|---|---|
System.String | sceneName | |
FsmID | id | |
Action<PlayMakerFSM> | action |
RemoveLanguageEdit(LanguageKey, Events.LanguageEdit)
Unhooks LanguageGet for the given key.
Declaration
public static void RemoveLanguageEdit(LanguageKey key, Events.LanguageEdit func)
Parameters
Type | Name | Description |
---|---|---|
LanguageKey | key | |
Events.LanguageEdit | func |
RemoveSceneChangeEdit(String, Action<Scene>)
Removes the action from the scene-specific active scene hook.
Declaration
public static void RemoveSceneChangeEdit(string sceneName, Action<Scene> action)
Parameters
Type | Name | Description |
---|---|---|
System.String | sceneName | |
Action<Scene> | action |
Events
| Improve this Doc View SourceAfterStartNewGame
Called after GameManager.StartNewGame.
Declaration
public static event Action? AfterStartNewGame
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
BeforeStartNewGame
Called before GameManager.StartNewGame.
Declaration
public static event Action? BeforeStartNewGame
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnBeginSceneTransition
Called immediately prior to the BeginSceneTransition routine. If transition overrides take place through ItemChanger, these are applied before the event is invoked.
Declaration
public static event Action<Transition>? OnBeginSceneTransition
Event Type
Type | Description |
---|---|
System.Nullable<Action<Transition>> |
OnEnterGame
Called on starting or continuing a save.
If continuing or starting with a custom start, it is called before GM.ContinueGame.
If starting with the base start, it is called before GM.StartNewGame.
Declaration
public static event Action? OnEnterGame
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnItemChangerHook
Called after ItemChanger hooks, which occurs either when ItemChanger settings are created or when ItemChanger settings are loaded from a save file.
Declaration
public static event Action? OnItemChangerHook
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnItemChangerUnhook
Called after ItemChanger unhooks, which occurs when ItemChanger settings are nulled on returning to menu.
Declaration
public static event Action? OnItemChangerUnhook
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnPersistentUpdate
Called after persistent items reset, on every active scene change.
Declaration
public static event Action? OnPersistentUpdate
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnSceneChange
Called on every active scene change with the new scene as parameter.
Declaration
public static event Action<Scene>? OnSceneChange
Event Type
Type | Description |
---|---|
System.Nullable<Action<Scene>> |
OnSemiPersistentUpdate
Called after semipersistent data resets, i.e. on bench, death, special cutscenes, etc.
Declaration
public static event Action? OnSemiPersistentUpdate
Event Type
Type | Description |
---|---|
System.Nullable<Action> |
OnSpriteGet
Universal hook for editing ItemChanger sprites.
Declaration
public static event Action<SpriteGetArgs>? OnSpriteGet
Event Type
Type | Description |
---|---|
System.Nullable<Action<SpriteGetArgs>> |
OnStringGet
Universal hook for editing ItemChanger text.
Declaration
public static event Action<StringGetArgs>? OnStringGet
Event Type
Type | Description |
---|---|
System.Nullable<Action<StringGetArgs>> |
OnTransitionOverride
Called whenever a transition is overriden through ItemChanger, giving access to the original transition data and the result of the override.
Declaration
public static event Events.TransitionOverrideListener OnTransitionOverride
Event Type
Type | Description |
---|---|
Events.TransitionOverrideListener |