

MovableChessboard
Library/Mod to move chessboard around. Provides useful hooks for mods depending on position of the chessboard.Details
MovableChessboard
MovableChessboard is a simple mod that allows players and mods alike to move the chessboard around the airport. Provides hooks to BoardMovement™ events to allow mods depending on this one to get instant updates on the new position, rotation and scale of the board!
As stated before, players can move chessboard using controls as defined per config file. For more information, see Configuration section.
Usage
As a dependency
To get updates on chessboard movement, your mod has to first call BoardManager.Init()
, preferably in your plugin's Start()
method.
After that, you can start hooking up your own event handlers. Here's an example:
private void Start()
{
// Initialize board manager
BoardManager.Init();
// Hook up to all interested events with your handlers
BoardManager.OnBoardLoaded += MyOnBoardLoaded;
BoardManager.OnBoardChangedPosition += MyOnBoardMoved;
BoardManager.OnBoardChangedRotation += MyOnBoardRotated;
BoardManager.OnBoardChangedScale += MyOnBoardScaled;
}
private void MyOnBoardLoaded()
{
Plugin.Log.LogDebug("Chessboard just got loaded into BoardManager!");
}
private void MyOnBoardMoved(Vector3 newPosition)
{
Plugin.Log.LogDebug($"Chessboard just got moved! New position: {newPosition}");
}
private void MyOnBoardRotated(Quaternion newRotation)
{
Plugin.Log.LogDebug($"Chessboard just got rotated! New rotation: {newRotation}");
}
private void MyOnBoardScaled(Vector3 newScale)
{
Plugin.Log.LogDebug($"Chessboard just got scaled! New scale: {newScale}");
}
To move, rotate or scale the chessboard from within your mod, you will have to call MoveChessboard(Vector3 newPosition)
,
RotateChessboard(Quaternion newRotation)
and ScaleChessboard(Vector3 newScale)
respectively.
For example usages of these methods, see src/MovableChessboard/Plugin.cs
.
As a standalone mod
When you create a lobby and get assigned as a host, you have an ability to move, rotate and scale the chessboard using controls as defined by Configuration file.
Note
Chessboard means only chessboard. Pieces will stay at the same position unless moved by other mods, see BetterChess. Also, as of right now, only you (the host) able to percieve the change in chessboard position. (I plan to add more RPC calls to make it possible to also change position when host changes as well as percieving the chessboard movement as client with a mod)
Configuration
Configuration file can be found in your $PEAK_FOLDER/BepInEx/config/com.github.Kirshoo.MovableChessboard.cfg
Issues and Suggestions
If you running into any issues or have suggestions, you can contact me on discord in modding community server here or open an issue on github repository for this project.