mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Makes the number of load/storable character slots a configurable value.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 += "<b>Select a character slot to load</b><hr>"
|
||||
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]"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user