Qbox-project / qbx_management

GNU General Public License v3.0
6 stars 27 forks source link

:art: Refactor client and server functions #15

Closed solareon closed 10 months ago

solareon commented 10 months ago

Description

GetPlayers() is no longer an export in the core. The existing function called overlaps with the native. I renamed the function to FindPlayers() and changed the export to the native.

Checklist

solareon commented 10 months ago

Reworked the hire menu logic to use GetPlayersFromCoords. Took me a minute to figure out you need to use GetPlayerServerId() to return the right id. Also fixed some issues with the offline firing and renamed variables to proper case for locals

solareon commented 10 months ago

Refactored basically the whole thing. All functions and menus were deduplicated and merged into cl_main. Added parameter documentation for functions (I might have gotten this wrong so please let me know). Fixed typos and variable names.

Manason commented 10 months ago

I'll add that in the future, please keep your PRs small. This PR is difficult to review now because of it's size.

solareon commented 10 months ago

I'll add that in the future, please keep your PRs small. This PR is difficult to review now because of it's size.

My apologies for the large PR. Would it help if I squashed the commits down? I didn't intend to rewrite the whole thing but kind of got in the groove after the first couple changes.

I made all the changes regarding the camelCase, localizing functions where appropriate, changing type to group, and only localizing source where appropriate.

Manason commented 10 months ago

I'll add that in the future, please keep your PRs small. This PR is difficult to review now because of it's size.

My apologies for the large PR. Would it help if I squashed the commits down? I didn't intend to rewrite the whole thing but kind of got in the groove after the first couple changes.

I made all the changes regarding the camelCase, localizing functions where appropriate, changing type to group, and only localizing source where appropriate.

That would make it worse actually. In the future please keep your PRs focused on one change. You can branch off your branch to create a second PR, and branch off of that branch to create a third, etc..

solareon commented 10 months ago

Closing this PR to submit a new one due to full rewrite.