From edc8313eceaa9e0a7b20d6b738faf91f2c11879e Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:28:28 -0400 Subject: [PATCH] [MIRROR] Fixes the color matrix editor (#1856) * Fixes the color matrix editor (#82478) ## About The Pull Request It was sending back stringified numbers as inputs. This came from a typescript cleanup pr from sync (#82000) and was ultimately caused by a... I think misunderstanding of how the color list works (#67967) ## Why It's Good For The Game Works like a charm now, which is good cause I use it a lot ## Changelog :cl: fix: The color matrix editor now works properly again /:cl: * Fixes the color matrix editor --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx b/tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx index 897c43e6234..edf75dcf161 100644 --- a/tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx +++ b/tgui/packages/tgui/interfaces/ColorMatrixEditor.tsx @@ -13,7 +13,7 @@ import { Window } from '../layouts'; type Data = { mapRef: string; - currentColor: string[]; + currentColor: number[]; }; const PREFIXES = ['r', 'g', 'b', 'a', 'c'] as const; @@ -49,7 +49,7 @@ export const ColorMatrixEditor = (props) => { format={(value) => toFixed(value, 2)} onDrag={(value) => { let retColor = currentColor; - retColor[row * 4 + col] = `${value}`; + retColor[row * 4 + col] = value; act('transition_color', { color: retColor, });