From c337141158b6aa83808ff9b79e8be0b822c1e73b Mon Sep 17 00:00:00 2001 From: otta8634 Date: Sun, 22 Dec 2024 17:46:05 +0800 Subject: [PATCH] Finish relocating guide includes to QC files, fix COLORED_NAME macros COLORED_NAME macro fix suggested by @Mario here https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/181#note_2269492232. --- qcsrc/common/colors.qh | 4 +-- qcsrc/common/items/item/ammo.qc | 34 +++++-------------- qcsrc/common/items/item/ammo.qh | 4 --- qcsrc/common/items/item/armor.qc | 8 ++--- qcsrc/common/items/item/health.qc | 8 ++--- qcsrc/common/items/item/jetpack.qc | 6 ++-- qcsrc/common/mutators/mutator/buffs/all.inc | 26 +++++++------- .../common/mutators/mutator/instagib/items.qc | 9 +++-- qcsrc/common/mutators/mutator/nades/nades.inc | 22 ++++++------ .../common/mutators/mutator/overkill/okhmg.qc | 4 ++- .../common/mutators/mutator/overkill/okhmg.qh | 3 -- .../mutators/mutator/overkill/okmachinegun.qc | 3 +- .../common/mutators/mutator/overkill/oknex.qc | 3 +- .../common/mutators/mutator/overkill/okrpc.qc | 3 +- .../mutators/mutator/overkill/okshotgun.qc | 3 +- .../mutator/powerups/powerup/invisibility.qc | 2 +- .../mutator/powerups/powerup/shield.qc | 2 +- .../mutator/powerups/powerup/speed.qc | 2 +- .../mutator/powerups/powerup/strength.qc | 2 +- qcsrc/common/vehicles/vehicle/bumblebee.qc | 10 +++--- qcsrc/common/vehicles/vehicle/bumblebee.qh | 3 -- qcsrc/common/vehicles/vehicle/racer.qc | 4 ++- qcsrc/common/vehicles/vehicle/racer.qh | 3 -- qcsrc/common/vehicles/vehicle/raptor.qc | 8 ++--- qcsrc/common/vehicles/vehicle/raptor.qh | 3 -- qcsrc/common/vehicles/vehicle/spiderbot.qc | 5 ++- qcsrc/common/vehicles/vehicle/spiderbot.qh | 4 --- qcsrc/common/weapons/weapon/arc.qc | 3 +- qcsrc/common/weapons/weapon/blaster.qc | 2 +- qcsrc/common/weapons/weapon/crylink.qc | 3 +- qcsrc/common/weapons/weapon/devastator.qc | 4 ++- qcsrc/common/weapons/weapon/devastator.qh | 1 - qcsrc/common/weapons/weapon/electro.qc | 3 +- qcsrc/common/weapons/weapon/fireball.qc | 2 +- qcsrc/common/weapons/weapon/hagar.qc | 3 +- qcsrc/common/weapons/weapon/hlac.qc | 4 ++- qcsrc/common/weapons/weapon/hlac.qh | 3 -- qcsrc/common/weapons/weapon/hook.qc | 3 +- qcsrc/common/weapons/weapon/machinegun.qc | 3 +- qcsrc/common/weapons/weapon/minelayer.qc | 3 +- qcsrc/common/weapons/weapon/mortar.qc | 3 +- qcsrc/common/weapons/weapon/porto.qc | 2 +- qcsrc/common/weapons/weapon/rifle.qc | 7 ++-- qcsrc/common/weapons/weapon/seeker.qc | 3 +- qcsrc/common/weapons/weapon/shockwave.qc | 3 +- qcsrc/common/weapons/weapon/shockwave.qh | 3 -- qcsrc/common/weapons/weapon/shotgun.qc | 3 +- qcsrc/common/weapons/weapon/tuba.qc | 2 +- qcsrc/common/weapons/weapon/vaporizer.qc | 5 ++- qcsrc/common/weapons/weapon/vaporizer.qh | 4 --- qcsrc/common/weapons/weapon/vortex.qc | 4 ++- qcsrc/common/weapons/weapon/vortex.qh | 3 -- 52 files changed, 123 insertions(+), 144 deletions(-) diff --git a/qcsrc/common/colors.qh b/qcsrc/common/colors.qh index 830e3a80d..4791770da 100644 --- a/qcsrc/common/colors.qh +++ b/qcsrc/common/colors.qh @@ -81,6 +81,6 @@ const vector COLOR_STATUSEFFECT_STUNNED = '0.67 0.84 1'; const vector COLOR_STATUSEFFECT_WEBBED = '0.94 0.3 1'; // Useful macros for the guide -#define COLORED_NAME(class) strcat(rgb_to_hexcolor(NEW(class).m_color), NEW(class).m_name, "^7") -#define COLORED_NAME_WITH_CONCAT(class, concat) strcat(rgb_to_hexcolor(NEW(class).m_color), NEW(class).m_name, " ", concat, "^7") +#define COLORED_NAME(this) strcat(rgb_to_hexcolor(this.m_color), this.m_name, "^7") +#define COLORED_NAME_WITH_CONCAT(this, concat) strcat(rgb_to_hexcolor(this.m_color), this.m_name, " ", concat, "^7") // These can't be used everywhere, or else it would cause circular includes by including "class" diff --git a/qcsrc/common/items/item/ammo.qc b/qcsrc/common/items/item/ammo.qc index 79f660599..56773d99e 100644 --- a/qcsrc/common/items/item/ammo.qc +++ b/qcsrc/common/items/item/ammo.qc @@ -1,53 +1,35 @@ #include "ammo.qh" #ifdef MENUQC +#include +#include +#include + METHOD(Shells, describe, string(Shells this)) { TC(Shells, this); 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") - ); + COLORED_NAME(this), COLORED_NAME(WEP_SHOTGUN), COLORED_NAME(WEP_OVERKILL_SHOTGUN)); } METHOD(Bullets, describe, string(Bullets this)) { TC(Bullets, this); 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") - ); + COLORED_NAME(this), COLORED_NAME(WEP_MACHINEGUN), COLORED_NAME(WEP_RIFLE), COLORED_NAME(WEP_OVERKILL_MACHINEGUN), COLORED_NAME(WEP_OVERKILL_HMG)); } METHOD(Rockets, describe, string(Rockets this)) { TC(Rockets, this); 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") - ); + COLORED_NAME(this), COLORED_NAME(WEP_DEVASTATOR), COLORED_NAME(WEP_MORTAR), COLORED_NAME(WEP_HAGAR), COLORED_NAME(WEP_MINE_LAYER), COLORED_NAME(WEP_SEEKER), COLORED_NAME(WEP_OVERKILL_RPC)); } METHOD(Cells, describe, string(Cells this)) { TC(Cells, this); 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") - ); + COLORED_NAME(this), COLORED_NAME(WEP_VORTEX), COLORED_NAME(WEP_CRYLINK), COLORED_NAME(WEP_ELECTRO), COLORED_NAME(WEP_HLAC), COLORED_NAME(WEP_VAPORIZER), COLORED_NAME(WEP_ARC)); } #endif diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index c8fa425b1..342936a2c 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -7,10 +7,6 @@ #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; diff --git a/qcsrc/common/items/item/armor.qc b/qcsrc/common/items/item/armor.qc index 25d22a7a4..904686a7b 100644 --- a/qcsrc/common/items/item/armor.qc +++ b/qcsrc/common/items/item/armor.qc @@ -6,7 +6,7 @@ METHOD(ArmorSmall, describe, string(ArmorSmall this)) TC(ArmorSmall, this); 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)); + COLORED_NAME(this)); } METHOD(ArmorMedium, describe, string(ArmorMedium this)) @@ -14,7 +14,7 @@ METHOD(ArmorMedium, describe, string(ArmorMedium this)) TC(ArmorMedium, this); 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)); + COLORED_NAME(this)); } METHOD(ArmorBig, describe, string(ArmorBig this)) @@ -22,7 +22,7 @@ METHOD(ArmorBig, describe, string(ArmorBig this)) TC(ArmorBig, this); 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)); + COLORED_NAME(this)); } METHOD(ArmorMega, describe, string(ArmorMega this)) @@ -31,6 +31,6 @@ METHOD(ArmorMega, describe, string(ArmorMega this)) 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)); + COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/items/item/health.qc b/qcsrc/common/items/item/health.qc index 1c82231c2..c74e478c1 100644 --- a/qcsrc/common/items/item/health.qc +++ b/qcsrc/common/items/item/health.qc @@ -6,7 +6,7 @@ METHOD(HealthSmall, describe, string(HealthSmall this)) TC(HealthSmall, this); return sprintf(_("The %s restores a small amount of health when picked up, " "helping you recover from damage taken during combat"), - COLORED_NAME(HealthSmall)); + COLORED_NAME(this)); } METHOD(HealthMedium, describe, string(HealthMedium this)) @@ -14,7 +14,7 @@ METHOD(HealthMedium, describe, string(HealthMedium this)) TC(HealthMedium, this); return sprintf(_("The %s restores a medium amount of health when picked up, " "helping you recover from damage taken during combat"), - COLORED_NAME(HealthMedium)); + COLORED_NAME(this)); } METHOD(HealthBig, describe, string(HealthBig this)) @@ -22,7 +22,7 @@ METHOD(HealthBig, describe, string(HealthBig this)) TC(HealthBig, this); return sprintf(_("The %s restores a large amount of health when picked up, " "helping you recover from damage taken during combat"), - COLORED_NAME(HealthBig)); + COLORED_NAME(this)); } METHOD(HealthMega, describe, string(HealthMega this)) @@ -31,6 +31,6 @@ METHOD(HealthMega, describe, string(HealthMega this)) 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)); + COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/items/item/jetpack.qc b/qcsrc/common/items/item/jetpack.qc index 698c0b1db..259a7c1e7 100644 --- a/qcsrc/common/items/item/jetpack.qc +++ b/qcsrc/common/items/item/jetpack.qc @@ -23,14 +23,14 @@ METHOD(Jetpack, describe, string(Jetpack this)) 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)); + COLORED_NAME(this)); } METHOD(JetpackFuel, describe, string(JetpackFuel this)) { TC(JetpackFuel, this); return sprintf(_("The %s ammo type is used by the %s"), - COLORED_NAME(JetpackFuel), COLORED_NAME(Jetpack)); + COLORED_NAME(this), COLORED_NAME(ITEM_Jetpack)); } METHOD(JetpackRegen, describe, string(JetpackRegen this)) @@ -39,6 +39,6 @@ METHOD(JetpackRegen, describe, string(JetpackRegen this)) 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)); + COLORED_NAME(this), COLORED_NAME(ITEM_JetpackFuel), COLORED_NAME(ITEM_Jetpack)); } #endif diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index 171bbd4b5..eae517206 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -28,7 +28,7 @@ CLASS(AmmoBuff, Buff) { TC(AmmoBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(AmmoBuff) @@ -48,7 +48,7 @@ CLASS(ResistanceBuff, Buff) TC(ResistanceBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(ResistanceBuff) @@ -68,7 +68,7 @@ CLASS(MedicBuff, Buff) TC(MedicBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(MedicBuff) @@ -89,7 +89,7 @@ CLASS(BashBuff, Buff) TC(BashBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(BashBuff) @@ -108,7 +108,7 @@ CLASS(VampireBuff, Buff) { TC(VampireBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(VampireBuff) @@ -128,7 +128,7 @@ CLASS(DisabilityBuff, Buff) TC(DisabilityBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(DisabilityBuff) @@ -146,7 +146,7 @@ CLASS(VengeanceBuff, Buff) { TC(VengeanceBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(VengeanceBuff) @@ -165,7 +165,7 @@ CLASS(JumpBuff, Buff) { TC(JumpBuff, this); return sprintf(_("The %s greatly increases your jump height, while the buff is active"), - COLORED_NAME_WITH_CONCAT(JumpBuff, _("Buff"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(JumpBuff) @@ -184,7 +184,7 @@ CLASS(InfernoBuff, Buff) { TC(InfernoBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(InfernoBuff) @@ -204,7 +204,7 @@ CLASS(SwapperBuff, Buff) TC(SwapperBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(SwapperBuff) @@ -223,7 +223,7 @@ CLASS(MagnetBuff, Buff) { TC(MagnetBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(MagnetBuff) @@ -241,7 +241,7 @@ CLASS(LuckBuff, Buff) { TC(LuckBuff, this); 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"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(LuckBuff) @@ -259,7 +259,7 @@ CLASS(FlightBuff, Buff) { TC(FlightBuff, this); return sprintf(_("While you have the %s, you can crouch while midair to switch your gravity, allowing flight"), - COLORED_NAME_WITH_CONCAT(FlightBuff, _("Buff"))); + COLORED_NAME_WITH_CONCAT(this, _("Buff"))); } #endif ENDCLASS(FlightBuff) diff --git a/qcsrc/common/mutators/mutator/instagib/items.qc b/qcsrc/common/mutators/mutator/instagib/items.qc index 923c5be19..7b6fa5aa1 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qc +++ b/qcsrc/common/mutators/mutator/instagib/items.qc @@ -1,14 +1,13 @@ #include "items.qh" #ifdef MENUQC +#include + 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 sprintf(_("The %s is sometimes present on maps when InstaGib is enabled, providing ammo for the %s"), - COLORED_NAME(VaporizerCells), VAPORIZER_COLOR); -#undef VAPORIZER_COLOR + COLORED_NAME(this), COLORED_NAME(WEP_VAPORIZER)); } METHOD(ExtraLife, describe, string(ExtraLife this)) @@ -16,6 +15,6 @@ METHOD(ExtraLife, describe, string(ExtraLife this)) TC(ExtraLife, this); 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)); + COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/nades/nades.inc b/qcsrc/common/mutators/mutator/nades/nades.inc index fd86a2b92..023e9122c 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.inc +++ b/qcsrc/common/mutators/mutator/nades/nades.inc @@ -17,7 +17,7 @@ CLASS(NormalNade, Nade) TC(NormalNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(NormalNade) @@ -38,7 +38,7 @@ CLASS(NapalmNade, Nade) TC(NapalmNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(NapalmNade) @@ -59,7 +59,7 @@ CLASS(IceNade, Nade) TC(IceNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(IceNade) @@ -79,7 +79,7 @@ CLASS(TranslocateNade, Nade) { TC(TranslocateNade, this); return sprintf(_("The %s detonates after a short delay, teleporting you to where it detonated"), - COLORED_NAME(TranslocateNade)); + COLORED_NAME(this)); } #endif ENDCLASS(TranslocateNade) @@ -100,7 +100,7 @@ CLASS(SpawnNade, Nade) TC(SpawnNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(SpawnNade) @@ -121,7 +121,7 @@ CLASS(HealNade, Nade) TC(HealNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(HealNade) @@ -141,7 +141,7 @@ CLASS(MonsterNade, Nade) { TC(MonsterNade, this); return sprintf(_("The %s explodes after a short delay, spawning one of four monster types"), - COLORED_NAME(MonsterNade)); + COLORED_NAME(this)); } #endif ENDCLASS(MonsterNade) @@ -162,7 +162,7 @@ CLASS(EntrapNade, Nade) TC(EntrapNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(EntrapNade) @@ -184,7 +184,7 @@ CLASS(VeilNade, Nade) TC(VeilNade, this); 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)); + COLORED_NAME(this)); } #endif ENDCLASS(VeilNade) @@ -206,7 +206,7 @@ CLASS(AmmoNade, Nade) 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)); + COLORED_NAME(this)); } #endif ENDCLASS(AmmoNade) @@ -226,7 +226,7 @@ CLASS(DarknessNade, Nade) { TC(DarknessNade, this); return sprintf(_("The %s detonates after a short delay, creating a dark field which temporarily blinds enemies who enter it"), - COLORED_NAME(DarknessNade)); + COLORED_NAME(this)); } #endif ENDCLASS(DarknessNade) diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index e4ddcc18e..a35864da7 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -156,6 +156,8 @@ METHOD(OverkillHeavyMachineGun, wr_impacteffect, void(entity thiswep, entity act #endif #ifdef MENUQC +#include +#include "okmachinegun.qh" METHOD(OverkillHeavyMachineGun, describe, string(OverkillHeavyMachineGun this)) { @@ -167,7 +169,7 @@ METHOD(OverkillHeavyMachineGun, describe, string(OverkillHeavyMachineGun this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(this), COLORED_NAME(WEP_OVERKILL_MACHINEGUN)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qh b/qcsrc/common/mutators/mutator/overkill/okhmg.qh index 052fc247a..3c2b26e22 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qh +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qh @@ -2,9 +2,6 @@ #include #include -#ifdef MENUQC - #include "okmachinegun.qh" // for its color -#endif CLASS(OverkillHeavyMachineGun, Weapon) /* spawnfunc */ ATTRIB(OverkillHeavyMachineGun, m_canonical_spawnfunc, string, "weapon_okhmg"); diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc index 7c5d8fc8a..53da43bf0 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc @@ -156,6 +156,7 @@ METHOD(OverkillMachineGun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(OverkillMachineGun, describe, string(OverkillMachineGun this)) { @@ -165,7 +166,7 @@ METHOD(OverkillMachineGun, describe, string(OverkillMachineGun this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc index bd83b3a5f..1a567aaa2 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qc +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qc @@ -363,6 +363,7 @@ METHOD(OverkillNex, wr_zoomdir, bool(entity thiswep)) #endif #ifdef MENUQC +#include METHOD(OverkillNex, describe, string(OverkillNex this)) { @@ -372,7 +373,7 @@ METHOD(OverkillNex, describe, string(OverkillNex this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qc b/qcsrc/common/mutators/mutator/overkill/okrpc.qc index f456ca852..70566f78e 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qc @@ -232,6 +232,7 @@ METHOD(OverkillRocketPropelledChainsaw, wr_impacteffect, void(entity thiswep, en #endif #ifdef MENUQC +#include METHOD(OverkillRocketPropelledChainsaw, describe, string(OverkillRocketPropelledChainsaw this)) { @@ -241,7 +242,7 @@ METHOD(OverkillRocketPropelledChainsaw, describe, string(OverkillRocketPropelled "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc index 9162b1295..405cfadd3 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc @@ -121,6 +121,7 @@ METHOD(OverkillShotgun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(OverkillShotgun, describe, string(OverkillShotgun this)) { @@ -130,7 +131,7 @@ METHOD(OverkillShotgun, describe, string(OverkillShotgun this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Shells), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc index 769d14bad..57fa99af9 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc +++ b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc @@ -49,6 +49,6 @@ METHOD(Invisibility, describe, string(Invisibility this)) 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)); + COLORED_NAME(STATUSEFFECT_Invisibility)); } #endif diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qc b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qc index 3a1d529a2..c5e856996 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qc +++ b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qc @@ -55,6 +55,6 @@ METHOD(Shield, describe, string(Shield this)) 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)); + COLORED_NAME(STATUSEFFECT_Shield)); } #endif diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qc b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qc index 1bc9ab6eb..d3f465fb0 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qc +++ b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qc @@ -37,6 +37,6 @@ METHOD(Speed, describe, string(Speed this)) 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)); + COLORED_NAME(STATUSEFFECT_Speed)); } #endif diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qc b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qc index 16e47c6fd..0e6891b3f 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qc +++ b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qc @@ -56,6 +56,6 @@ METHOD(Strength, describe, string(Strength this)) "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)); + COLORED_NAME(STATUSEFFECT_Strength)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index afc8a8c0b..3d73fad23 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -1,11 +1,13 @@ #include "bumblebee.qh" -#ifdef GAMEQC - -#ifdef SVQC +#if defined(SVQC) #include +#elif defined(MENUQC) + #include #endif +#ifdef GAMEQC + const float BRG_SETUP = 2; const float BRG_START = 4; const float BRG_END = 8; @@ -986,7 +988,7 @@ METHOD(Bumblebee, describe, string(Bumblebee this)) "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)); + COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qh b/qcsrc/common/vehicles/vehicle/bumblebee.qh index a6ab612db..800fd1e58 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qh +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qh @@ -1,9 +1,6 @@ #pragma once #include "bumblebee_weapons.qh" -#ifdef MENUQC - #include -#endif CLASS(Bumblebee, Vehicle) /* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE); diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 9ff0f6435..1fd306028 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -3,6 +3,8 @@ #if defined(SVQC) #include #include +#elif defined(MENUQC) + #include #endif #ifdef GAMEQC @@ -650,7 +652,7 @@ METHOD(Racer, describe, string(Racer this)) "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)); + COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/racer.qh b/qcsrc/common/vehicles/vehicle/racer.qh index 1224d50ad..1840aeea6 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qh +++ b/qcsrc/common/vehicles/vehicle/racer.qh @@ -1,9 +1,6 @@ #pragma once #include "racer_weapon.qh" -#ifdef MENUQC - #include -#endif CLASS(Racer, Vehicle) /* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index c7131cb16..9129768bd 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -2,6 +2,9 @@ #if defined(SVQC) #include +#elif defined(MENUQC) + #include + #include "spiderbot.qh" #endif #ifdef GAMEQC @@ -843,16 +846,13 @@ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance)) 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 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 + COLORED_NAME(this), COLORED_NAME(VEH_SPIDERBOT)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/raptor.qh b/qcsrc/common/vehicles/vehicle/raptor.qh index dbfa61a33..e7e56a7e0 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qh +++ b/qcsrc/common/vehicles/vehicle/raptor.qh @@ -1,9 +1,6 @@ #pragma once #include "raptor_weapons.qh" -#ifdef MENUQC - #include -#endif CLASS(Raptor, Vehicle) /* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL); diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index 43f984d83..fdbd0fed1 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -2,6 +2,9 @@ #if defined(SVQC) #include +#elif defined(MENUQC) + #include + #include "raptor.qh" #endif #ifdef GAMEQC @@ -655,7 +658,7 @@ METHOD(Spiderbot, describe, string(Spiderbot this)) "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)); + COLORED_NAME(this), COLORED_NAME(VEH_RAPTOR), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qh b/qcsrc/common/vehicles/vehicle/spiderbot.qh index ca61121fa..96e53ff73 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qh +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qh @@ -1,10 +1,6 @@ #pragma once #include "spiderbot_weapons.qh" -#ifdef MENUQC - #include - #include "raptor.qh" -#endif CLASS(Spiderbot, Vehicle) /* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE); diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 8d1b30908..ea5a79d59 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -1510,6 +1510,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew) #endif #ifdef MENUQC +#include METHOD(Arc, describe, string(Arc this)) { @@ -1518,7 +1519,7 @@ METHOD(Arc, describe, string(Arc this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 2e670c429..1d4c3c9bc 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -163,7 +163,7 @@ METHOD(Blaster, describe, string(Blaster this)) "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)); + COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index e039665f6..0e1adfe79 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -629,6 +629,7 @@ METHOD(Crylink, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Crylink, describe, string(Crylink this)) { @@ -642,7 +643,7 @@ METHOD(Crylink, describe, string(Crylink this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/devastator.qc b/qcsrc/common/weapons/weapon/devastator.qc index 671c93223..a49522528 100644 --- a/qcsrc/common/weapons/weapon/devastator.qc +++ b/qcsrc/common/weapons/weapon/devastator.qc @@ -607,6 +607,8 @@ METHOD(Devastator, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include "vortex.qh" +#include METHOD(Devastator, describe, string(Devastator this)) { @@ -619,7 +621,7 @@ METHOD(Devastator, describe, string(Devastator this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(WEP_VORTEX), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/devastator.qh b/qcsrc/common/weapons/weapon/devastator.qh index 39b0762c5..e8b6898af 100644 --- a/qcsrc/common/weapons/weapon/devastator.qh +++ b/qcsrc/common/weapons/weapon/devastator.qh @@ -1,7 +1,6 @@ #pragma once #include -#include "vortex.qh" // for its color CLASS(Devastator, Weapon) /* spawnfunc */ ATTRIB(Devastator, m_canonical_spawnfunc, string, "weapon_devastator"); diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index fd3896458..04bb7efc9 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -776,6 +776,7 @@ METHOD(Electro, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Electro, describe, string(Electro this)) { @@ -787,7 +788,7 @@ METHOD(Electro, describe, string(Electro this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/fireball.qc b/qcsrc/common/weapons/weapon/fireball.qc index db490dfa3..b1c634e2a 100644 --- a/qcsrc/common/weapons/weapon/fireball.qc +++ b/qcsrc/common/weapons/weapon/fireball.qc @@ -444,7 +444,7 @@ METHOD(Fireball, describe, string(Fireball this)) "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)); + COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 2740286ad..b47d17d4d 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -497,6 +497,7 @@ METHOD(Hagar, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Hagar, describe, string(Hagar this)) { @@ -507,7 +508,7 @@ METHOD(Hagar, describe, string(Hagar this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/hlac.qc b/qcsrc/common/weapons/weapon/hlac.qc index ebea79e27..e1973e142 100644 --- a/qcsrc/common/weapons/weapon/hlac.qc +++ b/qcsrc/common/weapons/weapon/hlac.qc @@ -227,6 +227,8 @@ METHOD(HLAC, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include "blaster.qh" +#include METHOD(HLAC, describe, string(HLAC this)) { @@ -239,7 +241,7 @@ METHOD(HLAC, describe, string(HLAC this)) "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)); + COLORED_NAME(this), COLORED_NAME(WEP_BLASTER), COLORED_NAME(WEP_BLASTER), COLORED_NAME(ITEM_Cells), COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/hlac.qh b/qcsrc/common/weapons/weapon/hlac.qh index 807ba29e9..d1ac35358 100644 --- a/qcsrc/common/weapons/weapon/hlac.qh +++ b/qcsrc/common/weapons/weapon/hlac.qh @@ -1,9 +1,6 @@ #pragma once #include -#ifdef MENUQC - #include "blaster.qh" -#endif CLASS(HLAC, Weapon) /* spawnfunc */ ATTRIB(HLAC, m_canonical_spawnfunc, string, "weapon_hlac"); diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index 96a2904d0..890f0c10a 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -511,6 +511,7 @@ NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew) // TODO: hook: temporarily transform this.origin for drawing the model along warpzones! #endif #ifdef MENUQC +#include METHOD(Hook, describe, string(Hook this)) { @@ -521,7 +522,7 @@ METHOD(Hook, describe, string(Hook this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_JetpackFuel), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/machinegun.qc b/qcsrc/common/weapons/weapon/machinegun.qc index db2882c2e..5435b4c76 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@ -413,6 +413,7 @@ METHOD(MachineGun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(MachineGun, describe, string(MachineGun this)) { @@ -422,7 +423,7 @@ METHOD(MachineGun, describe, string(MachineGun this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 405af3ae0..ad6408457 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -513,6 +513,7 @@ METHOD(MineLayer, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(MineLayer, describe, string(MineLayer this)) { @@ -523,7 +524,7 @@ METHOD(MineLayer, describe, string(MineLayer this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 8d216bb8a..24d0099f0 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -373,6 +373,7 @@ METHOD(Mortar, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Mortar, describe, string(Mortar this)) { @@ -382,7 +383,7 @@ METHOD(Mortar, describe, string(Mortar this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index 093d1e0b4..ea1673c77 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -433,7 +433,7 @@ METHOD(PortoLaunch, describe, string(PortoLaunch this)) "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)); + COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index 56c69bd4d..d9ede71dc 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -260,11 +260,11 @@ METHOD(Rifle, wr_zoomdir, bool(entity thiswep)) #endif #ifdef MENUQC +#include "vortex.qh" +#include 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 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" @@ -272,8 +272,7 @@ METHOD(Rifle, describe, string(Rifle this)) "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 + COLORED_NAME(this), COLORED_NAME(ITEM_Bullets), COLORED_NAME(WEP_VORTEX), COLORED_NAME(this), COLORED_NAME(WEP_VORTEX), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index dccc68f1e..df34e3d39 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -680,6 +680,7 @@ METHOD(Seeker, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Seeker, describe, string(Seeker this)) { @@ -690,7 +691,7 @@ METHOD(Seeker, describe, string(Seeker this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Rockets), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index f6001c764..6b6c141c4 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -814,6 +814,7 @@ METHOD(Shockwave, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include "shotgun.qh" METHOD(Shockwave, describe, string(Shockwave this)) { @@ -822,7 +823,7 @@ METHOD(Shockwave, describe, string(Shockwave this)) "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)); + COLORED_NAME(this), COLORED_NAME(WEP_SHOTGUN), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/shockwave.qh b/qcsrc/common/weapons/weapon/shockwave.qh index 597bebbca..daf8c6a7e 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qh +++ b/qcsrc/common/weapons/weapon/shockwave.qh @@ -1,9 +1,6 @@ #pragma once #include -#ifdef MENUQC - #include "shotgun.qh" // for its color -#endif CLASS(Shockwave, Weapon) /* spawnfunc */ ATTRIB(Shockwave, m_canonical_spawnfunc, string, "weapon_shockwave"); diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index 101de3cca..4d183f551 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -386,6 +386,7 @@ METHOD(Shotgun, wr_impacteffect, void(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include METHOD(Shotgun, describe, string(Shotgun this)) { @@ -395,7 +396,7 @@ METHOD(Shotgun, describe, string(Shotgun this)) "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)); + COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(ITEM_Shells), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 4636be902..0566aac87 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -604,7 +604,7 @@ METHOD(Tuba, describe, string(Tuba this)) "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)); + COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index c27cf36f9..9e7b493ad 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -408,6 +408,9 @@ METHOD(Vaporizer, wr_zoom, bool(entity thiswep, entity actor)) #endif #ifdef MENUQC +#include "blaster.qh" +#include +#include METHOD(Vaporizer, describe, string(Vaporizer this)) { @@ -417,7 +420,7 @@ METHOD(Vaporizer, describe, string(Vaporizer this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_ExtraLife), COLORED_NAME(WEP_BLASTER), COLORED_NAME(ITEM_Cells)); } #endif diff --git a/qcsrc/common/weapons/weapon/vaporizer.qh b/qcsrc/common/weapons/weapon/vaporizer.qh index aea349f94..9a6e82d1d 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qh +++ b/qcsrc/common/weapons/weapon/vaporizer.qh @@ -1,10 +1,6 @@ #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"); diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index fc763b793..81ff75068 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -354,6 +354,8 @@ METHOD(Vortex, wr_zoomdir, bool(entity thiswep)) #endif #ifdef MENUQC +#include "rifle.qh" +#include METHOD(Vortex, describe, string(Vortex this)) { @@ -364,7 +366,7 @@ METHOD(Vortex, describe, string(Vortex this)) "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)); + COLORED_NAME(this), COLORED_NAME(ITEM_Cells), COLORED_NAME(WEP_RIFLE), COLORED_NAME(this), COLORED_NAME(this), COLORED_NAME(WEP_RIFLE), COLORED_NAME(this)); } #endif diff --git a/qcsrc/common/weapons/weapon/vortex.qh b/qcsrc/common/weapons/weapon/vortex.qh index 714a970cb..f07d6cc91 100644 --- a/qcsrc/common/weapons/weapon/vortex.qh +++ b/qcsrc/common/weapons/weapon/vortex.qh @@ -1,9 +1,6 @@ #pragma once #include -#ifdef MENUQC - #include "rifle.qh" // for its color -#endif CLASS(Vortex, Weapon) /* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex"); -- 2.39.2