[MAJOR CHANGE] Admin rank datum (#17133)

* Admin ranks update

* Permissions fix

* One missing thing

* Further rework to make database also fully work

* Adds admin rank bitflag calculator to tools

* ZA WARUDO

---------

Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
Selis
2025-03-06 01:38:19 +01:00
committed by GitHub
parent caec59322e
commit 7a7ae89713
88 changed files with 1993 additions and 904 deletions
@@ -60,7 +60,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
continue
if(instance.ckeys_allowed && (!client || !(client.ckey in instance.ckeys_allowed)))
continue
if(instance.species_allowed && (!species || !(species in instance.species_allowed)) && (!client || !check_rights(R_ADMIN | R_EVENT | R_FUN, 0, client)) && (!custom_base || !(custom_base in instance.species_allowed)))
if(instance.species_allowed && (!species || !(species in instance.species_allowed)) && (!client || !check_rights_for(client, R_ADMIN | R_EVENT | R_FUN)) && (!custom_base || !(custom_base in instance.species_allowed)))
continue
.[instance.name] = instance
@@ -539,7 +539,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else
return TOPIC_NOACTION
if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(preference_mob(),setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE))
if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(user.client,setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE))
return TOPIC_NOACTION
var/prev_species = pref.species
@@ -1215,7 +1215,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
if(!(current_species.spawn_flags & SPECIES_CAN_JOIN))
restricted = 2
else if(!is_alien_whitelisted(preference_mob(),current_species))
else if(!is_alien_whitelisted(user.client,current_species))
restricted = 1
if(restricted)
@@ -83,7 +83,7 @@ var/list/gear_datums = list()
if(G.whitelisted && CONFIG_GET(flag/loadout_whitelist) != LOADOUT_WHITELIST_OFF && pref.client) //VOREStation Edit.
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species)
continue
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted]))
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob.client, GLOB.all_species[G.whitelisted]))
continue
if(max_cost && G.cost > max_cost)
continue