-
-
Notifications
You must be signed in to change notification settings - Fork 1
API
SALT has a few tools that you can use to help you make mods easier.
Methods and classes that have to do with adding Mods, but don't fit in any other category.
The self created mod that represents SALT. Contains some helpful tools.
A way to stop saving from happening.
Classes and methods that have to do with the keybinds.
Class that helps with inputs.
Gets an instance UserInputService from the static UserInputService.
An event to record when a key has been pressed. Add to it like this UserInputService.Instance.InputBegan += Method;
.
An event to record when a key has stopped being pressed. Add to it like this UserInputService.Instance.InputEnded += Method;
.
Classes and methods that have to do with the SALT Console. Belongs in the SALT.Console
namespace.
The basic class for the SALT Console. Sometimes SALT.Console.Console
can get confused with System.Console
.
Basic Log Method.
SALT.Console.Console.Log("Debugging")
Logging but with a green text.
SALT.Console.Console.LogSuccess("Done!")
Logging but with a orange text.
SALT.Console.Console.LogWarning("Oh no!")
Logging but with a red text.
SALT.Console.Console.LogError("Exception has occurred!")
Class with all the basic events.
Event for when a level is loaded. Does not run when Main Menu is loaded.
Event for when the Main Menu is loaded.
Enums in any namespace.
An enum that has all the Characters currently in the game. Belongs in the SALT
namespace.
An enum that has all the levels currently in the game. Belongs in the SALT
namespace.
Classes in the SALT.Registries
namespace
CharacterRegistry is a registry that helps you create new characters.
CharacterRegistry.CreateCharacterId
is a method that creates a new id for a character you want to add.
Can only be run during PreLoad
.
Example: Big Amelia's Id is created with BEEG = CharacterRegistry.CreateCharacterId("BEEG")
.
CharacterRegistry.RegisterCharacterSprite
is a method that adds the character sprite to the Character Selection.
Can only be run during PreLoad
or Load
. Putting it in PreLoad
is better.
Example: Big Amelia's does
CharacterRegistry.RegisterCharacterSprite(BEEG, Main.CreateSpriteFromImage("AmeWide.png"));
CharacterRegistry.RegisterCharacterPrefab
is a method that adds the character gameobject to the Character Selection.
Can only be run during Load
.
Example: Big Amelia's does
GameObject gameObject = PrefabUtils.CopyPrefab(CharacterRegistry.GetCharacter(Character.AMELIA));
gameObject.name = "beegAmePack";
gameObject.GetComponent<CharacterIdentifiable>().Id = BEEG;
CharacterRegistry.RegisterCharacterPrefab(gameObject);
Classes in the SALT.Utils
namespace
Extension Methods in the SALT.Extensions
namespace