COLORED_NAME macro fix suggested by @Mario here https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/181#note_2269492232.
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"
#include "ammo.qh"
#ifdef MENUQC
+#include <common/colors.qh>
+#include <common/weapons/weapon/_mod.qh>
+#include <common/mutators/mutator/overkill/_mod.qh>
+
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
#include <common/resources/sv_resources.qh>
#include <server/items/items.qh>
#endif
-#ifdef MENUQC
- #include <common/colors.qh>
- // can't include common/weapons/weapon/_mod.qh and common/mutators/mutator/overkill/_mod.qh or else circular includes
-#endif
#ifdef GAMEQC
.int spawnflags;
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))
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))
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))
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
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))
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))
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))
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
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))
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
{
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)
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)
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)
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)
{
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)
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)
{
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)
{
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)
{
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)
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)
{
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)
{
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)
{
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)
#include "items.qh"
#ifdef MENUQC
+#include <common/weapons/weapon/vaporizer.qh>
+
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))
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
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)
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)
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)
{
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)
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)
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)
{
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)
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)
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)
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)
{
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)
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
+#include "okmachinegun.qh"
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
#include <common/weapons/all.qh>
#include <common/colors.qh>
-#ifdef MENUQC
- #include "okmachinegun.qh" // for its color
-#endif
CLASS(OverkillHeavyMachineGun, Weapon)
/* spawnfunc */ ATTRIB(OverkillHeavyMachineGun, m_canonical_spawnfunc, string, "weapon_okhmg");
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
METHOD(OverkillRocketPropelledChainsaw, describe, string(OverkillRocketPropelledChainsaw this))
{
"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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
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
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
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
"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
#include "bumblebee.qh"
-#ifdef GAMEQC
-
-#ifdef SVQC
+#if defined(SVQC)
#include <common/mutators/mutator/instagib/sv_instagib.qh>
+#elif defined(MENUQC)
+ #include <common/colors.qh>
#endif
+#ifdef GAMEQC
+
const float BRG_SETUP = 2;
const float BRG_START = 4;
const float BRG_END = 8;
"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
#pragma once
#include "bumblebee_weapons.qh"
-#ifdef MENUQC
- #include <common/colors.qh>
-#endif
CLASS(Bumblebee, Vehicle)
/* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE);
#if defined(SVQC)
#include <common/gamemodes/gamemode/ctf/sv_ctf.qh>
#include <common/mapobjects/trigger/impulse.qh>
+#elif defined(MENUQC)
+ #include <common/colors.qh>
#endif
#ifdef GAMEQC
"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
#pragma once
#include "racer_weapon.qh"
-#ifdef MENUQC
- #include <common/colors.qh>
-#endif
CLASS(Racer, Vehicle)
/* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL);
#if defined(SVQC)
#include <common/gamemodes/gamemode/ctf/sv_ctf.qh>
+#elif defined(MENUQC)
+ #include <common/colors.qh>
+ #include "spiderbot.qh"
#endif
#ifdef GAMEQC
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
#pragma once
#include "raptor_weapons.qh"
-#ifdef MENUQC
- #include <common/colors.qh>
-#endif
CLASS(Raptor, Vehicle)
/* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL);
#if defined(SVQC)
#include <common/gamemodes/gamemode/ctf/sv_ctf.qh>
+#elif defined(MENUQC)
+ #include <common/colors.qh>
+ #include "raptor.qh"
#endif
#ifdef GAMEQC
"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
#pragma once
#include "spiderbot_weapons.qh"
-#ifdef MENUQC
- #include <common/colors.qh>
- #include "raptor.qh"
-#endif
CLASS(Spiderbot, Vehicle)
/* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE);
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
"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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include "vortex.qh"
+#include <common/items/item/ammo.qh>
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
#pragma once
#include <common/colors.qh>
-#include "vortex.qh" // for its color
CLASS(Devastator, Weapon)
/* spawnfunc */ ATTRIB(Devastator, m_canonical_spawnfunc, string, "weapon_devastator");
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
"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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include "blaster.qh"
+#include <common/items/item/ammo.qh>
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
#pragma once
#include <common/colors.qh>
-#ifdef MENUQC
- #include "blaster.qh"
-#endif
CLASS(HLAC, Weapon)
/* spawnfunc */ ATTRIB(HLAC, m_canonical_spawnfunc, string, "weapon_hlac");
// TODO: hook: temporarily transform this.origin for drawing the model along warpzones!
#endif
#ifdef MENUQC
+#include <common/items/item/jetpack.qh>
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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
"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
#endif
#ifdef MENUQC
+#include "vortex.qh"
+#include <common/items/item/ammo.qh>
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"
"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
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
#endif
#ifdef MENUQC
+#include "shotgun.qh"
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
#pragma once
#include <common/colors.qh>
-#ifdef MENUQC
- #include "shotgun.qh" // for its color
-#endif
CLASS(Shockwave, Weapon)
/* spawnfunc */ ATTRIB(Shockwave, m_canonical_spawnfunc, string, "weapon_shockwave");
#endif
#ifdef MENUQC
+#include <common/items/item/ammo.qh>
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
"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
#endif
#ifdef MENUQC
+#include "blaster.qh"
+#include <common/mutators/mutator/instagib/items.qh>
+#include <common/items/item/ammo.qh>
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
#pragma once
#include <common/colors.qh>
-#ifdef MENUQC
- #include "blaster.qh" // for its color
- #include <common/mutators/mutator/instagib/items.qh> // for ExtraLife color
-#endif
CLASS(Vaporizer, Weapon)
/* spawnfunc */ ATTRIB(Vaporizer, m_canonical_spawnfunc, string, "weapon_vaporizer");
#endif
#ifdef MENUQC
+#include "rifle.qh"
+#include <common/items/item/ammo.qh>
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
#pragma once
#include <common/colors.qh>
-#ifdef MENUQC
- #include "rifle.qh" // for its color
-#endif
CLASS(Vortex, Weapon)
/* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex");