Ticket #2487: patch_moddata.patch

File patch_moddata.patch, 5.9 KB (added by Itms, 10 years ago)
  • binaries/data/mods/public/config/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
     5 No newline at end of file
  • binaries/data/mods/public/config/public.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."
     12version.name = "Alpha XV"
     13version.nickname = "Osiris"
     14version.number = "0.0.15"
     15 No newline at end of file
  • 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", "config/public.cfg"))
     292        return "";
     293   
     294    Engine.ConfigDB_Reload("mod");
     295   
     296    return sprintf(translate("[font=\"sans-bold-16\"]%(versionName)s: %(versionNickname)s[/font]\n\n"),
     297            {versionName: Engine.ConfigDB_GetValue("mod", "version.name"), versionNickname: Engine.ConfigDB_GetValue("mod", "version.nickname")}
     298            )
     299        + Engine.TranslateLines(Engine.ReadFile("config/description.txt"));
     300}
     301
    289302/*
    290303 * FUNCTIONS BELOW DO NOT WORK YET
    291304 */
  • 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/session/session.js

     
    916916    }
    917917}
    918918
     919function getVersionLabel()
     920{
     921    if (!Engine.ConfigDB_SetFile("mod", "config/public.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/l10n/messages.json

     
    4848                    "format": "none"
    4949                }
    5050            },
     51            {
     52                "extractor": "txt",
     53                "filemasks": [
     54                    "config/**.txt"
     55                ],
     56                "options": {
     57                    "format": "none"
     58                }
     59            },
    5160            {
    5261                "extractor": "json",
    5362                "filemasks": [