From 239c43f2401c1577bd9dfbd19df71daff533c209 Mon Sep 17 00:00:00 2001 From: Rob Sassack <91514586+robsassack@users.noreply.github.com> Date: Thu, 16 Mar 2023 07:55:36 -0400 Subject: [PATCH] Added plus three funbox (#4076) robsassack --- backend/src/api/controllers/result.ts | 5 ++++- backend/src/constants/funbox.ts | 4 ++++ frontend/src/ts/test/funbox/funbox-list.ts | 5 +++++ frontend/static/funbox/_list.json | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/backend/src/api/controllers/result.ts b/backend/src/api/controllers/result.ts index 2403dd158..f50c5545a 100644 --- a/backend/src/api/controllers/result.ts +++ b/backend/src/api/controllers/result.ts @@ -388,7 +388,10 @@ export async function addResult( const { funbox, bailedOut } = result; const validResultCriteria = - (funbox === "none" || funbox === "plus_one" || funbox === "plus_two") && + (funbox === "none" || + funbox === "plus_one" || + funbox === "plus_two" || + funbox === "plus_three") && !bailedOut && user.banned !== true && user.lbOptOut !== true && diff --git a/backend/src/constants/funbox.ts b/backend/src/constants/funbox.ts index 376f7e068..88b1e9948 100644 --- a/backend/src/constants/funbox.ts +++ b/backend/src/constants/funbox.ts @@ -75,6 +75,10 @@ const Funboxes: Record = { canGetPb: true, difficultyLevel: 0, }, + plus_three: { + canGetPb: true, + difficultyLevel: 0, + }, read_ahead_easy: { canGetPb: true, difficultyLevel: 1, diff --git a/frontend/src/ts/test/funbox/funbox-list.ts b/frontend/src/ts/test/funbox/funbox-list.ts index 5356fe308..c22536ac9 100644 --- a/frontend/src/ts/test/funbox/funbox-list.ts +++ b/frontend/src/ts/test/funbox/funbox-list.ts @@ -118,6 +118,11 @@ const list: MonkeyTypes.FunboxMetadata[] = [ info: "Only two future words are visible.", properties: ["changesWordsVisibility", "toPush:3", "noInfiniteDuration"], }, + { + name: "plus_three", + info: "Only three future words are visible.", + properties: ["changesWordsVisibility", "toPush:4", "noInfiniteDuration"], + }, { name: "read_ahead_easy", info: "Only the current word is invisible.", diff --git a/frontend/static/funbox/_list.json b/frontend/static/funbox/_list.json index 6b5e01c4f..ce03cacdf 100644 --- a/frontend/static/funbox/_list.json +++ b/frontend/static/funbox/_list.json @@ -94,6 +94,11 @@ "info": "Only two future words are visible.", "canGetPb": true }, + { + "name": "plus_three", + "info": "Only three future words are visible.", + "canGetPb": true + }, { "name": "read_ahead_easy", "info": "Only the current word is invisible.",