added clienttools and diplomacy
This commit is contained in:
1 parent
339cf13b78
commit
9afe83e68e
6 files changed
+1065
-6
No files matched your search
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QHash>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <limits>
|
||||
@@ -357,12 +358,37 @@ QString Tribe::tString(QString templateText) const
|
||||
|
||||
QString Tribe::tPhrase(const QString &item) const
|
||||
{
|
||||
// Phrases/Phrases2 (StringTables.pas) aren't ported. "GENCITY" is the
|
||||
// only phrase this file ever looks up (a generated-city-name fallback
|
||||
// once a tribe's scripted name list runs out) - fall back to a plain
|
||||
// English template rather than failing on an unrecognized key.
|
||||
Q_UNUSED(item);
|
||||
return tString(QStringLiteral("City %1"));
|
||||
// Phrases/Phrases2 (StringTables.pas) aren't ported; these are
|
||||
// disclosed plain-English placeholders for the keys looked up via
|
||||
// Tribe::TPhrase() across this file and Diplomacy.pas, run through
|
||||
// TString() for the tribe's own #x name-template substitution.
|
||||
static const QHash<QString, QString> table = {
|
||||
{QStringLiteral("GENCITY"), QStringLiteral("City %1")},
|
||||
{QStringLiteral("PRICE_CIVIL"), QStringLiteral("our civil report")},
|
||||
{QStringLiteral("PRICE_MIL"), QStringLiteral("our military report")},
|
||||
{QStringLiteral("PRICE_MAP"), QStringLiteral("our map")},
|
||||
{QStringLiteral("PRICE_ALLTECH"), QStringLiteral("all our advances")},
|
||||
{QStringLiteral("PRICE_ALLMODEL"), QStringLiteral("all our unit designs")},
|
||||
{QStringLiteral("FRACCEPTTREATY"), QStringLiteral("We accept your treaty proposal.")},
|
||||
{QStringLiteral("FRACCEPTDEMAND_STRONG"), QStringLiteral("As you wish.")},
|
||||
{QStringLiteral("FRACCEPTPRESENT"), QStringLiteral("We gladly accept your gift.")},
|
||||
{QStringLiteral("FRACCEPTOFFER"), QStringLiteral("We accept your offer.")},
|
||||
{QStringLiteral("FRBREAK"), QStringLiteral("We break off negotiations.")},
|
||||
{QStringLiteral("FRNOTACCEPTTREATY"), QStringLiteral("We do not accept this treaty.")},
|
||||
{QStringLiteral("FRNOTACCEPTDEMAND_STRONG"), QStringLiteral("We refuse your demand.")},
|
||||
{QStringLiteral("FRNOTACCEPTPRESENT"), QStringLiteral("We decline your gift.")},
|
||||
{QStringLiteral("FRBYE"), QStringLiteral("Farewell.")},
|
||||
{QStringLiteral("FRNOTACCEPTOFFER"), QStringLiteral("We do not accept this offer.")},
|
||||
{QStringLiteral("FRPEACE"), QStringLiteral("we propose a peace treaty")},
|
||||
{QStringLiteral("FRFRIENDLY"), QStringLiteral("we propose friendly relations")},
|
||||
{QStringLiteral("FRALLIANCE"), QStringLiteral("we propose an alliance")},
|
||||
{QStringLiteral("FRDEMAND_STRONG"), QStringLiteral("we demand %1")},
|
||||
{QStringLiteral("FRPRESENT"), QStringLiteral("we offer you %1 as a gift")},
|
||||
{QStringLiteral("FRSTART_NOTREATY"), QStringLiteral("Greetings.")},
|
||||
{QStringLiteral("FRSTART_PEACE"), QStringLiteral("Greetings, friend.")},
|
||||
};
|
||||
const auto it = table.constFind(item);
|
||||
return tString(it != table.constEnd() ? it.value() : item);
|
||||
}
|
||||
|
||||
void Tribe::initAge(int age)
|
||||
|
||||
Reference in new issue
Block a user