Knowing how much health/armor you get from a MA/MH and whatnot seems useful for a newbie.
Same for ammo from ammo pickups.
FOREACH(Weapons, it.ammo_type == ammo, {
s = strcat(s, "\n ", COLORED_NAME(it));
});
+ const string nname = this.netname == "bullets" ? "nails" : this.netname;
+ s = sprintf(_("%s\n\nBy default, the pickup gives you %s ammo, to a maximum of %s."),
+ s, cvar_defstring(strcat("g_pickup_", nname)), cvar_defstring(sprintf("g_pickup_%s_max", nname)));
+ // TODO: rename all *nails* cvars to bullets
return s;
}
#endif
#ifdef MENUQC
#include <common/gamemodes/gamemode/duel/duel.qh>
+#define DEFAULT_PICKUP_ARMOR(s) \
+ sprintf(_("By default, the pickup gives you %s armor."), cvar_defstring(strcat("g_pickup_armor", s)))
+
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(this));
+ "protecting you from damage by absorbing incoming hits until it is depleted.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_ARMOR("small"));
}
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(this));
+ "protecting you from damage by absorbing incoming hits until it is depleted.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_ARMOR("medium"));
}
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(this));
+ "protecting you from damage by absorbing incoming hits until it is depleted.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_ARMOR("big"));
}
METHOD(ArmorMega, describe, string(ArmorMega this))
TC(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 %s."),
- COLORED_NAME(this), COLORED_NAME(MAPINFO_TYPE_DUEL));
+ "It tends to be one of the most highly contested items on a map, particularly in game modes like %s.\n\n%s"),
+ COLORED_NAME(this), COLORED_NAME(MAPINFO_TYPE_DUEL), DEFAULT_PICKUP_ARMOR("mega"));
}
+
+#undef DEFAULT_PICKUP_ARMOR
#endif
#ifdef MENUQC
#include <common/gamemodes/gamemode/duel/duel.qh>
+#define DEFAULT_PICKUP_HEALTH(s) \
+ sprintf(_("By default, the pickup gives you %s health."), cvar_defstring(strcat("g_pickup_health", s)))
+
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(this));
+ "helping you recover from damage taken during combat.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_HEALTH("small"));
}
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(this));
+ "helping you recover from damage taken during combat.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_HEALTH("medium"));
}
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(this));
+ "helping you recover from damage taken during combat.\n\n%s"),
+ COLORED_NAME(this), DEFAULT_PICKUP_HEALTH("big"));
}
METHOD(HealthMega, describe, string(HealthMega this))
TC(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 %s."),
- COLORED_NAME(this), COLORED_NAME(MAPINFO_TYPE_DUEL));
+ "It tends to be one of the most highly contested items on a map, particularly in game modes like %s.\n\n%s"),
+ COLORED_NAME(this), COLORED_NAME(MAPINFO_TYPE_DUEL), DEFAULT_PICKUP_HEALTH("mega"));
}
+
+#undef DEFAULT_PICKUP_HEALTH
#endif
METHOD(JetpackFuel, describe, string(JetpackFuel this))
{
TC(JetpackFuel, this);
- return sprintf(_("The %s ammo type is used by the %s."),
+ string s = sprintf(_("The %s ammo type is used by the %s."),
COLORED_NAME(this), COLORED_NAME(ITEM_Jetpack));
+ s = sprintf(_("%s\n\nBy default, the pickup gives you %s ammo, to a maximum of %s."),
+ s, cvar_defstring("g_pickup_fuel"), cvar_defstring("g_pickup_fuel_max"));
+ return s;
}
METHOD(JetpackRegen, describe, string(JetpackRegen this))