LimboConsole.Sharp 0.0.1-beta-008

This is a prerelease version of LimboConsole.Sharp.
dotnet add package LimboConsole.Sharp --version 0.0.1-beta-008
                    
NuGet\Install-Package LimboConsole.Sharp -Version 0.0.1-beta-008
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LimboConsole.Sharp" Version="0.0.1-beta-008" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LimboConsole.Sharp" Version="0.0.1-beta-008" />
                    
Directory.Packages.props
<PackageReference Include="LimboConsole.Sharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LimboConsole.Sharp --version 0.0.1-beta-008
                    
#r "nuget: LimboConsole.Sharp, 0.0.1-beta-008"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LimboConsole.Sharp@0.0.1-beta-008
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LimboConsole.Sharp&version=0.0.1-beta-008&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LimboConsole.Sharp&version=0.0.1-beta-008&prerelease
                    
Install as a Cake Tool

LimboConsole.Sharp

NuGet License Build Status Platform Godot Version NuGet Downloads

This nuget package is a c# wrapper that helps facilitate using the limbo_console godot plugin in c#.

Table of Contents

✨ Features

  • Simplified Integration: Easily interact with the 💻 limbo_console godot plugin from a c# godot game.
  • Command Registration: Register commands with descriptions and auto-complete sources.
  • Auto-Complete Support: Add auto-complete sources for command arguments.
  • Demo Project: Includes examples for initialization, commands, and advanced features.

🛠️ Requirements

  • Godot Engine: Version 4.4.X or higher.
  • .NET SDK: Version 8.0
  • limbo_console plugin: Installed and enabled in your godot project. See 💻 limbo console.

🖥️ Installation

  1. Ensure the 💻 limbo console plugin is installed and enabled in your godot project:

    • Go to Project > Project Settings > Plugins and enable the plugin.
  2. Install the nuget package for your godot c# project (compatible with godot 4.4.X).

Using dotnet CLI

Run the following command:

dotnet add package LimboConsole.Sharp

Using csproj

Add the following line to your godot game's csproj

<PackageReference Include="LimboConsole.Sharp" Version="<specify.your.version>" />

📝 Getting started

Register a Command

// Access the console statically from any node within the tree
LimboConsole.RegisterCommand(new Callable(this, MethodName.StartGame), "start_game", "Starts the game");

private void StartGame() {
    // Do something
}
Using the [ConsoleCommand] Attribute

You can also use the [ConsoleCommand] attribute to easily define commands.

💡You must call RegisterConsoleCommands() to enable your class's [ConsoleCommands].


  // By default use name of function exactly
  [ConsoleCommand]
  private void LogFromAttribute() => LimboConsole.Info($"{GlobalPosition}");

  // Pass a custom name
  [ConsoleCommand("CoolName")]
  private void AFunctionName() => LogFromAttribute();

  // Pass a custom name and description
  [ConsoleCommand("Say", "Shows a message in the console")]
  private void Print(string message) => LimboConsole.Info(message);

  // Remember to register the commands!
  private void _Ready() {
      // This will register the commands
      RegisterConsoleCommands();
  }

ConsoleCommand Attribute In Use

Register an Auto-Complete Source

You can also add auto-complete sources for command arguments:

LimboConsole.AddArgumentAutocompleteSource("abc", 1, Callable.From(() => new string[] { "a", "b", "c" }));

This example adds an auto-complete source for the first argument of the abc command, suggesting the values a, b, or c.

Note: when registering an argument index starts at 1 not 0 and currently has a max of 5 arguments

Using the [AutoComplete] Attribute

You can also use the [AutoComplete] attribute to quickly define autocompletes for your attribute based console commands

💡You must call RegisterConsoleCommands() to enable your class's [AutoComplete]'s!

[ConsoleCommand]
[AutoComplete(nameof(Colors))]
public void FavoriteColorCommand(string colors) {
  // Do something
}

private string[] Colors() {
  return new [] {"red", "blue", "green"};
}

This example adds an auto-complete source for the first argument of the FavoriteColorCommand command, suggesting the values red, blue, and green.

More examples

See run the demo project and see Demo.cs for more examples of how to use the package

📚 Documentation

See summary comments in nuget package or refer to 💻 limbo_console

For a detailed history of changes, see the Changelog.

🤝 Contributing

Thanks for your interest in contributing. Please follow these guidelines to keep the project consistent and maintainable in the long-term. Keep in mind this is just a wrapper. Feature or bug fixes for the requests for the console itself should go here 💻 limbo_console.

After a feature is added and/or the public api changes this repo will need to be updated so help keeping it up to date is appreciated!

See something you want or could improve upon? Make a PR! ✨

Project structure

  • Limbo.Console.Sharp: The root of the nuget package.

    • Pack: Use dotnet pack to create the package. Alternatively, run the provided .bat script on Windows to automate packaging to the demo project.

    The .bat file is a helpful reference for understanding how the demo project and the nuget package interact. It automates the packaging process for Windows users to test changes in the demo project.

  • Demo Project: A sample godot project included to demonstrate:

    • Registering commands and auto-complete sources.
    • Using advanced features like signals and callable commands.

Note: Currently, there is no quick script for packaging on non-Windows platforms. Contributions to add this functionality are welcome!

Code Style & Recommendations

📋 Changelog

See the CHANGELOG.md file for a detailed list of changes in each version.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

👥 Contributors

Thanks to these wonderful people for their contributions:

ryan-linehan fahall

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-beta-008 232 6/1/2025
0.0.1-beta-007 171 5/26/2025
0.0.1-beta-006 188 4/17/2025
0.0.1-beta-005 107 4/13/2025
0.0.1-beta-004 112 4/13/2025
0.0.1-beta-003 121 4/13/2025
0.0.1-beta-002 110 4/12/2025
0.0.1-beta-001 75 4/12/2025
0.0.1-beta 69 4/12/2025