player_ranks
Vars | |
donator_controller | The donator player rank controller. |
---|---|
mentor_controller | The mentor player rank controller. |
veteran_controller | The veteran player rank controller. |
Procs | |
add_player_rank_sql | Handles adding the ckey to the appropriate player rank table on the database, as well as in-game. |
add_player_to_group | Handles adding the ckey to the proper player rank group, either on the database or in the legacy system. |
get_controller_for_group | Allows fetching the appropriate player_rank_controller based on its
rank_title , for convenience. |
is_donator | Returns whether or not the user is qualified as a donator. |
is_mentor | Returns whether or not the user is qualified as a mentor.
Wrapper for the is_mentor() proc on the client, with a null check. |
is_veteran | Returns whether or not the user is qualified as a veteran. |
load_donators | Handles loading donators either via SQL or using the legacy system, based on configs. |
load_mentors | Handles loading mentors either via SQL or using the legacy system, based on configs. |
load_player_rank_sql | Handles populating the player rank from the database. |
load_veterans | Handles loading veteran players either via SQL or using the legacy system, based on configs. |
migrate_player_rank_to_sql | Handles migrating a player rank system from the legacy system to the
SQL-based version, from its rank_title |
migrate_player_rank_to_sql_from_controller | Handles migrating the ckeys of the players that were stored in a legacy player rank system into the SQL-based one instead. It will ensure to only add ckeys that were not already present in the database. |
remove_player_from_group | Handles removing the ckey from the proper player rank group, either on the database or in the legacy system. |
remove_player_rank_sql | Handles removing the ckey from the appropriate player rank table on the database, as well as in-game. |
update_all_prefs_donator_status | Handles updating all of the preferences datums to have the appropriate
donator_status and max_save_slots once donators are loaded. |
update_prefs_donator_status | Updates the donator_status and the max_save_slots |
Var Details
donator_controller
The donator player rank controller.
mentor_controller
The mentor player rank controller.
veteran_controller
The veteran player rank controller.
Proc Details
add_player_rank_sql
Handles adding the ckey to the appropriate player rank table on the database, as well as in-game.
Arguments:
- controller - The controller of the player rank you want to add the ckey to.
- ckey - The ckey of the player you want to now possess that player rank.
- admin_ckey - The ckey of the admin that made the rank change.
add_player_to_group
Handles adding the ckey to the proper player rank group, either on the database or in the legacy system.
Arguments:
- admin - The admin making the rank change. Can be a /client or a /datum/admins.
- ckey - The ckey of the player you want to now possess that player rank.
- rank_title - The title of the group you want to add the ckey to.
get_controller_for_group
Allows fetching the appropriate player_rank_controller based on its
rank_title
, for convenience.
is_donator
Returns whether or not the user is qualified as a donator.
Arguments:
- user - The client to verify the donator status of.
- admin_bypass - Whether or not admins can succeed this check, even if they
do not actually possess the role. Defaults to
TRUE
.
is_mentor
Returns whether or not the user is qualified as a mentor.
Wrapper for the is_mentor()
proc on the client, with a null check.
Arguments:
- user - The client to verify the mentor status of.
- admin_bypass - Whether or not admins can succeed this check, even if they
do not actually possess the role. Defaults to
TRUE
.
is_veteran
Returns whether or not the user is qualified as a veteran.
Arguments:
- user - The client to verify the veteran status of.
- admin_bypass - Whether or not admins can succeed this check, even if they
do not actually possess the role. Defaults to
TRUE
.
load_donators
Handles loading donators either via SQL or using the legacy system, based on configs.
load_mentors
Handles loading mentors either via SQL or using the legacy system, based on configs.
load_player_rank_sql
Handles populating the player rank from the database.
Arguments:
- rank_controller - The player rank controller of the rank to load.
load_veterans
Handles loading veteran players either via SQL or using the legacy system, based on configs.
migrate_player_rank_to_sql
Handles migrating a player rank system from the legacy system to the
SQL-based version, from its rank_title
Arguments:
- admin - The admin trying to do the migration.
- rank_title - String of the name of the player rank to migrate (case-sensitive).
migrate_player_rank_to_sql_from_controller
Handles migrating the ckeys of the players that were stored in a legacy player rank system into the SQL-based one instead. It will ensure to only add ckeys that were not already present in the database.
Arguments:
- controller - The player rank controller you want to migrate from the legacy system to the SQL one.
remove_player_from_group
Handles removing the ckey from the proper player rank group, either on the database or in the legacy system.
Arguments:
- admin - The admin making the rank change. Can be a /client or a /datum/admins.
- ckey - The ckey of the player you want to no longer possess that player rank.
- rank_title - The title of the group you want to remove the ckey from.
remove_player_rank_sql
Handles removing the ckey from the appropriate player rank table on the database, as well as in-game.
Arguments:
- controller - The controller of the player rank you want to remove the ckey from.
- ckey - The ckey of the player you want to no longer possess that player rank.
- admin_ckey - The ckey of the admin that made the rank change.
update_all_prefs_donator_status
Handles updating all of the preferences datums to have the appropriate
donator_status
and max_save_slots
once donators are loaded.
update_prefs_donator_status
Updates the donator_status
and the max_save_slots
Arguments:
- prefs - The preferences datum to check the donator_status eligibility.