Skip to content

v0.2.0

Choose a tag to compare

@rosshadden rosshadden released this 26 Jun 20:56
· 40 commits to main since this release

Full Changelog: v0.1.7...v0.2.0

Huge UX improvements!

  • relaxed API struct requirements, making Godot 4.4.1 or something work again (reported by @VBismuth)
  • added p and pt for easy printing with varargs
gd.p('player', player)
gd.pt(2, 4, 6, 8, 'who', 'do', 'we', 'appreciate', true)

Note: this only works on builtin types and any type that explicitly defines a str() string method. This is a bug/lacking-feature I found in V and made an issue for here. After that gets merged these should work for any type ever, with no need for an explicit str method.

  • made variant functions have more convenient arg types (removed indirection)
  • added some Godot type aliases:
pub type Bool = bool
pub type Int = i64
pub type Float = f64
  • this lets us add methods to them
  • notably I added to_variant to them all, which lets us... 👇
  • all functions that accepted Variant now accept ToVariant, and converts them within
    • this is SOOOOO much nicer! No more wrapping args as variants!
  • converted arg types for builtin classes to V types
    • this was already how it worked for Object-based classes (ex: Node, Control, etc.), but now is how it works for packed struct as well (ex: Vector2, Array, etc.)
  • converted arg types for all constructor methods to V types
    • ex: Signal.new2, Callable.new2

Some of the above things work together to make things much nicer.
Things like creating Callables, Signals, and Arrays, and supplying args to Signal#emit for example.