otta8634 [Sun, 22 Dec 2024 17:08:07 +0000 (01:08 +0800)]
Separate powerups from items in the guide
Since both the Powerups and Items sections use the ITEM registry, the REGISTRY_SOURCE macro had to be updated, so some minor refactoring is included.
Choose to use the ka icon for Buffs since it's more circular (like the buffs simpleitems), and dom for Powerups since it's more triangular (like most powerups simpleitems).
otta8634 [Sun, 22 Dec 2024 16:58:25 +0000 (00:58 +0800)]
Relocate descriptions of powerups from statuseffects to items
Due to 89ad1fa8 the descriptions need to be shifted to the ITEM_ powerup not the STATUSEFFECT_ powerup.
Also made the distinction between the two clear for the main 4 powerups.
otta8634 [Sun, 22 Dec 2024 10:19:07 +0000 (18:19 +0800)]
Add some documentation showing the location of guide descriptions
This will hopefully make them a bit easier to find if someone inexperienced with the codebase wants to try to edit the guide. I think still they're require someone to point them in the right place though, but this is better than nothing.
otta8634 [Fri, 20 Dec 2024 11:35:22 +0000 (19:35 +0800)]
Colorize guide
Added colors to mostly all m_names shown currently except monsters since the plural versions don't have a standalone transifex string (yet).
Some colors are currently white (like for all ammo items and vehicles) but can easily be changed in future.
otta8634 [Fri, 20 Dec 2024 09:00:47 +0000 (17:00 +0800)]
Use m_name for vehicles and monsters
Previously monster_name and vehicle_name were used, which were obviously used nowhere else.
Renamed them both to m_name, mostly so that the COLORED_NAME macro can work on them, and also so that there's less unnecessary entity fields.
otta8634 [Fri, 20 Dec 2024 08:28:53 +0000 (16:28 +0800)]
Use the translatable strings for some default classes
The "Monster", "Buff", and "Vehicle" transifex strings already existed but weren't used here for some reason.
This is unrelated to the guide but I saw it as a good opportunity to fix this.
otta8634 [Fri, 20 Dec 2024 08:26:17 +0000 (16:26 +0800)]
Move attributes for items and nades into their classes
This makes it more consistent with weapons, buffers, some powerups, monsters, and vehicles.
Also this makes it possible to use the COLORED_NAME macro on them in the guide.
This could be done for the rest of the powerups too, but they're a bit of a mess currently.
otta8634 [Thu, 19 Dec 2024 18:18:16 +0000 (02:18 +0800)]
Relocate m_color constants to common/colors.qh
This allows for the colors to be used in guide descriptions in future, without causing duplicate code.
This will also make editing multiple colors at once easier.
Also renamed wpcolor attrib (waypointsprite color) used by weapons to m_color, as with all other item-things.
otta8634 [Thu, 19 Dec 2024 15:22:28 +0000 (23:22 +0800)]
Move descriptions to MENUQC
Added ifdef MENUQC checks around describe methods for the currently added: items, monsters, vehicles, weapons, buffs/powerups, and nades.
Skipped gamemodes since they're used elsewhere (I think?), and skipped the free-text guide since that's in qcsrc/menu/.
This change prevents the csprogs from increasing in size unnecessarily, with minimal readability cost.
otta8634 [Thu, 19 Dec 2024 08:45:08 +0000 (16:45 +0800)]
Add buffs, powerups, and items to the guide
Descriptions of buffs/powerups were somewhat based on https://gitlab.com/xonotic/xonotic/-/wikis/Buffs and https://gitlab.com/xonotic/xonotic/-/wikis/Powerups.
otta8634 [Thu, 19 Dec 2024 07:29:57 +0000 (15:29 +0800)]
Add weapons to the guide
Descriptions were somewhat based on https://gitlab.com/xonotic/xonotic/-/wikis/Weapons but since that's in a format not really suitable for a guide, I took some creative liberty.
otta8634 [Mon, 16 Dec 2024 09:30:16 +0000 (17:30 +0800)]
Improve formatting consistency
Changed spaces to tabs in menu files.
Moved menu/xonotic/guide/tab.qc and .qh to menu/xonotic/dialog_multiplayer_guide.qc and .qh to make it more consistent with every other dialog.
Added empty .qc files for .qh files which were missing one.
Slightly improved some code formatting.
terencehill [Thu, 31 Oct 2024 22:01:05 +0000 (23:01 +0100)]
Reduce code duplication in REGISTER_STAT
This change slightly improves compilation performance since it avoids generating about 120KB of completely useless qc code both from server and client code
terencehill [Thu, 31 Oct 2024 13:28:40 +0000 (14:28 +0100)]
Hook code: minor optimizations and cleanups
Optimizations:
- calculate dir without using normalize
- reduce scope of some variables
Cleanups:
- remove useless and outdated installation instructions
- fix mixed indentation in 2 functions (now hook.qc is fully indented with tabs)
- don't mention cvar values next to autocvars