otta8634 [Tue, 7 Jan 2025 17:07:11 +0000 (01:07 +0800)]
Relocate the guide to Singleplayer
Added a button for it alongside the 'Instant action' button.
Converted it to a XonoticDialog from a XonoticTab, renamed the class to XonoticGuideDialog.
Renamed the Singleplayer menu to Singleplayer / Guide.
Slightly changed some Singleplayer menu strings.
otta8634 [Tue, 7 Jan 2025 11:51:53 +0000 (19:51 +0800)]
Allow use of ctrl+F and ctrl+U in guide filter
The filtering still doesn't work yet.
Also cleaned up guide tab fill function, and some other code.
Made the guide XonoticEntryList not have to refer to XonoticMapList.
otta8634 [Mon, 6 Jan 2025 16:51:34 +0000 (00:51 +0800)]
Add Gametypes to the guide
Descriptions were based on https://gitlab.com/xonotic/xonotic/-/wikis/home, although some gamemodes don't have a description there.
Added back .gametype_description (now called .m_description) so that the shorter gamemode descriptions can still be used.
Added .m_name to the gamemode class, copied with the initial value of .message, so that the COLORED_NAME macros can be used. Ideally .message wouldn't be necessary since it's not very descriptive, I just didn't bother going through all instances of .message being used to make sure nothing would break.
terencehill [Sat, 4 Jan 2025 14:04:08 +0000 (15:04 +0100)]
Refactor code to remove WEP_FLAG_SPECIALATTACK checks if WEP_FLAG_HIDDEN is already checked.
This refactoring is now possible thanks to the changes of !1344, where all WEP_FLAG_SPECIALATTACK checks have been paired with WEP_FLAG_HIDDEN checks
To make sure WEP_FLAG_HIDDEN is always set on special attacks, weapon initialization code triggers a fatal error if WEP_FLAG_SPECIALATTACK is set but WEP_FLAG_HIDDEN is not.
Rudolf Polzer [Thu, 2 Jan 2025 23:58:19 +0000 (18:58 -0500)]
Fix case of trails not being drawn on CSQC models with unset alpha.
That bug was found by Mario in
https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/1410#note_2279399941
and was actually pre-existing even before the change, as it was passing
0 to both alpha and count modifiers.
otta8634 [Wed, 1 Jan 2025 05:41:56 +0000 (13:41 +0800)]
Add turrets to the guide
Descriptions were somewhat based on scripts/entities.ent from xonotic/xonotic-maps.pk3dir.
Also renamed .turret_name -> .m_name, so the COLORED_NAME macros could work on turrets.
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.
otta8634 [Sat, 14 Dec 2024 10:28:49 +0000 (18:28 +0800)]
Update the player_ready scoreboard icon
Seems that the TGA is made from some outdated SVG not available on mediasource, the associated SVG in mediasource looks cleaner and is more consistent with the luma styling.
Regenerated the TGA.