Adds a console command 'convertjobs': An idempotent function which copies all player's primary job & gang into the player_groups table. This works for both online & offline players, so isn't required to be ran when the server is empty.
We want the player_groups table to accurately reflect the groups the player is in. Without doing this step, it is likely that the data will eventually make its way into the player_groups table, but that would lessen the accuracy of exports that return data about which jobs the player holds. I also considered doing a check on player login instead, but that would preclude offline players from having their data corrected. The best solution I feel, is to convert all at once to guarantee the data is present immediately.
I didn't include conversions for existing multi job resources out there. Given that there is no built-in UI for qbox's multi job system, external multi job resources will need to be made qbox compatible anyway and providing a conversion function is one more step to doing that. For this reason, a server event is triggered at the end of the conversion that can be consumed by multi job resources to do additional conversion.
Adds a console command 'convertjobs': An idempotent function which copies all player's primary job & gang into the player_groups table. This works for both online & offline players, so isn't required to be ran when the server is empty.
We want the player_groups table to accurately reflect the groups the player is in. Without doing this step, it is likely that the data will eventually make its way into the player_groups table, but that would lessen the accuracy of exports that return data about which jobs the player holds. I also considered doing a check on player login instead, but that would preclude offline players from having their data corrected. The best solution I feel, is to convert all at once to guarantee the data is present immediately.
I didn't include conversions for existing multi job resources out there. Given that there is no built-in UI for qbox's multi job system, external multi job resources will need to be made qbox compatible anyway and providing a conversion function is one more step to doing that. For this reason, a server event is triggered at the end of the conversion that can be consumed by multi job resources to do additional conversion.
Tested.