player_ranks ![modular_bluemoon/phoenix404/modules/player_ranks/code/player_rank_controller/subsystem/player_ranks.dm 10](git.png)
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_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. |
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. |
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. |
Var Details
donator_controller ![modular_bluemoon/phoenix404/modules/player_ranks/code/player_rank_controller/subsystem/player_ranks.dm 18](git.png)
The donator player rank controller.
mentor_controller ![modular_bluemoon/phoenix404/modules/player_ranks/code/player_rank_controller/subsystem/player_ranks.dm 20](git.png)
The mentor player rank controller.
veteran_controller ![modular_bluemoon/phoenix404/modules/player_ranks/code/player_rank_controller/subsystem/player_ranks.dm 25](git.png)
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.
- 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_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
.
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.
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.
- 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.