From: otta8634 Date: Fri, 20 Dec 2024 11:35:22 +0000 (+0800) Subject: Colorize guide X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=582e88dae4b89dacd20f21661509f8e6d1edf936;p=xonotic%2Fxonotic-data.pk3dir.git 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. --- diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index 74af3fd7d..7a8ecef9a 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -7,6 +7,10 @@ #include #include #endif +#ifdef MENUQC + #include + // can't include common/weapons/weapon/_mod.qh and common/mutators/mutator/overkill/_mod.qh or else circular includes +#endif #ifdef GAMEQC .int spawnflags; @@ -68,7 +72,11 @@ CLASS(Shells, Ammo) METHOD(Shells, describe, string(Shells this)) { TC(Shells, this); - return _("The Shells ammo type is used by the Shotgun and Overkill Shotgun"); + return sprintf(_("The %s ammo type is used by the %s and %s"), + COLORED_NAME(Shells), + strcat(rgb_to_hexcolor(COLOR_WEP_SHOTGUN), _("Shotgun"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_OKSHOTGUN), _("Overkill Shotgun"), "^7") + ); } #endif ENDCLASS(Shells) @@ -109,7 +117,13 @@ CLASS(Bullets, Ammo) METHOD(Bullets, describe, string(Bullets this)) { TC(Bullets, this); - return _("The Bullets ammo type is used by the MachineGun, Rifle, Overkill MachineGun, and Overkill Heavy Machine Gun"); + return sprintf(_("The %s ammo type is used by the %s, %s, %s, and %s"), + COLORED_NAME(Bullets), + strcat(rgb_to_hexcolor(COLOR_WEP_MACHINEGUN), _("MachineGun"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_RIFLE), _("Rifle"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_OKMACHINEGUN), _("Overkill MachineGun"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_OKHMG), _("Overkill Heavy Machine Gun"), "^7") + ); } #endif ENDCLASS(Bullets) @@ -150,7 +164,15 @@ CLASS(Rockets, Ammo) METHOD(Rockets, describe, string(Rockets this)) { TC(Rockets, this); - return _("The Rockets ammo type is used by the Devastator, Mortar, Mine Layer, Hagar, T.A.G. Seeker, and Overkill Rocket Propelled Chainsaw"); + return sprintf(_("The %s ammo type is used by the %s, %s, %s, %s, %s, and %s"), + COLORED_NAME(Rockets), + strcat(rgb_to_hexcolor(COLOR_WEP_DEVASTATOR), _("Devastator"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_MORTAR), _("Mortar"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_HAGAR), _("Hagar"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_MINELAYER), _("Mine Layer"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_SEEKER), _("T.A.G. Seeker"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_OKRPC), _("Overkill Rocket Propelled Chainsaw"), "^7") + ); } #endif ENDCLASS(Rockets) @@ -191,7 +213,15 @@ CLASS(Cells, Ammo) METHOD(Cells, describe, string(Cells this)) { TC(Cells, this); - return _("The Cells ammo type is used by the Vortex, Crylink, Electro, Heavy Laser Assault Cannon, Arc, and Vaporizer"); + return sprintf(_("The %s ammo type is used by the %s, %s, %s, %s, %s, and %s"), + COLORED_NAME(Cells), + strcat(rgb_to_hexcolor(COLOR_WEP_VORTEX), _("Vortex"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_CRYLINK), _("Crylink"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_ELECTRO), _("Electro"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_HLAC), _("Heavy Laser Assault Cannon"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_VAPORIZER), _("Vaporizer"), "^7"), + strcat(rgb_to_hexcolor(COLOR_WEP_ARC), _("Arc"), "^7") + ); } #endif ENDCLASS(Cells) diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index 8ea1297aa..5d65caa89 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -4,9 +4,10 @@ #include "pickup.qh" CLASS(Armor, Pickup) +/* color */ ATTRIB(Armor, m_color, vector, COLOR_ITEM_ARMOR); #ifdef SVQC - ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); - ATTRIB(Armor, m_botvalue, int, 5000); +/* pickupfunc */ ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); +/* botvalue */ ATTRIB(Armor, m_botvalue, int, 5000); #endif ENDCLASS(Armor) @@ -63,8 +64,9 @@ CLASS(ArmorSmall, Armor) METHOD(ArmorSmall, describe, string(ArmorSmall this)) { TC(ArmorSmall, this); - return _("The Small armor provides you a small amount of armor when picked up, " - "protecting you from damage by absorbing incoming hits until it is depleted"); + return sprintf(_("The %s provides you a small amount of armor when picked up, " + "protecting you from damage by absorbing incoming hits until it is depleted"), + COLORED_NAME(ArmorSmall)); } #endif ENDCLASS(ArmorSmall) @@ -121,8 +123,9 @@ CLASS(ArmorMedium, Armor) METHOD(ArmorMedium, describe, string(ArmorMedium this)) { TC(ArmorMedium, this); - return _("The Medium armor provides you a medium amount of armor when picked up, " - "protecting you from damage by absorbing incoming hits until it is depleted"); + return sprintf(_("The %s provides you a medium amount of armor when picked up, " + "protecting you from damage by absorbing incoming hits until it is depleted"), + COLORED_NAME(ArmorMedium)); } #endif ENDCLASS(ArmorMedium) @@ -166,7 +169,6 @@ CLASS(ArmorBig, Armor) "armor_big" #endif ); -/* color */ ATTRIB(ArmorBig, m_color, vector, COLOR_ITEM_ARMOR); /* wptext */ ATTRIB(ArmorBig, m_waypoint, string, _("Big armor")); #ifdef SVQC /* itemid */ ATTRIB(ArmorBig, m_itemid, int, IT_RESOURCE); @@ -179,8 +181,9 @@ CLASS(ArmorBig, Armor) METHOD(ArmorBig, describe, string(ArmorBig this)) { TC(ArmorBig, this); - return _("The Big armor provides you a large amount of armor when picked up, " - "protecting you from damage by absorbing incoming hits until it is depleted"); + return sprintf(_("The %s provides you a large amount of armor when picked up, " + "protecting you from damage by absorbing incoming hits until it is depleted"), + COLORED_NAME(ArmorBig)); } #endif ENDCLASS(ArmorBig) @@ -224,7 +227,6 @@ CLASS(ArmorMega, Armor) "armor_mega" #endif ); -/* color */ ATTRIB(ArmorMega, m_color, vector, COLOR_ITEM_ARMOR); /* wptext */ ATTRIB(ArmorMega, m_waypoint, string, _("Mega armor")); /* wpblink */ ATTRIB(ArmorMega, m_waypointblink, int, 2); #ifdef SVQC @@ -239,9 +241,10 @@ CLASS(ArmorMega, Armor) METHOD(ArmorMega, describe, string(ArmorMega this)) { TC(ArmorMega, this); - return _("The Mega armor provides you a huge amount of armor when picked up, " - "protecting you from damage by absorbing incoming hits until it is depleted\n\n" - "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel"); + return sprintf(_("The %s provides you a huge amount of armor when picked up, " + "protecting you from damage by absorbing incoming hits until it is depleted\n\n" + "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel"), + COLORED_NAME(ArmorMega)); } #endif ENDCLASS(ArmorMega) diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 0accf6aff..94265163f 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -4,9 +4,10 @@ #include "pickup.qh" CLASS(Health, Pickup) +/* color */ ATTRIB(Health, m_color, vector, COLOR_ITEM_HEALTH); #ifdef SVQC - ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); - ATTRIB(Health, m_botvalue, int, 5000); +/* pickupfunc */ ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); +/* botvalue */ ATTRIB(Health, m_botvalue, int, 5000); #endif ENDCLASS(Health) @@ -63,8 +64,9 @@ CLASS(HealthSmall, Health) METHOD(HealthSmall, describe, string(HealthSmall this)) { TC(HealthSmall, this); - return _("The Small health restores a small amount of health when picked up, " - "helping you recover from damage taken during combat"); + return sprintf(_("The %s restores a small amount of health when picked up, " + "helping you recover from damage taken during combat"), + COLORED_NAME(HealthSmall)); } #endif ENDCLASS(HealthSmall) @@ -121,8 +123,9 @@ CLASS(HealthMedium, Health) METHOD(HealthMedium, describe, string(HealthMedium this)) { TC(HealthMedium, this); - return _("The Medium health restores a medium amount of health when picked up, " - "helping you recover from damage taken during combat"); + return sprintf(_("The %s restores a medium amount of health when picked up, " + "helping you recover from damage taken during combat"), + COLORED_NAME(HealthMedium)); } #endif ENDCLASS(HealthMedium) @@ -166,7 +169,6 @@ CLASS(HealthBig, Health) "health_big" #endif ); -/* color */ ATTRIB(HealthBig, m_color, vector, COLOR_ITEM_HEALTH); /* wptext */ ATTRIB(HealthBig, m_waypoint, string, _("Big health")); #ifdef SVQC /* itemid */ ATTRIB(HealthBig, m_itemid, int, IT_RESOURCE); @@ -179,8 +181,9 @@ CLASS(HealthBig, Health) METHOD(HealthBig, describe, string(HealthBig this)) { TC(HealthBig, this); - return _("The Big health restores a large amount of health when picked up, " - "helping you recover from damage taken during combat"); + return sprintf(_("The %s restores a large amount of health when picked up, " + "helping you recover from damage taken during combat"), + COLORED_NAME(HealthBig)); } #endif ENDCLASS(HealthBig) @@ -223,7 +226,6 @@ CLASS(HealthMega, Health) "health_mega" #endif ); -/* color */ ATTRIB(HealthMega, m_color, vector, COLOR_ITEM_HEALTH); /* wptext */ ATTRIB(HealthMega, m_waypoint, string, _("Mega health")); /* wpblink */ ATTRIB(HealthMega, m_waypointblink, int, 2); #ifdef SVQC @@ -238,9 +240,10 @@ CLASS(HealthMega, Health) METHOD(HealthMega, describe, string(HealthMega this)) { TC(HealthMega, this); - return _("The Mega health restores a huge amount of health when picked up, " - "helping you recover from damage taken during combat\n\n" - "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel"); + return sprintf(_("The %s restores a huge amount of health when picked up, " + "helping you recover from damage taken during combat\n\n" + "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel"), + COLORED_NAME(HealthMega)); } #endif ENDCLASS(HealthMega) diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index 88bc12d95..4df3f5984 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -52,9 +52,10 @@ CLASS(Jetpack, Powerup) METHOD(Jetpack, describe, string(Jetpack this)) { TC(Jetpack, this); - return _("The Jetpack allows you to fly around the map for a short period, " - "providing increased mobility, maneuverability, and the ability to reach higher ground\n\n" - "It consumes Fuel ammo while operating, so make sure you don't run out when you're high up!"); + return sprintf(_("The %s allows you to fly around the map for a short period, " + "providing increased mobility, maneuverability, and the ability to reach higher ground\n\n" + "It consumes Fuel ammo while operating, so make sure you don't run out when you're high up!"), + COLORED_NAME(Jetpack)); } #endif ENDCLASS(Jetpack) @@ -94,7 +95,8 @@ CLASS(JetpackFuel, Ammo) METHOD(JetpackFuel, describe, string(JetpackFuel this)) { TC(JetpackFuel, this); - return _("The Fuel ammo type is used by the Jetpack"); + return sprintf(_("The %s ammo type is used by the %s"), + COLORED_NAME(JetpackFuel), COLORED_NAME(Jetpack)); } #endif ENDCLASS(JetpackFuel) @@ -138,9 +140,10 @@ CLASS(JetpackRegen, Powerup) METHOD(JetpackRegen, describe, string(JetpackRegen this)) { TC(JetpackRegen, this); - return _("The Fuel Regenerator powerup regenerates Fuel needed for the Jetpack until the powerup expires, " - "so you can continue flying around for longer" - "Since it is a powerup, it will drop if you die while holding it"); + return sprintf(_("The %s powerup regenerates %s needed for the %s until the powerup expires, " + "so you can continue flying around for longer\n\n" + "Since it is a powerup, it will drop if you die while holding it"), + COLORED_NAME(JetpackRegen), COLORED_NAME(JetpackFuel), COLORED_NAME(Jetpack)); } #endif ENDCLASS(JetpackRegen) diff --git a/qcsrc/common/items/item/pickup.qh b/qcsrc/common/items/item/pickup.qh index 95c9d81a0..14240653f 100644 --- a/qcsrc/common/items/item/pickup.qh +++ b/qcsrc/common/items/item/pickup.qh @@ -33,11 +33,11 @@ CLASS(Pickup, GameItem) #ifdef GAMEQC ATTRIB(Pickup, m_model, Model); ATTRIB(Pickup, m_skin, int); - ATTRIB(Pickup, m_color, vector); ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP); #endif ATTRIB(Pickup, netname, string); ATTRIB(Pickup, m_name, string); + ATTRIB(Pickup, m_color, vector, '1 1 1'); METHOD(Pickup, show, void(Pickup this)) { TC(Pickup, this); diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index f109da0dc..171bbd4b5 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -27,7 +27,8 @@ CLASS(AmmoBuff, Buff) METHOD(AmmoBuff, describe, string(AmmoBuff this)) { TC(AmmoBuff, this); - return _("The Ammo Buff gives you infinite ammo until the buff expires, so you don't need to worry about running out of ammo"); + return sprintf(_("The %s gives you infinite ammo until the buff expires, so you don't need to worry about running out of ammo"), + COLORED_NAME_WITH_CONCAT(AmmoBuff, _("Buff"))); } #endif ENDCLASS(AmmoBuff) @@ -45,7 +46,9 @@ CLASS(ResistanceBuff, Buff) METHOD(ResistanceBuff, describe, string(ResistanceBuff this)) { TC(ResistanceBuff, this); - return _("The Resistance Buff greatly reduces your damage taken while the buff is active"); + return sprintf(_("The %s greatly reduces your damage taken while the buff is active\n\n" + "This also impacts the damage you deal to yourself"), + COLORED_NAME_WITH_CONCAT(ResistanceBuff, _("Buff"))); } #endif ENDCLASS(ResistanceBuff) @@ -63,8 +66,9 @@ CLASS(MedicBuff, Buff) METHOD(MedicBuff, describe, string(MedicBuff this)) { TC(MedicBuff, this); - return _("The Medic Buff increases health regeneration speed, increases the maximum health you can have before health starts to rot, and reduces health rot speed until the buff expires\n\n" - "It also gives you a chance to survive a fatal hit, with a small amount of health left over"); + return sprintf(_("The %s increases health regeneration speed, increases the maximum health you can have before health starts to rot, and reduces health rot speed until the buff expires\n\n" + "It also gives you a chance to survive a fatal hit, with a small amount of health left over"), + COLORED_NAME_WITH_CONCAT(MedicBuff, _("Buff"))); } #endif ENDCLASS(MedicBuff) @@ -83,8 +87,9 @@ CLASS(BashBuff, Buff) METHOD(BashBuff, describe, string(BashBuff this)) { TC(BashBuff, this); - return _("The Bash Buff increases knockback force you deal, and makes you immune to knockback while the buff is active\n\n" - "It also slightly increases knockback you deal to yourself"); + return sprintf(_("The %s increases knockback force you deal, and makes you immune to knockback while the buff is active\n\n" + "It also slightly increases knockback you deal to yourself"), + COLORED_NAME_WITH_CONCAT(BashBuff, _("Buff"))); } #endif ENDCLASS(BashBuff) @@ -102,7 +107,8 @@ CLASS(VampireBuff, Buff) METHOD(VampireBuff, describe, string(VampireBuff this)) { TC(VampireBuff, this); - return _("The Vampire Buff converts some of the damage you deal to enemies and monsters into health for yourself, until the buff expires"); + return sprintf(_("The %s converts some of the damage you deal to enemies and monsters into health for yourself, until the buff expires"), + COLORED_NAME_WITH_CONCAT(VampireBuff, _("Buff"))); } #endif ENDCLASS(VampireBuff) @@ -120,8 +126,9 @@ CLASS(DisabilityBuff, Buff) METHOD(DisabilityBuff, describe, string(DisabilityBuff this)) { TC(DisabilityBuff, this); - return _("The Disability Buff causes your enemies and monsters to slow down for a few seconds when you attack them, while the buff is active\n\n" - "This is particularly useful against speedy players, especially in Capture The Flag"); + return sprintf(_("The %s causes your enemies and monsters to slow down for a few seconds when you attack them, while the buff is active\n\n" + "This is particularly useful against speedy players, especially in Capture The Flag"), + COLORED_NAME_WITH_CONCAT(DisabilityBuff, _("Buff"))); } #endif ENDCLASS(DisabilityBuff) @@ -138,7 +145,8 @@ CLASS(VengeanceBuff, Buff) METHOD(VengeanceBuff, describe, string(VengeanceBuff this)) { TC(VengeanceBuff, this); - return _("The Vengeance Buff reciprocates a portion of the damage enemies deal to you onto them, until the buff expires"); + return sprintf(_("The %s reciprocates a portion of the damage enemies deal to you onto them, until the buff expires"), + COLORED_NAME_WITH_CONCAT(VengeanceBuff, _("Buff"))); } #endif ENDCLASS(VengeanceBuff) @@ -156,7 +164,8 @@ CLASS(JumpBuff, Buff) METHOD(JumpBuff, describe, string(JumpBuff this)) { TC(JumpBuff, this); - return _("The Jump Buff greatly increases your jump height, while the buff is active"); + return sprintf(_("The %s greatly increases your jump height, while the buff is active"), + COLORED_NAME_WITH_CONCAT(JumpBuff, _("Buff"))); } #endif ENDCLASS(JumpBuff) @@ -174,7 +183,8 @@ CLASS(InfernoBuff, Buff) METHOD(InfernoBuff, describe, string(InfernoBuff this)) { TC(InfernoBuff, this); - return _("The Inferno Buff sets any enemies or monsters you attack alight, dealing burn damage to them for several seconds until the buff expires"); + return sprintf(_("The %s sets any enemies or monsters you attack alight, dealing burn damage to them for several seconds until the buff expires"), + COLORED_NAME_WITH_CONCAT(InfernoBuff, _("Buff"))); } #endif ENDCLASS(InfernoBuff) @@ -192,8 +202,9 @@ CLASS(SwapperBuff, Buff) METHOD(SwapperBuff, describe, string(SwapperBuff this)) { TC(SwapperBuff, this); - return _("The Swapper Buff allows you to press the \"dropweapon\" bind to switch places with a nearby enemy once\n\n" - "A common usage of this Buff is to jump over the map's void, then swap with an enemy, to cause them to fall into the void"); + return sprintf(_("The %s allows you to press the ^3dropweapon^7 bind to switch places with a nearby enemy once\n\n" + "A common usage of this Buff is to jump over the map's void, then swap with an enemy, to cause them to fall into the void"), + COLORED_NAME_WITH_CONCAT(SwapperBuff, _("Buff"))); } #endif ENDCLASS(SwapperBuff) @@ -211,7 +222,8 @@ CLASS(MagnetBuff, Buff) METHOD(MagnetBuff, describe, string(MagnetBuff this)) { TC(MagnetBuff, this); - return _("The Magnet Buff greatly increases your item pickup range, collecting nearby items for you while the buff is active"); + return sprintf(_("The %s greatly increases your item pickup range, collecting nearby items for you while the buff is active"), + COLORED_NAME_WITH_CONCAT(MagnetBuff, _("Buff"))); } #endif ENDCLASS(MagnetBuff) @@ -228,7 +240,8 @@ CLASS(LuckBuff, Buff) METHOD(LuckBuff, describe, string(LuckBuff this)) { TC(LuckBuff, this); - return _("While you have the Luck Buff, each attack has a chance of being a critical hit with greatly increased damage"); + return sprintf(_("While you have the %s, each attack has a chance of being a critical hit with greatly increased damage"), + COLORED_NAME_WITH_CONCAT(LuckBuff, _("Buff"))); } #endif ENDCLASS(LuckBuff) @@ -245,7 +258,8 @@ CLASS(FlightBuff, Buff) METHOD(FlightBuff, describe, string(FlightBuff this)) { TC(FlightBuff, this); - return _("While you have the Flight Buff, you can crouch while midair to switch your gravity, allowing flight"); + return sprintf(_("While you have the %s, you can crouch while midair to switch your gravity, allowing flight"), + COLORED_NAME_WITH_CONCAT(FlightBuff, _("Buff"))); } #endif ENDCLASS(FlightBuff) diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 2182b491d..1089bf424 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -44,8 +44,12 @@ CLASS(VaporizerCells, Ammo) #ifdef MENUQC METHOD(VaporizerCells, describe, string(VaporizerCells this)) { + // can't include common/weapons/weapon/vaporizer.qh or else circular includes +#define VAPORIZER_COLOR strcat(rgb_to_hexcolor(COLOR_WEP_VAPORIZER), _("Vaporizer"), "^7") TC(VaporizerCells, this); - return _("The Vaporizer ammo is sometimes present on maps when InstaGib is enabled, providing ammo for the Vaporizer"); + return sprintf(_("The %s is sometimes present on maps when InstaGib is enabled, providing ammo for the %s"), + COLORED_NAME(VaporizerCells), VAPORIZER_COLOR); +#undef VORTEX_COLOR } #endif ENDCLASS(VaporizerCells) @@ -78,8 +82,9 @@ CLASS(ExtraLife, Powerup) METHOD(ExtraLife, describe, string(ExtraLife this)) { TC(ExtraLife, this); - return _("The Extra Life powerup acts as armor in InstaGib. " - "If a player is shot while having one or more Extra Lives, they will survive the shot but suffer strong knockback"); + return sprintf(_("The %s powerup acts as armor in InstaGib. " + "If a player is shot while having one or more extra lives, they will survive the shot but suffer strong knockback"), + COLORED_NAME(ExtraLife)); } #endif ENDCLASS(ExtraLife) diff --git a/qcsrc/common/mutators/mutator/nades/nades.inc b/qcsrc/common/mutators/mutator/nades/nades.inc index 902ad6522..fd86a2b92 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.inc +++ b/qcsrc/common/mutators/mutator/nades/nades.inc @@ -15,8 +15,9 @@ CLASS(NormalNade, Nade) METHOD(NormalNade, describe, string(NormalNade this)) { TC(NormalNade, this); - return _("The (normal) Grenade explodes after a short delay, dealing damage to nearby players\n\n" - "Make sure you remember to throw it, or else it will blow up in your hands!"); + return sprintf(_("The (normal) %s explodes after a short delay, dealing damage to nearby players\n\n" + "Make sure you remember to throw it with ^3dropweapon^7, or else it will blow up in your hands!"), + COLORED_NAME(NormalNade)); } #endif ENDCLASS(NormalNade) @@ -35,8 +36,9 @@ CLASS(NapalmNade, Nade) METHOD(NapalmNade, describe, string(NapalmNade this)) { TC(NapalmNade, this); - return _("The Napalm grenade explodes after a short delay, spreading fiery napalm globs around in the fountain. " - "The napalm fire balls burn for a while, and damage players who get too close"); + return sprintf(_("The %s explodes after a short delay, spreading fiery napalm globs around in the fountain. " + "The napalm fire balls burn for a while, and damage players who get too close"), + COLORED_NAME(NapalmNade)); } #endif ENDCLASS(NapalmNade) @@ -55,8 +57,9 @@ CLASS(IceNade, Nade) METHOD(IceNade, describe, string(IceNade this)) { TC(IceNade, this); - return _("The Ice grenade detonates after a short delay, freezing any enemies who walk within the explosion radius for a few seconds after the explosion. " - "While frozen, enemies are progressively dealt damage"); + return sprintf(_("The %s detonates after a short delay, freezing any enemies who walk within the explosion radius for a few seconds after the explosion. " + "While frozen, enemies are progressively dealt damage"), + COLORED_NAME(IceNade)); } #endif ENDCLASS(IceNade) @@ -75,7 +78,8 @@ CLASS(TranslocateNade, Nade) METHOD(TranslocateNade, describe, string(TranslocateNade this)) { TC(TranslocateNade, this); - return _("The Translocate grenade detonates after a short delay, teleporting you to where it detonated"); + return sprintf(_("The %s detonates after a short delay, teleporting you to where it detonated"), + COLORED_NAME(TranslocateNade)); } #endif ENDCLASS(TranslocateNade) @@ -94,8 +98,9 @@ CLASS(SpawnNade, Nade) METHOD(SpawnNade, describe, string(SpawnNade this)) { TC(SpawnNade, this); - return _("The Spawn grenade detonates after a short delay, temporarily setting your spawn point to where it detonated. " - "It is useful for cases where you want to go back to some point on the map after you die"); + return sprintf(_("The %s detonates after a short delay, temporarily setting your spawn point to where it detonated. " + "It is useful for cases where you want to go back to some point on the map after you die"), + COLORED_NAME(SpawnNade)); } #endif ENDCLASS(SpawnNade) @@ -114,8 +119,9 @@ CLASS(HealNade, Nade) METHOD(HealNade, describe, string(HealNade this)) { TC(HealNade, this); - return _("The Heal grenade detonates after a short delay, temporarily creating a healing orb around the point where it detonated for several seconds. " - "If your team members enter the orb they will recover health, and if enemies enter the sphere they will be harmed"); + return sprintf(_("The %s detonates after a short delay, temporarily creating a healing orb around the point where it detonated for several seconds. " + "If your team members enter the orb they will recover health, and if enemies enter the sphere they will be harmed"), + COLORED_NAME(HealNade)); } #endif ENDCLASS(HealNade) @@ -134,7 +140,8 @@ CLASS(MonsterNade, Nade) METHOD(MonsterNade, describe, string(MonsterNade this)) { TC(MonsterNade, this); - return _("The Monster grenade explodes after a short delay, spawning one of four monster types"); + return sprintf(_("The %s explodes after a short delay, spawning one of four monster types"), + COLORED_NAME(MonsterNade)); } #endif ENDCLASS(MonsterNade) @@ -153,8 +160,9 @@ CLASS(EntrapNade, Nade) METHOD(EntrapNade, describe, string(EntrapNade this)) { TC(EntrapNade, this); - return _("The Entrap grenade detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " - "Players and projectiles that enter the sphere will be slowed down, including yourself"); + return sprintf(_("The %s detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " + "Players and projectiles that enter the sphere will be slowed down, including yourself"), + COLORED_NAME(EntrapNade)); } #endif ENDCLASS(EntrapNade) @@ -174,8 +182,9 @@ CLASS(VeilNade, Nade) METHOD(VeilNade, describe, string(VeilNade this)) { TC(VeilNade, this); - return _("The Veil grenade detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " - "Players inside the orb will be invisible to those outside it"); + return sprintf(_("The Veil grenade detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " + "Players inside the orb will be invisible to those outside it"), + COLORED_NAME(VeilNade)); } #endif ENDCLASS(VeilNade) @@ -194,9 +203,10 @@ CLASS(AmmoNade, Nade) METHOD(AmmoNade, describe, string(AmmoNade this)) { TC(AmmoNade, this); - return _("The Ammo grenade detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " - "If your team members enter the orb they will recover ammo, and if enemies enter the sphere they will lose ammo\n\n" - "This does not impact weapon magazines, so it won't reload your weapons for you"); + return sprintf(_("The %s detonates after a short delay, temporarily creating an orb around the point where it detonated for several seconds. " + "If your team members enter the orb they will recover ammo, and if enemies enter the sphere they will lose ammo\n\n" + "This does not impact weapon magazines, so it won't reload your weapons for you"), + COLORED_NAME(AmmoNade)); } #endif ENDCLASS(AmmoNade) @@ -215,7 +225,8 @@ CLASS(DarknessNade, Nade) METHOD(DarknessNade, describe, string(DarknessNade this)) { TC(DarknessNade, this); - return _("The Darkness grenade detonates after a short delay, creating a dark field which temporarily blinds enemies who enter it"); + return sprintf(_("The %s detonates after a short delay, creating a dark field which temporarily blinds enemies who enter it"), + COLORED_NAME(DarknessNade)); } #endif ENDCLASS(DarknessNade) diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qh b/qcsrc/common/mutators/mutator/overkill/okhmg.qh index 5236b0f22..43eb09463 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qh +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qh @@ -2,6 +2,9 @@ #include #include +#ifdef MENUQC + #include "okmachinegun.qh" // for its color +#endif CLASS(OverkillHeavyMachineGun, Weapon) /* spawnfunc */ ATTRIB(OverkillHeavyMachineGun, m_canonical_spawnfunc, string, "weapon_okhmg"); @@ -49,13 +52,14 @@ CLASS(OverkillHeavyMachineGun, Weapon) METHOD(OverkillHeavyMachineGun, describe, string(OverkillHeavyMachineGun this)) { TC(OverkillHeavyMachineGun, this); - return _("The Overkill Heavy Machine Gun is a superweapon that rapidly fires harmful bullets with a small degree of spread\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "It is a superweapon found on some maps, meaning that it breaks down after some time\n\n" - "The primary fire consumes Bullets ammo, although you spawn with an infinite amount of it in Overkill. " - "It has a limited magazine size, so needs reloading after several shots\n\n" - "The Overkill Heavy Machine Gun can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously\n\n" - "Since its bullets deal a lot more damage than the Overkill MachineGun's bullets, it is often heavily contested when it spawns in"); + return sprintf(_("The %s is a superweapon that rapidly fires harmful bullets with a small degree of spread\n\n" + "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "It is a superweapon found on some maps, meaning that it breaks down after some time\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "It has a limited magazine size, so needs reloading after several shots\n\n" + "The %s can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously\n\n" + "Since its bullets deal a lot more damage than the %s's bullets, it is often heavily contested when it spawns in"), + COLORED_NAME(OverkillHeavyMachineGun), COLORED_NAME(Bullets), COLORED_NAME(OverkillHeavyMachineGun), COLORED_NAME(OverkillMachineGun)); } #endif ENDCLASS(OverkillHeavyMachineGun) diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh index 917ca66d9..43f9274f2 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh @@ -51,11 +51,12 @@ CLASS(OverkillMachineGun, Weapon) METHOD(OverkillMachineGun, describe, string(OverkillMachineGun this)) { TC(OverkillMachineGun, this); - return _("The Overkill MachineGun quickly fires bullets with a small degree of spread\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes Bullets ammo, although you spawn with an infinite amount of it in Overkill. " - "It has a limited magazine size, so needs reloading after several shots\n\n" - "The Overkill MachineGun can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously"); + return sprintf(_("The %s quickly fires bullets with a small degree of spread\n\n" + "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "It has a limited magazine size, so needs reloading after several shots\n\n" + "The %s can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously"), + COLORED_NAME(OverkillMachineGun), COLORED_NAME(Bullets), COLORED_NAME(OverkillMachineGun)); } #endif ENDCLASS(OverkillMachineGun) diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qh b/qcsrc/common/mutators/mutator/overkill/oknex.qh index 93ee6200a..937efe863 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qh +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qh @@ -63,11 +63,12 @@ CLASS(OverkillNex, Weapon) METHOD(OverkillNex, describe, string(OverkillNex this)) { TC(OverkillNex, this); - return _("The Overkill Nex fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes Cells ammo, although you spawn with an infinite amount of it in Overkill. " - "It has a limited magazine size, so needs reloading after several shots\n\n" - "Since it is the only Overkill weapon with no spread, the Overkill Nex stands out at long ranges"); + return sprintf(_("The %s fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" + "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "It has a limited magazine size, so needs reloading after several shots\n\n" + "Since it is the only Overkill weapon with no spread, the %s stands out at long ranges"), + COLORED_NAME(OverkillNex), COLORED_NAME(Cells), COLORED_NAME(OverkillNex)); } #endif ENDCLASS(OverkillNex) diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qh b/qcsrc/common/mutators/mutator/overkill/okrpc.qh index a18110510..a8cc06945 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qh +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qh @@ -54,10 +54,12 @@ CLASS(OverkillRocketPropelledChainsaw, Weapon) METHOD(OverkillRocketPropelledChainsaw, describe, string(OverkillRocketPropelledChainsaw this)) { TC(OverkillRocketPropelledChainsaw, this); - return _("As the name suggests, the Overkill Rocket Propelled Chainsaw fires a rocket propelled chainsaw which explodes on impact, dealing a lot of splash damage to any players close by\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes Rockets ammo, although you spawn with an infinite amount of it in Overkill\n\n" - "Since it is the only Overkill weapon which deals splash damage, the Overkill Rocket Propelled Chainsaw is a good choice of weapon for attacking groups of enemies"); + return sprintf(_("As the name suggests, the %s is a superweapon that fires a rocket propelled chainsaw which explodes on impact, dealing a lot of splash damage to any players close by\n\n" + "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "It is a superweapon found on some maps, meaning that it breaks down after some time\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill\n\n" + "Since it is the only Overkill weapon which deals splash damage, the %s is a good choice of weapon for attacking groups of enemies"), + COLORED_NAME(OverkillRocketPropelledChainsaw), COLORED_NAME(Rockets), COLORED_NAME(OverkillRocketPropelledChainsaw)); } #endif ENDCLASS(OverkillRocketPropelledChainsaw) diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh index 647215a31..fe797d560 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh @@ -52,11 +52,12 @@ CLASS(OverkillShotgun, Weapon) METHOD(OverkillShotgun, describe, string(OverkillShotgun this)) { TC(OverkillShotgun, this); - return _("The Overkill Shotgun fires a single shotgun round which spreads into multiple pellets upon exiting the barrel, dealing a deadly blow if up close\n\n" - "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" - "The primary fire consumes Shells ammo, although you spawn with an infinite amount of it in Overkill. " - "It has a limited magazine size, so needs reloading after several shots\n\n" - "The Shotgun's damage drops off quickly as the range increases, so it is only useful for close combat or sometimes medium range combat"); + return sprintf(_("The %s fires a single shotgun round which spreads into multiple pellets upon exiting the barrel, dealing a deadly blow if up close\n\n" + "Like with all Overkill weapons, the secondary fire shoots a laser which does not damage or push enemies, but can be used to push yourself around\n\n" + "The primary fire consumes %s ammo, although you spawn with an infinite amount of it in Overkill. " + "It has a limited magazine size, so needs reloading after several shots\n\n" + "The %s's damage drops off quickly as the range increases, so it is only useful for close combat or sometimes medium range combat"), + COLORED_NAME(OverkillShotgun), COLORED_NAME(Shells), COLORED_NAME(OverkillShotgun)); } #endif ENDCLASS(OverkillShotgun) diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh index 0bd65fb07..8776cf896 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh @@ -63,9 +63,10 @@ CLASS(Invisibility, Powerups) METHOD(Invisibility, describe, string(Invisibility this)) { TC(Invisibility, this); - return _("The Invisibility powerup increases your translucency while the powerup is active, making it more difficult for enemies to see you. " - "This powerup is often present in InstaGib\n\n" - "Since it is a powerup, it will drop if you die while holding it"); + return sprintf(_("The %s powerup increases your translucency while the powerup is active, making it more difficult for enemies to see you. " + "This powerup is often present in InstaGib\n\n" + "Since it is a powerup, it will drop if you die while holding it"), + COLORED_NAME(Invisibility)); } #endif ENDCLASS(Invisibility) diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh index 08d5b180a..6f3a41c9f 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh @@ -55,14 +55,16 @@ SPAWNFUNC_ITEM(item_invincible, ITEM_Shield) CLASS(Shield, Powerups) ATTRIB(Shield, netname, string, "invincible"); // NOTE: referring to as invincible so that it matches the powerup item ATTRIB(Shield, m_name, string, _("Shield")); + ATTRIB(Shield, m_color, vector, COLOR_POWERUP_SHIELD); ATTRIB(Shield, m_icon, string, "shield"); #ifdef MENUQC METHOD(Shield, describe, string(Shield this)) { TC(Shield, this); - return _("The Shield powerup greatly decreases the damage you take until the powerup expires, having a compounding effect with armor. " - "It also makes you more resistant to knockback\n\n" - "Since it is a powerup, it will drop if you die while holding it"); + return sprintf(_("The %s powerup greatly decreases the damage you take until the powerup expires, having a compounding effect with armor. " + "It also makes you more resistant to knockback\n\n" + "Since it is a powerup, it will drop if you die while holding it"), + COLORED_NAME(Shield)); } #endif ENDCLASS(Shield) diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh index 219a64520..5d34eb344 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh @@ -64,9 +64,10 @@ CLASS(Speed, Powerups) METHOD(Speed, describe, string(Speed this)) { TC(Speed, this); - return _("The Speed powerup increases your movement speed, attack speed, and health regeneration speed while the powerup is active. " - "However, it also makes you a bit more vulnerable to incoming attacks\n\n" - "Since it is a powerup, it will drop if you die while holding it"); + return sprintf(_("The %s powerup increases your movement speed, attack speed, and health regeneration speed while the powerup is active. " + "However, it also makes you a bit more vulnerable to incoming attacks\n\n" + "Since it is a powerup, it will drop if you die while holding it"), + COLORED_NAME(Speed)); } #endif ENDCLASS(Speed) diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh index fd2e598f9..de133de26 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh @@ -56,15 +56,17 @@ SPAWNFUNC_ITEM(item_strength, ITEM_Strength) CLASS(Strength, Powerups) ATTRIB(Strength, netname, string, "strength"); ATTRIB(Strength, m_name, string, _("Strength")); + ATTRIB(Strength, m_color, vector, COLOR_POWERUP_STRENGTH); ATTRIB(Strength, m_icon, string, "strength"); #ifdef MENUQC METHOD(Strength, describe, string(Strength this)) { TC(Strength, this); - return _("The Strength powerup greatly increases the damage you deal, until the powerup expires. " - "It also increases the knockback that your attacks deal\n\n" - "The damage and knockback you deal to yourself also increases but by a smaller amount\n\n" - "Since it is a powerup, it will drop if you die while holding it"); + return sprintf(_("The %s powerup greatly increases the damage you deal, until the powerup expires. " + "It also increases the knockback that your attacks deal\n\n" + "The damage and knockback you deal to yourself also increases but by a smaller amount\n\n" + "Since it is a powerup, it will drop if you die while holding it"), + COLORED_NAME(Strength)); } #endif ENDCLASS(Strength) diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qh b/qcsrc/common/vehicles/vehicle/bumblebee.qh index a380d9d75..05fc9f950 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qh +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qh @@ -1,6 +1,9 @@ #pragma once #include "bumblebee_weapons.qh" +#ifdef MENUQC + #include +#endif CLASS(Bumblebee, Vehicle) /* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE); @@ -24,11 +27,12 @@ CLASS(Bumblebee, Vehicle) METHOD(Bumblebee, describe, string(Bumblebee this)) { TC(Bumblebee, this); - return _("The Bumblebee vehicle seats up to three passengers, who are given different roles based on the order they enter\n\n" - "The first player to enter will be the pilot, flying the vehicle up into the skies. " - "The first player can also shoot a green healing wave to heal other teammates on the ground\n\n" - "The second player to enter is the right gunner and the third player to enter is the left gunner\n\n" - "When the pilot exits the vehicle, the players switch roles by moving up in position"); + return sprintf(_("The %s vehicle seats up to three passengers, who are given different roles based on the order they enter\n\n" + "The first player to enter will be the pilot, flying the vehicle up into the skies. " + "The first player can also shoot a green healing wave to heal other teammates on the ground\n\n" + "The second player to enter is the right gunner and the third player to enter is the left gunner\n\n" + "When the pilot exits the vehicle, the players switch roles by moving up in position"), + COLORED_NAME(Bumblebee)); } #endif ENDCLASS(Bumblebee) diff --git a/qcsrc/common/vehicles/vehicle/racer.qh b/qcsrc/common/vehicles/vehicle/racer.qh index 5797411a8..b75732089 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qh +++ b/qcsrc/common/vehicles/vehicle/racer.qh @@ -1,6 +1,9 @@ #pragma once #include "racer_weapon.qh" +#ifdef MENUQC + #include +#endif CLASS(Racer, Vehicle) /* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); @@ -24,9 +27,11 @@ CLASS(Racer, Vehicle) METHOD(Racer, describe, string(Racer this)) { TC(Racer, this); - return _("The Racer vehicle looks like a jet, but does not fly uwpards very well. It seats only one passenger, who becomes the pilot\n\n" - "It can be accelerated by pressing the \"+jump\" bind, which consumes power from the same source as the primary weapon\n\n" - "The Racer's primary weapon is a laser and the secondary weapon is energy balls that explode on impact"); + return sprintf(_("The %s vehicle looks like a jet, but does not fly uwpards very well. " + "It seats only one passenger, who becomes the pilot\n\n" + "It can be accelerated by pressing the ^3+jump^7 bind, which consumes power from the same source as the primary weapon\n\n" + "The %s's primary weapon is a laser and the secondary weapon is energy balls that explode on impact"), + COLORED_NAME(Racer), COLORED_NAME(Racer)); } #endif ENDCLASS(Racer) diff --git a/qcsrc/common/vehicles/vehicle/raptor.qh b/qcsrc/common/vehicles/vehicle/raptor.qh index c4ce6699e..24c69394c 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qh +++ b/qcsrc/common/vehicles/vehicle/raptor.qh @@ -1,6 +1,9 @@ #pragma once #include "raptor_weapons.qh" +#ifdef MENUQC + #include +#endif CLASS(Raptor, Vehicle) /* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); @@ -23,12 +26,16 @@ CLASS(Raptor, Vehicle) #ifdef MENUQC METHOD(Raptor, describe, string(Raptor this)) { + // can't include ./spiderbot.qh or else circular includes +#define SPIDERBOT_COLOR strcat(rgb_to_hexcolor('1 1 1'), _("Spiderbot"), "^7") TC(Raptor, this); - return _("The Raptor vehicle is a flying vehicle that takes only one pilot, who can also opearate two weapons\n\n" - "The two weapons have different reticles for them similar to the Spiderbot. " - "The primary weapon is laser-based, and is shot toward the white reticle. " - "The secondary weapon drops bombs to the ground, aiming towards the green reticle. " - "The white reticle always points at the head of the vehicle, while the green reticle's location is determined by the momentum of the vehicle"); + return sprintf(_("The %s vehicle is a flying vehicle that takes only one pilot, who can also opearate two weapons\n\n" + "The two weapons have different reticles for them similar to the %s. " + "The primary weapon is laser-based, and is shot toward the white reticle. " + "The secondary weapon drops bombs to the ground, aiming towards the green reticle. " + "The white reticle always points at the head of the vehicle, while the green reticle's location is determined by the momentum of the vehicle"), + COLORED_NAME(Raptor), SPIDERBOT_COLOR); +#undef SPIDERBOT_COLOR } #endif ENDCLASS(Raptor) diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qh b/qcsrc/common/vehicles/vehicle/spiderbot.qh index dd68811e0..33aa8ad1f 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qh +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qh @@ -1,6 +1,10 @@ #pragma once #include "spiderbot_weapons.qh" +#ifdef MENUQC + #include + #include "raptor.qh" +#endif CLASS(Spiderbot, Vehicle) /* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE); @@ -24,12 +28,13 @@ CLASS(Spiderbot, Vehicle) METHOD(Spiderbot, describe, string(Spiderbot this)) { TC(Spiderbot, this); - return _("The Spiderbot vehicle walks and jumps around, and takes only one rider\n\n" - "It can jump from very high altitudes while protecting the rider\n\n" - "It has two weapons the rider can control, which have different reticles for them similar to the Raptor. " - "The primary weapon is a machine gun, and is shot toward the green reticle. " - "The secondary weapon shoots rockets towards the white reticle. " - "The white reticle points to the front of the vehicle, while the green reticle also points to the front, with a bit of delay when the Spiderbot rotates"); + return sprintf(_("The %s vehicle walks and jumps around, and takes only one rider\n\n" + "It can jump from very high altitudes while protecting the rider\n\n" + "It has two weapons the rider can control, which have different reticles for them similar to the %s. " + "The primary weapon is a machine gun, and is shot toward the green reticle. " + "The secondary weapon shoots rockets towards the white reticle. " + "The white reticle points to the front of the vehicle, while the green reticle also points to the front, with a bit of delay when the %s rotates"), + COLORED_NAME(Spiderbot), COLORED_NAME(Raptor), COLORED_NAME(Spiderbot)); } #endif ENDCLASS(Spiderbot) diff --git a/qcsrc/common/weapons/weapon/arc.qh b/qcsrc/common/weapons/weapon/arc.qh index 36b924849..7a8bcf0d4 100644 --- a/qcsrc/common/weapons/weapon/arc.qh +++ b/qcsrc/common/weapons/weapon/arc.qh @@ -84,10 +84,11 @@ CLASS(Arc, Weapon) METHOD(Arc, describe, string(Arc this)) { TC(Arc, this); - return _("The Arc fires a continuous stream of electricity, steadily dealing damage to any enemies that cross its path\n\n" - "The secondary fire rapidly shoots electro balls forward, exploding on impact and dealing some splash damage\n\n" - "It consumes Cells ammo, steadily churning through your supply to maintain the stream\n\n" - "The Arc is quite a versatile weapon, however it is more effective at close to medium ranges, since the stream is not instantaneous"); + return sprintf(_("The %s fires a continuous stream of electricity, steadily dealing damage to any enemies that cross its path\n\n" + "The secondary fire rapidly shoots electro balls forward, exploding on impact and dealing some splash damage\n\n" + "It consumes %s ammo, steadily churning through your supply to maintain the stream\n\n" + "The %s is quite a versatile weapon, however it is more effective at close to medium ranges, since the stream is not instantaneous"), + COLORED_NAME(Arc), COLORED_NAME(Cells), COLORED_NAME(Arc)); } #endif ENDCLASS(Arc) diff --git a/qcsrc/common/weapons/weapon/blaster.qh b/qcsrc/common/weapons/weapon/blaster.qh index 7bd781ac8..0b2db652a 100644 --- a/qcsrc/common/weapons/weapon/blaster.qh +++ b/qcsrc/common/weapons/weapon/blaster.qh @@ -49,12 +49,13 @@ CLASS(Blaster, Weapon) METHOD(Blaster, describe, string(Blaster this)) { TC(Blaster, this); - return _("The Blaster is one of the two main default weapons, firing a relatively weak high speed laser forwards, dealing some splash damage but importantly a lot of knockback\n\n" - "It has no secondary fire, instead switching to the previously selected weapon\n\n" - "It doesn't require ammo, meaning it is a great choice if you are running low on ammo and need to preserve some\n\n" - "The Blaster is always available so ends up being used a lot when players spawn in, but it's difficult to master when used over a medium to long range. " - "One of the most common uses of the Blaster is \"laser jumping\", where you can gain height by aiming down, jumping, then firing to boost yourself up. " - "Because it does a lot of knockback, another common usage is alternating between a high damage weapon and the Blaster to throw the enemy's aim off"); + return sprintf(_("The %s is one of the two main default weapons, firing a relatively weak high speed laser forwards, dealing some splash damage but importantly a lot of knockback\n\n" + "It has no secondary fire, instead switching to the previously selected weapon\n\n" + "It doesn't require ammo, meaning it is a great choice if you are running low on ammo and need to preserve some\n\n" + "The %s is always available so ends up being used a lot when players spawn in, but it's difficult to master when used over a medium to long range\n\n" + "One of the most common uses of the %s is \"laser jumping,\" where you can gain height by aiming down, jumping, then firing to boost yourself up. " + "Because it does a lot of knockback, another common usage is alternating between a high damage weapon and the %s to throw the enemy's aim off"), + COLORED_NAME(Blaster), COLORED_NAME(Blaster), COLORED_NAME(Blaster), COLORED_NAME(Blaster)); } #endif ENDCLASS(Blaster) diff --git a/qcsrc/common/weapons/weapon/crylink.qh b/qcsrc/common/weapons/weapon/crylink.qh index d7cb9eb02..0840e8f87 100644 --- a/qcsrc/common/weapons/weapon/crylink.qh +++ b/qcsrc/common/weapons/weapon/crylink.qh @@ -64,15 +64,16 @@ CLASS(Crylink, Weapon) METHOD(Crylink, describe, string(Crylink this)) { TC(Crylink, this); - return _("The Crylink fires bursts of laser-like projectiles, spreading out as they travel away, and deflecting off walls. " - "If the primary fire is held, when it's released the projectiles will converge before spreading out again, " - "which can be utilized to deal more damage to an enemy by making the projectiles converge on them\n\n" - "The secondary fire shoots the projectiles together in a tight group, so it is often the better option in situations where the enemy is an easy target to hit\n\n" - "It consumes Cells ammo for each projectile, which is shared by several weapons\n\n" - "Close to medium range is the ideal time to use the Crylink, although the secondary fire can be useful for long range combat sometimes\n\n" - "The Crylink deals knockback in a unique way, pulling the player from their center to the point of impact. " - "This makes it one of the best weapons to slow someone down if you are chasing them, particularly with the secondary fire. " - "Another common use of the Crylink is \"crylink running\", where you partially angle down and use the secondary fire to pull yourself forwards, in order to gain speed"); + return sprintf(_("The %s fires bursts of laser-like projectiles, spreading out as they travel away, and deflecting off walls. " + "If the primary fire is held, when it's released the projectiles will converge before spreading out again, " + "which can be utilized to deal more damage to an enemy by making the projectiles converge on them\n\n" + "The secondary fire shoots the projectiles together in a tight group, so it is often the better option in situations where the enemy is an easy target to hit\n\n" + "It consumes %s ammo for each projectile, which is shared by several weapons\n\n" + "Close to medium range is the ideal time to use the %s, although the secondary fire can be useful for long range combat sometimes\n\n" + "The %s deals knockback in a unique way, pulling the player from their center to the point of impact. " + "This makes it one of the best weapons to slow someone down if you are chasing them, particularly with the secondary fire. " + "Another common use of the %s is \"crylink running,\" where you partially angle down and use the secondary fire to pull yourself forwards, in order to gain speed"), + COLORED_NAME(Crylink), COLORED_NAME(Cells), COLORED_NAME(Crylink), COLORED_NAME(Crylink), COLORED_NAME(Crylink)); } #endif ENDCLASS(Crylink) diff --git a/qcsrc/common/weapons/weapon/devastator.qh b/qcsrc/common/weapons/weapon/devastator.qh index a57f87fc7..9472648a3 100644 --- a/qcsrc/common/weapons/weapon/devastator.qh +++ b/qcsrc/common/weapons/weapon/devastator.qh @@ -1,6 +1,7 @@ #pragma once #include +#include "vortex.qh" // for its color CLASS(Devastator, Weapon) /* spawnfunc */ ATTRIB(Devastator, m_canonical_spawnfunc, string, "weapon_devastator"); @@ -70,14 +71,15 @@ CLASS(Devastator, Weapon) METHOD(Devastator, describe, string(Devastator this)) { TC(Devastator, this); - return _("The Devastator launches a remote controlled rocket, dealing significant damage when it explodes on impact. " - "If the primary fire is held, the rocket can be guided by the user's aim, allowing steering it towards enemies\n\n" - "The secondary fire can be used to immediately detonate the most recently fired rocket, allowing dealing damage to enemies even if the rocket barely missed colliding with them\n\n" - "It consumes a bunch of Rockets ammo for each rocket, which can end up being depleted quickly, so often players alternate with another weapon like Vortex\n\n" - "Due to its high damage output, the Devastator is one of the most commonly used weapons. " - "It can be used in almost any scenario, working best in medium range combat. " - "In close range combat, the large splash radius means often rockets can damage yourself as well as the enemy\n\n" - "Due to the ability to remotely detonate rockets, a common usage is \"rocket flying\", where you fire a rocket and immediately detonate it to boost yourself while mid-air"); + return sprintf(_("The %s launches a remote controlled rocket, dealing significant damage when it explodes on impact. " + "If the primary fire is held, the rocket can be guided by the user's aim, allowing steering it towards enemies\n\n" + "The secondary fire can be used to immediately detonate the most recently fired rocket, allowing dealing damage to enemies even if the rocket barely missed colliding with them\n\n" + "It consumes a bunch of %s ammo for each rocket, which can end up being depleted quickly, so often players alternate with another weapon like %s\n\n" + "Due to its high damage output, the %s is one of the most commonly used weapons. " + "It can be used in almost any scenario, working best in medium range combat. " + "In close range combat, the large splash radius means often rockets can damage yourself as well as the enemy\n\n" + "Due to the ability to remotely detonate rockets, a common usage is \"rocket flying\", where you fire a rocket and immediately detonate it to boost yourself while mid-air"), + COLORED_NAME(Devastator), COLORED_NAME(Rockets), COLORED_NAME(Vortex), COLORED_NAME(Devastator)); } #endif ENDCLASS(Devastator) diff --git a/qcsrc/common/weapons/weapon/electro.qh b/qcsrc/common/weapons/weapon/electro.qh index 6394ce226..b75a15dec 100644 --- a/qcsrc/common/weapons/weapon/electro.qh +++ b/qcsrc/common/weapons/weapon/electro.qh @@ -78,13 +78,14 @@ CLASS(Electro, Weapon) METHOD(Electro, describe, string(Electro this)) { TC(Electro, this); - return _("The Electro shoots electric balls forwards, dealing some splash damage when they burst on impact\n\n" - "The secondary fire launches similar balls that are influenced by gravity, " - "so they can be laid around the map at high traffic locations (like the flag in Capture The Flag) to damage enemies that walk by. " - "The balls burst after some time, and can be forced to burst in a \"combo\" if a primary fire ball bursts near them\n\n" - "It consumes some Cells ammo for each ball\n\n" - "The Electro is one of the best spam weapons to use in crowded areas, since combos can deal tons of damage, if the enemy is close enough. " - "Since the primary fire doesn't travel particularly fast, the Electro is not useful in many other situations"); + return sprintf(_("The %s shoots electric balls forwards, dealing some splash damage when they burst on impact\n\n" + "The secondary fire launches similar balls that are influenced by gravity, " + "so they can be laid around the map at high traffic locations (like the flag in Capture The Flag) to damage enemies that walk by. " + "The balls burst after some time, and can be forced to burst in a \"combo\" if a primary fire ball bursts near them\n\n" + "It consumes some %s ammo for each ball\n\n" + "The %s is one of the best spam weapons to use in crowded areas, since combos can deal tons of damage, if the enemy is close enough. " + "Since the primary fire doesn't travel particularly fast, the %s is not useful in many other situations"), + COLORED_NAME(Electro), COLORED_NAME(Cells), COLORED_NAME(Electro), COLORED_NAME(Electro)); } #endif ENDCLASS(Electro) diff --git a/qcsrc/common/weapons/weapon/fireball.qh b/qcsrc/common/weapons/weapon/fireball.qh index a7e2e2176..2b596ebd9 100644 --- a/qcsrc/common/weapons/weapon/fireball.qh +++ b/qcsrc/common/weapons/weapon/fireball.qh @@ -58,12 +58,13 @@ CLASS(Fireball, Weapon) METHOD(Fireball, describe, string(Fireball this)) { TC(Fireball, this); - return _("The Fireball supercharges then fires a massive fireball in a straight line, dealing heaps of splash damage over a large radius on impact\n\n" - "The secondary fire launches flaming balls that set nearby players alight\n\n" - "It is a superweapon, so isn't often found in game\n\n" - "It doesn't require ammo, but it is destroyed after some time\n\n" - "Since the Fireball takes a moment to charge and the fireball travels slowly, using it effectively may be difficult, " - "but if done properly it can deal a ton of damage"); + return sprintf(_("The %s supercharges then fires a massive fireball in a straight line, dealing heaps of splash damage over a large radius on impact\n\n" + "The secondary fire launches flaming balls that set nearby players alight\n\n" + "It is a superweapon, so isn't often found in game\n\n" + "It doesn't require ammo, but it is destroyed after some time\n\n" + "Since the %s takes a moment to charge and the fireball travels slowly, using it effectively may be difficult, " + "but if done properly it can deal a ton of damage"), + COLORED_NAME(Fireball), COLORED_NAME(Fireball)); } #endif ENDCLASS(Fireball) diff --git a/qcsrc/common/weapons/weapon/hagar.qh b/qcsrc/common/weapons/weapon/hagar.qh index 7b3b42dc6..b908d1170 100644 --- a/qcsrc/common/weapons/weapon/hagar.qh +++ b/qcsrc/common/weapons/weapon/hagar.qh @@ -62,12 +62,13 @@ CLASS(Hagar, Weapon) METHOD(Hagar, describe, string(Hagar this)) { TC(Hagar, this); - return _("The Hagar rapidly fires small propelled rockets forwards, dealing some splash damage on impact\n\n" - "When the secondary fire is held, multiple rockets are loaded up, and they're shot at the same time when released. " - "These rockets can't be held forever, so it will fire itself after some time (after a warning beep) if the secondary fire isn't released\n\n" - "It consumes Rockets ammo for each rocket\n\n" - "The Hagar works best over close to medium ranges, since it's hard to land hits at a long distance. " - "A common usage is fully loading the secondary fire before turning a corner, so you can surprise any enemies around the corner with a bunch of rockets to the face"); + return sprintf(_("The %s rapidly fires small propelled rockets forwards, dealing some splash damage on impact\n\n" + "When the secondary fire is held, multiple rockets are loaded up, and they're shot at the same time when released. " + "These rockets can't be held forever, so it will fire itself after some time (after a warning beep) if the secondary fire isn't released\n\n" + "It consumes %s ammo for each rocket\n\n" + "The %s works best over close to medium ranges, since it's hard to land hits at a long distance. " + "A common usage is fully loading the secondary fire before turning a corner, so you can surprise any enemies around the corner with a bunch of rockets to the face"), + COLORED_NAME(Hagar), COLORED_NAME(Rockets), COLORED_NAME(Hagar)); } #endif ENDCLASS(Hagar) diff --git a/qcsrc/common/weapons/weapon/hlac.qh b/qcsrc/common/weapons/weapon/hlac.qh index 77bb82df7..6eac2ac56 100644 --- a/qcsrc/common/weapons/weapon/hlac.qh +++ b/qcsrc/common/weapons/weapon/hlac.qh @@ -1,6 +1,9 @@ #pragma once #include +#ifdef MENUQC + #include "blaster.qh" +#endif CLASS(HLAC, Weapon) /* spawnfunc */ ATTRIB(HLAC, m_canonical_spawnfunc, string, "weapon_hlac"); @@ -54,14 +57,15 @@ CLASS(HLAC, Weapon) METHOD(HLAC, describe, string(HLAC this)) { TC(HLAC, this); - return _("The Heavy Assualt Laser Cannon (or HLAC for short) fires lasers in quick succession. " - "The projectiles it fires are similar to those of the Blaster\n\n" - "The secondary fire shoots a randomly scattered burst of multiple lasers at once\n\n" - "Unlike the Blaster, it consumes Cells ammo for each laser shot, meaning that it cannot be used infinitely\n\n" - "The HLAC works best in close ranges, but the primary fire is also useful in medium ranges\n\n" - "A unique aspect of the HLAC is that the longer the primary fire is held, the more that the lasers will start to spread out. " - "This means releasing primary fire every now and then is important to restore accuracy. " - "Also, the HLAC has less spread when used while crouching"); + return sprintf(_("The %s (or HLAC for short) fires lasers in quick succession. " + "The projectiles it fires are similar to those of the %s\n\n" + "The secondary fire shoots a randomly scattered burst of multiple lasers at once\n\n" + "Unlike the %s, it consumes %s ammo for each laser shot, meaning that it cannot be used infinitely\n\n" + "The %s works best in close ranges, but the primary fire is also useful in medium ranges\n\n" + "A unique aspect of the %s is that the longer the primary fire is held, the more that the lasers will start to spread out. " + "This means releasing primary fire every now and then is important to restore accuracy. " + "Also, the %s has less spread when used while crouching"), + COLORED_NAME(HLAC), COLORED_NAME(Blaster), COLORED_NAME(Blaster), COLORED_NAME(Cells), COLORED_NAME(HLAC), COLORED_NAME(HLAC), COLORED_NAME(HLAC)); } #endif ENDCLASS(HLAC) diff --git a/qcsrc/common/weapons/weapon/hook.qh b/qcsrc/common/weapons/weapon/hook.qh index 4d974bace..e4051392f 100644 --- a/qcsrc/common/weapons/weapon/hook.qh +++ b/qcsrc/common/weapons/weapon/hook.qh @@ -54,12 +54,13 @@ CLASS(Hook, Weapon) METHOD(Hook, describe, string(Hook this)) { TC(Hook, this); - return _("The Grappling Hook is a unique weapon, firing a chain forwards which pulls you in once it latches onto something\n\n" - "The secondary fire usually drops a gravity bomb that affects enemies, also releasing light a smoke like a flashbang\n\n" - "It usually requires Fuel ammo to work, consuming it both when initially firing the hook, and after a couple seconds as it reels you in\n\n" - "The Grappling Hook allows reaching previously unreachable places on maps and zooming around the map at high speeds, " - "making both surprise ambushes and miraculous escapes possible\n\n" - "It isn't available very often on maps, unless the Grappling Hook mutator is active, in which all players have it on their offhand, used with the +hook bind"); + return sprintf(_("The %s is a unique weapon, firing a chain forwards which pulls you in once it latches onto something\n\n" + "The secondary fire usually drops a gravity bomb that affects enemies, also releasing light a smoke like a flashbang\n\n" + "It usually requires %s ammo to work, consuming it both when initially firing the hook, and after a couple seconds as it reels you in\n\n" + "The %s allows reaching previously unreachable places on maps and zooming around the map at high speeds, " + "making both surprise ambushes and miraculous escapes possible\n\n" + "It isn't available very often on maps, unless the Grappling Hook mutator is active, in which all players have it on their offhand, used with the ^3+hook^7 bind"), + COLORED_NAME(Hook), COLORED_NAME(JetpackFuel), COLORED_NAME(Hook)); } #endif ENDCLASS(Hook) diff --git a/qcsrc/common/weapons/weapon/machinegun.qh b/qcsrc/common/weapons/weapon/machinegun.qh index cf700397a..53155ef4e 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qh +++ b/qcsrc/common/weapons/weapon/machinegun.qh @@ -68,11 +68,12 @@ CLASS(MachineGun, Weapon) METHOD(MachineGun, describe, string(MachineGun this)) { TC(MachineGun, this); - return _("The MachineGun quickly fires bullets with a small degree of spread\n\n" - "The secondary fire fires a quick burst of bullets faster than the primary fire and with no spread, but there's a short delay until it can be used again\n\n" - "It consumes Bullets ammo for each bullet shot, until the whole magazine is emptied\n\n" - "The MachineGun can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously. " - "Since the secondary fire has no spread, it's the better option when firing over a long range"); + return sprintf(_("The %s quickly fires bullets with a small degree of spread\n\n" + "The secondary fire fires a quick burst of bullets faster than the primary fire and with no spread, but there's a short delay until it can be used again\n\n" + "It consumes %s ammo for each bullet shot, until the whole magazine is emptied\n\n" + "The %s can be used in a lot of situations, and it works particularly well at long ranges since the bullets pierce the sky instantaneously. " + "Since the secondary fire has no spread, it's the better option when firing over a long range"), + COLORED_NAME(MachineGun), COLORED_NAME(Bullets), COLORED_NAME(MachineGun)); } #endif ENDCLASS(MachineGun) diff --git a/qcsrc/common/weapons/weapon/minelayer.qh b/qcsrc/common/weapons/weapon/minelayer.qh index 06e454bb7..82d114fb9 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qh +++ b/qcsrc/common/weapons/weapon/minelayer.qh @@ -59,12 +59,13 @@ CLASS(MineLayer, Weapon) METHOD(MineLayer, describe, string(MineLayer this)) { TC(MineLayer, this); - return _("The Mine Layer places mines on the ground when fired, which detonate and damage enemies if stepped on. " - "Only a couple mines can be placed at any time, and after several seconds they will self-detonate\n\n" - "The secondary fire instantaneously detonates any mines fired by the primary fire, first waiting until you're far enough away\n\n" - "It consumes Rockets ammo for each mine laid\n\n" - "The mines are not launched very far before they hit the ground, so the Mine Layer isn't very effective at medium to long ranges. " - "It is often used to protect important areas of the map such as the flag in Capture The Flag, control points in Onslaught, or checkpoints in Assault"); + return sprintf(_("The %s places mines on the ground when fired, which detonate and damage enemies if stepped on. " + "Only a couple mines can be placed at any time, and after several seconds they will self-detonate\n\n" + "The secondary fire instantaneously detonates any mines fired by the primary fire, first waiting until you're far enough away\n\n" + "It consumes %s ammo for each mine laid\n\n" + "The mines are not launched very far before they hit the ground, so the %s isn't very effective at medium to long ranges. " + "It is often used to protect important areas of the map such as the flag in Capture The Flag, control points in Onslaught, or checkpoints in Assault"), + COLORED_NAME(MineLayer), COLORED_NAME(Rockets), COLORED_NAME(MineLayer)); } #endif ENDCLASS(MineLayer) diff --git a/qcsrc/common/weapons/weapon/mortar.qh b/qcsrc/common/weapons/weapon/mortar.qh index c7903fe63..a27c29b06 100644 --- a/qcsrc/common/weapons/weapon/mortar.qh +++ b/qcsrc/common/weapons/weapon/mortar.qh @@ -60,11 +60,12 @@ CLASS(Mortar, Weapon) METHOD(Mortar, describe, string(Mortar this)) { TC(Mortar, this); - return _("The Mortar launches a grenade that explodes immediately on impact, dealing a medium amount of splash damage\n\n" - "The secondary fire shoots a similar grenade that explodes shortly after bouncing\n\n" - "It consumes Rockets ammo for every grenade launched\n\n" - "The Mortar works best at close to medium ranges, but it's quite tricky to hit an enemy if they're airborne. " - "Since the secondary fire grenade bounces before exploding, it can be bounced against walls to damage enemies lurking around a corner"); + return sprintf(_("The %s launches a grenade that explodes immediately on impact, dealing a medium amount of splash damage\n\n" + "The secondary fire shoots a similar grenade that explodes shortly after bouncing\n\n" + "It consumes %s ammo for every grenade launched\n\n" + "The %s works best at close to medium ranges, but it's quite tricky to hit an enemy if they're airborne. " + "Since the secondary fire grenade bounces before exploding, it can be bounced against walls to damage enemies lurking around a corner"), + COLORED_NAME(Mortar), COLORED_NAME(Rockets), COLORED_NAME(Mortar)); } #endif ENDCLASS(Mortar) diff --git a/qcsrc/common/weapons/weapon/porto.qh b/qcsrc/common/weapons/weapon/porto.qh index b83316ca0..c8b29a692 100644 --- a/qcsrc/common/weapons/weapon/porto.qh +++ b/qcsrc/common/weapons/weapon/porto.qh @@ -39,11 +39,12 @@ CLASS(PortoLaunch, Weapon) METHOD(PortoLaunch, describe, string(PortoLaunch this)) { TC(PortoLaunch, this); - return _("The Port-O-Launch is a unique gun that creates one-way portals between flat surfaces on the map, that immediately teleport players and projectiles\n\n" - "The secondary fire is used to shoot the out-portal, while the primary fire shoots the in-portal\n\n" - "It doesn't require ammo, but it is destroyed after some time\n\n" - "The portals will close either after the player who shot them dies or after some time period" - "The Port-O-Launch isn't often placed on maps, but if used well it can make for some interesting gameplay"); + return sprintf(_("The %s is a unique gun that creates one-way portals between flat surfaces on the map, that immediately teleport players and projectiles\n\n" + "The secondary fire is used to shoot the out-portal, while the primary fire shoots the in-portal\n\n" + "It doesn't require ammo, but it is destroyed after some time\n\n" + "The portals will close either after the player who shot them dies or after some time period" + "The %s isn't often placed on maps, but if used well it can make for some interesting gameplay"), + COLORED_NAME(PortoLaunch), COLORED_NAME(PortoLaunch)); } #endif ENDCLASS(PortoLaunch) diff --git a/qcsrc/common/weapons/weapon/rifle.qh b/qcsrc/common/weapons/weapon/rifle.qh index 40475cb0f..f850eee55 100644 --- a/qcsrc/common/weapons/weapon/rifle.qh +++ b/qcsrc/common/weapons/weapon/rifle.qh @@ -57,13 +57,17 @@ CLASS(Rifle, Weapon) #ifdef MENUQC METHOD(Rifle, describe, string(Rifle this)) { + // can't include ./vortex.qh or else circular includes +#define VORTEX_COLOR strcat(rgb_to_hexcolor(COLOR_WEP_VORTEX), _("Vortex"), "^7") TC(Rifle, this); - return _("The Rifle fires bullets that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" - "The secondary fire shoots a few less powerful bullets at once with a bit of scatter\n\n" - "It consumes Bullets ammo for each bullet shot\n\n" - "Unlike the Vortex, the secondary fire doesn't zoom, so the +zoom bind needs to be used manually with the Rifle. " - "Also, it needs to be reloaded after its magazine is emptied\n\n" - "Similar to the Vortex, the Rifle can be used at any range, but it stands out at long ranges"); + return sprintf(_("The %s fires bullets that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" + "The secondary fire shoots a few less powerful bullets at once with a bit of scatter\n\n" + "It consumes %s ammo for each bullet shot\n\n" + "Unlike the %s, the secondary fire doesn't zoom, so the ^3+zoom^7 bind needs to be used manually with the %s. " + "Also, it needs to be reloaded after its magazine is emptied\n\n" + "Similar to the %s, the %s can be used at any range, but it stands out at long ranges"), + COLORED_NAME(Rifle), COLORED_NAME(Bullets), VORTEX_COLOR, COLORED_NAME(Rifle), VORTEX_COLOR, COLORED_NAME(Rifle)); +#undef VORTEX_COLOR } #endif ENDCLASS(Rifle) diff --git a/qcsrc/common/weapons/weapon/seeker.qh b/qcsrc/common/weapons/weapon/seeker.qh index e6081a733..d8d6538aa 100644 --- a/qcsrc/common/weapons/weapon/seeker.qh +++ b/qcsrc/common/weapons/weapon/seeker.qh @@ -88,12 +88,13 @@ CLASS(Seeker, Weapon) METHOD(Seeker, describe, string(Seeker this)) { TC(Seeker, this); - return _("The T.A.G. Seeker is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. " - "The homing isn't perfect, so sometimes the missiles can hit an object or a corner\n\n" - "The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance\n\n" - "It consumes Rockets ammo, even when the tag doesn't land\n\n" - "The T.A.G. Seeker primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. " - "The secondary fire is only useful in close range combat, and sometimes the explosives can damage yourself too"); + return sprintf(_("The %s is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. " + "The homing isn't perfect, so sometimes the missiles can hit an object or a corner\n\n" + "The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance\n\n" + "It consumes %s ammo, even when the tag doesn't land\n\n" + "The %s primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. " + "The secondary fire is only useful in close range combat, and sometimes the explosives can damage yourself too"), + COLORED_NAME(Seeker), COLORED_NAME(Rockets), COLORED_NAME(Seeker)); } #endif ENDCLASS(Seeker) diff --git a/qcsrc/common/weapons/weapon/shockwave.qh b/qcsrc/common/weapons/weapon/shockwave.qh index 33a7d1922..e4be82a3e 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qh +++ b/qcsrc/common/weapons/weapon/shockwave.qh @@ -1,6 +1,9 @@ #pragma once #include +#ifdef MENUQC + #include "shotgun.qh" // for its color +#endif CLASS(Shockwave, Weapon) /* spawnfunc */ ATTRIB(Shockwave, m_canonical_spawnfunc, string, "weapon_shockwave"); @@ -77,10 +80,11 @@ CLASS(Shockwave, Weapon) METHOD(Shockwave, describe, string(Shockwave this)) { TC(Shockwave, this); - return _("The Shockwave is a unique weapon, firing shockwave blasts that deal damage over a short range\n\n" - "Similar to the Shotgun, the secondary fire swings the Shockwave, slapping players close enough with the head of the weapon\n\n" - "It doesn't require ammo to work\n\n" - "The Shockwave can only deal damage over a short range, so it is not useful for medium and long range combat"); + return sprintf(_("The %s is a unique weapon, firing shockwave blasts that deal damage over a short range\n\n" + "Similar to the %s, the secondary fire swings the %s, slapping players close enough with the head of the weapon\n\n" + "It doesn't require ammo to work\n\n" + "The %s can only deal damage over a short range, so it is not useful for medium and long range combat"), + COLORED_NAME(Shockwave), COLORED_NAME(Shotgun), COLORED_NAME(Shockwave), COLORED_NAME(Shockwave)); } #endif ENDCLASS(Shockwave) diff --git a/qcsrc/common/weapons/weapon/shotgun.qh b/qcsrc/common/weapons/weapon/shotgun.qh index 4fe8e10a9..896dd31a3 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qh +++ b/qcsrc/common/weapons/weapon/shotgun.qh @@ -65,11 +65,12 @@ CLASS(Shotgun, Weapon) METHOD(Shotgun, describe, string(Shotgun this)) { TC(Shotgun, this); - return _("The Shotgun is one of the two main default weapons, firing a single shotgun round which spreads into multiple pellets upon exiting the barrel\n\n" - "The secondary fire swings the Shotgun, slapping players close enough with the head of the weapon. " - "Since the slap takes a moment to land, timing this well is difficult\n\n" - "The primary fire consumes Shells ammo, although if you spawn in with the Shotgun you will already have some\n\n" - "The Shotgun's damage drops off quickly as the range increases, so it is only useful for close combat or sometimes medium range combat"); + return sprintf(_("The %s is one of the two main default weapons, firing a single shotgun round which spreads into multiple pellets upon exiting the barrel\n\n" + "The secondary fire swings the %s, slapping players close enough with the head of the weapon. " + "Since the slap takes a moment to land, timing this well is difficult\n\n" + "The primary fire consumes %s ammo, although if you spawn in with the %s you will already have some\n\n" + "The %s's damage drops off quickly as the range increases, so it is only useful for close combat or sometimes medium range combat"), + COLORED_NAME(Shotgun), COLORED_NAME(Shotgun), COLORED_NAME(Shells), COLORED_NAME(Shotgun), COLORED_NAME(Shotgun)); } #endif ENDCLASS(Shotgun) diff --git a/qcsrc/common/weapons/weapon/tuba.qh b/qcsrc/common/weapons/weapon/tuba.qh index c7fc19978..7c39b37c4 100644 --- a/qcsrc/common/weapons/weapon/tuba.qh +++ b/qcsrc/common/weapons/weapon/tuba.qh @@ -44,12 +44,13 @@ CLASS(Tuba, Weapon) METHOD(Tuba, describe, string(Tuba this)) { TC(Tuba, this); - return _("The @!#%'n Tuba is unique weapon that makes the ears of nearby enemies bleed by playing awful sounds, also slightly knocking them back\n\n" - "The secondary fire works the same way, playing a higher pitch\n\n" - "The only ammo it needs to operate is the breath from your lungs\n\n" - "Since your enemies need to be close by to hear your awful music, the @!#%'n Tuba is only effective at very close ranges\n\n" - "The pitch the @!#%'n Tuba plays depends on the movement keys pressed. " - "Reloading the weapon switches its model and notes played"); + return sprintf(_("The %s is unique weapon that makes the ears of nearby enemies bleed by playing awful sounds, also slightly knocking them back\n\n" + "The secondary fire works the same way, playing a higher pitch\n\n" + "The only ammo it needs to operate is the breath from your lungs\n\n" + "Since your enemies need to be close by to hear your awful music, the %s is only effective at very close ranges\n\n" + "The pitch the %s plays depends on the movement keys pressed. " + "Reloading the weapon switches its model and notes played"), + COLORED_NAME(Tuba), COLORED_NAME(Tuba), COLORED_NAME(Tuba)); } #endif ENDCLASS(Tuba) diff --git a/qcsrc/common/weapons/weapon/vaporizer.qh b/qcsrc/common/weapons/weapon/vaporizer.qh index 7b9147720..bea98ac64 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qh +++ b/qcsrc/common/weapons/weapon/vaporizer.qh @@ -1,6 +1,10 @@ #pragma once #include +#ifdef MENUQC + #include "blaster.qh" // for its color + #include // for ExtraLife color +#endif CLASS(Vaporizer, Weapon) /* spawnfunc */ ATTRIB(Vaporizer, m_canonical_spawnfunc, string, "weapon_vaporizer"); @@ -49,11 +53,12 @@ CLASS(Vaporizer, Weapon) METHOD(Vaporizer, describe, string(Vaporizer this)) { TC(Vaporizer, this); - return _("The Vaporizer is unique weapon, firing a deadly beam of energy dealing a huge amount of damage. " - "In InstaGib, the beam has the ability to instantly kill enemies with a single shot, unless they have an Extra Life\n\n" - "The secondary fire fires a laser similar to that fired by the Blaster, with very strong knockback\n\n" - "It is a superweapon, so isn't often found in game, except in InstaGib where all players spawn with it\n\n" - "It consumes some Cells ammo with each shot"); + return sprintf(_("The %s is unique weapon, firing a deadly beam of energy dealing a huge amount of damage. " + "In InstaGib, the beam has the ability to instantly kill enemies with a single shot, unless they have an %s\n\n" + "The secondary fire fires a laser similar to that fired by the %s, with very strong knockback\n\n" + "It is a superweapon, so isn't often found in game, except in InstaGib where all players spawn with it\n\n" + "It consumes some %s ammo with each shot"), + COLORED_NAME(Vaporizer), COLORED_NAME(ExtraLife), COLORED_NAME(Blaster), COLORED_NAME(Cells)); } #endif ENDCLASS(Vaporizer) diff --git a/qcsrc/common/weapons/weapon/vortex.qh b/qcsrc/common/weapons/weapon/vortex.qh index b1061ced7..efb37c895 100644 --- a/qcsrc/common/weapons/weapon/vortex.qh +++ b/qcsrc/common/weapons/weapon/vortex.qh @@ -1,6 +1,9 @@ #pragma once #include +#ifdef MENUQC + #include "rifle.qh" // for its color +#endif CLASS(Vortex, Weapon) /* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex"); @@ -67,12 +70,13 @@ CLASS(Vortex, Weapon) METHOD(Vortex, describe, string(Vortex this)) { TC(Vortex, this); - return _("The Vortex fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" - "The secondary fire zooms in when held, allowing for ease of aiming\n\n" - "It consumes Cells ammo for each bullet shot\n\n" - "Unlike the Rifle, the Vortex doesn't need to be reloaded manually, although you have to wait a couple seconds between shots. " - "Uniquely, the Vortex can be fired slightly before it finishes completely reloading, albeit dealing slightly less damage\n\n" - "Similar to the Rifle, the Vortex can be used at any range, but it stands out at long ranges"); + return sprintf(_("The %s fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact\n\n" + "The secondary fire zooms in when held, allowing for ease of aiming\n\n" + "It consumes %s ammo for each bullet shot\n\n" + "Unlike the %s, the %s doesn't need to be reloaded manually, although you have to wait a couple seconds between shots. " + "Uniquely, the %s can be fired slightly before it finishes completely reloading, albeit dealing slightly less damage\n\n" + "Similar to the %s, the %s can be used at any range, but it stands out at long ranges"), + COLORED_NAME(Vortex), COLORED_NAME(Cells), COLORED_NAME(Rifle), COLORED_NAME(Vortex), COLORED_NAME(Vortex), COLORED_NAME(Rifle), COLORED_NAME(Vortex)); } #endif ENDCLASS(Vortex)