diff --git a/modular_ss220/_defines220/_defines220.dme b/modular_ss220/_defines220/_defines220.dme index 65c29efd5930..5c65e1f6cdf3 100644 --- a/modular_ss220/_defines220/_defines220.dme +++ b/modular_ss220/_defines220/_defines220.dme @@ -12,3 +12,4 @@ #include "code/hud_ss220.dm" #include "code/layers_ss220.dm" #include "code/signals_atom.dm" +#include "code/donor.dm" diff --git a/modular_ss220/_defines220/code/donor.dm b/modular_ss220/_defines220/code/donor.dm new file mode 100644 index 000000000000..053c420212cf --- /dev/null +++ b/modular_ss220/_defines220/code/donor.dm @@ -0,0 +1,7 @@ +// Special tiers for ss220 staff +#define BIG_WORKER_TIER 220 +#define LITTLE_WORKER_TIER 110 + +// What TTS level does it give access to? +#define BIG_WORKER_TTS_LEVEL 3 +#define LITTLE_WORKER_TTS_LEVEL 1 diff --git a/modular_ss220/donor/code/client_procs.dm b/modular_ss220/donor/code/client_procs.dm index 97819cbc77b1..4088d6d80072 100644 --- a/modular_ss220/donor/code/client_procs.dm +++ b/modular_ss220/donor/code/client_procs.dm @@ -2,8 +2,10 @@ /datum/client_login_processor/donator_check/proc/CheckAutoDonatorLevel(client/C) + var/list/big_worker = list("Админ", "Старший Администратор", "Разработчик", "Бригадир мапперов", "Маппер") + if(C.holder) - C.donator_level = 2 + C.donator_level = (C.holder.rank in big_worker) ? BIG_WORKER_TIER : LITTLE_WORKER_TIER return var/is_wl = GLOB.configuration.overflow.reroute_cap == 0.5 ? TRUE : FALSE @@ -17,7 +19,7 @@ return while(rank_ckey_read.NextRow()) - C.donator_level = 2 + C.donator_level = (rank_ckey_read.item[1] in big_worker) ? BIG_WORKER_TIER : LITTLE_WORKER_TIER qdel(rank_ckey_read) @@ -42,7 +44,13 @@ if(10000 to INFINITY) donator_level = DONATOR_LEVEL_MAX - C.donator_level = max(donator_level, C.donator_level) + switch(C.donator_level) + if(LITTLE_WORKER_TIER) + C.donator_level = LITTLE_WORKER_TTS_LEVEL > donator_level ? C.donator_level : donator_level + if(BIG_WORKER_TIER) + C.donator_level = BIG_WORKER_TTS_LEVEL > donator_level ? C.donator_level : donator_level + else + C.donator_level = donator_level C.donor_loadout_points() @@ -77,6 +85,10 @@ prefs.max_gear_slots += 12 if(5) prefs.max_gear_slots += 16 + if(LITTLE_WORKER_TIER) + prefs.max_gear_slots += 1 + if(BIG_WORKER_TIER) + prefs.max_gear_slots += 5 /client/proc/donor_character_slots() if(!prefs) @@ -84,6 +96,12 @@ prefs.max_save_slots = MAX_SAVE_SLOTS_SS220 + 5 * donator_level + switch(donator_level) + if(LITTLE_WORKER_TIER) + prefs.max_save_slots = 7 + if(BIG_WORKER_TIER) + prefs.max_save_slots = 10 + prefs.character_saves.len = prefs.max_save_slots #undef MAX_SAVE_SLOTS_SS220 diff --git a/modular_ss220/text_to_speech/code/tts_preferences.dm b/modular_ss220/text_to_speech/code/tts_preferences.dm index 7e86aed414fb..c19f23b3d7c3 100644 --- a/modular_ss220/text_to_speech/code/tts_preferences.dm +++ b/modular_ss220/text_to_speech/code/tts_preferences.dm @@ -101,7 +101,16 @@ client.prefs.ShowChoices(src) return FALSE var/datum/tts_seed/seed = SStts220.tts_seeds[client.prefs.active_character.tts_seed] - if(client.donator_level < seed.required_donator_level) + + switch(client.donator_level) + if(LITTLE_WORKER_TIER) + if(LITTLE_WORKER_TTS_LEVEL >= seed.required_donator_level) + return TRUE + if(BIG_WORKER_TIER) + if(BIG_WORKER_TTS_LEVEL >= seed.required_donator_level) + return TRUE + + if(client.donator_level < seed.required_donator_level || client.donator_level > DONATOR_LEVEL_MAX) to_chat(usr, span_danger("Выбранный голос персонажа более недоступен на текущем уровне подписки!")) client.prefs.ShowChoices(src) return FALSE