Adds toggles3 (#27397)

This commit is contained in:
AffectedArc07
2024-11-24 14:23:27 +00:00
committed by GitHub
parent e37b83a0b9
commit 5e5c75bf48
8 changed files with 28 additions and 4 deletions
@@ -63,6 +63,7 @@ GLOBAL_LIST_INIT(special_role_times, list(
var/UI_style = "Midnight"
var/toggles = TOGGLES_DEFAULT
var/toggles2 = TOGGLES_2_DEFAULT // Created because 1 column has a bitflag limit of 24 (BYOND limitation not MySQL)
var/toggles3 = TOGGLES_3_DEFAULT // Created for see above. I need to JSONify this at some point -aa07
var/sound = SOUND_DEFAULT
var/light = LIGHT_DEFAULT
/// Glow level for the lighting. Takes values from GLOW_HIGH to GLOW_DISABLE.
@@ -34,6 +34,7 @@
raw_muted_admins = query.item[26]
viewrange = query.item[27]
raw_fptp = query.item[28]
toggles3 = text2num(query.item[29])
lastchangelog_2 = lastchangelog // Clone please
@@ -43,6 +44,7 @@
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
toggles = sanitize_integer(toggles, 0, TOGGLES_TOTAL, initial(toggles))
toggles2 = sanitize_integer(toggles2, 0, TOGGLES_2_TOTAL, initial(toggles2))
toggles3 = sanitize_integer(toggles3, 0, TOGGLES_3_TOTAL, initial(toggles3))
sound = sanitize_integer(sound, 0, 65535, initial(sound))
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
@@ -94,6 +96,7 @@
default_slot=:defaultslot,
toggles=:toggles,
toggles_2=:toggles2,
toggles_3=:toggles3,
atklog=:atklog,
sound=:sound,
light=:light,
@@ -123,6 +126,7 @@
// Even though its a number in the DB, you have to use num2text here, otherwise byond adds scientific notation to the number
"toggles" = num2text(toggles, CEILING(log(10, (TOGGLES_TOTAL)), 1)),
"toggles2" = num2text(toggles2, CEILING(log(10, (TOGGLES_2_TOTAL)), 1)),
"toggles3" = num2text(toggles3, CEILING(log(10, (TOGGLES_3_TOTAL)), 1)),
"atklog" = atklog,
"sound" = sound,
"light" = light,