]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Flesh out Guide topic code
authorotta8634 <k9wolf@pm.me>
Mon, 30 Dec 2024 17:17:26 +0000 (01:17 +0800)
committerotta8634 <k9wolf@pm.me>
Mon, 30 Dec 2024 17:17:26 +0000 (01:17 +0800)
Also properly commented out DebugSource.

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

index 5723211f8a612f8735e0e6785f901dd54118c576..7c60b1a2b3dcf2cca555705af13fe871f65805f3 100644 (file)
@@ -25,6 +25,7 @@ METHOD(TopicSource, reload, int(TopicSource this, string filter))
        return n;
 }
 
+/*
 entity DebugSource_find_debug()
 {
        entity head = NULL, tail = NULL;
@@ -70,6 +71,7 @@ METHOD(DebugSource, reload, int(DebugSource this, string filter))
        }
        return idx;
 }
+*/
 
 METHOD(MapSource, getEntry, entity(MapSource this, int i, void(string, string) returns))
 {
index 88ad489f9a51f68daaa4d729f8a6d9f2155b2321..2a34aaaf234bf09051c7f3ed5ecbc58cac6881ac 100644 (file)
        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)
        METHOD(TopicSource, getEntry, entity(TopicSource this, int i, void(string, string) returns));
        METHOD(TopicSource, reload, int(TopicSource this, string filter));
 ENDCLASS(TopicSource)
 
+/*
 CLASS(DebugSource, DataSource)
        .entity nextdebug;
        string DebugSource_activeFilter = "";
        METHOD(DebugSource, getEntry, entity(DebugSource this, int i, void(string, string) returns));
        METHOD(DebugSource, reload, int(DebugSource this, string filter));
 ENDCLASS(DebugSource)
+*/
 
 .bool m_hidden;
 
index 1b15398b5907058d970f7c5a5168f696b7fe1de1..b6b9af2adfe8125acd459c46eb1446278df3435c 100644 (file)
@@ -2,9 +2,17 @@
 
 METHOD(GuidePage, describe, string(GuidePage this))
 {
+       TC(GuidePage, this);
        return this.m_description;
 }
 METHOD(GuidePage, display, void(GuidePage this, void(string name, string icon) returns))
 {
-       returns(this.m_title, "nopreview_map");
+       string icon_str;
+       if (this.m_title == _("Introduction"))
+               icon_str = "gametype_dm";
+       else if (this.m_title == _("Movement"))
+               icon_str = "gametype_inv";
+       else
+               icon_str = "nopreview_map";
+       returns(this.m_title, icon_str);
 }
index b11cb9fb8ea152e82176d57b8cb5708b7c6d9cf5..5f29b530bd079b2b11739167e17153addc217a12 100644 (file)
@@ -12,7 +12,6 @@ CLASS(GuidePage, Object);
                CONSTRUCT(GuidePage);
                this.m_title = _title;
        }
-
 ENDCLASS(GuidePage)
 
 REGISTRY(GuidePages, 16)
@@ -20,4 +19,10 @@ REGISTRY(GuidePages, 16)
        REGISTER(GuidePages, GUIDE_PAGE, id, m_id, NEW(GuidePage, title))
 REGISTER_REGISTRY(GuidePages)
 
-REGISTER_GUIDE_PAGE(0, _("Intro")) { this.m_description = _("Welcome to Xonotic"); }
+REGISTER_GUIDE_PAGE(0, _("Introduction")) {
+       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")) {
+       this.m_description = _("In Xonotic to move quickly you will have to airstrafe and bunnyhop"); // TODO
+}