Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubles the max character slots, ups beecoin and Byondmember additions accordingly. #11523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ GLOBAL_LIST_INIT(helmet_styles, list(
HELMET_PROTECTIVE,
))

// True value of max save slots (3 is default, 8 is byond member, +1 to either if you have the extra slot loadout entry). Potential max is 9
#define TRUE_MAX_SAVE_SLOTS 9
// True value of max save slots (10 is default, 16 is byond member, +2 to either if you have the extra slot loadout entry). Potential max is 18
#define TRUE_MAX_SAVE_SLOTS 18

// Values for /datum/preference/preference_type
/// This preference is character specific.
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/loadout/loadout_ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
is_equippable = FALSE

/datum/gear/ooc/char_slot
display_name = "extra character slot"
description = "An extra charslot. Pretty self-explanatory."
display_name = "two extra character slots"
description = "An extra two charslots. Pretty self-explanatory."
cost = 10000
path = /obj/item/toy/figure/captain

/datum/gear/ooc/char_slot/purchase(var/client/C)
// This is only locally immediately after purchase - this will be incremented on load in preferences.dm
C.prefs.max_save_slots += 1
C.prefs.max_save_slots += 2

/datum/gear/ooc/real_antagtoken
display_name = "antag token"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/// The current active slot, and the one that will be saved as active
var/default_slot = 1
/// The maximum number of slots we're allowed to contain
var/max_save_slots = 3
var/max_save_slots = 10
/// Cache for the current active character slot
var/datum/preferences_holder/preferences_character/character_data
/// Cache for player datumized preferences
Expand Down Expand Up @@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!IS_GUEST_KEY(parent.key))
unlock_content = !!parent.IsByondMember()
if(unlock_content)
max_save_slots = 8
max_save_slots = 16
log_preferences("[parent.ckey]: Checked BYOND membership: [unlock_content ? "MEMBER" : "NONMEMBER"].")
else
CRASH("attempted to create a preferences datum without a client!")
Expand All @@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(pref_load == PREFERENCE_LOAD_SUCCESS || pref_load == PREFERENCE_LOAD_NO_DATA)
log_preferences("[parent?.ckey]: Player preferences loaded and applied.")
if("6030fe461e610e2be3a2c3e75c06067e" in purchased_gear) //MD5 hash of, "extra character slot"
max_save_slots += 1
max_save_slots += 2
// Apply the loaded preferences!!
if(istype(parent))
apply_all_client_preferences()
Expand Down
Loading