Video Power-ups: Custom Power-ups, ?parts=video overlay, new redeems editor
- Custom Power-ups (bits) are redeem triggers: channel.custom_power_up_redemption.add
-> redeems.handle('custom_power_up', ...) with the bits amount; listed live from
Helix /bits/custom_power_ups on the Redeems page; labels/replay in Recent activity.
- Variations can show a video (reward_variations.video): style 'video' plays only on
the opt-in ?parts=video overlay (public/alerts/video.js), full-screen, one at a time,
with a yellow camcorder box ("TRIGGERED <name>", viewer, bits, POWER-UP) in the alert
corner. Any source size; 2560x1440 like HUDFX gives sharper video.
- Redeems page rewritten as one editor: Display (Cassette / Sound only / Video),
volume slider, sticker thumbnails, live % chances, one Save button + Ctrl+S
(POST /redeems/save), tests/add/delete save first, unsaved edits kept as a browser
draft with an inline restore bar (no dialogs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
19a0965eb2
commit
b3caac7a31
11 changed files with 512 additions and 135 deletions
|
|
@ -98,7 +98,7 @@ function createSchema() {
|
|||
|
||||
CREATE TABLE IF NOT EXISTS reward_variations (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
kind TEXT NOT NULL, -- reward | auto_reward | power_up
|
||||
kind TEXT NOT NULL, -- reward | auto_reward | power_up | custom_power_up
|
||||
key TEXT NOT NULL, -- reward id / built-in reward type / power-up type
|
||||
title TEXT NOT NULL, -- trigger name shown in the UI (last known)
|
||||
name TEXT NOT NULL, -- variation name, shown on the polaroid
|
||||
|
|
@ -141,7 +141,8 @@ function migrate() {
|
|||
addColumn('activity_log', 'replay_json', 'TEXT');
|
||||
addColumn('settings', 'hudfx_overlay_url', "TEXT DEFAULT ''");
|
||||
addColumn('settings', 'chat_hidden_users', "TEXT DEFAULT 'bot_account, blerp, blerpbot, hudfx, hudfxbot, lumiastream'"); // never shown in the on-screen chat
|
||||
addColumn('settings', 'chat_hide_commands', 'INTEGER DEFAULT 1'); // hide messages starting with ! // HUDFX browser source URL, embedded with ?ext=hudfx // the overlay message that was shown (dashboard Replay)
|
||||
addColumn('settings', 'chat_hide_commands', 'INTEGER DEFAULT 1'); // hide messages starting with !
|
||||
addColumn('reward_variations', 'video', "TEXT DEFAULT ''"); // URL of a video: full-screen on the ?parts=video overlay // HUDFX browser source URL, embedded with ?ext=hudfx // the overlay message that was shown (dashboard Replay)
|
||||
}
|
||||
|
||||
// Put the starter TTS blocklist (src/tts-blocklist.txt) into the settings ONCE; after that it is the user's list
|
||||
|
|
@ -282,7 +283,7 @@ function getMatchingActions(eventType, eventDetail) {
|
|||
}
|
||||
|
||||
// Redeem variations
|
||||
const VARIATION_FIELDS = ['name', 'rarity', 'sound', 'volume', 'polaroid', 'caption', 'art', 'enabled', 'tts_voice_id'];
|
||||
const VARIATION_FIELDS = ['name', 'rarity', 'sound', 'volume', 'polaroid', 'caption', 'art', 'enabled', 'tts_voice_id', 'video'];
|
||||
|
||||
function getAllVariations() {
|
||||
return db.prepare('SELECT * FROM reward_variations ORDER BY kind, title, id').all();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue