diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 284caa23ac..8daa0c3e03 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -69,6 +69,8 @@ var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds... var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active. + + var/character_slots = 10 // The number of available character slots var/max_maint_drones = 5 //This many drones can spawn, var/allow_drone_spawn = 1 //assuming the admin allow them to. @@ -493,6 +495,9 @@ if("req_cult_ghostwriter") config.cult_ghostwriter_req_cultists = text2num(value) + + if("character_slots") + config.character_slots = text2num(value) if("allow_drone_spawn") config.allow_drone_spawn = text2num(value) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f00a8a9e6e..6814ad7ec8 100755 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -20,8 +20,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "mutineer" = IS_MODE_COMPILED("mutiny"), // 13 ) -var/const/MAX_SAVE_SLOTS = 10 - //used for alternate_option #define GET_RANDOM_JOB 0 #define BE_ASSISTANT 1 @@ -1622,7 +1620,7 @@ datum/preferences if(S) dat += "Select a character slot to load
" var/name - for(var/i=1, i<=MAX_SAVE_SLOTS, i++) + for(var/i=1, i<= config.character_slots, i++) S.cd = "/character[i]" S["real_name"] >> name if(!name) name = "Character[i]" diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index db654fcc13..0f3a1dd0f7 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -62,7 +62,7 @@ lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style)) be_special = sanitize_integer(be_special, 0, 65535, initial(be_special)) - default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) + default_slot = sanitize_integer(default_slot, 1, config.character_slots, initial(default_slot)) toggles = sanitize_integer(toggles, 0, 65535, initial(toggles)) 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,7 +94,7 @@ if(!S) return 0 S.cd = "/" if(!slot) slot = default_slot - slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) + slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot)) if(slot != default_slot) default_slot = slot S["default_slot"] << slot diff --git a/config/example/config.txt b/config/example/config.txt index faeebb79bc..6062108945 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -258,5 +258,8 @@ ALLOW_CULT_GHOSTWRITER ## Sets the minimum number of cultists needed for ghosts to write in blood. REQ_CULT_GHOSTWRITER 6 +## Sets the number of available character slots +CHARACTER_SLOTS 10 + ## Uncomment to use overmap system for zlevel travel #USE_OVERMAP