Plugins: the general APIs a filming mode needs

- reskate.input.hide hides the right stick and the stick clicks, and reskate.input.mouse reads the mouse's movement and wheel.
- reskate.skater.cruise: cruise control up to a speed, optionally easing down to it.
- reskate.skater.reach and hand: an arm reaching for a point (two-bone IK, Extension/Skater/arm_reach), in the pose drawn and sent, and where a hand joint is.
- reskate.entities.set's attach: an object kept on a joint of your skater or another player's, moved every frame.
- reskate.screen.look and slap: the Filmer branch's VX1000 post-process as a fixed-parameter camcorder look drawn by the overlay.
This commit is contained in:
AyeZeeBB committed 2026-10-20 15:24:00 -05:00
1 parent 847c0df6fe
commit cf5165b791
31 files changed
+2100 -38

No files matched your search

+10 -1
View File
@@ -340,6 +340,15 @@ struct KitApi {
need(L, plugin, "skater.control", "reskate.skater.push_reset");
return result(L, game(plugin).skater_push_reset(plugin.id()));
}
// cruise(speed, may_slow): carried up to `speed` (m/s, 1 to 30; 0 or nil off) while rolling and not
// braking, for the next 300 ms (call it every tick); with may_slow, eased down to it when faster.
static int cruise(lua_State* L) {
auto& plugin = plugin_of(L);
need(L, plugin, "skater.control", "reskate.skater.cruise");
const double speed = luaL_optnumber(L, 1, 0);
if (!(speed == 0 || (speed >= 1 && speed <= 30))) luaL_argerror(L, 1, "a cruise speed is 1 to 30 m/s, or 0 for none");
return result(L, game(plugin).cruise(plugin.id(), static_cast<float>(speed), lua_toboolean(L, 2) != 0));
}
static int hold(lua_State* L) {
auto& plugin = plugin_of(L);
need(L, plugin, "skater.control", "reskate.skater.hold");
@@ -360,6 +369,6 @@ void KitApi::install(Plugin&, lua_State* L) {
lua_pop(L, 1);
add_functions(L, "files", {{"list", files_list}, {"read", files_read}, {"write", files_write}, {"remove", files_remove}});
add_functions(L, "ui", {{"dialog", dialog}, {"close_dialog", close_dialog}});
add_functions(L, "skater", {{"push", push}, {"push_wait", push_wait}, {"push_reset", push_reset}, {"hold", hold}});
add_functions(L, "skater", {{"push", push}, {"push_wait", push_wait}, {"push_reset", push_reset}, {"hold", hold}, {"cruise", cruise}});
}
}