Skip to content

Oxidizer v0.12.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 14:10
· 2 commits to master since this release

Added

  • Physics forces for Rust mods (oxidizer_api::physics, API version 6): register_force adds a mod's forces and torques to vehicles inside the game's physics, once or more per substep, on the game's physics worker threads. The callback gets the vehicle's state in plain data (position, velocity, attitude, atmosphere, mass, the game's own drag areas) and a key that physics::vehicle_key gives for a KSA.Vehicle. The game's PhysicsStates.ComputeDerivatives takes span arguments, which the generic hooks can't patch, so the bridge injects the call with a transpiler; nothing is patched until a mod registers a force. A reload removes a mod's callbacks. Example: examples/force_rust.
  • Data per save game, for Rust and Rhai mods: oxidizer_api::save::{get, set} and save_get / save_set, with the callbacks saving (the game is about to write a save) and save_loaded. Each mod's values are written into the save's own folder as oxidizer/<mod>.json, so they travel with the save. oxidizer_api 0.7.0 (API version 6) has Mod::saving and Mod::save_loaded.
  • inspect(value) for Rhai and the console: a game object's public properties and fields with their current values, and its first items, as JSON (Rhai Studio's INSPECT panel). Getters that throw read as null without filling the log.

Fixed

  • Hooking a method that a class overrides (like KSA.UncompressedSave.Write) failed with "has 2 overloads": the inherited method it replaces was counted as a second one.

Screenshots

Physics forces: a watch on the acceleration steps up by 2 g while examples/force_rust pushes

Physics forces: a watch on the acceleration steps up by 2 g while examples/force_rust pushes

Per-save data: after loading a save, hello_rust reads back what it stored in it

Per-save data: after loading a save, hello_rust reads back what it stored in it

inspect(), as Rhai Studio 1.3 shows it

inspect(), as Rhai Studio 1.3 shows it

Rust mods built with oxidizer_api 0.7 need this Oxidizer; older mods keep working.

Full Changelog: v0.11.0...v0.12.0