mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-25 09:34:41 +01:00
Plugins: prop hunt APIs, and plugin commands in the console lookup
- reskate.entities.blueprints lists the game's object blueprints (meshes only if asked), and reskate.entities.bounds gives a blueprint's box, so a mod can pick a prop by list or at random - Attached objects take upright, turn and ground (a floor found within reach below), the "root" joint, and a 6th options argument with solid; spawned props' bodies are found and ghosted - reskate.skater.hide, reskate.world.pick, and skater.get gives right and switch - reskate.console.command takes an optional 4th table of subcommands; the console lookup suggests plugin commands word by word, and plugin commands lists the subcommands - objbody: a test command for finding which body setter takes a prop out of collision
This commit is contained in:
1 parent
c35e9a357b
commit
45346b122c
26 files changed
+1238
-36
No files matched your search
@@ -1,7 +1,15 @@
|
||||
#include "Extension/Console/commands.h"
|
||||
#include "Extension/Profile/local_profile_runtime.h"
|
||||
#include "Extension/World/world_entities.h"
|
||||
namespace dingosdk::console {
|
||||
void register_object_commands(Commands ®istry) {
|
||||
// Test only: a per-body physics setter on plugins' world objects (world_entities.h test_bodies).
|
||||
auto body_test = action("objbody", "Test: run a physics body setter on plugins' world objects", Group::objects, {argument("setter")});
|
||||
body_test.run = [](const Model &, const Values &args, const Output &out) {
|
||||
world_entities::test_bodies(std::get<std::string>(args[0]));
|
||||
out("Queued; the log says which bodies it ran on.");
|
||||
};
|
||||
registry.add(std::move(body_test));
|
||||
auto enabled = variable("objects enabled", "Persist placed objects between sessions", Group::objects,
|
||||
argument("0|1", Type::boolean));
|
||||
enabled.aliases = {"objectpersistence"};
|
||||
|
||||
Reference in new issue
Block a user