Ticket #2487: patch_moddata.2.patch

File patch_moddata.2.patch, 6.2 KB (added by Itms, 10 years ago)
  • binaries/data/mods/public/gui/pregame/mainmenu.js

     
    286286    return sprintf(translate("Build: %(buildDate)s (%(revision)s)"), { buildDate: Engine.GetBuildTimestamp(0), revision: Engine.GetBuildTimestamp(2) });
    287287}
    288288
     289function getModDescription()
     290{
     291    if (!Engine.ConfigDB_SetFile("mod", "info.cfg"))
     292        return "";
     293   
     294    Engine.ConfigDB_Reload("mod");
     295   
     296    return "[font=\"sans-bold-16\"]"
     297        + sprintf(translate("%(versionName)s: %(versionNickname)s"),
     298            {versionName: translate(Engine.ConfigDB_GetValue("mod", "version.name")),
     299                versionNickname: translate(Engine.ConfigDB_GetValue("mod", "version.nickname"))
     300                }
     301            )
     302        + "[/font]\n\n"
     303        + Engine.TranslateLines(Engine.ReadFile("gui/pregame/mod_description.txt"));
     304}
     305
    289306/*
    290307 * FUNCTIONS BELOW DO NOT WORK YET
    291308 */
  • binaries/data/mods/public/gui/pregame/mainmenu.xml

     
    467467                style="TranslucentPanelThinBorder"
    468468            >
    469469
    470                 <!-- PRE-RELEASE WARNING -->
     470                <!-- MOD DESCRIPTION -->
    471471                <object
    472472                    font="sans-14"
    473473                    type="text"
    474474                    textcolor="white"
    475475                    size="8 8 100%-8 100%-36"
    476                                         ghost="true"
     476                    ghost="true"
    477477                >
    478                     <!-- IMPORTANT: remember to update session/session.xml in sync with this: -->
    479                     <attribute id="caption">
    480                         <keep>[font="sans-bold-16"]</keep>
    481                         <translate>Alpha XV: Osiris</translate>
    482                         <keep>[/font]\n\n</keep>
    483                         <translate>WARNING: This is an early development version of the game. Many features have not been added yet.</translate>
    484                         <keep>\n\n</keep>
    485                         <translate>Get involved at: play0ad.com</translate>
    486                     </attribute>
     478                    <action on="Load">
     479                        this.caption = getModDescription();
     480                    </action>
    487481                </object>
    488482
    489483                <!-- CONTACT METHODS -->
  • binaries/data/mods/public/gui/pregame/mod_description.txt

     
     1WARNING: This is an early development version of the game. Many features have not been added yet.
     2
     3
     4Get involved at: play0ad.com
  • binaries/data/mods/public/gui/session/session.js

     
    916916    }
    917917}
    918918
     919function getVersionLabel()
     920{
     921    if (!Engine.ConfigDB_SetFile("mod", "info.cfg"))
     922        return "";
     923   
     924    Engine.ConfigDB_Reload("mod");
     925   
     926    return sprintf(translate("%(versionName)s: %(versionNickname)s"),
     927        {versionName: Engine.ConfigDB_GetValue("mod", "version.name"), versionNickname: Engine.ConfigDB_GetValue("mod", "version.nickname")}
     928        );
     929}
     930
    919931function getBuildString()
    920932{
    921933    return sprintf(translate("Build: %(buildDate)s (%(revision)s)"), { buildDate: Engine.GetBuildTimestamp(0), revision: Engine.GetBuildTimestamp(2) });
  • binaries/data/mods/public/gui/session/session.xml

     
    764764
    765765
    766766        <!-- ================================  ================================ -->
    767         <!-- ALPHA LABELS (alpha, build time, revision) -->
     767        <!-- VERSION LABELS (alpha, build time, revision) -->
    768768        <!-- ================================  ================================ -->
    769769
    770770        <!-- Displays Alpha name and number -->
    771         <object size="50%+48 0 100%-226 100%" name="alphaLabel" type="text" style="ModernLabelText" text_valign="top" ghost="true">
    772             <!-- IMPORTANT: remember to update pregame/mainmenu.xml in sync with this: -->
    773             <translatableAttribute id="caption">ALPHA XV : Osiris</translatableAttribute>
     771        <object size="50%+48 0 100%-226 100%" name="versionLabel" type="text" style="ModernLabelText" text_valign="top" ghost="true">
     772            <action on="Load">this.caption = getVersionLabel()</action>
    774773
    775774            <!-- Displays build date and revision number-->
    776775            <object size="50%-128 0 50%+128 100%-2" name="buildTimeLabel" type="text" style="BuildNameText" ghost="true">
  • binaries/data/mods/public/info.cfg

     
     1; Mod Settings
     2;
     3; **************************************************************
     4; * THIS FILE DOES NOT CONTAIN CUSTOMISATION ELEMENTS.         *
     5; * It provides information about the current mod, to be used  *
     6; * in the game.                                               *
     7; **************************************************************
     8
     9; 0 A.D. Public Mod
     10
     11title = "0 A.D."
     12
     13; Version information
     14version.name = "Alpha XV"
     15version.nickname = "Osiris"
     16version.number = "0.0.15"
  • binaries/data/mods/public/l10n/messages.json

     
    4040                "filemasks": [
    4141                    "gui/manual/intro.txt",
    4242                    "gui/manual/userreport.txt",
     43                    "gui/pregame/mod_description.txt",
    4344                    "gui/text/quotes.txt",
    4445                    "gui/splashscreen/splashscreen.txt",
    4546                    "gui/text/tips/**.txt"
     
    4849                    "format": "none"
    4950                }
    5051            },
     52            {
     53                "extractor": "ini",
     54                "filemasks": [
     55                    "info.cfg"
     56                ],
     57                "options": {
     58                    "format": "none",
     59                    "keywords": [
     60                        "title",
     61                        "version.name",
     62                        "version.nickname"
     63                    ]
     64                }
     65            },
    5166            {
    5267                "extractor": "json",
    5368                "filemasks": [