diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1811f3f8715..59dfe72b318 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -109,8 +109,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) load_path(parent.ckey) if(load_and_save && !fexists(path)) try_savefile_type_migration() - unlock_content = !!parent.IsByondMember() || GLOB.donator_list[parent.ckey] //SKYRAT EDIT - ADDED DONATOR CHECK - if(unlock_content) + unlock_content = !!parent.IsByondMember() + donator_status = !!GLOB.donator_list[parent.ckey] //SKYRAT EDIT ADD - DONATOR CHECK + if(unlock_content || donator_status) //SKYRAT EDIT - ADD DONATOR CHECK max_save_slots = 50 //SKYRAT EDIT - ORIGINAL 8 else CRASH("attempted to create a preferences datum without a client or mock!") diff --git a/modular_skyrat/master_files/code/modules/mob/login.dm b/modular_skyrat/master_files/code/modules/mob/login.dm index fbf57ccf0b5..96c9a6c2d2b 100644 --- a/modular_skyrat/master_files/code/modules/mob/login.dm +++ b/modular_skyrat/master_files/code/modules/mob/login.dm @@ -5,6 +5,6 @@ return FALSE if(SSplayer_ranks.initialized) - SSplayer_ranks.update_prefs_unlock_content(client?.prefs) + SSplayer_ranks.update_prefs_donator_status(client?.prefs) return TRUE diff --git a/modular_skyrat/modules/player_ranks/code/preferences.dm b/modular_skyrat/modules/player_ranks/code/preferences.dm new file mode 100644 index 00000000000..5a3f43dc8b1 --- /dev/null +++ b/modular_skyrat/modules/player_ranks/code/preferences.dm @@ -0,0 +1,3 @@ +/datum/preferences + /// Does this member have donator status on the server + var/donator_status = FALSE diff --git a/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm b/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm index 6e724e44dbc..64ce3304732 100644 --- a/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm +++ b/modular_skyrat/modules/player_ranks/code/subsystem/player_ranks.dm @@ -111,7 +111,7 @@ SUBSYSTEM_DEF(player_ranks) if(CONFIG_GET(flag/donator_legacy_system)) donator_controller.load_legacy() - update_all_prefs_unlock_contents() + update_all_prefs_donator_status() return if(!SSdbcore.Connect()) @@ -124,30 +124,31 @@ SUBSYSTEM_DEF(player_ranks) return load_player_rank_sql(donator_controller) - update_all_prefs_unlock_contents() + update_all_prefs_donator_status() /** * Handles updating all of the preferences datums to have the appropriate - * `unlock_content` and `max_save_slots` once donators are loaded. + * `donator_status` and `max_save_slots` once donators are loaded. */ -/datum/controller/subsystem/player_ranks/proc/update_all_prefs_unlock_contents() +/datum/controller/subsystem/player_ranks/proc/update_all_prefs_donator_status() for(var/ckey as anything in GLOB.preferences_datums) - update_prefs_unlock_content(GLOB.preferences_datums[ckey]) + update_prefs_donator_status(GLOB.preferences_datums[ckey]) /** - * Updates the `unlock_contents` and the `max_save_slots` + * Updates the `donator_status` and the `max_save_slots` * * Arguments: - * * prefs - The preferences datum to check the unlock_content eligibility. + * * prefs - The preferences datum to check the donator_status eligibility. */ -/datum/controller/subsystem/player_ranks/proc/update_prefs_unlock_content(datum/preferences/prefs) +/datum/controller/subsystem/player_ranks/proc/update_prefs_donator_status(datum/preferences/prefs) if(!prefs) return - prefs.unlock_content = !!prefs.parent.IsByondMember() || is_donator(prefs.parent) - if(prefs.unlock_content) + prefs.unlock_content = !!prefs.parent.IsByondMember() + prefs.donator_status = is_donator(prefs.parent) + if(prefs.unlock_content || prefs.donator_status) prefs.max_save_slots = 50 diff --git a/tgstation.dme b/tgstation.dme index 49d1b61bc7b..b4b43389d62 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7776,6 +7776,7 @@ #include "modular_skyrat\modules\pixel_shift\code\pixel_shift_component.dm" #include "modular_skyrat\modules\pixel_shift\code\pixel_shift_keybind.dm" #include "modular_skyrat\modules\pixel_shift\code\pixel_shift_mob.dm" +#include "modular_skyrat\modules\player_ranks\code\preferences.dm" #include "modular_skyrat\modules\player_ranks\code\world_topic.dm" #include "modular_skyrat\modules\player_ranks\code\player_rank_controller\_player_rank_controller.dm" #include "modular_skyrat\modules\player_ranks\code\player_rank_controller\config_entry.dm"