Skip to content

Releases: Mikusch/vscript-ext

1.1.0

14 Apr 16:53

Choose a tag to compare

Added

  • ScriptIterator methodmap for traversing key-value pairs in tables, scopes, and arrays:
    • Created via ScriptHandle.Iterate, it exposes both keys and values with full type support
    • New natives:
      • ScriptIterator.Next to advance the iterator
      • ScriptIterator.KeyType, ScriptIterator.ValueType properties for type introspection
      • ScriptIterator.GetKey* for typed key access, ScriptIterator.GetValue* for typed value access
    • See Iterating Tables and Arrays for examples
  • Entity convenience functions to convert between HSCRIPT instances and entity indices without manual handle management:
    • ScriptHandle.GetEntity - gets an entity index from a table/scope value
    • ScriptContext.GetArgEntity - gets an entity index from a callback argument
    • ScriptContext.SetReturnEntity - sets a callback return value to an entity's script instance
    • ScriptCall.GetReturnEntity - gets an entity index from a call return value
  • EHANDLE field type (ScriptField_EHandle) for reading entity handle values from VScript
  • Format string support for VScript_Run (e.g. VScript_Run("DoStuff(%d)", value))
  • Format string support for ScriptContext.RaiseException (e.g. ctx.RaiseException("Bad arg: %d", arg))

Deprecated

  • ScriptHandle.GetNextKey in favor of ScriptIterator. GetNextKey only exposes keys, not values, and value retrieval via ScriptHandle.Get* does not work for arrays.

1.0.0

24 Mar 14:31

Choose a tag to compare

Initial release. Nothing else to see here.