Browse Source

Added Surrender translation

Minor optimization
pull/3/head
JustinAJ 9 years ago
parent
commit
a404c9f44e
  1. 2
      Bot/IRC_Bot.cpp
  2. 2
      Bot/IRC_Bot.h
  3. BIN
      Release/Bot.lib
  4. BIN
      Release/Plugins/RenX.Core.lib
  5. 1
      RenX.Core/RenX.h
  6. 4
      RenX.Core/RenX_Functions.cpp
  7. 2
      RenX.Core/RenX_Server.cpp

2
Bot/IRC_Bot.cpp

@ -101,7 +101,7 @@ Jupiter::ArrayList<IRCCommand> IRC_Bot::getAccessCommands(Jupiter::IRC::Client::
return r;
}
Jupiter::StringL IRC_Bot::getTriggers(Jupiter::ArrayList<IRCCommand> cmds)
Jupiter::StringL IRC_Bot::getTriggers(Jupiter::ArrayList<IRCCommand> &cmds)
{
Jupiter::StringL r;
for (size_t i = 0; i < cmds.size(); i++)

2
Bot/IRC_Bot.h

@ -95,7 +95,7 @@ public:
* @param cmds Commands to construct the string with.
* @return A string containing the triggers of the commands in a space-deliminated list.
*/
static Jupiter::StringL getTriggers(Jupiter::ArrayList<IRCCommand> cmds);
static Jupiter::StringL getTriggers(Jupiter::ArrayList<IRCCommand> &cmds);
/**
* @brief Reloads some settings.

BIN
Release/Bot.lib

Binary file not shown.

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

1
RenX.Core/RenX.h

@ -47,6 +47,7 @@ namespace RenX
Beacon,
Tie,
Shutdown,
Surrender,
Unknown
};

4
RenX.Core/RenX_Functions.cpp

@ -53,6 +53,7 @@ Jupiter::ReferenceString baseWinTypeTranslation = "Conquest (Base Destruction)";
Jupiter::ReferenceString beaconWinTypeTranslation = "Espionage (Beacon)";
Jupiter::ReferenceString tieWinTypeTranslation = "Draw (Tie)";
Jupiter::ReferenceString shutdownWinTypeTranslation = "Ceasefire (Shutdown)";
Jupiter::ReferenceString surrenderWinTypeTranslation = "Forfeit (Surrender)";
Jupiter::ReferenceString unknownWinTypeTranslation = "Aliens (Unknown)";
/** WinType plain translations */
@ -795,6 +796,8 @@ const Jupiter::ReadableString &RenX::translateWinType(RenX::WinType winType)
return tieWinTypeTranslation;
case RenX::WinType::Shutdown:
return shutdownWinTypeTranslation;
case RenX::WinType::Surrender:
return surrenderWinTypeTranslation;
case RenX::WinType::Unknown:
default:
return unknownWinTypeTranslation;
@ -839,6 +842,7 @@ void RenX::initTranslations(Jupiter::INIFile &translationsFile)
beaconWinTypeTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinType"), STRING_LITERAL_AS_REFERENCE("Beacon"), STRING_LITERAL_AS_REFERENCE("Espionage (Beacon)"));
tieWinTypeTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinType"), STRING_LITERAL_AS_REFERENCE("Tie"), STRING_LITERAL_AS_REFERENCE("Draw (Tie)"));
shutdownWinTypeTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinType"), STRING_LITERAL_AS_REFERENCE("Shutdown"), STRING_LITERAL_AS_REFERENCE("Ceasefire (Shutdown)"));
surrenderWinTypeTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinType"), STRING_LITERAL_AS_REFERENCE("Surrender"), STRING_LITERAL_AS_REFERENCE("Forfeit (Surrender)"));
unknownWinTypeTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinType"), STRING_LITERAL_AS_REFERENCE("Unknown"), STRING_LITERAL_AS_REFERENCE("Aliens (Unknown)"));
scoreWinTypePlainTranslation = translationsFile.get(STRING_LITERAL_AS_REFERENCE("WinTypePlain"), STRING_LITERAL_AS_REFERENCE("Score"), STRING_LITERAL_AS_REFERENCE("High Score"));

2
RenX.Core/RenX_Server.cpp

@ -1957,6 +1957,8 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
winType = WinType::Base;
else if (sWinType.equals("triggered"))
winType = WinType::Shutdown;
else if (sWinType.equals("Surrender"))
winType = WinType::Surrender;
TeamType team = RenX::getTeam(tokens.getToken(3));

Loading…
Cancel
Save