Giter Site home page Giter Site logo

kubulambula / godot-gdshell Goto Github PK

View Code? Open in Web Editor NEW
204.0 204.0 10.0 1.17 MB

Light-weight, powerful, customizable and modular in-game console for Godot 4.

Home Page: https://godotengine.org/asset-library/asset/1526

License: MIT License

GDScript 100.00%
console gdscript gdshell godot godot-addon godot-console godot-engine godot4 godotengine shell

godot-gdshell's Introduction

Hi, I'm Jakub!

Kubulambula's GitHub stats

Something about me

# kubulambula.yaml

Kubulambula: 
  Name: Jakub Janšta
  Job: Student # VUT FIT
  Languages:
    - en
    - cs
  Familiar technologies:
    - Godot
    - Python
    - Java
    - C
    - C++
    - 'C#'
    - Git
    - SQL
  Connections:
    Twitter: @kubulambula
    Instagram: @kubulambula
    GitHub: kubulambula
    Email: [email protected] 

Pinned Projects

Quick connections


godot-gdshell's People

Contributors

bitphreak avatar collcaz avatar fire avatar geowarin avatar kubulambula avatar tryoxiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

godot-gdshell's Issues

Missing documentation

Some of the existing documentation is already outdated or it is just not good.

There is no documentation for most of the commands and all of the GDShell inner workings and scripts if someone wishes to modify it.

The documentation of commands should also be consistent with the command manual accesible from the console.

Before 1.0 there should be a big docs rewrite.

`pck` [?] command

I don't really know what this command should be called, but it would be nice to have a simple command that loads a PCK at runtime given a file path. It would be done with ProjectSettings.load_resource_pack(file), so it would be simple to implement.

Possibly res:// could be provided, so you just need to specify the file path within that. It is actually reccommended you load mods from user://, so if we provide anything that should be it.

Sorry for posting two issues in a row, just some things I was thinking of.

`ls` (done) and `scn` commands.

scn is used to edit the current scene (e.g., instancing nodes, freeing nodes). ls is used to view the current scene tree. I have some docs articles here to give an idea of what i'm thinking but feel free to suggest changes!

Shortcut doesn't work in Godot 4 beta 4

After installing and enabling the plugin, the keyboard shortcut isn't created and when created manually, the console doesn't show.

Additionally, if I manually add a GDShellMain Node, it appears permanently and never disappears or reacts to the keyboard shortcut.

Change promt to be more useful

I finally got it set up in a project and I was wondering what that was for. I know thats default in bash, user@computer, but here it dosen't seem to serve a pourpose other than to mimic BASH. I would say the seccond variable can be used for the current scene but I don't know what the first one could really be fore. (e.g., main_menu$ [enter command]).

Personally I don't really see a point in having constants in the promt more than necesary, especially not when thier only pourpose is to mimic bash. It can -- and does -- have a familliar feel without that.

Add an export script, that excludes unsafe commands from release builds.

I envisioned GDShell as a safe console by default with commands, that should don't do any harm to your projects if a user has access to it. Some commands useful for debugging have to be unsafe to be useful and providing a secondary repository with commands is just annoying to use for both developers and users.

We could make an export script that looks through all available GDShell commands and excludes unsafe scripts by looking at other SAFE flag. It would be a property of GDShellCommand and thus can be overridden in user commands if they wish to exclude their scripts from release builds.

Add `emit` command that emits events on nodes

I think it could work like this

$ emit $path/of/node event_name "additional args for the event emitter function"

For convinience sake the user could copy paths into the input field at cursor position by clicking on it on a recent output to the ls command (#6 ).

( Awesome Plugin by the way! )

Add optional type casting to command arguments

I think it should be possible to type cast arguments, for example:

example:
Running [ command int(3) ] in the cosole:

func _main(argv: Array, data) -> Dictionary:
    output(argv[1]) # outputs 3
    output(typeof(argv[1])) # outputs 4 (meaning string)
    output(typed_argv[1])) #outputs 3
    output(typeof(typed_argv[1])) #outputs 2 (meaning int)

This may or may not be better if implemented in the base GDShellCommand resource rather than per command, idk.

would store the first argument in argv[] as int, the second as a float and the last one as a string.

This would be very useful when creating commands that call a function or a signal, so you could pass in arguments to that function or signal in the expected type.

This could be done with regex and, GDScript's built in type casting.

I plan to implement this feature, as I am also working on the emit_signal command from issue #15 and, also plan on creating a command that calls functions from nodes.

Command history

One of the most common and useful features of terminals is command history, being able to press up/down arrow to go through a list of previously run commands. I actually just assumed that existed until recently when I realised it does not.

No list of commands

There isn't a docs article with a comprehsnvie list of commands, or proper syntax. Each of the commands has a basic man article in its script, but thats not super clear docs wise.

Move relevant constants to ProjectSettings

Hi, I really like this plugin. I want to use it in my game, but I also want to heavily customize it. Currently it seems in order to do that, I have to edit the scripts themselves. This is not ideal, since that means potential merge conflicts every time I update it.

I propose that some constants are moved to the ProjectSettings, such as the command file directory and the ui handler scene.

I will very likely end up making my own small modifications to the scripts actual behaviour-wise, but I still want to minimize them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.