[MIRROR] fixes one of my first ever coding sins here (#11720)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-22 01:34:50 +02:00
committed by GitHub
co-authored by Kashargul
parent 85cd507d86
commit 65a5e0a614
14 changed files with 525 additions and 365 deletions
+9 -4
View File
@@ -508,8 +508,8 @@
if(!user)
return
if(!values)
values = list(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
if(values.len < 12)
values = DEFAULT_COLORMATRIX
if(length(values) < 12)
values.len = 12
var/list/output = list()
output += "<form><input type='hidden' name='src' value='[REF(src)]'>"
@@ -580,8 +580,13 @@
var/client/C = user
user = C.mob
else
return
return null
var/datum/browser/modal/color_matrix_picker/B = new(user, message, title, button1, button2, button3, stealfocus, timeout, values)
B.open()
B.wait()
return list("button" = B.selected_button, "matrix" = B.color_matrix)
if(B.selected_button == 3 || !B.selected_button)
return values
if((B.selected_button == 2) || !islist(B.color_matrix) || !ISINRANGE(length(B.color_matrix), 9, 20))
return list()
return B.color_matrix