From c114d9c020c66123eca23e46a79ef8635ca64c9d Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Mon, 11 Dec 2023 18:01:45 +1000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=BD=D0=B0=D1=82=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=83=20=D0=BF=D0=B5=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/_defines220/code/donor.dm | 4 ++++ modular_ss220/donor/code/client_procs.dm | 13 +++++++++++++ modular_ss220/jobs/code/donor/donor_jobs.dm | 4 +--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/modular_ss220/_defines220/code/donor.dm b/modular_ss220/_defines220/code/donor.dm index 053c420212cf..6617ee16b205 100644 --- a/modular_ss220/_defines220/code/donor.dm +++ b/modular_ss220/_defines220/code/donor.dm @@ -5,3 +5,7 @@ // What TTS level does it give access to? #define BIG_WORKER_TTS_LEVEL 3 #define LITTLE_WORKER_TTS_LEVEL 1 + +// General limitation +#define BIG_WORKER_LEVEL 3 +#define LITTLE_WORKER_LEVEL 2 diff --git a/modular_ss220/donor/code/client_procs.dm b/modular_ss220/donor/code/client_procs.dm index 4088d6d80072..c491d1f5e7d2 100644 --- a/modular_ss220/donor/code/client_procs.dm +++ b/modular_ss220/donor/code/client_procs.dm @@ -105,3 +105,16 @@ prefs.character_saves.len = prefs.max_save_slots #undef MAX_SAVE_SLOTS_SS220 + +/client/proc/is_donor_allowed(donator_tier) + switch(C.donator_level) + if(LITTLE_WORKER_TIER) + if(donator_tier > LITTLE_WORKER_LEVEL) + return FALSE + if(BIG_WORKER_TIER) + if(donator_tier > BIG_WORKER_LEVEL) + return FALSE + else + if(donator_tier > C.donator_level) // Tier check + return FALSE + return TRUE diff --git a/modular_ss220/jobs/code/donor/donor_jobs.dm b/modular_ss220/jobs/code/donor/donor_jobs.dm index e9838260b7b1..4e17b3d61988 100644 --- a/modular_ss220/jobs/code/donor/donor_jobs.dm +++ b/modular_ss220/jobs/code/donor/donor_jobs.dm @@ -139,6 +139,4 @@ /datum/job/donor/is_donor_allowed(client/C) if(!C) return FALSE // No client - if(donator_tier > C.donator_level) // Tier check - return FALSE - return TRUE + return C.is_donor_allowed(donator_tier)