mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
better buttonboxing
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
module.exports = {
|
||||
id: 'assignmentRoulette',
|
||||
name: 'Rover Reassignment',
|
||||
description: 'Scrambles who is driving which rover.',
|
||||
goal: 300,
|
||||
async run(ctx) {
|
||||
const moved = ctx.rerollAssignments();
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Reward Definition: Camera Whiplash
|
||||
// Purpose: Defines the camera-whiplash deterrence reward and timing/strength settings. Scope: Supplies reusable reward metadata and execution parameters for chaos triggers.
|
||||
const STEP_MS = 220;
|
||||
const DURATION_MS = 30 * 1000;
|
||||
const DURATION_MS = 60 * 1000;
|
||||
const STEPS = Math.ceil(DURATION_MS / STEP_MS);
|
||||
|
||||
module.exports = {
|
||||
id: 'cameraWhiplash',
|
||||
name: 'Camera Wiggle',
|
||||
description: 'Makes the rover cameras wiggle around.',
|
||||
goal: 100,
|
||||
async run(ctx) {
|
||||
const rovers = ctx
|
||||
|
||||
@@ -22,6 +22,7 @@ function sleep(ms) {
|
||||
module.exports = {
|
||||
id: 'chatSpam',
|
||||
name: 'Chat Spam',
|
||||
description: 'Floods chat with nonsense messages.',
|
||||
goal: 320,
|
||||
async run(ctx) {
|
||||
const nickname = randLetter();
|
||||
|
||||
@@ -116,6 +116,7 @@ async function startDarkness(ctx, effect) {
|
||||
module.exports = {
|
||||
id: 'darkness',
|
||||
name: 'Darkness',
|
||||
description: 'Disables room lights and headlights for 15 minutes.',
|
||||
isHeadlightBlocked,
|
||||
goal: 400,
|
||||
async run(ctx) {
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
module.exports = {
|
||||
id: 'discordPingEveryone',
|
||||
name: 'PING @EVERYONE',
|
||||
goal: 20000,
|
||||
description: 'Pings @everyone in Discord.',
|
||||
dailyLimited: true,
|
||||
goal: 4000,
|
||||
async run(ctx) {
|
||||
ctx.publishEvent({
|
||||
source: 'buttonBoxReward',
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
module.exports = {
|
||||
id: 'discordStalkerPing',
|
||||
name: 'Discord Ping',
|
||||
goal: 9000,
|
||||
description: 'Pings the stalker role in Discord.',
|
||||
dailyLimited: true,
|
||||
goal: 2000,
|
||||
async run(ctx) {
|
||||
ctx.publishEvent({
|
||||
source: 'buttonBoxReward',
|
||||
|
||||
@@ -5,6 +5,7 @@ const DOCK_COMMAND_BASE64 = Buffer.from([143]).toString('base64');
|
||||
module.exports = {
|
||||
id: 'dockPanic',
|
||||
name: 'All Dock',
|
||||
description: 'Forces all rovers into docking mode.',
|
||||
goal: 180,
|
||||
async run(ctx) {
|
||||
const rovers = ctx.listOnlineRovers();
|
||||
|
||||
@@ -16,6 +16,7 @@ function sleep(ms) {
|
||||
module.exports = {
|
||||
id: 'ghostTypingSpam',
|
||||
name: 'Typing Spam',
|
||||
description: 'Fills chat with fake typing indicators.',
|
||||
goal: 220,
|
||||
async run(ctx) {
|
||||
const active = new Set();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Reward Definition: Light Strobe
|
||||
// Purpose: Defines the light-strobe deterrence reward and activation contract. Scope: Encapsulates reward identity, labels, and effect parameters for runtime dispatch.
|
||||
const STROBE_MS = 30 * 1000;
|
||||
const TICK_MS = 200;
|
||||
const TICK_MS = 500;
|
||||
|
||||
let activeTimer = null;
|
||||
|
||||
@@ -40,7 +40,8 @@ function startStrobe(ctx, effect = {}) {
|
||||
module.exports = {
|
||||
id: 'lightStrobe',
|
||||
name: 'Light Strobe',
|
||||
goal: 300,
|
||||
description: 'Makes the room lights flash rapidly for 30 seconds.',
|
||||
goal: 400,
|
||||
async run(ctx) {
|
||||
startStrobe(ctx, { endsAt: Date.now() + STROBE_MS, on: false });
|
||||
ctx.sendAlert({ color: '#ffc107', title: 'Light Strobe', message: 'All room controls strobing for 30 seconds.' });
|
||||
|
||||
@@ -53,7 +53,8 @@ function scheduleRestore(ctx, effect = {}) {
|
||||
module.exports = {
|
||||
id: 'modeJam',
|
||||
name: 'Admin Lock',
|
||||
goal: 900,
|
||||
description: 'Temporarily puts the server in admin mode.',
|
||||
goal: 3000,
|
||||
async run(ctx) {
|
||||
const durationMs =
|
||||
MIN_DURATION_MS + Math.floor(Math.random() * (MAX_DURATION_MS - MIN_DURATION_MS + 1));
|
||||
|
||||
Reference in New Issue
Block a user