Skip to content

Commit

Permalink
Донатное ограничение у педалей
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Dec 11, 2023
1 parent c654cc2 commit c114d9c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions modular_ss220/_defines220/code/donor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions modular_ss220/donor/code/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 110 in modular_ss220/donor/code/client_procs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "C"

Check warning on line 110 in modular_ss220/donor/code/client_procs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "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

Check failure on line 118 in modular_ss220/donor/code/client_procs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "C"

Check warning on line 118 in modular_ss220/donor/code/client_procs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "donator_level"
return FALSE
return TRUE
4 changes: 1 addition & 3 deletions modular_ss220/jobs/code/donor/donor_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit c114d9c

Please sign in to comment.