]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Separate Movement from Guide in the guide
authorotta8634 <k9wolf@pm.me>
Thu, 30 Jan 2025 10:03:48 +0000 (18:03 +0800)
committerotta8634 <k9wolf@pm.me>
Thu, 30 Jan 2025 10:15:28 +0000 (18:15 +0800)
Also renamed Guide to Introduction, and the first entry of it to About this guide.

qcsrc/menu/xonotic/guide/guide.qh
qcsrc/menu/xonotic/guide/pages.qh

index f1307db1774a2ee644694a2f0af37e1b26ed5dbf..9bbc2681ea4717fd0c0cdaacbfde6a280992783b 100644 (file)
@@ -6,18 +6,19 @@
 #include <menu/xonotic/datasource.qh>
 
 #define TOPICS(X) \
-       X(NEW(FreetextSource),  _("Guide"),     "gametype_tdm") \
-       X(NEW(GametypeSource),  _("Gametypes"), "gametype_dm") \
-       X(NEW(WeaponSource),    _("Weapons"),   "gametype_duel") \
-       X(NEW(ItemSource),      _("Items"),     "gametype_kh") \
-       X(NEW(PowerupSource),   _("Powerups"),  "gametype_dom") \
-       X(NEW(BuffSource),      _("Buffs"),     "gametype_ka") \
-       X(NEW(NadeSource),      _("Nades"),     "gametype_ft") \
-       X(NEW(MonsterSource),   _("Monsters"),  "gametype_lms") \
-       X(NEW(VehicleSource),   _("Vehicles"),  "gametype_rc") \
-       X(NEW(TurretSource),    _("Turrets"),   "gametype_as") \
-       X(NEW(MutatorSource),   _("Mutators"),  "gametype_nb") \
-       /*X(NEW(MapSource),       _("Maps"),      "gametype_ctf")*/ \
+       X(NEW(IntroductionSource), _("Introduction"), "gametype_tdm") \
+       X(NEW(MovementSource),     _("Movement"),     "gametype_inv") \
+       X(NEW(GametypeSource),             _("Gametypes"),    "gametype_dm") \
+       X(NEW(WeaponSource),               _("Weapons"),      "gametype_duel") \
+       X(NEW(ItemSource),                 _("Items"),        "gametype_kh") \
+       X(NEW(PowerupSource),              _("Powerups"),     "gametype_dom") \
+       X(NEW(BuffSource),                 _("Buffs"),        "gametype_ka") \
+       X(NEW(NadeSource),                 _("Nades"),        "gametype_ft") \
+       X(NEW(MonsterSource),              _("Monsters"),     "gametype_lms") \
+       X(NEW(VehicleSource),              _("Vehicles"),     "gametype_rc") \
+       X(NEW(TurretSource),               _("Turrets"),      "gametype_as") \
+       X(NEW(MutatorSource),              _("Mutators"),     "gametype_nb") \
+       /*X(NEW(MapSource),                  _("Maps"),         "gametype_ctf")*/ \
        /*if (gamestatus & GAME_DEVELOPER) X(NEW(DebugSource), _("Debug"), "gametype_ons")*/ \
        /**/
 CLASS(TopicSource, DataSource)
@@ -86,7 +87,8 @@ ENDCLASS(id)
 #define REGISTRY_SOURCE_5(id, arr_name, register_arr, cond1, cond2)        _REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, false, 2)
 #define REGISTRY_SOURCE_6(id, arr_name, register_arr, cond1, cond2, cond3) _REGISTRY_SOURCE(id, arr_name, register_arr, cond1, cond2, cond3, 3)
 
-REGISTRY_SOURCE(FreetextSource, Guide, GuidePages)
+REGISTRY_SOURCE(IntroductionSource, Introduction, IntroductionGuidePages)
+REGISTRY_SOURCE(MovementSource, Movement, MovementGuidePages)
 // The descriptions for these are in menu/xonotic/guide/pages.qh
 
 #include <common/mapinfo.qh>
index 939e09bc788db496fd3a3ea0244e00e553b3169b..1a7512db18861f04b1b52097408124bb731930ef 100644 (file)
@@ -1,7 +1,5 @@
 #pragma once
 
-// This is for the freetext sections only
-
 CLASS(GuidePage, Object)
        ATTRIB(GuidePage, m_id, int, 0);
        ATTRIB(GuidePage, m_name, string, "");
@@ -26,17 +24,25 @@ CLASS(GuidePage, Object)
        }
 ENDCLASS(GuidePage)
 
-REGISTRY(GuidePages, 16)
-#define REGISTER_GUIDE_PAGE(id, name, icon) REGISTER(GuidePages, GUIDE_PAGE, id, m_id, NEW(GuidePage, name, icon))
-REGISTER_REGISTRY(GuidePages)
 
-REGISTER_GUIDE_PAGE(0, _("Introduction"), "gametype_dm")
+// This is for the freetext sections only
+
+REGISTRY(IntroductionGuidePages, 16)
+#define REGISTER_INTRODUCTION_PAGE(id, name, icon) REGISTER(IntroductionGuidePages, GUIDE_PAGE, id, m_id, NEW(GuidePage, name, icon))
+REGISTER_REGISTRY(IntroductionGuidePages)
+
+REGISTER_INTRODUCTION_PAGE(0, _("About this guide"), "gametype_dm")
 {
        this.m_description = _("Welcome to Xonotic, the free and fast arena shooter!\n\n"
                "Keep in mind all values and descriptions in this guide are based on the default game settings, so it may differ from the experience when playing on some modified servers");
 }
 
-REGISTER_GUIDE_PAGE(1, _("Movement"), "gametype_inv")
+
+REGISTRY(MovementGuidePages, 16)
+#define REGISTER_MOVEMENT_PAGE(id, name, icon) REGISTER(MovementGuidePages, GUIDE_PAGE, id, m_id, NEW(GuidePage, name, icon))
+REGISTER_REGISTRY(MovementGuidePages)
+
+REGISTER_MOVEMENT_PAGE(0, _("Movement"), "gametype_inv")
 {
        this.m_description = _("In Xonotic to move quickly you will have to airstrafe and bunnyhop"); // TODO
 }