]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Unhardcode some text in the guide
authorotta8634 <k9wolf@pm.me>
Thu, 9 Jan 2025 07:29:37 +0000 (15:29 +0800)
committerotta8634 <k9wolf@pm.me>
Thu, 9 Jan 2025 07:29:37 +0000 (15:29 +0800)
qcsrc/common/items/item/armor.qc
qcsrc/common/items/item/health.qc
qcsrc/common/mutators/mutator/buffs/all.inc
qcsrc/common/mutators/mutator/instagib/items.qc
qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qc

index 904686a7b9794c5781c69a9df3643631982beebe..4695bda9e59c4e4f2445975f136952d7588497fd 100644 (file)
@@ -1,6 +1,8 @@
 #include "armor.qh"
 
 #ifdef MENUQC
+#include <common/gamemodes/gamemode/duel/duel.qh>
+
 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
index c74e478c15b4a8b36b8c8455ecb49937a3c94520..1b0ab6aef7ddc37831ef5dfb6039a4a387374d7c 100644 (file)
@@ -1,6 +1,8 @@
 #include "health.qh"
 
 #ifdef MENUQC
+#include <common/gamemodes/gamemode/duel/duel.qh>
+
 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
index 332b831bda5abe32a9591a21513956e14e5070b8..3cae71b3a69e6e9b90fecd4b48beb3b69fb5f74d 100644 (file)
@@ -1,3 +1,5 @@
+#include <common/gamemodes/gamemode/ctf/ctf.qh>
+
 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
index 7b6fa5aa185afaebaea339a27f59219aa404e207..6f5a017444d20ad8b14f640553c240d81590297d 100644 (file)
@@ -1,20 +1,21 @@
 #include "items.qh"
 
 #ifdef MENUQC
+#include "instagib.qh"
 #include <common/weapons/weapon/vaporizer.qh>
 
 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
index fa096b5fd52865fc67a549d3679d9c53751dc894..ed583e34cad4e02b608cb8fecae37cdb026cde65 100644 (file)
@@ -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