Refactors client data loading

This commit is contained in:
AffectedArc07
2021-07-29 12:52:45 +01:00
parent 0032043740
commit f73af8b3cf
49 changed files with 2951 additions and 2810 deletions
+18
View File
@@ -95,6 +95,24 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
to_chat(user, "<font color='red'>Error: You are not an admin.</font>")
return 0
// Basically the above proc but checks at a /client level
/proc/check_rights_client(rights_required, show_msg = TRUE, client/C)
if(C)
if(rights_required)
if(C.holder)
if(rights_required & C.holder.rights)
return TRUE
else
if(show_msg)
to_chat(C, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
else
if(C.holder)
return TRUE
else
if(show_msg)
to_chat(C, "<font color='red'>Error: You are not an admin.</font>")
return FALSE
//probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other)
if(usr && usr.client)