promotional bannermobile promotional banner

RedOnion: Unrestricted in-game scripting (Lua, ROS)

Provides in-game scripting using Lua and a custom JS/Ruby-like language

File Details

RedOnion v0.4.6

  • B
  • Dec 3, 2019
  • 515.51 KB
  • 64
  • 1.8.1+1

File Name

RedOnion.zip

Supported Versions

  • 1.8.1
  • 1.8

RedOnionScript (ROS) Changes:

LiveRepl Changes:

  • Fixed an issue where the global keybindings of LiveRepl could be activated when the input is not locked to the window. (input is locked when the mouse is inside the window bounds)
  • Made LiveRepl use KSP's UI_SCALE setting. Hard for me to test this thoroughly as I don't have a monitor with a high enough resolution, but from what I can see it is working. I could add an additional scaling factor in some other setting later, if desired, to make it even larger. One thing I did not find how to scale was the scrollbar. But I was able to scale the part of the scrollbar that accepts mouse dragging.
  • CompletionArea resets the scroll position each time the completion results list gets updated.

Lua Changes:

  • Lua reflection api was a bit confusing. I'm changing the terminology to type and runtime type instead of static and type. So what was once a static will now be called a type, and what was once a type will now be called a runtime type. (runtime types are for reflection whereas types are for accessing static members of clr classes or passing as the first argument to new to create a new object.)
  • Removed dofile, loadfile, and loadfilesafe as they do not use the Scripts directory as the base directory and cannot be configured to do so. Versions of these (at least dofile) will be implemented in the future.

require can be used because it allowed me to specify the base path. However, require will only run something the first time you call it on some filepath. To make it run that file again again you have to do packages[filepath]=nil.