diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm
index 29e6c15d20e..dfcc7d314b0 100644
--- a/code/__HELPERS/sanitize_values.dm
+++ b/code/__HELPERS/sanitize_values.dm
@@ -31,17 +31,16 @@
return default
-/proc/sanitize_hexcolor(color, desired_format=3, include_bang=0, default)
- var/bang = include_bang ? "#" : ""
+/proc/sanitize_hexcolor(color, desired_format=3, include_crunch=0, default)
+ var/crunch = include_crunch ? "#" : ""
if(!istext(color))
- if(default) return default
- return bang + repeat_string(desired_format, "0")
-
+ color = ""
+
var/start = 1 + (text2ascii(color,1)==35)
var/len = length(color)
var/step_size = 1 + ((len+1)-start != desired_format)
-
- . = bang
+
+ . = ""
for(var/i=start, i<=len, i+=step_size)
var/ascii = text2ascii(color,i)
switch(ascii)
@@ -49,7 +48,10 @@
if(97 to 102) . += ascii2text(ascii) //letters a to f
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
else
- if(default) return default
- return bang + repeat_string(desired_format, "0")
-
- return .
\ No newline at end of file
+ break
+
+ if(length(.) != desired_format)
+ if(default) return default
+ return crunch + repeat_string(desired_format, "0")
+
+ return crunch + .
\ No newline at end of file
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index 2271bc26b80..f64a36c9c05 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -38,18 +38,20 @@
log_ooc("[mob.name]/[key] : [msg]")
+ var/keyname = unlock_content ? "[key]" : key
+
for(var/client/C in clients)
if(C.prefs.toggles & CHAT_OOC)
if(holder)
if(!holder.fakekey || C.holder)
if(holder.rights & R_ADMIN)
- C << "OOC: [key][holder.fakekey ? "/([holder.fakekey])" : ""]: "
+ C << "OOC: [keyname][holder.fakekey ? "/([holder.fakekey])" : ""]: "
else
- C << "OOC: [key][holder.fakekey ? "/([holder.fakekey])" : ""]: "
+ C << "OOC: [keyname][holder.fakekey ? "/([holder.fakekey])" : ""]: "
else
C << "OOC: [holder.fakekey ? holder.fakekey : key]: "
else
- C << "OOC: [key]: "
+ C << "OOC: [keyname]: "
var/global/normal_ooc_colour = "#002eb8"
@@ -58,3 +60,18 @@ var/global/normal_ooc_colour = "#002eb8"
set desc = "Set to yellow for eye burning goodness."
set category = "Fun"
normal_ooc_colour = newColor
+
+/client/verb/colorooc()
+ set name = "OOC Text Color"
+ set category = "Preferences"
+
+ if(!unlock_content && !(holder && (holder.rights & R_ADMIN)))
+ src << "You must be a byond member or admin with +ADMIN rights to access this feature. Sorry"
+ return
+
+ var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
+ if(new_ooccolor)
+ prefs.ooccolor = new_ooccolor
+ prefs.save_preferences()
+ feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ return
\ No newline at end of file
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 0fcc9ad91c5..339db872a56 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -28,7 +28,6 @@ var/list/admin_verbs_admin = list(
/datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
/datum/admins/proc/announce, /*priority announce something to all clients.*/
- /client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/toggle_view_range, /*changes how far we can see*/
/datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
@@ -141,7 +140,6 @@ var/list/admin_verbs_hideable = list(
/datum/admins/proc/toggleenter,
/datum/admins/proc/toggleguests,
/datum/admins/proc/announce,
- /client/proc/colorooc,
/client/proc/admin_ghost,
/client/proc/toggle_view_range,
/datum/admins/proc/view_txt_log,
@@ -381,17 +379,6 @@ var/list/admin_verbs_hideable = list(
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
-/client/proc/colorooc()
- set category = "Fun"
- set name = "OOC Text Color"
- if(!holder) return
- var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
- if(new_ooccolor)
- prefs.ooccolor = new_ooccolor
- prefs.save_preferences()
- feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
/client/proc/stealth()
set category = "Admin"
set name = "Stealth Mode"
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 3ef743c60b8..b88ee8fadd3 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -17,6 +17,8 @@
var/adminobs = null
var/area = null
+ var/unlock_content = 0 //byond-member content
+
///////////////
//SOUND STUFF//
///////////////
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 9fbadcba04c..3056a000378 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -87,6 +87,8 @@
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
return null
+ unlock_content = IsByondMember()
+
clients += src
directory[ckey] = src
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 156c338fdd4..5b8dee959de 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -17,13 +17,11 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
)
-var/const/MAX_SAVE_SLOTS = 3
-
-
datum/preferences
//doohickeys for savefiles
var/path
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
+ var/max_save_slots = 3
//non-preference stuff
var/warns = 0
@@ -33,7 +31,7 @@ datum/preferences
//game-preferences
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
- var/ooccolor = "#b82e00"
+ var/ooccolor = "#002eb8"
var/be_special = 0 //Special role selection
var/UI_style = "Midnight"
var/toggles = TOGGLES_DEFAULT
@@ -50,7 +48,7 @@ datum/preferences
var/h_color = "000" //Hair color
var/f_style = "Shaved" //Face hair type
var/f_color = "000" //Facial hair color
- var/skin_tone = "caucasian" //Skin color
+ var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
//Mob preview
@@ -81,9 +79,12 @@ datum/preferences
/datum/preferences/New(client/C)
b_type = random_blood_type()
+ ooccolor = normal_ooc_colour
if(istype(C))
if(!IsGuestKey(C.key))
load_path(C.ckey)
+ if(C.unlock_content)
+ max_save_slots = 8
var/loaded_preferences_successfully = load_preferences()
if(loaded_preferences_successfully)
if(load_character())
@@ -121,12 +122,12 @@ datum/preferences
if(S)
dat += "