Throwdowns: the throwdown kit, so a mode is a plugin and the SDK knows no particular mode

Plugins register modes (card, replaces, order, flag, players) and publish documents through
reskate.throwdowns.ui: the setup page, the waiting card, HUD slots themed on the game's HUD_<theme>_*
widgets, the match panel, flags and match restrictions. SmokeyDawg58's native plumbing
(throwdown_menu.cpp and its .inl files) renders them and posts throwdown_ui events back. kit::flag
is the one native flag registration. General services added for it: reskate.files, reskate.ui.dialog,
reskate.skater push/hold/bone_cam, reskate.camera.pad_flight, reskate.physics competition,
reskate.session.world, reskate.tricks feed/gesture, and world entities.

His ten modes are now Lua in his plugin: the rules, referee and wire (td/rules, referee, wire), and
every page and HUD document (td/ui*.lua). Extension/Modes and reskate.modes are gone, along with
every race and 1-UP branch in the SDK. The plugin test drives each mode through kit events.

A native setup page is never written to while it closes into flag placement: its rows are not
republished, the stock page is put back once the exit is over, and the stock Players slider is left
alone while a plugin flag is out. This fixes the crashes on the Deathrace button and on 1-UP's
Confirm.
This commit is contained in:
AyeZeeBB committed 2026-10-20 01:04:54 -05:00
1 parent e14064250c
commit 8444553402
186 files changed
+28015 -2747

No files matched your search

+7 -2
View File
@@ -15,6 +15,7 @@
#include "Extension/Skater/score_hud.h"
#include "Extension/Skater/trick_watch.h"
#include "Extension/Trainer/trainer.h"
#include "Extension/Throwdowns/throwdown_kit.h"
#include <Windows.h>
#include <ShlObj.h>
#include <array>
@@ -73,7 +74,9 @@ public:
}
// As the console's tp: refused in a session whose host has turned teleporting (and noclip) off.
Teleport teleport(const Vec3& position, float heading) override {
if (!session_noclip_allowed()) return Teleport::forbidden;
// A throwdown mode's own moves (line-ups, recoveries, returns to the start) are the game's:
// allowed wherever its match runs and asks for them (the kit's `match.teleports`).
if (!session_noclip_allowed() && !throwdowns::kit::match().teleports) return Teleport::forbidden;
return teleport_local_skater_heading(position, heading) ? Teleport::sent : Teleport::unavailable;
}
std::optional<Vec3> raycast(const Vec3& from, const Vec3& to) override { return local_surface_hit(from, to); }
@@ -93,6 +96,8 @@ public:
else if (name == "navigate") sound = UiSound::navigate;
else if (name == "toggle") sound = UiSound::toggle;
else if (name == "tab") sound = UiSound::tab;
else if (name == "countdown") sound = UiSound::countdown;
else if (name == "go") sound = UiSound::go;
else return false;
multiplayer::queue_ui_sound(static_cast<std::uint32_t>(sound));
return true;
@@ -195,7 +200,7 @@ void read_tricks() {
signals.line_score = hud->line_score;
signals.multiplier = hud->multiplier;
signals.slam = hud->slam;
// A wipeout is physics states 300-399 (as Domination reads it).
// A wipeout is physics states 300-399.
signals.wipeout = skater.skater && skater.physics_state >= 300 && skater.physics_state < 400;
const auto event = trick_watch.update(signals);
environment->score_now = ScoreState{hud->line_score, hud->multiplier, trick_watch.in_trick(), hud->header, hud->descriptor,