mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
you can set the volume of the jukebox now, preferences tab -> set volume
Conflicts: code/modules/media/mediamanager.dm
This commit is contained in:
@@ -126,6 +126,8 @@ datum/preferences
|
||||
// Whether or not to use randomized character slots
|
||||
var/randomslot = 0
|
||||
|
||||
// jukebox volume
|
||||
var/volume = 100
|
||||
/datum/preferences/New(client/C)
|
||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||
if(istype(C))
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
S["UI_style_color"] >> UI_style_color
|
||||
S["UI_style_alpha"] >> UI_style_alpha
|
||||
S["randomslot"] >> randomslot
|
||||
|
||||
S["volume"] >> volume
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
@@ -70,6 +70,7 @@
|
||||
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))
|
||||
randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot))
|
||||
volume = sanitize_integer(volume, 0, 100, initial(volume))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences()
|
||||
@@ -91,6 +92,17 @@
|
||||
S["UI_style_color"] << UI_style_color
|
||||
S["UI_style_alpha"] << UI_style_alpha
|
||||
S["randomslot"] << randomslot
|
||||
S["volume"] << volume
|
||||
return 1
|
||||
|
||||
//saving volume changes
|
||||
/datum/preferences/proc/save_volume()
|
||||
if(!path) return 0
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0
|
||||
S.cd = "/"
|
||||
|
||||
S["volume"] << volume
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/load_save(dir)
|
||||
|
||||
Reference in New Issue
Block a user