From 4c220abfaf7dba70981aa495497f0b6e9fdc0214 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Thu, 9 Jan 2025 15:29:37 +0800 Subject: [PATCH] Unhardcode some text in the guide --- qcsrc/common/items/item/armor.qc | 6 ++++-- qcsrc/common/items/item/health.qc | 6 ++++-- qcsrc/common/mutators/mutator/buffs/all.inc | 8 +++++--- qcsrc/common/mutators/mutator/instagib/items.qc | 9 +++++---- .../mutators/mutator/powerups/powerup/invisibility.qc | 6 ++++-- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/qcsrc/common/items/item/armor.qc b/qcsrc/common/items/item/armor.qc index 904686a7b9..4695bda9e5 100644 --- a/qcsrc/common/items/item/armor.qc +++ b/qcsrc/common/items/item/armor.qc @@ -1,6 +1,8 @@ #include "armor.qh" #ifdef MENUQC +#include + METHOD(ArmorSmall, describe, string(ArmorSmall this)) { TC(ArmorSmall, this); @@ -30,7 +32,7 @@ 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 Duel"), - COLORED_NAME(this)); + "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)); } #endif diff --git a/qcsrc/common/items/item/health.qc b/qcsrc/common/items/item/health.qc index c74e478c15..1b0ab6aef7 100644 --- a/qcsrc/common/items/item/health.qc +++ b/qcsrc/common/items/item/health.qc @@ -1,6 +1,8 @@ #include "health.qh" #ifdef MENUQC +#include + METHOD(HealthSmall, describe, string(HealthSmall this)) { TC(HealthSmall, this); @@ -30,7 +32,7 @@ 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 Duel"), - COLORED_NAME(this)); + "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)); } #endif diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index 332b831bda..3cae71b3a6 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -1,3 +1,5 @@ +#include + string Buff_CompatName(string buffname) { switch(buffname) @@ -126,8 +128,8 @@ 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(this, _("Buff"))); + "This is particularly useful against speedy players, especially in %s"), + COLORED_NAME_WITH_CONCAT(this, _("Buff")), COLORED_NAME(MAPINFO_TYPE_CTF)); } #endif ENDCLASS(DisabilityBuff) @@ -202,7 +204,7 @@ CLASS(SwapperBuff, Buff) { TC(SwapperBuff, this); return sprintf(_("The %s allows you to press the ^3drop weapon^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"), + "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(this, _("Buff"))); } #endif diff --git a/qcsrc/common/mutators/mutator/instagib/items.qc b/qcsrc/common/mutators/mutator/instagib/items.qc index 7b6fa5aa18..6f5a017444 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qc +++ b/qcsrc/common/mutators/mutator/instagib/items.qc @@ -1,20 +1,21 @@ #include "items.qh" #ifdef MENUQC +#include "instagib.qh" #include METHOD(VaporizerCells, describe, string(VaporizerCells this)) { TC(VaporizerCells, this); - return sprintf(_("The %s is sometimes present on maps when InstaGib is enabled, providing ammo for the %s"), - COLORED_NAME(this), COLORED_NAME(WEP_VAPORIZER)); + return sprintf(_("The %s is sometimes present on maps when %s is enabled, providing ammo for the %s"), + COLORED_NAME(this), COLORED_NAME(MUTATOR_mutator_instagib), COLORED_NAME(WEP_VAPORIZER)); } METHOD(ExtraLife, describe, string(ExtraLife this)) { TC(ExtraLife, this); - return sprintf(_("The %s powerup acts as armor in InstaGib. " + return sprintf(_("The %s powerup acts as armor in %s. " "If a player is shot while having one or more extra lives, they will survive the shot but suffer strong knockback"), - COLORED_NAME(this)); + COLORED_NAME(this), COLORED_NAME(MUTATOR_mutator_instagib)); } #endif diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc index fa096b5fd5..ed583e34ca 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc +++ b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc @@ -43,12 +43,14 @@ METHOD(InvisibilityStatusEffect, m_tick, void(StatusEffects this, entity actor)) } #endif #ifdef MENUQC +#include "../../instagib/instagib.qh" + METHOD(InvisibilityItem, describe, string(InvisibilityItem this)) { TC(InvisibilityItem, 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" + "This powerup is often present in %s\n\n" "Since it is a powerup, it will drop if you die while holding it"), - COLORED_NAME(this)); + COLORED_NAME(this), COLORED_NAME(MUTATOR_mutator_instagib)); } #endif -- 2.39.5