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 = 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/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/max_maint_drones = 5 //This many drones can spawn,
|
||||||
var/allow_drone_spawn = 1 //assuming the admin allow them to.
|
var/allow_drone_spawn = 1 //assuming the admin allow them to.
|
||||||
@@ -493,6 +495,9 @@
|
|||||||
|
|
||||||
if("req_cult_ghostwriter")
|
if("req_cult_ghostwriter")
|
||||||
config.cult_ghostwriter_req_cultists = text2num(value)
|
config.cult_ghostwriter_req_cultists = text2num(value)
|
||||||
|
|
||||||
|
if("character_slots")
|
||||||
|
config.character_slots = text2num(value)
|
||||||
|
|
||||||
if("allow_drone_spawn")
|
if("allow_drone_spawn")
|
||||||
config.allow_drone_spawn = text2num(value)
|
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
|
"mutineer" = IS_MODE_COMPILED("mutiny"), // 13
|
||||||
)
|
)
|
||||||
|
|
||||||
var/const/MAX_SAVE_SLOTS = 10
|
|
||||||
|
|
||||||
//used for alternate_option
|
//used for alternate_option
|
||||||
#define GET_RANDOM_JOB 0
|
#define GET_RANDOM_JOB 0
|
||||||
#define BE_ASSISTANT 1
|
#define BE_ASSISTANT 1
|
||||||
@@ -1622,7 +1620,7 @@ datum/preferences
|
|||||||
if(S)
|
if(S)
|
||||||
dat += "<b>Select a character slot to load</b><hr>"
|
dat += "<b>Select a character slot to load</b><hr>"
|
||||||
var/name
|
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.cd = "/character[i]"
|
||||||
S["real_name"] >> name
|
S["real_name"] >> name
|
||||||
if(!name) name = "Character[i]"
|
if(!name) name = "Character[i]"
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style))
|
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))
|
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))
|
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
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))
|
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
if(!S) return 0
|
if(!S) return 0
|
||||||
S.cd = "/"
|
S.cd = "/"
|
||||||
if(!slot) slot = default_slot
|
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)
|
if(slot != default_slot)
|
||||||
default_slot = slot
|
default_slot = slot
|
||||||
S["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.
|
## Sets the minimum number of cultists needed for ghosts to write in blood.
|
||||||
REQ_CULT_GHOSTWRITER 6
|
REQ_CULT_GHOSTWRITER 6
|
||||||
|
|
||||||
|
## Sets the number of available character slots
|
||||||
|
CHARACTER_SLOTS 10
|
||||||
|
|
||||||
## Uncomment to use overmap system for zlevel travel
|
## Uncomment to use overmap system for zlevel travel
|
||||||
#USE_OVERMAP
|
#USE_OVERMAP
|
||||||
|
|||||||
Reference in New Issue
Block a user