# HG changeset patch # User unc0rr # Date 1387224172 -14400 # Node ID f2b18754742f014b9e464a3029934f20c50f29d0 # Parent 7d0329f371815e77bf4f416066d437cad19bd700# Parent 1fdc1507e42db9ac09136d3024e25c11f128b26d merge default here diff -r 7d0329f37181 -r f2b18754742f CREDITS --- a/CREDITS Sat Dec 14 21:16:20 2013 +0400 +++ b/CREDITS Tue Dec 17 00:02:52 2013 +0400 @@ -17,8 +17,7 @@ ========== - Robinator -> Terminator (2010) - shingo666 -> Samus (2010) -- MeinCookie95 -> InfernalHorns (2010) -- MeinCookie95 -> Mummy (2010) +- MeinCookie95 -> InfernalHorns (2010), Mummy (2010), war_* (2010-2011) - thuban -> Elvis (2010) - Miphica -> Disguise (2010) - Blayde -> Deer (2010), Moose (2010) diff -r 7d0329f37181 -r f2b18754742f ChangeLog.txt --- a/ChangeLog.txt Sat Dec 14 21:16:20 2013 +0400 +++ b/ChangeLog.txt Tue Dec 17 00:02:52 2013 +0400 @@ -3,6 +3,7 @@ 0.9.19 -> ???: * increase precision in damage calcs; extra damage affects fire properly now + * visual enhancements for whip 0.9.18 -> 0.9.19: + New Freezer weapon - freezes terrain, water, hedgehogs, mines, cases, explosives diff -r 7d0329f37181 -r f2b18754742f QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/game.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -506,7 +506,7 @@ void HWGame::sendCampaignVar(const QByteArray &varToSend) { - QString varToFind(varToSend); + QString varToFind = QString::fromUtf8(varToSend); QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(campaignTeam), QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); QString varValue = teamfile.value("Campaign " + campaign + "/" + varToFind, "").toString(); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/HatModel.cpp --- a/QTfrontend/model/HatModel.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/HatModel.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -37,6 +37,8 @@ void HatModel::loadHats() { + qDebug("HatModel::loadHats()"); + // this method resets the contents of this model (important to know for views). QStandardItemModel::beginResetModel(); QStandardItemModel::clear(); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/MapModel.cpp --- a/QTfrontend/model/MapModel.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/MapModel.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -28,12 +28,26 @@ #include "HWApplication.h" #include "hwconsts.h" -MapModel::MapInfo MapModel::MapInfoRandom = {MapModel::GeneratedMap, "+rnd+", "", 0, "", "", ""}; -MapModel::MapInfo MapModel::MapInfoMaze = {MapModel::GeneratedMaze, "+maze+", "", 0, "", "", ""}; -MapModel::MapInfo MapModel::MapInfoDrawn = {MapModel::HandDrawnMap, "+drawn+", "", 0, "", "", ""}; +MapModel::MapInfo MapModel::MapInfoRandom = {MapModel::GeneratedMap, "+rnd+", "", 0, "", "", "", false}; +MapModel::MapInfo MapModel::MapInfoMaze = {MapModel::GeneratedMaze, "+maze+", "", 0, "", "", "", false}; +MapModel::MapInfo MapModel::MapInfoDrawn = {MapModel::HandDrawnMap, "+drawn+", "", 0, "", "", "", false}; + -void MapModel::loadMaps(MapType maptype) +MapModel::MapModel(MapType maptype, QObject *parent) : QStandardItemModel(parent) +{ + m_maptype = maptype; + m_loaded = false; +} + +bool MapModel::loadMaps() { + if(m_loaded) + return false; + + m_loaded = true; + + qDebug("[LAZINESS] MapModel::loadMaps()"); + // this method resets the contents of this model (important to know for views). beginResetModel(); @@ -75,7 +89,7 @@ MapType type = isMission ? MissionMap : StaticMap; // if we're supposed to ignore this type, continue - if (type != maptype) continue; + if (type != m_maptype) continue; // load map info from file QTextStream input(&mapCfgFile); @@ -149,15 +163,19 @@ QStandardItemModel::appendColumn(mapList); endResetModel(); + + return true; } -bool MapModel::mapExists(const QString & map) const +bool MapModel::mapExists(const QString & map) { return findMap(map) >= 0; } -int MapModel::findMap(const QString & map) const +int MapModel::findMap(const QString & map) { + loadMaps(); + return m_mapIndexes.value(map, -1); } diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/MapModel.h --- a/QTfrontend/model/MapModel.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/MapModel.h Tue Dec 17 00:02:52 2013 +0400 @@ -67,12 +67,14 @@ bool dlc; ///< True if this map was not packaged with the game }; + MapModel(MapType maptype, QObject *parent = 0); + /** * @brief Searches maps in model to find out if one exists * @param map map of which to check existence * @return true if it exists */ - bool mapExists(const QString & map) const; + bool mapExists(const QString & map); /** * @brief Finds a map index (column, row) for a map name @@ -86,7 +88,7 @@ * @param map map of which to find index * @return int of index, or -1 if map not found */ - int findMap(const QString & map) const; + int findMap(const QString & map); /** * @brief Finds and returns a map item for a map name @@ -98,16 +100,16 @@ // Static MapInfos for drawn and generated maps static MapInfo MapInfoRandom, MapInfoMaze, MapInfoDrawn; - public slots: - /// Reloads the maps using the DataManager. - /// Accepts two map types: StaticMap or MissionMap. - void loadMaps(MapType maptype); + /// Loads the maps + bool loadMaps(); private: /// map index lookup table. QPair contains: //QHash > m_mapIndexes; QHash m_mapIndexes; + MapType m_maptype; + bool m_loaded; /** * @brief Creates a QStandardItem, that holds the map info and item appearance. diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/ThemeModel.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -29,6 +29,8 @@ QAbstractListModel(parent) { m_data = QList >(); + + m_themesLoaded = false; } int ThemeModel::rowCount(const QModelIndex &parent) const @@ -36,7 +38,11 @@ if(parent.isValid()) return 0; else + { + if(!m_themesLoaded) + loadThemes(); return m_data.size(); + } } @@ -45,13 +51,21 @@ if(index.column() > 0 || index.row() >= m_data.size()) return QVariant(); else + { + if(!m_themesLoaded) + loadThemes(); + return m_data.at(index.row()).value(role); + } } -void ThemeModel::loadThemes() +void ThemeModel::loadThemes() const { - beginResetModel(); + qDebug("[LAZINESS ThemeModel::loadThemes()]"); + + m_themesLoaded = true; + DataManager & datamgr = DataManager::instance(); @@ -94,7 +108,4 @@ m_data.append(dataset); } - - - endResetModel(); } diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/ThemeModel.h --- a/QTfrontend/model/ThemeModel.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/ThemeModel.h Tue Dec 17 00:02:52 2013 +0400 @@ -45,14 +45,11 @@ int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; + private: + mutable QList > m_data; + mutable bool m_themesLoaded; - public slots: - /// reloads the themes from the DataManager - void loadThemes(); - - - private: - QList > m_data; + void loadThemes() const; }; #endif // HEDGEWARS_THEMEMODEL_H diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/playerslistmodel.cpp --- a/QTfrontend/model/playerslistmodel.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/playerslistmodel.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -84,6 +84,15 @@ return true; } +QModelIndex PlayersListModel::nicknameIndex(const QString & nickname) +{ + QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + + if(mil.size() > 0) + return mil[0]; + else + return QModelIndex(); +} void PlayersListModel::addPlayer(const QString & nickname, bool notify) { @@ -105,22 +114,22 @@ else emit nickRemovedLobby(nickname, msg); - QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + QModelIndex mi = nicknameIndex(nickname); - if(mil.size()) - removeRow(mil[0].row()); + if(mi.isValid()) + removeRow(mi.row()); } void PlayersListModel::playerJoinedRoom(const QString & nickname, bool notify) { - QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + QModelIndex mi = nicknameIndex(nickname); - if(mil.size()) + if(mi.isValid()) { - setData(mil[0], true, RoomFilterRole); - updateIcon(mil[0]); - updateSortData(mil[0]); + setData(mi, true, RoomFilterRole); + updateIcon(mi); + updateSortData(mi); } emit nickAdded(nickname, notify); @@ -131,62 +140,65 @@ { emit nickRemoved(nickname); - QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + QModelIndex mi = nicknameIndex(nickname); - if(mil.size()) + if(mi.isValid()) { - setData(mil[0], false, RoomFilterRole); - setData(mil[0], false, RoomAdmin); - setData(mil[0], false, Ready); - setData(mil[0], false, InGame); - updateIcon(mil[0]); + setData(mi, false, RoomFilterRole); + setData(mi, false, RoomAdmin); + setData(mi, false, Ready); + setData(mi, false, InGame); + updateIcon(mi); } } void PlayersListModel::setFlag(const QString &nickname, StateFlag flagType, bool isSet) { - QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + if(flagType == Friend) + { + if(isSet) + m_friendsSet.insert(nickname.toLower()); + else + m_friendsSet.remove(nickname.toLower()); - if(mil.size()) + saveSet(m_friendsSet, "friends"); + } + else if(flagType == Ignore) { - setData(mil[0], isSet, flagType); + if(isSet) + m_ignoredSet.insert(nickname.toLower()); + else + m_ignoredSet.remove(nickname.toLower()); + + saveSet(m_ignoredSet, "ignore"); + } + + QModelIndex mi = nicknameIndex(nickname); + + if(mi.isValid()) + { + setData(mi, isSet, flagType); if(flagType == Friend || flagType == ServerAdmin || flagType == Ignore || flagType == RoomAdmin) - updateSortData(mil[0]); - - if(flagType == Friend) - { - if(isSet) - m_friendsSet.insert(nickname.toLower()); - else - m_friendsSet.remove(nickname.toLower()); - - saveSet(m_friendsSet, "friends"); - } + updateSortData(mi); - if(flagType == Ignore) - { - if(isSet) - m_ignoredSet.insert(nickname.toLower()); - else - m_ignoredSet.remove(nickname.toLower()); - - saveSet(m_ignoredSet, "ignore"); - } - - updateIcon(mil[0]); + updateIcon(mi); } } bool PlayersListModel::isFlagSet(const QString & nickname, StateFlag flagType) { - QModelIndexList mil = match(index(0), Qt::DisplayRole, nickname, 1, Qt::MatchExactly); + QModelIndex mi = nicknameIndex(nickname); - if(mil.size()) - return mil[0].data(flagType).toBool(); + if(mi.isValid()) + return mi.data(flagType).toBool(); + else if(flagType == Friend) + return isFriend(nickname); + else if(flagType == Ignore) + return isIgnored(nickname); else return false; } @@ -344,11 +356,20 @@ checkFriendIgnore(index(i)); } +bool PlayersListModel::isFriend(const QString & nickname) +{ + return m_friendsSet.contains(nickname.toLower()); +} + +bool PlayersListModel::isIgnored(const QString & nickname) +{ + return m_ignoredSet.contains(nickname.toLower()); +} void PlayersListModel::checkFriendIgnore(const QModelIndex &mi) { - setData(mi, m_friendsSet.contains(mi.data().toString().toLower()), Friend); - setData(mi, m_ignoredSet.contains(mi.data().toString().toLower()), Ignore); + setData(mi, isFriend(mi.data().toString()), Friend); + setData(mi, isIgnored(mi.data().toString()), Ignore); updateIcon(mi); updateSortData(mi); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/playerslistmodel.h --- a/QTfrontend/model/playerslistmodel.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/playerslistmodel.h Tue Dec 17 00:02:52 2013 +0400 @@ -43,6 +43,8 @@ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + QModelIndex nicknameIndex(const QString & nickname); + public slots: void addPlayer(const QString & nickname, bool notify); void removePlayer(const QString & nickname, const QString & msg = QString()); @@ -71,6 +73,8 @@ void loadSet(QSet & set, const QString & suffix); void saveSet(const QSet & set, const QString & suffix); void checkFriendIgnore(const QModelIndex & mi); + bool isFriend(const QString & nickname); + bool isIgnored(const QString & nickname); }; #endif // PLAYERSLISTMODEL_H diff -r 7d0329f37181 -r f2b18754742f QTfrontend/model/roomslistmodel.cpp --- a/QTfrontend/model/roomslistmodel.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/model/roomslistmodel.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -30,7 +30,7 @@ RoomsListModel::RoomsListModel(QObject *parent) : QAbstractTableModel(parent), - c_nColumns(8) + c_nColumns(9) { m_headerData = QStringList() @@ -40,6 +40,7 @@ << tr("T") << tr("Owner") << tr("Map") + << tr("Script") << tr("Rules") << tr("Weapons"); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/net/newnetclient.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -311,14 +311,12 @@ if (lst[0] == "ROOMS") { - if(lst.size() % 8 != 1) + if(lst.size() % 9 != 1) { qWarning("Net: Malformed ROOMS message"); return; } - QStringList tmp = lst; - tmp.removeFirst(); - m_roomsListModel->setRoomsList(tmp); + m_roomsListModel->setRoomsList(lst.mid(1)); if (m_private_game == false && m_nick_registered == false) { emit NickNotRegistered(mynick); @@ -406,7 +404,7 @@ return; } - if (lst[0] == "CLIENT_FLAGS") + if (lst[0] == "CLIENT_FLAGS" || lst[0] == "CF") { if(lst.size() < 3 || lst[1].size() < 2) { @@ -527,7 +525,7 @@ return; } - if(lst[0] == "ROOM" && lst.size() == 10 && lst[1] == "ADD") + if(lst[0] == "ROOM" && lst.size() == 11 && lst[1] == "ADD") { QStringList tmp = lst; tmp.removeFirst(); @@ -537,7 +535,7 @@ return; } - if(lst[0] == "ROOM" && lst.size() == 11 && lst[1] == "UPD") + if(lst[0] == "ROOM" && lst.size() == 12 && lst[1] == "UPD") { QStringList tmp = lst; tmp.removeFirst(); @@ -627,15 +625,9 @@ return; } - if (lst[0] == "ADMIN_ACCESS") - { - // obsolete, see +a client flag - return; - } - if(lst[0] == "JOINING") { - if(lst.size() < 2) + if(lst.size() != 2) { qWarning("Net: Bad JOINING message"); return; @@ -643,6 +635,7 @@ myroom = lst[1]; emit roomNameUpdated(myroom); + return; } if(netClientState == InLobby && lst[0] == "JOINED") @@ -818,17 +811,6 @@ m_playersModel->playerLeftRoom(lst[1]); return; } - - // obsolete - if (lst[0] == "ROOM_CONTROL_ACCESS") - { - if (lst.size() < 2) - { - qWarning("Net: Bad ROOM_CONTROL_ACCESS message"); - return; - } - return; - } } qWarning() << "Net: Unknown message or wrong state:" << lst; diff -r 7d0329f37181 -r f2b18754742f QTfrontend/team.cpp --- a/QTfrontend/team.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/team.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -276,6 +276,9 @@ sl.push_back(QString("evoicepack " + m_voicepack)); sl.push_back(QString("eflag " + m_flag)); + if(!m_owner.isEmpty()) + sl.push_back(QString("eowner ") + m_owner); + for (int t = 0; t < m_numHedgehogs; t++) { sl.push_back(QString("eaddhh %1 %2 %3") diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/page/pageeditteam.cpp --- a/QTfrontend/ui/page/pageeditteam.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/page/pageeditteam.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -211,7 +211,12 @@ { if(m_loaded) return; m_loaded = true; - qDebug("[LAZYNESS] PageEditTeam::lazyLoad()"); + qDebug("[LAZINESS] PageEditTeam::lazyLoad()"); + + HatModel * hatsModel = DataManager::instance().hatModel(); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) + HHHats[i]->setModel(hatsModel); + QRegExp pngSuffix("\\.png$"); DataManager & dataMgr = DataManager::instance(); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/page/pageroomslist.cpp --- a/QTfrontend/ui/page/pageroomslist.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/page/pageroomslist.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -169,47 +169,11 @@ stateMenu->addAction(showGamesInProgress); btnState->setMenu(stateMenu); - // Rules dropdown - - CBRules = new QComboBox(this); - CBRules->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }"); - - QLabel * ruleLabel = new QLabel(tr("Rules:"), this); - ruleLabel->setFixedHeight(CBRules->height()); - ruleLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - ruleLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);"); - - filterLayout->addWidget(ruleLabel); - filterLayout->addWidget(CBRules); - filterLayout->addSpacing(filterSpacing); - - // Weapons dropdown - - CBWeapons = new QComboBox(this); - CBWeapons->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }"); - - QLabel * weaponLabel = new QLabel(tr("Weapons:"), this); - weaponLabel->setFixedHeight(CBWeapons->height()); - weaponLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - weaponLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);"); - - filterLayout->addWidget(weaponLabel); - filterLayout->addWidget(CBWeapons); - filterLayout->addSpacing(filterSpacing); - - // Clear filters button - - BtnClear = addButton(tr("Clear filters"), filterLayout, 0); - weaponLabel->setFixedHeight(CBWeapons->height()); - BtnClear->setStyleSheet("padding: 4px;"); - // Lobby chat chatWidget = new HWChatWidget(this, false); m_splitter->addWidget(chatWidget); - CBRules->addItem(QComboBox::tr("Any")); - return pageLayout; } @@ -230,7 +194,6 @@ connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); - connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick())); connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp())); connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown())); connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick())); @@ -238,8 +201,6 @@ connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus())); connect(showGamesInLobby, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(showGamesInProgress, SIGNAL(triggered()), this, SLOT(onFilterChanged())); - connect(CBRules, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged())); - connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged())); connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onFilterChanged())); connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection); @@ -273,22 +234,8 @@ { roomsModel = NULL; stateFilteredModel = NULL; - schemeFilteredModel = NULL; - weaponsFilteredModel = NULL; initPage(); - - // not the most elegant solution but it works - ammoSchemeModel = new AmmoSchemeModel(this, NULL); - for (int i = 0; i < ammoSchemeModel->predefSchemesNames.count(); i++) - CBRules->addItem(ammoSchemeModel->predefSchemesNames.at(i).toAscii().constData()); - - CBWeapons->addItem(QComboBox::tr("Any")); - for (int i = 0; i < cDefaultAmmos.count(); i++) - { - QPair ammo = cDefaultAmmos.at(i); - CBWeapons->addItem(ammo.first.toAscii().constData()); - } } @@ -578,16 +525,6 @@ emit askForRoomList(); } -void PageRoomsList::onClearClick() -{ - showGamesInLobby->setChecked(true); - showGamesInProgress->setChecked(true); - CBRules->setCurrentIndex(0); - CBWeapons->setCurrentIndex(0); - searchText->clear(); - searchText->setFocus(); -} - void PageRoomsList::onJoinConfirmation(const QString & room) { @@ -628,25 +565,15 @@ roomsModel->sort(RoomsListModel::StateColumn, Qt::AscendingOrder); stateFilteredModel = new QSortFilterProxyModel(this); - schemeFilteredModel = new QSortFilterProxyModel(this); - weaponsFilteredModel = new QSortFilterProxyModel(this); stateFilteredModel->setDynamicSortFilter(true); - schemeFilteredModel->setDynamicSortFilter(true); - weaponsFilteredModel->setDynamicSortFilter(true); roomsModel->setFilterKeyColumn(-1); // search in all columns stateFilteredModel->setFilterKeyColumn(RoomsListModel::StateColumn); - schemeFilteredModel->setFilterKeyColumn(RoomsListModel::SchemeColumn); - weaponsFilteredModel->setFilterKeyColumn(RoomsListModel::WeaponsColumn); roomsModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - schemeFilteredModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - weaponsFilteredModel->setFilterCaseSensitivity(Qt::CaseInsensitive); - schemeFilteredModel->setSourceModel(stateFilteredModel); - weaponsFilteredModel->setSourceModel(schemeFilteredModel); - roomsModel->setSourceModel(weaponsFilteredModel); + roomsModel->setSourceModel(stateFilteredModel); // let the table view display the last model in the filter chain roomsList->setModel(roomsModel); @@ -660,8 +587,6 @@ stateFilteredModel->setSourceModel(model); - roomsList->hideColumn(RoomsListModel::StateColumn); - QHeaderView * h = roomsList->horizontalHeader(); h->setSortIndicatorShown(true); @@ -678,6 +603,8 @@ h->resizeSection(RoomsListModel::WeaponsColumn, 100); } + // hide column used for filtering + roomsList->hideColumn(RoomsListModel::StateColumn); // save header state on change connect(roomsList->horizontalHeader(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), @@ -714,29 +641,17 @@ if (roomsModel == NULL) return; - roomsModel->setFilterWildcard(QString("*%1*").arg(searchText->text())); + roomsModel->setFilterFixedString(searchText->text()); bool stateLobby = showGamesInLobby->isChecked(); bool stateProgress = showGamesInProgress->isChecked(); if (stateLobby && stateProgress) - stateFilteredModel->setFilterWildcard("*"); // "any" + stateFilteredModel->setFilterFixedString(QString()); // "any" else if (stateLobby != stateProgress) stateFilteredModel->setFilterFixedString(QString(stateProgress)); else stateFilteredModel->setFilterFixedString(QString("none")); // Basically, none. - - if (CBRules->currentIndex() == 0) - schemeFilteredModel->setFilterWildcard("*"); // "any" - else - schemeFilteredModel->setFilterWildcard( - QString("*%1*").arg(CBRules->currentText())); - - if (CBWeapons->currentIndex() == 0) - weaponsFilteredModel->setFilterWildcard("*"); // "any" - else - weaponsFilteredModel->setFilterWildcard( - QString("*%1*").arg(CBWeapons->currentText())); } void PageRoomsList::setSettings(QSettings *settings) diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/page/pageroomslist.h --- a/QTfrontend/ui/page/pageroomslist.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/page/pageroomslist.h Tue Dec 17 00:02:52 2013 +0400 @@ -55,10 +55,7 @@ QPushButton * BtnCreate; QPushButton * BtnJoin; QPushButton * BtnAdmin; - QPushButton * BtnClear; QComboBox * CBState; - QComboBox * CBRules; - QComboBox * CBWeapons; HWChatWidget * chatWidget; QLabel * lblCount; @@ -84,7 +81,6 @@ void onCreateClick(); void onJoinClick(); void onRefreshClick(); - void onClearClick(); void onJoinConfirmation(const QString &); void onSortIndicatorChanged(int logicalIndex, Qt::SortOrder order); void onFilterChanged(); @@ -98,8 +94,6 @@ QSettings * m_gameSettings; QSortFilterProxyModel * roomsModel; QSortFilterProxyModel * stateFilteredModel; - QSortFilterProxyModel * schemeFilteredModel; - QSortFilterProxyModel * weaponsFilteredModel; QAction * showGamesInLobby; QAction * showGamesInProgress; QSplitter * m_splitter; diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/chatwidget.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -861,6 +861,8 @@ else nick = m_clickedNick; + bool isOnline = (mil.size() > 0); + QSortFilterProxyModel * playersSortFilterModel = qobject_cast(chatNicks->model()); if(!playersSortFilterModel) return; @@ -871,8 +873,11 @@ return; bool isSelf = (nick == m_userNick); + bool isInRoom = players->isFlagSet(nick, PlayersListModel::InRoom); - acFollow->setVisible(!isSelf); + acFollow->setVisible(!isSelf && isInRoom); + + acInfo->setVisible(isOnline); // update context menu labels according to possible action if(players->isFlagSet(nick, PlayersListModel::Ignore)) @@ -901,7 +906,7 @@ if (m_isAdmin) { - acKick->setVisible(!isSelf); + acKick->setVisible(!isSelf && isOnline); acBan->setVisible(!isSelf); } diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/gamecfgwidget.cpp --- a/QTfrontend/ui/widget/gamecfgwidget.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -390,7 +390,10 @@ seedChanged(pMapContainer->getCurrentSeed()); templateFilterChanged(pMapContainer->getTemplateFilter()); - themeChanged(pMapContainer->getCurrentTheme()); + + QString t = pMapContainer->getCurrentTheme(); + if(!t.isEmpty()) + themeChanged(t); schemeChanged(GameSchemes->currentIndex()); scriptChanged(Scripts->currentIndex()); diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/hatbutton.cpp --- a/QTfrontend/ui/widget/hatbutton.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/hatbutton.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -19,7 +19,6 @@ #include #include "hatprompt.h" -#include "DataManager.h" #include "HatModel.h" #include "hatbutton.h" @@ -28,8 +27,13 @@ setIconSize(QSize(32, 37)); setFixedSize(44, 44); - m_hatModel = DataManager::instance().hatModel(); + m_hatModel = 0; connect(this, SIGNAL(clicked()), this, SLOT(showPrompt())); +} + +void HatButton::setModel(HatModel *model) +{ + m_hatModel = model; setCurrentIndex(0); } diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/hatbutton.h --- a/QTfrontend/ui/widget/hatbutton.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/hatbutton.h Tue Dec 17 00:02:52 2013 +0400 @@ -35,6 +35,7 @@ HatButton(QWidget* parent); int currentIndex(); QString currentHat() const; + void setModel(HatModel * model); private: QModelIndex m_hat; diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/mapContainer.cpp --- a/QTfrontend/ui/widget/mapContainer.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/mapContainer.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -55,6 +55,11 @@ mapgen(MAPGEN_REGULAR), m_previewSize(256, 128) { + // don't show preview anything until first show event + m_previewEnabled = false; + m_missionsViewSetup = false; + m_staticViewSetup = false; + hhSmall.load(":/res/hh_small.png"); hhLimit = 18; templateFilter = 0; @@ -158,28 +163,14 @@ /* Static maps list */ staticMapList = new QListView; - staticMapList->setModel(m_staticMapModel); rightLayout->addWidget(staticMapList, 1); - staticMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); m_childWidgets << staticMapList; - QItemSelectionModel * staticSelectionModel = staticMapList->selectionModel(); - connect(staticSelectionModel, - SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), - this, - SLOT(staticMapChanged(const QModelIndex &, const QModelIndex &))); /* Mission maps list */ - missionMapList = new QListView; - missionMapList->setModel(m_missionMapModel); - missionMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); + missionMapList = new QListView(this); rightLayout->addWidget(missionMapList, 1); m_childWidgets << missionMapList; - QItemSelectionModel * missionSelectionModel = missionMapList->selectionModel(); - connect(missionSelectionModel, - SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), - this, - SLOT(missionMapChanged(const QModelIndex &, const QModelIndex &))); /* Map load and edit buttons */ @@ -261,7 +252,6 @@ staticMapChanged(m_staticMapModel->index(0, 0)); missionMapChanged(m_missionMapModel->index(0, 0)); changeMapType(MapModel::GeneratedMap); - setRandomTheme(); } void HWMapContainer::setImage(const QImage newImage) @@ -608,8 +598,22 @@ updatePreview(); } +void HWMapContainer::showEvent(QShowEvent * event) +{ + if (!m_previewEnabled) { + m_previewEnabled = true; + setRandomTheme(); + updatePreview(); + } + QWidget::showEvent(event); +} + void HWMapContainer::updatePreview() { + // abort if the widget isn't supposed to show anything yet + if (!m_previewEnabled) + return; + if (pMap) { disconnect(pMap, 0, this, SLOT(setImage(const QImage))); @@ -726,6 +730,7 @@ btnEditMap->show(); break; case MapModel::MissionMap: + setupMissionMapsView(); mapgen = MAPGEN_MAP; missionMapChanged(newMap.isValid() ? newMap : missionMapList->currentIndex()); lblMapList->setText(tr("Mission:")); @@ -736,6 +741,7 @@ emit mapChanged(m_curMap); break; case MapModel::StaticMap: + setupStaticMapsView(); mapgen = MAPGEN_MAP; staticMapChanged(newMap.isValid() ? newMap : staticMapList->currentIndex()); lblMapList->setText(tr("Map:")); @@ -935,3 +941,35 @@ btnTheme->setIcon(QIcon()); btnTheme->setText(tr("Theme: %1").arg(name)); } + +void HWMapContainer::setupMissionMapsView() +{ + if(m_missionsViewSetup) return; + m_missionsViewSetup = true; + + m_missionMapModel->loadMaps(); + missionMapList->setModel(m_missionMapModel); + missionMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); + QItemSelectionModel * missionSelectionModel = missionMapList->selectionModel(); + connect(missionSelectionModel, + SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), + this, + SLOT(missionMapChanged(const QModelIndex &, const QModelIndex &))); + missionSelectionModel->setCurrentIndex(m_missionMapModel->index(0, 0), QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent); +} + +void HWMapContainer::setupStaticMapsView() +{ + if(m_staticViewSetup) return; + m_staticViewSetup = true; + + m_staticMapModel->loadMaps(); + staticMapList->setModel(m_staticMapModel); + staticMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); + QItemSelectionModel * staticSelectionModel = staticMapList->selectionModel(); + connect(staticSelectionModel, + SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), + this, + SLOT(staticMapChanged(const QModelIndex &, const QModelIndex &))); + staticSelectionModel->setCurrentIndex(m_staticMapModel->index(0, 0), QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent); +} diff -r 7d0329f37181 -r f2b18754742f QTfrontend/ui/widget/mapContainer.h --- a/QTfrontend/ui/widget/mapContainer.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/ui/widget/mapContainer.h Tue Dec 17 00:02:52 2013 +0400 @@ -111,6 +111,7 @@ protected: virtual void resizeEvent ( QResizeEvent * event ); + virtual void showEvent ( QShowEvent * event ); private: QVBoxLayout mainLayout; @@ -149,6 +150,9 @@ QPushButton * btnSeed; bool m_master; QList m_childWidgets; + bool m_previewEnabled; + bool m_missionsViewSetup; + bool m_staticViewSetup; void intSetSeed(const QString & seed); void intSetMap(const QString & map); @@ -161,6 +165,8 @@ void changeMapType(MapModel::MapType type, const QModelIndex & newMap = QModelIndex()); void updatePreview(); void updateThemeButtonSize(); + void setupMissionMapsView(); + void setupStaticMapsView(); MapModel::MapInfo m_mapInfo; int m_themeID; diff -r 7d0329f37181 -r f2b18754742f QTfrontend/util/DataManager.cpp --- a/QTfrontend/util/DataManager.cpp Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/util/DataManager.cpp Tue Dec 17 00:02:52 2013 +0400 @@ -98,8 +98,7 @@ MapModel * DataManager::staticMapModel() { if (m_staticMapModel == NULL) { - m_staticMapModel = new MapModel(); - m_staticMapModel->loadMaps(MapModel::StaticMap); + m_staticMapModel = new MapModel(MapModel::StaticMap, this); } return m_staticMapModel; } @@ -107,8 +106,7 @@ MapModel * DataManager::missionMapModel() { if (m_missionMapModel == NULL) { - m_missionMapModel = new MapModel(); - m_missionMapModel->loadMaps(MapModel::MissionMap); + m_missionMapModel = new MapModel(MapModel::MissionMap, this); } return m_missionMapModel; } @@ -117,7 +115,6 @@ { if (m_themeModel == NULL) { m_themeModel = new ThemeModel(); - m_themeModel->loadThemes(); } return m_themeModel; } diff -r 7d0329f37181 -r f2b18754742f QTfrontend/weapons.h --- a/QTfrontend/weapons.h Sat Dec 14 21:16:20 2013 +0400 +++ b/QTfrontend/weapons.h Tue Dec 17 00:02:52 2013 +0400 @@ -21,45 +21,46 @@ //skip---------------------------------| //structure------------------------------------------------------------------| -#define AMMOLINE_DEFAULT_QT "9391929422199121032235111001201000000211110101011111121" -#define AMMOLINE_DEFAULT_PROB "0405040541600655546554464776576666666155510101115411121" -#define AMMOLINE_DEFAULT_DELAY "0000000000000205500000040007004000000000220000000600020" -#define AMMOLINE_DEFAULT_CRATE "1311110312111111123114111111111111111211111101111111121" -#define AMMOLINE_CRAZY_QT "9999999999999999992999999999999999299999999909999992999" -#define AMMOLINE_CRAZY_PROB "1111110111111111111111111111111111111111111101111111111" -#define AMMOLINE_CRAZY_DELAY "0000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_CRAZY_CRATE "1311110312111111123114111111111111111211110101111111121" +#define AMMOLINE_DEFAULT_QT "93919294221991210322351110012000000002111001010111110001" +#define AMMOLINE_DEFAULT_PROB "04050405416006555465544647765766666661555101011154111111" +#define AMMOLINE_DEFAULT_DELAY "00000000000002055000000400070040000000002200000006000200" +#define AMMOLINE_DEFAULT_CRATE "13111103121111111231141111111111111112111111011111111111" -#define AMMOLINE_PROMODE_QT "9090009000000000000009000000000000000000000000000000000" -#define AMMOLINE_PROMODE_PROB "0000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_PROMODE_DELAY "0000000000000205500000040007004000000000200000000000020" -#define AMMOLINE_PROMODE_CRATE "1111110111111111111111111111111111111111100101111111121" +#define AMMOLINE_CRAZY_QT "99999999999999999929999999999999992999999999099999929991" +#define AMMOLINE_CRAZY_PROB "11111101111111111111111111111111111111111111011111111111" +#define AMMOLINE_CRAZY_DELAY "00000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_CRAZY_CRATE "13111103121111111231141111111111111112111101011111111111" -#define AMMOLINE_SHOPPA_QT "0000009900000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_PROB "4444410044244402210112121222422000000002000400010011001" -#define AMMOLINE_SHOPPA_DELAY "0000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_CRATE "1111110111111111111111111111111111111111101101111111121" +#define AMMOLINE_PROMODE_QT "90900090000000000000090000000000000000000000000000000000" +#define AMMOLINE_PROMODE_PROB "00000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_PROMODE_DELAY "00000000000002055000000400070040000000002000000000000200" +#define AMMOLINE_PROMODE_CRATE "11111101111111111111111111111111111111111001011111111111" -#define AMMOLINE_CLEAN_QT "1010009000010000011000000000000000000000000000001000000" -#define AMMOLINE_CLEAN_PROB "0405040541600655546554464776576666666155510101115411121" -#define AMMOLINE_CLEAN_DELAY "0000000000000000000000000000000000000000000000000000020" -#define AMMOLINE_CLEAN_CRATE "1311110312111111123114111111111111111211111101111111121" +#define AMMOLINE_SHOPPA_QT "00000099000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_PROB "44444100442444022101121212224220000000020004000100110010" +#define AMMOLINE_SHOPPA_DELAY "00000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_CRATE "11111101111111111111111111111111111111111011011111111110" -#define AMMOLINE_MINES_QT "0000009900090000000300000000000000000000000000000000000" -#define AMMOLINE_MINES_PROB "0000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_MINES_DELAY "0000000000000205500000040007004000000000200000000600020" -#define AMMOLINE_MINES_CRATE "1111110111111111111111111111111111111111111101111111121" +#define AMMOLINE_CLEAN_QT "10100090000100000110000000000000000000000000000010000000" +#define AMMOLINE_CLEAN_PROB "04050405416006555465544647765766666661555101011154111211" +#define AMMOLINE_CLEAN_DELAY "00000000000000000000000000000000000000000000000000000200" +#define AMMOLINE_CLEAN_CRATE "13111103121111111231141111111111111112111111011111111111" -#define AMMOLINE_PORTALS_QT "9000009002000000002100000000000000110000090000000000000" -#define AMMOLINE_PORTALS_PROB "0405040541600655546554464776576666666155510101115411121" -#define AMMOLINE_PORTALS_DELAY "0000000000000205500000040007004000000000200000000600020" -#define AMMOLINE_PORTALS_CRATE "1311110312111111123114111111111111111211111101111111121" +#define AMMOLINE_MINES_QT "00000099000900000003000000000000000000000000000000000000" +#define AMMOLINE_MINES_PROB "00000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_MINES_DELAY "00000000000002055000000400070040000000002000000006000200" +#define AMMOLINE_MINES_CRATE "11111101111111111111111111111111111111111111011111111111" -#define AMMOLINE_ONEEVERY_QT "1111119111111111111111111111111111111111111111111111111" -#define AMMOLINE_ONEEVERY_PROB "1111110111111111111111111111111111111111111111111111111" -#define AMMOLINE_ONEEVERY_DELAY "0000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_ONEEVERY_CRATE "1111110111111111111111111111111111111111111111111111111" +#define AMMOLINE_PORTALS_QT "90000090020000000021000000000000001100000900000000000000" +#define AMMOLINE_PORTALS_PROB "04050405416006555465544647765766666661555101011154111211" +#define AMMOLINE_PORTALS_DELAY "00000000000002055000000400070040000000002000000006000200" +#define AMMOLINE_PORTALS_CRATE "13111103121111111231141111111111111112111111011111111111" + +#define AMMOLINE_ONEEVERY_QT "11111191111111111111111111111111111111111111111111111111" +#define AMMOLINE_ONEEVERY_PROB "11111101111111111111111111111111111111111111111111111111" +#define AMMOLINE_ONEEVERY_DELAY "00000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_ONEEVERY_CRATE "11111101111111111111111111111111111111111111111111111111" //When adding new weapons also insert one element in cDefaultAmmos list (hwconsts.cpp.in) diff -r 7d0329f37181 -r f2b18754742f gameServer/Actions.hs --- a/gameServer/Actions.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/Actions.hs Tue Dec 17 00:02:52 2013 +0400 @@ -21,6 +21,7 @@ import System.Process import Network.Socket import System.Random +import qualified Data.Traversable as DT ----------------------------- #if defined(OFFICIAL_SERVER) import OfficialServer.GameReplayStore @@ -187,13 +188,14 @@ ri <- clientRoomA rnc <- gets roomsClients playersNum <- io $ room'sM rnc playersIn ri + specialRoom <- io $ room'sM rnc isSpecial ri master <- client's isMaster -- client <- client's id clNick <- client's nick chans <- othersChans if master then - if playersNum > 1 then + if (playersNum > 1) || specialRoom then mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] else processAction RemoveRoom @@ -205,7 +207,7 @@ -- when not removing room ready <- client's isReady - when (not master || playersNum > 1) . io $ do + when (not master || playersNum > 1 || specialRoom) . io $ do modifyRoom rnc (\r -> r{ playersIn = playersIn r - 1, readyPlayers = if ready then readyPlayers r - 1 else readyPlayers r @@ -218,31 +220,40 @@ proto <- client's clientProto ri <- clientRoomA rnc <- gets roomsClients - newMasterId <- liftM (\ids -> fromMaybe (last . filter (/= ci) $ ids) delegateId) . io $ roomClientsIndicesM rnc ri - newMaster <- io $ client'sM rnc id newMasterId + specialRoom <- io $ room'sM rnc isSpecial ri + newMasterId <- liftM (\ids -> fromMaybe (listToMaybe . reverse . filter (/= ci) $ ids) $ liftM Just delegateId) . io $ roomClientsIndicesM rnc ri + newMaster <- io $ client'sM rnc id `DT.mapM` newMasterId oldMasterId <- io $ room'sM rnc masterID ri - oldMaster <- io $ client'sM rnc id oldMasterId oldRoomName <- io $ room'sM rnc name ri kicked <- client's isKickedFromServer thisRoomChans <- liftM (map sendChan) $ roomClientsS ri - let newRoomName = if (proto < 42) || kicked then nick newMaster else oldRoomName - mapM_ processAction [ + let newRoomName = if ((proto < 42) || kicked) && (not specialRoom) then maybeNick newMaster else oldRoomName + + when (isJust oldMasterId) $ do + oldMasterNick <- io $ client'sM rnc nick (fromJust oldMasterId) + mapM_ processAction [ + ModifyClient2 (fromJust oldMasterId) (\c -> c{isMaster = False}) + , AnswerClients thisRoomChans ["CLIENT_FLAGS", "-h", oldMasterNick] + ] + + when (isJust newMasterId) $ + mapM_ processAction [ + ModifyClient2 (fromJust newMasterId) (\c -> c{isMaster = True}) + , AnswerClients [sendChan $ fromJust newMaster] ["ROOM_CONTROL_ACCESS", "1"] + , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+h", nick $ fromJust newMaster] + ] + + processAction $ ModifyRoom (\r -> r{masterID = newMasterId , name = newRoomName , isRestrictedJoins = False , isRestrictedTeams = False - , isRegisteredOnly = False} + , isRegisteredOnly = isSpecial r} ) - , ModifyClient2 newMasterId (\c -> c{isMaster = True}) - , ModifyClient2 oldMasterId (\c -> c{isMaster = False}) - , AnswerClients [sendChan newMaster] ["ROOM_CONTROL_ACCESS", "1"] - , AnswerClients thisRoomChans ["CLIENT_FLAGS", "-h", nick oldMaster] - , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+h", nick newMaster] - ] newRoom' <- io $ room'sM rnc id ri chans <- liftM (map sendChan) $! sameProtoClientsS proto - processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo (nick newMaster) newRoom') + processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo proto (maybeNick newMaster) newRoom') processAction (AddRoom roomName roomPassword) = do @@ -252,7 +263,7 @@ n <- client's nick let rm = newRoom{ - masterID = clId, + masterID = Just clId, name = roomName, password = roomPassword, roomProto = proto @@ -265,7 +276,7 @@ chans <- liftM (map sendChan) $! sameProtoClientsS proto mapM_ processAction [ - AnswerClients chans ("ROOM" : "ADD" : roomInfo n rm{playersIn = 1}) + AnswerClients chans ("ROOM" : "ADD" : roomInfo proto n rm{playersIn = 1}) ] @@ -292,9 +303,9 @@ rnc <- gets roomsClients ri <- io $ clientRoomM rnc clId rm <- io $ room'sM rnc id ri - n <- io $ client'sM rnc nick (masterID rm) + masterCl <- io $ client'sM rnc id `DT.mapM` (masterID rm) chans <- liftM (map sendChan) $! sameProtoClientsS proto - processAction $ AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo n rm) + processAction $ AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo proto (maybeNick masterCl) rm) processAction UnreadyRoomClients = do @@ -433,10 +444,8 @@ checkerLogin "" False False else processAction JoinLobby - Admin -> do + Admin -> mapM_ processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby] - chan <- client's sendChan - processAction $ AnswerClients [chan] ["ADMIN_ACCESS"] ReplayName fn -> processAction $ ShowReplay fn where isBanned = do @@ -714,11 +723,11 @@ where toPair t = (teamname t, teamowner t) -processAction (QueryReplay name) = do +processAction (QueryReplay rname) = do (Just ci) <- gets clientIndex si <- gets serverInfo uid <- client's clUID - io $ writeChan (dbQueries si) $ GetReplayName ci (hashUnique uid) name + io $ writeChan (dbQueries si) $ GetReplayName ci (hashUnique uid) rname #else processAction SaveReplay = return () @@ -728,25 +737,25 @@ processAction (QueryReplay _) = return () #endif -processAction (ShowReplay name) = do +processAction (ShowReplay rname) = do c <- client's sendChan cl <- client's id - let fileName = B.concat ["checked/", if B.isPrefixOf "replays/" name then B.drop 8 name else name] + let fileName = B.concat ["checked/", if B.isPrefixOf "replays/" rname then B.drop 8 rname else rname] - checkInfo <- liftIO $ E.handle (\(e :: SomeException) -> + cInfo <- liftIO $ E.handle (\(e :: SomeException) -> warningM "REPLAYS" (B.unpack $ B.concat ["Problems reading ", fileName, ": ", B.pack $ show e]) >> return Nothing) $ do (t, p1, p2, msgs) <- liftM read $ readFile (B.unpack fileName) return $ Just (t, Map.fromList p1, Map.fromList p2, reverse msgs) - let (teams, params1, params2, roundMsgs) = fromJust checkInfo + let (teams', params1, params2, roundMsgs') = fromJust cInfo - when (isJust checkInfo) $ do + when (isJust cInfo) $ do mapM_ processAction $ concat [ [AnswerClients [c] ["JOINED", nick cl]] , answerFullConfigParams cl params1 params2 - , answerAllTeams cl teams + , answerAllTeams cl teams' , [AnswerClients [c] ["RUN_GAME"]] - , [AnswerClients [c] $ "EM" : roundMsgs] + , [AnswerClients [c] $ "EM" : roundMsgs'] , [AnswerClients [c] ["KICKED"]] ] diff -r 7d0329f37181 -r f2b18754742f gameServer/Consts.hs --- a/gameServer/Consts.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/Consts.hs Tue Dec 17 00:02:52 2013 +0400 @@ -4,4 +4,4 @@ import qualified Data.ByteString.Char8 as B serverVersion :: B.ByteString -serverVersion = "1" +serverVersion = "2" diff -r 7d0329f37181 -r f2b18754742f gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/CoreTypes.hs Tue Dec 17 00:02:52 2013 +0400 @@ -170,7 +170,7 @@ data RoomInfo = RoomInfo { - masterID :: ClientIndex, + masterID :: Maybe ClientIndex, name :: B.ByteString, password :: B.ByteString, roomProto :: Word16, @@ -181,6 +181,8 @@ isRestrictedJoins :: Bool, isRestrictedTeams :: Bool, isRegisteredOnly :: Bool, + isSpecial :: Bool, + greeting :: B.ByteString, roomBansList :: ![B.ByteString], mapParams :: Map.Map B.ByteString B.ByteString, params :: Map.Map B.ByteString [B.ByteString] @@ -189,7 +191,7 @@ newRoom :: RoomInfo newRoom = RoomInfo - (error "No room master defined") + Nothing "" "" 0 @@ -200,13 +202,20 @@ False False False + False + "" [] ( - Map.fromList $ Prelude.zipWith (,) + Map.fromList $ Prelude.zip ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"] ["+rnd+", "0", "0", "seed", "0"] ) - (Map.singleton "SCHEME" ["Default"]) + ( + Map.fromList $ Prelude.zip + ["SCHEME", "SCRIPT"] + [["Default"], ["Normal"]] + ) + data StatisticsInfo = StatisticsInfo diff -r 7d0329f37181 -r f2b18754742f gameServer/EngineInteraction.hs --- a/gameServer/EngineInteraction.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/EngineInteraction.hs Tue Dec 17 00:02:52 2013 +0400 @@ -12,6 +12,7 @@ import Data.Word import Data.Bits import Control.Arrow +import Data.Maybe ------------- import CoreTypes import Utils @@ -74,7 +75,7 @@ em = toEngineMsg eml = em . B.concat mapGenTypes = ["+rnd+", "+maze+", "+drawn+"] - maybeScript = let s = head $ prms Map.! "SCRIPT" in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", s, ".lua"]] + maybeScript = let s = head . fromMaybe ["Normal"] $ Map.lookup "SCRIPT" prms in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", s, ".lua"]] maybeMap = let m = mParams Map.! "MAP" in if m `elem` mapGenTypes then [] else [eml ["emap ", m]] scheme = tail $ prms Map.! "SCHEME" mapgen = mParams Map.! "MAPGEN" diff -r 7d0329f37181 -r f2b18754742f gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/HWProtoCore.hs Tue Dec 17 00:02:52 2013 +0400 @@ -51,6 +51,9 @@ let chans = map (sendChan . client rnc) $ allClients rnc return [AnswerClients chans ["CHAT", "[global notice]", p] | isAdministrator cl] h "WATCH" f = return [QueryReplay f] + h "FIX" _ = handleCmd ["FIX"] + h "UNFIX" _ = handleCmd ["UNFIX"] + h "GREETING" msg = handleCmd ["GREETING", msg] h c p = return [Warning $ B.concat ["Unknown cmd: /", c, p]] handleCmd cmd = do diff -r 7d0329f37181 -r f2b18754742f gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/HWProtoInRoomState.hs Tue Dec 17 00:02:52 2013 +0400 @@ -31,7 +31,11 @@ | otherwise = do chans <- roomOthersChans cl <- thisClient - if isMaster cl then + rm <- thisRoom + + if isSpecial rm then + return [Warning $ loc "Restricted"] + else if isMaster cl then return [ ModifyRoom f, AnswerClients chans ("CFG" : paramName : paramStrs)] @@ -43,6 +47,7 @@ else r{params = Map.insert paramName paramStrs (params r)} + handleCmd_inRoom ("ADD_TEAM" : tName : color : grave : fort : voicepack : flag : difStr : hhsInfo) | length hhsInfo /= 16 = return [ProtocolError $ loc "Corrupted hedgehogs info"] | otherwise = do @@ -290,11 +295,14 @@ if illegalName newName then [Warning $ loc "Illegal room name"] else + if isSpecial rm then + [Warning $ loc "Restricted"] + else if isJust $ find (\r -> newName == name r) rs then [Warning $ loc "Room with such name already exists"] else [ModifyRoom roomUpdate, - AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo (nick cl) (roomUpdate rm))] + AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo (clientProto cl) (nick cl) (roomUpdate rm))] where roomUpdate r = r{name = newName} @@ -323,6 +331,7 @@ maybeClientId <- clientByNick newAdmin master <- liftM isMaster thisClient serverAdmin <- liftM isAdministrator thisClient + thisRoomMasterId <- liftM masterID thisRoom let newAdminId = fromJust maybeClientId let sameRoom = clientRoom rnc thisClientId == clientRoom rnc newAdminId return @@ -330,6 +339,7 @@ (master || serverAdmin) && isJust maybeClientId && ((newAdminId /= thisClientId) || (serverAdmin && not master)) + && (Just newAdminId /= thisRoomMasterId) && sameRoom] @@ -360,6 +370,19 @@ s <- roomClientsChans return [AnswerClients s ["CHAT", n, B.unwords $ "/rnd" : rs], Random s rs] +handleCmd_inRoom ["FIX"] = do + cl <- thisClient + return [ModifyRoom (\r -> r{isSpecial = True}) | isAdministrator cl] + +handleCmd_inRoom ["UNFIX"] = do + cl <- thisClient + return [ModifyRoom (\r -> r{isSpecial = False}) | isAdministrator cl] + +handleCmd_inRoom ["GREETING", msg] = do + cl <- thisClient + rm <- thisRoom + return [ModifyRoom (\r -> r{greeting = msg}) | isAdministrator cl || (isMaster cl && (not $ isSpecial rm))] + handleCmd_inRoom ["LIST"] = return [] -- for old clients (<= 0.9.17) handleCmd_inRoom (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: in room)"] diff -r 7d0329f37181 -r f2b18754742f gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/HWProtoLobbyState.hs Tue Dec 17 00:02:52 2013 +0400 @@ -21,10 +21,9 @@ (ci, irnc) <- ask let cl = irnc `client` ci rooms <- allRoomInfos - let roomsInfoList = concatMap (\r -> roomInfo (nick $ irnc `client` masterID r) r) . filter (\r -> (roomProto r == clientProto cl)) + let roomsInfoList = concatMap (\r -> roomInfo (clientProto cl) (maybeNick . liftM (client irnc) $ masterID r) r) . filter (\r -> (roomProto r == clientProto cl)) return [AnswerClients [sendChan cl] ("ROOMS" : roomsInfoList rooms)] - handleCmd_lobby ["CHAT", msg] = do n <- clientNick s <- roomOthersChans @@ -60,35 +59,37 @@ let sameProto = clientProto cl == roomProto jRoom let jRoomClients = map (client irnc) $ roomClients irnc jRI let nicks = map nick jRoomClients - let ownerNick = nick . fromJust $ find isMaster jRoomClients + let owner = find isMaster jRoomClients let chans = map sendChan (cl : jRoomClients) let isBanned = host cl `elem` roomBansList jRoom return $ - if isNothing maybeRI || not sameProto then + if isNothing maybeRI then [Warning $ loc "No such room"] + else if not sameProto then + [Warning $ loc "Room version incompatible to your hedgewars version"] else if isRestrictedJoins jRoom then [Warning $ loc "Joining restricted"] - else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) then + else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) && not (isAdministrator cl) then [Warning $ loc "Registered users only"] else if isBanned then [Warning $ loc "You are banned in this room"] else if roomPassword /= password jRoom then [NoticeMessage WrongPassword] else - [ + ( MoveToRoom jRI - , ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom}) - , AnswerClients [sendChan cl] $ "JOINED" : nicks - , AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl] - , AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick] - ] - ++ (if clientProto cl < 38 then map (readynessMessage cl) jRoomClients else [sendStateFlags cl jRoomClients]) + : ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom}) + : AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl] + : [(AnswerClients [sendChan cl] $ "JOINED" : nicks) | not $ null nicks] + ) + ++ [AnswerClients [sendChan cl] ["CLIENT_FLAGS", "+h", nick $ fromJust owner] | isJust owner] + ++ [sendStateFlags cl jRoomClients | not $ null jRoomClients] ++ answerFullConfig cl jRoom ++ answerTeams cl jRoom ++ watchRound cl jRoom chans + ++ [AnswerClients [sendChan cl] ["CHAT", "[greeting]", greeting jRoom] | greeting jRoom /= ""] where - readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c] sendStateFlags cl clients = AnswerClients [sendChan cl] . concat . intersperse [""] . filter (not . null) . concat $ [f "+r" ready, f "-r" unready, f "+g" ingame, f "-g" inroomlobby] where diff -r 7d0329f37181 -r f2b18754742f gameServer/Utils.hs --- a/gameServer/Utils.hs Sat Dec 14 21:16:20 2013 +0400 +++ b/gameServer/Utils.hs Tue Dec 17 00:02:52 2013 +0400 @@ -125,8 +125,9 @@ upperCase :: B.ByteString -> B.ByteString upperCase = UTF8.fromString . map Char.toUpper . UTF8.toString -roomInfo :: B.ByteString -> RoomInfo -> [B.ByteString] -roomInfo n r = [ +roomInfo :: Word16 -> B.ByteString -> RoomInfo -> [B.ByteString] +roomInfo p n r + | p < 46 = [ showB $ isJust $ gameInfo r, name r, showB $ playersIn r, @@ -136,7 +137,17 @@ head (Map.findWithDefault ["Default"] "SCHEME" (params r)), head (Map.findWithDefault ["Default"] "AMMO" (params r)) ] - + | otherwise = [ + showB $ isJust $ gameInfo r, + name r, + showB $ playersIn r, + showB $ length $ teams r, + n, + Map.findWithDefault "+rnd+" "MAP" (mapParams r), + head (Map.findWithDefault ["Normal"] "SCRIPT" (params r)), + head (Map.findWithDefault ["Default"] "SCHEME" (params r)), + head (Map.findWithDefault ["Default"] "AMMO" (params r)) + ] answerFullConfigParams :: ClientInfo @@ -169,3 +180,6 @@ loc :: B.ByteString -> B.ByteString loc = id + +maybeNick :: Maybe ClientInfo -> B.ByteString +maybeNick = fromMaybe "[empty]" . liftM nick diff -r 7d0329f37181 -r f2b18754742f hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/CMakeLists.txt Tue Dec 17 00:02:52 2013 +0400 @@ -176,6 +176,15 @@ #needs to be last add_definitions(-dDEBUGFILE) + +# make source files objects depend on their predecessors in list +set(sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/options.inc" "${CMAKE_CURRENT_BINARY_DIR}/config.inc") +foreach(loop_var ${engine_sources}) + SET_SOURCE_FILES_PROPERTIES(${loop_var} PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}") + list(APPEND sourcefiles_sofar "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}") +endforeach(loop_var) + + #SOURCE AND PROGRAMS SECTION if(BUILD_ENGINE_LIBRARY) message("***Engine will be built as library (experimental)***") diff -r 7d0329f37181 -r f2b18754742f hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uAIAmmoTests.pas Tue Dec 17 00:02:52 2013 +0400 @@ -54,6 +54,7 @@ function TestTeleport(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; function TestHammer(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; function TestCake(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestDynamite(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; type TAmmoTestProc = function (Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; TAmmoTest = record @@ -74,7 +75,7 @@ (proc: nil; flags: 0), // amRope (proc: nil; flags: 0), // amMine (proc: @TestDesertEagle; flags: amtest_MultipleAttacks), // amDEagle - (proc: nil; flags: 0), // amDynamite + (proc: @TestDynamite; flags: amtest_NoTarget), // amDynamite (proc: @TestFirePunch; flags: amtest_NoTarget), // amFirePunch (proc: @TestWhip; flags: amtest_NoTarget), // amWhip (proc: @TestBaseballBat; flags: amtest_NoTarget), // amBaseballBat @@ -120,7 +121,8 @@ //(proc: nil; flags: 0), // amStructure (proc: nil; flags: 0), // amLandGun (proc: nil; flags: 0), // amIceGun - (proc: nil; flags: 0) // amKnife + (proc: nil; flags: 0), // amKnife + (proc: nil; flags: 0) // amGirder ); implementation @@ -1222,4 +1224,48 @@ TestCake:= valueResult; end; +function TestDynamite(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +var valueResult: LongInt; + x, y, dx, dy: real; + EX, EY, t: LongInt; +begin +Targ:= Targ; // avoid compiler hint + +x:= hwFloat2Float(Me^.X) + hwSign(Me^.dX) * 7; +y:= hwFloat2Float(Me^.Y); +dx:= hwSign(Me^.dX) * 0.03; +dy:= 0; +t:= 5000; +repeat + dec(t); + x:= x + dx; + dy:= dy + cGravityf; + y:= y + dy; + + if TestColl(trunc(x), trunc(y), 3) then + t:= 0; +until t = 0; + +EX:= trunc(x); +EY:= trunc(y); + +if Level = 1 then + valueResult:= RateExplosion(Me, EX, EY, 76, afTrackFall or afErasesLand) +else + valueResult:= RateExplosion(Me, EX, EY, 76); + +if (valueResult > 0) then + begin + ap.Angle:= 0; + ap.Power:= 1; + ap.Time:= 0; + ap.ExplR:= 150; + ap.ExplX:= EX; + ap.ExplY:= EY + end else + valueResult:= BadTurn; + +TestDynamite:= valueResult +end; + end. diff -r 7d0329f37181 -r f2b18754742f hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uAIMisc.pas Tue Dec 17 00:02:52 2013 +0400 @@ -812,13 +812,13 @@ jmpLJump: begin if TestCollisionYwithGear(Gear, -1) <> 0 then - if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then + if TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) = 0 then Gear^.Y:= Gear^.Y - int2hwFloat(2) else - if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then + if TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) = 0 then Gear^.Y:= Gear^.Y - _1; - if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) or - (TestCollisionYwithGear(Gear, -1) <> 0)) then + if (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.dY:= -_0_15; Gear^.dX:= SignAs(_0_15, Gear^.dX); @@ -846,7 +846,7 @@ Gear^.dY:= -_0_25; Gear^.dX:= SignAs(_0_02, Gear^.dX) end; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX); + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then SetLittle(Gear^.dX); Gear^.X:= Gear^.X + Gear^.dX; inc(GoInfo.Ticks); Gear^.dY:= Gear^.dY + cGravity; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uAmmos.pas Tue Dec 17 00:02:52 2013 +0400 @@ -322,18 +322,21 @@ if Hedgehog.Gear <> nil then with Hedgehog do begin - CurMinAngle:= Ammoz[AmmoType].minAngle; - if Ammoz[AmmoType].maxAngle <> 0 then - CurMaxAngle:= Ammoz[AmmoType].maxAngle - else - CurMaxAngle:= cMaxAngle; + if (AmmoType <> amNothing) then + begin + CurMinAngle:= Ammoz[AmmoType].minAngle; + if Ammoz[AmmoType].maxAngle <> 0 then + CurMaxAngle:= Ammoz[AmmoType].maxAngle + else + CurMaxAngle:= cMaxAngle; - with Hedgehog.Gear^ do - begin - if Angle < CurMinAngle then - Angle:= CurMinAngle; - if Angle > CurMaxAngle then - Angle:= CurMaxAngle; + with Hedgehog.Gear^ do + begin + if Angle < CurMinAngle then + Angle:= CurMinAngle; + if Angle > CurMaxAngle then + Angle:= CurMaxAngle; + end end end end; @@ -509,6 +512,8 @@ RegisterVariable('ammreinf', @SetAmmoReinforcement, false); RegisterVariable('ammstore', @chAddAmmoStore , false); + CurMinAngle:= 0; + CurMaxAngle:= cMaxAngle; StoreCnt:= 0; ammoLoadout:= ''; ammoProbability:= ''; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uChat.pas --- a/hedgewars/uChat.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uChat.pas Tue Dec 17 00:02:52 2013 +0400 @@ -285,11 +285,14 @@ exit end; - if (copy(s, 1, 4) <> '/me ') then + if (copy(s, 1, 4) = '/me ') then begin - if CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then - exit; + ParseCommand('/say ' + s, true); + exit + end; + if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then + begin for i:= Low(TWave) to High(TWave) do if (s = Wavez[i].cmd) then begin diff -r 7d0329f37181 -r f2b18754742f hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uCollisions.pas Tue Dec 17 00:02:52 2013 +0400 @@ -38,29 +38,29 @@ function CheckGearsCollision(Gear: PGear): PGearArray; -function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): Word; function TestCollisionYwithGear(Gear: PGear; Dir: LongInt): Word; -function TestCollisionXKick(Gear: PGear; Dir: LongInt): boolean; -function TestCollisionYKick(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionXKick(Gear: PGear; Dir: LongInt): Word; +function TestCollisionYKick(Gear: PGear; Dir: LongInt): Word; -function TestCollisionX(Gear: PGear; Dir: LongInt): boolean; -function TestCollisionY(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionX(Gear: PGear; Dir: LongInt): Word; +function TestCollisionY(Gear: PGear; Dir: LongInt): Word; -function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): boolean; inline; -function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt; withGear: boolean): boolean; -function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): boolean; inline; -function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt; withGear: boolean): boolean; +function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): Word; inline; +function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt; withGear: boolean): Word; +function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): Word; inline; +function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt; withGear: boolean): Word; function TestRectancleForObstacle(x1, y1, x2, y2: LongInt; landOnly: boolean): boolean; // returns: negative sign if going downhill to left, value is steepness (noslope/error = _0, 45° = _0_5) function CalcSlopeBelowGear(Gear: PGear): hwFloat; function CalcSlopeNearGear(Gear: PGear; dirX, dirY: LongInt): hwFloat; -function CalcSlopeTangent(Gear: PGear; collisionX, collisionY: LongInt; var outDeltaX, outDeltaY: LongInt; TestWord: LongWord): Boolean; +function CalcSlopeTangent(Gear: PGear; collisionX, collisionY: LongInt; var outDeltaX, outDeltaY: LongInt; TestWord: LongWord): boolean; implementation -uses uConsts, uLandGraphics, uVariables, uDebug, uGearsList; +uses uConsts, uLandGraphics, uVariables, uDebug; type TCollisionEntry = record X, Y, Radius: LongInt; @@ -95,7 +95,7 @@ while (t <> nil) and (t^.Kind <> gtMine) do t:= t^.NextGear; if (t <> nil) then - DeleteGear(t) + t^.State:= t^.State or gmDelete end; end; @@ -135,7 +135,7 @@ end end; -function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): Word; var x, y, i: LongInt; begin // Special case to emulate the old intersect gear clearing, but with a bit of slop for pixel overlap @@ -150,7 +150,6 @@ else x:= x + Gear^.Radius; -TestCollisionXwithGear:= true; if (x and LAND_WIDTH_MASK) = 0 then begin y:= hwRound(Gear^.Y) - Gear^.Radius + 1; @@ -158,11 +157,11 @@ repeat if (y and LAND_HEIGHT_MASK) = 0 then if Land[y, x] and Gear^.CollisionMask <> 0 then - exit; + exit(Land[y, x] and Gear^.CollisionMask); inc(y) until (y > i); end; -TestCollisionXwithGear:= false +TestCollisionXwithGear:= 0 end; function TestCollisionYwithGear(Gear: PGear; Dir: LongInt): Word; @@ -188,8 +187,7 @@ if (x and LAND_WIDTH_MASK) = 0 then if Land[y, x] and Gear^.CollisionMask <> 0 then begin - TestCollisionYwithGear:= Land[y, x]; - exit; + exit(Land[y, x] and Gear^.CollisionMask) end; inc(x) until (x > i); @@ -197,34 +195,33 @@ TestCollisionYwithGear:= 0 end; -function TestCollisionXKick(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionXKick(Gear: PGear; Dir: LongInt): Word; var x, y, mx, my, i: LongInt; - flag: boolean; + pixel: Word; begin -flag:= false; +pixel:= 0; x:= hwRound(Gear^.X); if Dir < 0 then x:= x - Gear^.Radius else x:= x + Gear^.Radius; -TestCollisionXKick:= true; if (x and LAND_WIDTH_MASK) = 0 then begin y:= hwRound(Gear^.Y) - Gear^.Radius + 1; i:= y + Gear^.Radius * 2 - 2; repeat if (y and LAND_HEIGHT_MASK) = 0 then - if Land[y, x] > 255 then - exit - else if Land[y, x] <> 0 then - flag:= true; + if Land[y, x] and Gear^.CollisionMask > 255 then + exit(Land[y, x] and Gear^.CollisionMask) + else if Land[y, x] and Gear^.CollisionMask <> 0 then + pixel:= Land[y, x] and Gear^.CollisionMask; inc(y) until (y > i); end; -TestCollisionXKick:= flag; +TestCollisionXKick:= pixel; -if flag then +if pixel <> 0 then begin if hwAbs(Gear^.dX) < cHHKick then exit; @@ -255,24 +252,22 @@ Active:= true end; DeleteCI(cGear); - TestCollisionXKick:= false; - exit; + exit(0); end end end; -function TestCollisionYKick(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionYKick(Gear: PGear; Dir: LongInt): Word; var x, y, mx, my, myr, i: LongInt; - flag: boolean; + pixel: Word; begin -flag:= false; +pixel:= 0; y:= hwRound(Gear^.Y); if Dir < 0 then y:= y - Gear^.Radius else y:= y + Gear^.Radius; -TestCollisionYKick:= true; if (y and LAND_HEIGHT_MASK) = 0 then begin x:= hwRound(Gear^.X) - Gear^.Radius + 1; @@ -280,16 +275,16 @@ repeat if (x and LAND_WIDTH_MASK) = 0 then if Land[y, x] > 0 then - if Land[y, x] > 255 then - exit + if Land[y, x] and Gear^.CollisionMask > 255 then + exit(Land[y, x] and Gear^.CollisionMask) else if Land[y, x] <> 0 then - flag:= true; + pixel:= Land[y, x] and Gear^.CollisionMask; inc(x) until (x > i); end; -TestCollisionYKick:= flag; +TestCollisionYKick:= pixel; -if flag then +if pixel <> 0 then begin if hwAbs(Gear^.dY) < cHHKick then exit; @@ -318,18 +313,17 @@ Active:= true end; DeleteCI(cGear); - TestCollisionYKick:= false; - exit + exit(0) end end end; -function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): boolean; inline; +function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): Word; inline; begin TestCollisionXwithXYShift:= TestCollisionXwithXYShift(Gear, ShiftX, ShiftY, Dir, true); end; -function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt; withGear: boolean): boolean; +function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt; withGear: boolean): Word; begin Gear^.X:= Gear^.X + ShiftX; Gear^.Y:= Gear^.Y + int2hwFloat(ShiftY); @@ -340,7 +334,7 @@ Gear^.Y:= Gear^.Y - int2hwFloat(ShiftY) end; -function TestCollisionX(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionX(Gear: PGear; Dir: LongInt): Word; var x, y, i: LongInt; begin x:= hwRound(Gear^.X); @@ -349,22 +343,21 @@ else x:= x + Gear^.Radius; -TestCollisionX:= true; if (x and LAND_WIDTH_MASK) = 0 then begin y:= hwRound(Gear^.Y) - Gear^.Radius + 1; i:= y + Gear^.Radius * 2 - 2; repeat if (y and LAND_HEIGHT_MASK) = 0 then - if Land[y, x] > 255 then - exit; + if Land[y, x] and Gear^.CollisionMask > 255 then + exit(Land[y, x] and Gear^.CollisionMask); inc(y) until (y > i); end; -TestCollisionX:= false +TestCollisionX:= 0 end; -function TestCollisionY(Gear: PGear; Dir: LongInt): boolean; +function TestCollisionY(Gear: PGear; Dir: LongInt): Word; var x, y, i: LongInt; begin y:= hwRound(Gear^.Y); @@ -373,33 +366,32 @@ else y:= y + Gear^.Radius; -TestCollisionY:= true; if (y and LAND_HEIGHT_MASK) = 0 then begin x:= hwRound(Gear^.X) - Gear^.Radius + 1; i:= x + Gear^.Radius * 2 - 2; repeat if (x and LAND_WIDTH_MASK) = 0 then - if Land[y, x] > 255 then - exit; + if Land[y, x] and Gear^.CollisionMask > 255 then + exit(Land[y, x] and Gear^.CollisionMask); inc(x) until (x > i); end; -TestCollisionY:= false +TestCollisionY:= 0 end; -function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): boolean; inline; +function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): Word; inline; begin TestCollisionYwithXYShift:= TestCollisionYwithXYShift(Gear, ShiftX, ShiftY, Dir, true); end; -function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt; withGear: boolean): boolean; +function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt; withGear: boolean): Word; begin Gear^.X:= Gear^.X + int2hwFloat(ShiftX); Gear^.Y:= Gear^.Y + int2hwFloat(ShiftY); if withGear then - TestCollisionYwithXYShift:= TestCollisionYwithGear(Gear, Dir) <> 0 + TestCollisionYwithXYShift:= TestCollisionYwithGear(Gear, Dir) else TestCollisionYwithXYShift:= TestCollisionY(Gear, Dir); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uCommandHandlers.pas Tue Dec 17 00:02:52 2013 +0400 @@ -109,39 +109,6 @@ CurrentTeam^.ExtDriven:= true end; -procedure chGrave(var s: shortstring); -begin -if CurrentTeam = nil then - OutError(errmsgIncorrectUse + ' "/grave"', true); -if s[1]='"' then - Delete(s, 1, 1); -if s[byte(s[0])]='"' then - Delete(s, byte(s[0]), 1); -CurrentTeam^.GraveName:= s -end; - -procedure chFort(var s: shortstring); -begin -if CurrentTeam = nil then - OutError(errmsgIncorrectUse + ' "/fort"', true); -if s[1]='"' then - Delete(s, 1, 1); -if s[byte(s[0])]='"' then - Delete(s, byte(s[0]), 1); -CurrentTeam^.FortName:= s -end; - -procedure chFlag(var s: shortstring); -begin -if CurrentTeam = nil then - OutError(errmsgIncorrectUse + ' "/flag"', true); -if s[1]='"' then - Delete(s, 1, 1); -if s[byte(s[0])]='"' then - Delete(s, byte(s[0]), 1); -CurrentTeam^.flag:= s -end; - procedure chScript(var s: shortstring); begin if s[1]='"' then @@ -152,21 +119,6 @@ ScriptLoad(s) end; -procedure chSetHat(var s: shortstring); -begin -if (not isDeveloperMode) or (CurrentTeam = nil) then exit; -with CurrentTeam^ do - begin - if not CurrentHedgehog^.King then - if (s = '') - or (((GameFlags and gfKing) <> 0) and (s = 'crown')) - or ((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then - CurrentHedgehog^.Hat:= 'NoHat' - else - CurrentHedgehog^.Hat:= s - end; -end; - procedure chCurU_p(var s: shortstring); begin s:= s; // avoid compiler hint @@ -657,10 +609,26 @@ procedure chRotateMask(var s: shortstring); begin s:= s; // avoid compiler hint -if ((GameFlags and gfInvulnerable) = 0) then - cTagsMask:= cTagsMasks[cTagsMask] +// this is just for me, 'cause I thought it'd be fun. using the old precise + switch to keep it out of people's way +if LocalMessage and (gmPrecise or gmSwitch) = (gmPrecise or gmSwitch) then + begin + if UIDisplay <> uiNone then + UIDisplay:= uiNone + else UIDisplay:= uiAll + end +else if LocalMessage and gmPrecise = gmPrecise then + begin + if ((GameFlags and gfInvulnerable) = 0) then + cTagsMask:= cTagsMasks[cTagsMask] + else + cTagsMask:= cTagsMasksNoHealth[cTagsMask] + end else - cTagsMask:= cTagsMasksNoHealth[cTagsMask]; + begin + if UIDisplay <> uiNoTeams then + UIDisplay:= uiNoTeams + else UIDisplay:= uiAll + end end; procedure chSpeedup_p(var s: shortstring); @@ -827,7 +795,6 @@ RegisterVariable('setweap' , @chSetWeapon , false, true); //////// End top by freq analysis RegisterVariable('gencmd' , @chGenCmd , false); - RegisterVariable('flag' , @chFlag , false); RegisterVariable('script' , @chScript , false); RegisterVariable('proto' , @chCheckProto , true ); RegisterVariable('spectate', @chFastUntilLag , false); @@ -857,9 +824,6 @@ RegisterVariable('gmflags' , @chGameFlags , false); RegisterVariable('turntime', @chHedgehogTurnTime, false); RegisterVariable('minestime',@chMinesTime , false); - RegisterVariable('fort' , @chFort , false); - RegisterVariable('grave' , @chGrave , false); - RegisterVariable('hat' , @chSetHat , false); RegisterVariable('quit' , @chQuit , true ); RegisterVariable('forcequit', @chForceQuit , true ); RegisterVariable('confirm' , @chConfirm , true ); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGears.pas Tue Dec 17 00:02:52 2013 +0400 @@ -33,7 +33,7 @@ * effects are called "Visual Gears" and defined in the respective unit! *) interface -uses uConsts, uFloat, uTypes; +uses uConsts, uFloat, uTypes, uChat; procedure initModule; procedure freeModule; @@ -78,7 +78,7 @@ begin if (not isInMultiShoot) then inc(Gear^.Damage, Gear^.Karma); - if (Gear^.Damage <> 0) and (not Gear^.Invulnerable) then + if (Gear^.Damage <> 0) and ((Gear^.Hedgehog^.Effects[heInvulnerable] = 0)) then begin CheckNoDamage:= false; @@ -510,7 +510,7 @@ if (Gear <> nil) then begin if (GameFlags and gfInvulnerable) = 0 then - Gear^.Invulnerable:= false; + Gear^.Hedgehog^.Effects[heInvulnerable]:= 0; end; end; t:= GearsList; @@ -564,7 +564,7 @@ end; procedure AddMiscGears; -var i,rx, ry: Longword; +var p,i,j,rx, ry: Longword; rdx, rdy: hwFloat; Gear: PGear; begin @@ -599,11 +599,13 @@ Gear:= GearsList; if (GameFlags and gfInvulnerable) <> 0 then - while Gear <> nil do - begin - Gear^.Invulnerable:= true; // this is only checked on hogs right now, so no need for gear type check - Gear:= Gear^.NextGear - end; + for p:= 0 to Pred(ClansCount) do + with ClansArray[p]^ do + for j:= 0 to Pred(TeamsNumber) do + with Teams[j]^ do + for i:= 0 to cMaxHHIndex do + with Hedgehogs[i] do + Effects[heInvulnerable]:= 1; if (GameFlags and gfLaserSight) <> 0 then cLaserSighting:= true; @@ -622,7 +624,7 @@ snowRight:= max(LAND_WIDTH,4096)+512; snowLeft:= -(snowRight-LAND_WIDTH); -if (not hasBorder) and ((Theme = 'Snow') or (Theme = 'Christmas')) then +if (not hasBorder) and cSnow then for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LAND_HEIGHT + LongInt(GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0); end; @@ -882,9 +884,10 @@ Gear^.Hedgehog:= hh; Gear^.Text:= text; Gear^.FrameTicks:= x - end + end; + //ParseCommand('/say [' + hh^.Name + '] '+text, true) + AddChatString(#1+'[' + HH^.Name + '] '+text); end - //else ParseCommand('say ' + text, true) end else if (x >= 4) then begin diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsHandlers.pas --- a/hedgewars/uGearsHandlers.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsHandlers.pas Tue Dec 17 00:02:52 2013 +0400 @@ -61,7 +61,7 @@ begin Gear^.Tag := 0; Gear^.Y := Gear^.Y + int2hwFloat(yy); - if not TestCollisionXwithGear(Gear, xxn) then + if TestCollisionXwithGear(Gear, xxn) = 0 then begin Gear^.X := Gear^.X + int2hwFloat(xxn); NextAngle(Gear, dA) @@ -69,7 +69,7 @@ end; if (yy = 0) then - if TestCollisionXwithGear(Gear, xx) then + if TestCollisionXwithGear(Gear, xx) <> 0 then PrevAngle(Gear, dA) else begin diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsHandlersMess.pas Tue Dec 17 00:02:52 2013 +0400 @@ -208,7 +208,7 @@ if (gi^.Kind = gtHedgehog) then begin d := r - hwRound(Distance(gi^.X - x, gi^.Y - y)); - if (d > 1) and (not gi^.Invulnerable) and (GetRandom(2) = 0) then + if (d > 1) and ((gi^.Hedgehog^.Effects[heInvulnerable] = 0)) and (GetRandom(2) = 0) then begin if (CurrentHedgehog^.Gear = gi) then PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack) @@ -281,15 +281,18 @@ isFalling: boolean; //tmp: QWord; tX, tdX, tdY: hwFloat; - collV, collH: LongInt; - land: word; + collV, collH, gX, gY: LongInt; + land, xland: word; + boing: PVisualGear; begin tX:= Gear^.X; + gX:= hwRound(Gear^.X); + gY:= hwRound(Gear^.Y); if (Gear^.Kind <> gtGenericFaller) and WorldWrap(Gear) and (WorldEdge = weWrap) and (Gear^.AdvBounce <> 0) and - (TestCollisionXwithGear(Gear, 1) or TestCollisionXwithGear(Gear, -1)) then + ((TestCollisionXwithGear(Gear, 1) <> 0) or (TestCollisionXwithGear(Gear, -1) <> 0)) then begin Gear^.X:= tX; - Gear^.dX.isNegative:= (hwRound(tX) > leftX+Gear^.Radius*2) + Gear^.dX.isNegative:= (gX > leftX+Gear^.Radius*2) end; // clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems. @@ -298,7 +301,7 @@ if Gear^.dY.Round > 2 then Gear^.dY.QWordValue:= 8589934592; - if (Gear^.State and gstSubmersible <> 0) and (hwRound(Gear^.Y) > cWaterLine) then + if (Gear^.State and gstSubmersible <> 0) and (gY > cWaterLine) then begin Gear^.dX:= Gear^.dX * _0_999; Gear^.dY:= Gear^.dY * _0_999 @@ -311,8 +314,8 @@ tdY := Gear^.dY; // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips) - if (hwRound(Gear^.X) < min(LAND_WIDTH div -2, -2048)) - or (hwRound(Gear^.X) > max(LAND_WIDTH * 3 div 2, 6144)) then + if (gX < min(LAND_WIDTH div -2, -2048)) + or (gX > max(LAND_WIDTH * 3 div 2, 6144)) then Gear^.State := Gear^.State or gstCollision; if Gear^.dY.isNegative then @@ -323,15 +326,20 @@ begin collV := -1; if land and lfIce <> 0 then - Gear^.dX := Gear^.dX * (_0_9 + Gear^.Friction * _0_1) - else - Gear^.dX := Gear^.dX * Gear^.Friction; - - Gear^.dY := - Gear^.dY * Gear^.Elasticity; - Gear^.State := Gear^.State or gstCollision + Gear^.dX := Gear^.dX * (_0_9 + Gear^.Friction * _0_1) + else Gear^.dX := Gear^.dX * Gear^.Friction; + if (Gear^.AdvBounce = 0) or (land and lfBouncy = 0) then + begin + Gear^.dY := - Gear^.dY * Gear^.Elasticity; + Gear^.State := Gear^.State or gstCollision + end + else Gear^.dY := - Gear^.dY * cElastic end - else if (Gear^.AdvBounce=1) and (TestCollisionYwithGear(Gear, 1) <> 0) then - collV := 1; + else if Gear^.AdvBounce = 1 then + begin + land:= TestCollisionYwithGear(Gear, 1); + if land <> 0 then collV := 1 + end end else begin // Gear^.dY.isNegative is false @@ -345,34 +353,63 @@ else Gear^.dX := Gear^.dX * Gear^.Friction; - Gear^.dY := - Gear^.dY * Gear^.Elasticity; - Gear^.State := Gear^.State or gstCollision + if (Gear^.AdvBounce = 0) or (land and lfBouncy = 0) then + begin + Gear^.dY := - Gear^.dY * Gear^.Elasticity; + Gear^.State := Gear^.State or gstCollision + end + else Gear^.dY := - Gear^.dY * cElastic end else begin isFalling := true; - if (Gear^.AdvBounce=1) and (TestCollisionYwithGear(Gear, -1) <> 0) then - collV := -1 + if Gear^.AdvBounce = 1 then + begin + land:= TestCollisionYwithGear(Gear, -1); + if land <> 0 then collV := -1 + end end end; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then + xland:= TestCollisionXwithGear(Gear, hwSign(Gear^.dX)); + if xland <> 0 then begin collH := hwSign(Gear^.dX); - Gear^.dX := - Gear^.dX * Gear^.Elasticity; - Gear^.dY := Gear^.dY * Gear^.Elasticity; - Gear^.State := Gear^.State or gstCollision + if (Gear^.AdvBounce = 0) or (xland and lfBouncy = 0) then + begin + Gear^.dX := - Gear^.dX * Gear^.Elasticity; + Gear^.dY := Gear^.dY * Gear^.Elasticity; + Gear^.State := Gear^.State or gstCollision + end + else + begin + Gear^.dX := - Gear^.dX * cElastic; + Gear^.dY := Gear^.dY * cElastic + end end - else if (Gear^.AdvBounce=1) and TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)) then - collH := -hwSign(Gear^.dX); + else if Gear^.AdvBounce = 1 then + begin + xland:= TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)); + if xland <> 0 then collH := -hwSign(Gear^.dX) + end; //if Gear^.AdvBounce and (collV <>0) and (collH <> 0) and (hwSqr(tdX) + hwSqr(tdY) > _0_08) then - if (Gear^.AdvBounce=1) and (collV <>0) and (collH <> 0) and ((collV=-1) - or ((tdX.QWordValue + tdY.QWordValue) > _0_2.QWordValue)) then - begin - Gear^.dX := tdY*Gear^.Elasticity*Gear^.Friction; - Gear^.dY := tdX*Gear^.Elasticity; - //*Gear^.Friction; + if (collV <> 0) and (collH <> 0) and + (((Gear^.AdvBounce=1) and ((collV=-1) or ((tdX.QWordValue + tdY.QWordValue) > _0_2.QWordValue)))) then + //or ((xland or land) and lfBouncy <> 0)) then + begin + if (xland or land) and lfBouncy = 0 then + begin + Gear^.dX := tdY*Gear^.Elasticity*Gear^.Friction; + Gear^.dY := tdX*Gear^.Elasticity; + Gear^.State := Gear^.State or gstCollision + end + else + begin + Gear^.dX := tdY*cElastic*Gear^.Friction; + Gear^.dY := tdX*cElastic + end; + Gear^.dY.isNegative := not tdY.isNegative; isFalling := false; Gear^.AdvBounce := 10; @@ -397,7 +434,28 @@ else Gear^.State := Gear^.State or gstMoving; - if (Gear^.nImpactSounds > 0) and + if ((xland or land) and lfBouncy <> 0) and (Gear^.dX.QWordValue < _0_15.QWordValue) and (Gear^.dY.QWordValue < _0_15.QWordValue) then + Gear^.State := Gear^.State or gstCollision; + + if ((xland or land) and lfBouncy <> 0) and (Gear^.Radius >= 3) and + ((Gear^.dX.QWordValue > _0_15.QWordValue) or (Gear^.dY.QWordValue > _0_15.QWordValue)) then + begin + boing:= AddVisualGear(gX, gY, vgtStraightShot, 0, false, 1); + if boing <> nil then + with boing^ do + begin + Angle:= random(360); + dx:= 0; + dy:= 0; + FrameTicks:= 200; + tX:= _0; + tX.QWordValue:= Gear^.dY.QWordValue + Gear^.dX.QWordValue; + Scale:= hwFloat2Float(Gear^.Density * tX) / 1.5; + State:= ord(sprBoing) + end; + PlaySound(sndMelonImpact, true) + end + else if (Gear^.nImpactSounds > 0) and (Gear^.State and gstCollision <> 0) and (((Gear^.Kind <> gtMine) and (Gear^.Damage <> 0)) or (Gear^.State and gstMoving <> 0)) and (((Gear^.Radius < 3) and (Gear^.dY < -_0_1)) or @@ -871,11 +929,11 @@ AllInactive := false; if Gear^.dY.isNegative then - if TestCollisionY(Gear, -1) then + if TestCollisionY(Gear, -1) <> 0 then Gear^.dY := _0; if not Gear^.dY.isNegative then - if TestCollisionY(Gear, 1) then + if TestCollisionY(Gear, 1) <> 0 then begin Gear^.dY := - Gear^.dY * Gear^.Elasticity; if Gear^.dY > - _1div1024 then @@ -931,13 +989,24 @@ if Gear^.Timer = 0 then - Gear^.RenderTimer:= false + begin + // no "fuel"? just fall + doStepFallingGear(Gear); + // if drowning, stop bee sound + if (Gear^.State and gstDrowning) <> 0 then + StopSoundChan(Gear^.SoundChannel); + end else begin if (GameTicks and $F) = 0 then begin if (GameTicks and $30) = 0 then - AddVisualGear(gX, gY, vgtBeeTrace); + begin + if nuw then + AddVisualGear(gX, gY, vgtBubble) + else + AddVisualGear(gX, gY, vgtBeeTrace); + end; Gear^.dX := Gear^.Elasticity * (Gear^.dX + _0_000064 * (Gear^.Target.X - gX)); Gear^.dY := Gear^.Elasticity * (Gear^.dY + _0_000064 * (Gear^.Target.Y - gY)); // make sure new speed isn't higher than original one (which we stored in Friction variable) @@ -978,17 +1047,15 @@ end; if (Gear^.Timer > 0) then - dec(Gear^.Timer) - else - begin - Gear^.State:= Gear^.State and not gstSubmersible; - if nuw then - begin - StopSoundChan(Gear^.SoundChannel); - CheckGearDrowning(Gear); - end - else - doStepFallingGear(Gear); + begin + dec(Gear^.Timer); + if Gear^.Timer = 0 then + begin + // no need to display remaining time anymore + Gear^.RenderTimer:= false; + // bee can drown when timer reached 0 + Gear^.State:= Gear^.State and not gstSubmersible; + end; end; end; @@ -1656,12 +1723,14 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepSMine(Gear: PGear); + var land: Word; begin // TODO: do real calculation? - if TestCollisionXwithGear(Gear, 2) - or (TestCollisionYwithGear(Gear, -2) <> 0) - or TestCollisionXwithGear(Gear, -2) - or (TestCollisionYwithGear(Gear, 2) <> 0) then + land:= TestCollisionXwithGear(Gear, 2); + if land = 0 then land:= TestCollisionYwithGear(Gear,-2); + if land = 0 then land:= TestCollisionXwithGear(Gear,-2); + if land = 0 then land:= TestCollisionYwithGear(Gear, 2); + if (land <> 0) and (land and lfBouncy = 0) then begin if (not isZero(Gear^.dX)) or (not isZero(Gear^.dY)) then begin @@ -1688,24 +1757,23 @@ Gear^.State := Gear^.State or gstAttacking end else // gstAttacking <> 0 - begin + begin AllInactive := false; if Gear^.Timer = 0 then begin doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound); DeleteGear(Gear); exit - end else + end + else if (Gear^.Timer and $FF) = 0 then PlaySound(sndMineTick); - - dec(Gear^.Timer); + dec(Gear^.Timer); end - end + end else // gsttmpFlag = 0 - if (TurnTimeLeft = 0) - or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) - or (Gear^.Hedgehog^.Gear = nil) then + if ((GameFlags and gfInfAttack = 0) and ((TurnTimeLeft = 0) or (Gear^.Hedgehog^.Gear = nil))) + or ((GameFlags and gfInfAttack <> 0) and (GameTicks > Gear^.FlightTime)) then Gear^.State := Gear^.State or gsttmpFlag; end; @@ -1969,7 +2037,11 @@ procedure doStepTarget(Gear: PGear); begin if (Gear^.Timer = 0) and (Gear^.Tag = 0) then + begin PlaySound(sndWarp); + // workaround: save spawn Y for doStepCase (which is a mess atm) + Gear^.Angle:= hwRound(Gear^.Y); + end; if (Gear^.Tag = 0) and (Gear^.Timer < 1000) then inc(Gear^.Timer) @@ -2027,6 +2099,7 @@ for i:= 0 to 3 do begin + AddVisualGear(hwRound(Gear^.X) + hwSign(Gear^.dX) * (10 + 6 * i), hwRound(Gear^.Y) + 12 + Random(6), vgtDust); AmmoShove(Gear, 30, 25); Gear^.X := Gear^.X + Gear^.dX * 5 end; @@ -2297,7 +2370,7 @@ HHGear^.Y := HHGear^.Y + cGravity * 40; // don't drift into obstacles - if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then + if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) <> 0 then HHGear^.X := HHGear^.X - int2hwFloat(hwSign(HHGear^.dX)); HHGear^.Y := HHGear^.Y + cGravity * 100; Gear^.X := HHGear^.X; @@ -2413,6 +2486,7 @@ HHGear: PGear; x, y, tx, ty: hwFloat; rx: LongInt; + LandFlags: Word; begin AllInactive := false; @@ -2423,12 +2497,16 @@ y := HHGear^.Y; rx:= hwRound(x); + LandFlags:= 0; + if cIce then LandFlags:= lfIce + else if Gear^.AmmoType = amRubber then LandFlags:= lfBouncy; + if ((Distance(tx - x, ty - y) > _256) and ((WorldEdge <> weWrap) or ( (Distance(tx - int2hwFloat(rightX+(rx-leftX)), ty - y) > _256) and (Distance(tx - int2hwFloat(leftX-(rightX-rx)), ty - y) > _256) ))) - or (not TryPlaceOnLand(Gear^.Target.X - SpritesData[sprAmGirder].Width div 2, Gear^.Target.Y - SpritesData[sprAmGirder].Height div 2, sprAmGirder, Gear^.State, true, false)) then + or (not TryPlaceOnLand(Gear^.Target.X - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Width div 2, Gear^.Target.Y - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Height div 2, Ammoz[Gear^.AmmoType].PosSprite, Gear^.State, true, false, LandFlags)) then begin PlaySound(sndDenied); HHGear^.Message := HHGear^.Message and (not gmAttack); @@ -2826,7 +2904,7 @@ dmg:= dmgBase - max(hwRound(Distance(tdX, tdY)),gi^.Radius); if (dmg > 1) then dmg:= ModifyDamage(min(dmg div 2, cakeDmg), gi); if (dmg > 1) then - if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then + if (CurrentHedgehog^.Gear = gi) and ((gi^.Hedgehog^.Effects[heInvulnerable] = 0)) then gi^.State := gi^.State or gstLoser else gi^.State := gi^.State or gstWinner; @@ -3077,14 +3155,14 @@ tempColl:= Gear^.CollisionMask; Gear^.CollisionMask:= $007F; - if (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) <> 0) or TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) or (GameTicks > Gear^.FlightTime) then + if (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) <> 0) or (TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) <> 0) or (GameTicks > Gear^.FlightTime) then t := CheckGearsCollision(Gear) else t := nil; Gear^.CollisionMask:= tempColl; //fixes drill not exploding when touching HH bug if (Gear^.Timer = 0) or ((t <> nil) and (t^.Count <> 0)) - or ( ((Gear^.State and gsttmpFlag) = 0) and (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) = 0) and (not TestCollisionXWithGear(Gear, hwSign(Gear^.dX)))) + or ( ((Gear^.State and gsttmpFlag) = 0) and (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) = 0) and (TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) = 0)) // CheckLandValue returns true if the type isn't matched or (not CheckLandValue(hwRound(Gear^.X), hwRound(Gear^.Y), lfIndestructible)) then begin @@ -3098,7 +3176,7 @@ exit end - else if (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) = 0) and (not TestCollisionXWithGear(Gear, hwSign(Gear^.dX))) then + else if (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) = 0) and (TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) = 0) then begin StopSoundChan(Gear^.SoundChannel); Gear^.Tag := 1; @@ -3555,7 +3633,13 @@ HHGear := Gear^.Hedgehog^.Gear; if HHGear = nil then begin - DeleteGear(Gear); + Gear^.Timer := 0; + Gear^.State := Gear^.State or gstAnimation or gstTmpFlag; + Gear^.Timer := 0; + Gear^.doStep := @doStepBirdyDisappear; + CurAmmoGear := nil; + isCursorVisible := false; + AfterAttack; exit end; @@ -3657,14 +3741,21 @@ HHGear: PGear; begin if Gear^.Timer > 0 then - dec(Gear^.Timer, 1) - else if Gear^.Hedgehog^.Gear = nil then - begin - DeleteGear(Gear); + dec(Gear^.Timer, 1); + + HHGear := Gear^.Hedgehog^.Gear; + if HHGear = nil then + begin + Gear^.Timer := 0; + Gear^.State := Gear^.State or gstAnimation or gstTmpFlag; + Gear^.Timer := 0; + Gear^.doStep := @doStepBirdyDisappear; + CurAmmoGear := nil; + isCursorVisible := false; AfterAttack; exit end; - HHGear := Gear^.Hedgehog^.Gear; + HHGear^.Message := HHGear^.Message and (not (gmUp or gmPrecise or gmLeft or gmRight)); if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then begin @@ -4030,8 +4121,7 @@ iterator^.Radius := iterator^.Radius - 1; // check front - isCollision := TestCollisionY(iterator, sy) - or TestCollisionX(iterator, sx); + isCollision := (TestCollisionY(iterator, sy) <> 0) or (TestCollisionX(iterator, sx) <> 0); if not isCollision then begin @@ -4039,8 +4129,8 @@ // the square check won't check more pixels than we want to) iterator^.Radius := 1 + resetr div 2; rh := resetr div 4; - isCollision := TestCollisionYwithXYShift(iterator, 0, -sy * rh, sy, false) - or TestCollisionXwithXYShift(iterator, ox * rh, 0, sx, false); + isCollision := (TestCollisionYwithXYShift(iterator, 0, -sy * rh, sy, false) <> 0) + or (TestCollisionXwithXYShift(iterator, ox * rh, 0, sx, false) <> 0); end; iterator^.Radius := resetr; @@ -4734,7 +4824,7 @@ if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then begin //tmp^.State:= tmp^.State or gstFlatened; - if not tmp^.Invulnerable then + if (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then ApplyDamage(tmp, CurrentHedgehog, tmp^.Health div 3, dsUnknown); //DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3); tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0); @@ -5075,7 +5165,7 @@ while t <> nil do begin if (t^.Kind = gtHedgehog) and (t^.Hedgehog^.Team^.Clan = HH^.Team^.Clan) then - t^.Invulnerable:= true; + t^.Hedgehog^.Effects[heInvulnerable]:= 1; t:= t^.NextGear; end; end; @@ -5629,9 +5719,9 @@ begin tdX:= HHGear^.X-Gear^.X; dir:= hwSign(tdX); - if not TestCollisionX(Gear, dir) then + if TestCollisionX(Gear, dir) = 0 then Gear^.X:= Gear^.X + signAs(_1,tdX); - if TestCollisionXwithXYShift(Gear, signAs(_10,tdX), 0, dir) then + if TestCollisionXwithXYShift(Gear, signAs(_10,tdX), 0, dir) <> 0 then begin Gear^.dX:= SignAs(_0_15, tdX); Gear^.dY:= -_0_3; @@ -5670,9 +5760,9 @@ begin (*ox:= 0; oy:= 0; if TestCollisionYwithGear(Gear, -1) <> 0 then oy:= -1; - if TestCollisionXwithGear(Gear, 1) then ox:= 1; - if TestCollisionXwithGear(Gear, -1) then ox:= -1; - if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; + if TestCollisionXwithGear(Gear, 1) <> 0 then ox:= 1; + if TestCollisionXwithGear(Gear, -1) <> 0 then ox:= -1; + if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; if Gear^.Health > 0 then PlaySound(sndRopeAttach); @@ -5701,9 +5791,9 @@ end else if GameTicks and $3F = 0 then begin - if (TestCollisionYwithGear(Gear, -1) = 0) - and (not TestCollisionXwithGear(Gear, 1)) - and (not TestCollisionXwithGear(Gear, -1)) + if (TestCollisionYwithGear(Gear,-1) = 0) + and (TestCollisionXwithGear(Gear, 1) = 0) + and (TestCollisionXwithGear(Gear,-1) = 0) and (TestCollisionYwithGear(Gear, 1) = 0) then Gear^.State:= Gear^.State and (not gstCollision) or gstMoving; end end; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsHandlersRope.pas Tue Dec 17 00:02:52 2013 +0400 @@ -36,7 +36,7 @@ HHGear := Gear^.Hedgehog^.Gear; tX:= HHGear^.X; if WorldWrap(HHGear) and (WorldEdge = weWrap) and - (TestCollisionXwithGear(HHGear, 1) or TestCollisionXwithGear(HHGear, -1)) then + ((TestCollisionXwithGear(HHGear, 1) <> 0) or (TestCollisionXwithGear(HHGear, -1) <> 0)) then begin HHGear^.X:= tX; HHGear^.dX.isNegative:= (hwRound(tX) > leftX+HHGear^.Radius*2) @@ -62,7 +62,7 @@ HedgehogChAngle(HHGear); - if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then + if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) <> 0 then SetLittle(HHGear^.dX); if HHGear^.dY.isNegative and (TestCollisionYwithGear(HHGear, -1) <> 0) then @@ -127,7 +127,7 @@ tX:= HHGear^.X; if WorldWrap(HHGear) and (WorldEdge = weWrap) and - (TestCollisionXwithGear(HHGear, 1) or TestCollisionXwithGear(HHGear, -1)) then + ((TestCollisionXwithGear(HHGear, 1) <> 0) or (TestCollisionXwithGear(HHGear, -1) <> 0)) then begin PlaySound(sndRopeRelease); RopeDeleteMe(Gear, HHGear); @@ -147,17 +147,17 @@ HHGear^.dX.QWordValue:= HHGear^.dX.QWordValue shl 2; HHGear^.dY.QWordValue:= HHGear^.dY.QWordValue shl 2; - if (Gear^.Message and gmLeft <> 0) and (not TestCollisionXwithGear(HHGear, -1)) then + if (Gear^.Message and gmLeft <> 0) and (TestCollisionXwithGear(HHGear, -1) = 0) then HHGear^.dX := HHGear^.dX - _0_0032; - if (Gear^.Message and gmRight <> 0) and (not TestCollisionXwithGear(HHGear, 1)) then + if (Gear^.Message and gmRight <> 0) and (TestCollisionXwithGear(HHGear, 1) = 0) then HHGear^.dX := HHGear^.dX + _0_0032; // vector between hedgehog and rope attaching point ropeDx := HHGear^.X - Gear^.X; ropeDy := HHGear^.Y - Gear^.Y; - if TestCollisionYwithGear(HHGear, 1) = 0 then + if TestCollisionYwithXYShift(HHGear, 0, 1, 1) = 0 then begin // depending on the rope vector we know which X-side to check for collision @@ -168,12 +168,12 @@ cd:= 1; // apply gravity if there is no obstacle - if not TestCollisionXwithGear(HHGear, cd) then + if TestCollisionXwithXYShift(HHGear, _2*cd, 0, cd, true) = 0 then HHGear^.dY := HHGear^.dY + cGravity * 16; if (GameFlags and gfMoreWind) <> 0 then // apply wind if there's no obstacle - if not TestCollisionXwithGear(HHGear, hwSign(cWindSpeed)) then + if TestCollisionXwithGear(HHGear, hwSign(cWindSpeed)) = 0 then HHGear^.dX := HHGear^.dX + cWindSpeed * 16 / HHGear^.Density; end; @@ -193,13 +193,13 @@ ty := HHGear^.Y; if ((Gear^.Message and gmDown) <> 0) and (Gear^.Elasticity < Gear^.Friction) then - if not (TestCollisionXwithGear(HHGear, hwSign(ropeDx)) - or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, hwSign(ropeDy)))) then + if not ((TestCollisionXwithXYShift(HHGear, _2*hwSign(ropeDx), 0, hwSign(ropeDx), true) <> 0) + or ((ropeDy.QWordValue <> 0) and (TestCollisionYwithXYShift(HHGear, 0, 1*hwSign(ropeDy), hwSign(ropeDy)) <> 0))) then Gear^.Elasticity := Gear^.Elasticity + _1_2; if ((Gear^.Message and gmUp) <> 0) and (Gear^.Elasticity > _30) then - if not (TestCollisionXwithGear(HHGear, -hwSign(ropeDx)) - or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, -hwSign(ropeDy)))) then + if not ((TestCollisionXwithXYShift(HHGear, -_2*hwSign(ropeDx), 0, -hwSign(ropeDx), true) <> 0) + or ((ropeDy.QWordValue <> 0) and (TestCollisionYwithXYShift(HHGear, 0, 1*-hwSign(ropeDy), -hwSign(ropeDy)) <> 0))) then Gear^.Elasticity := Gear^.Elasticity - _1_2; HHGear^.X := Gear^.X + mdX * Gear^.Elasticity; @@ -315,12 +315,12 @@ end; haveCollision := false; - if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then + if TestCollisionXwithXYShift(HHGear, _2*hwSign(HHGear^.dX), 0, hwSign(HHGear^.dX), true) <> 0 then begin HHGear^.dX := -_0_6 * HHGear^.dX; haveCollision := true end; - if TestCollisionYwithXYShift(HHGear, 0, 1, hwSign(HHGear^.dY)) then + if TestCollisionYwithXYShift(HHGear, 0, 1*hwSign(HHGear^.dY), hwSign(HHGear^.dY)) <> 0 then begin HHGear^.dY := -_0_6 * HHGear^.dY; haveCollision := true @@ -418,7 +418,7 @@ if (HHGear^.State and gstMoving) <> 0 then begin - if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then + if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) <> 0 then SetLittle(HHGear^.dX); if HHGear^.dY.isNegative and (TestCollisionYwithGear(HHGear, -1) <> 0) then HHGear^.dY := _0; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsHedgehog.pas Tue Dec 17 00:02:52 2013 +0400 @@ -20,7 +20,7 @@ unit uGearsHedgehog; interface -uses uTypes; +uses uTypes, uGearsHandlersMess; procedure doStepHedgehog(Gear: PGear); procedure AfterAttack; @@ -65,7 +65,7 @@ HHGear^.Message:= HHGear^.Message and (not gmSlot); prevAmmo:= CurAmmoType; ammoidx:= 0; - if ((HHGear^.State and (gstAttacking or gstAttacked)) <> 0) + if (((HHGear^.State and (gstAttacking or gstAttacked)) <> 0) and (GameFlags and gfInfAttack = 0)) or ((HHGear^.State and gstHHDriven) = 0) then exit; ChangeAmmo:= true; @@ -140,6 +140,7 @@ weap: TAmmoType; Hedgehog: PHedgehog; s: boolean; + prevState, newState: LongWord; begin s:= false; @@ -155,12 +156,18 @@ HHGear^.Message:= HHGear^.Message and (not gmWeapon); +prevState:= HHGear^.State; +newState:= prevState; with Hedgehog^ do while (CurAmmoType <> weap) and (t >= 0) do begin s:= ChangeAmmo(HHGear); + if HHGear^.State <> prevState then // so we can keep gstAttacked out of consideration when looping + newState:= HHGear^.State; + HHGear^.State:= prevState; dec(t) end; +HHGear^.State:= newState; if s then ApplyAmmoChanges(HHGear^.Hedgehog^) @@ -346,6 +353,10 @@ amNapalm: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0); amBlowTorch: newGear:= AddGear(hwRound(lx), hwRound(ly), gtBlowTorch, 0, SignAs(_0_5, dX), _0, 0); amGirder: newGear:= AddGear(0, 0, gtGirder, CurWeapon^.Pos, _0, _0, 0); + amRubber: begin + newGear:= AddGear(0, 0, gtGirder, CurWeapon^.Pos, _0, _0, 0); + newGear^.AmmoType:= amRubber + end; amTeleport: newGear:= AddGear(CurWeapon^.Pos, 0, gtTeleport, 0, _0, _0, 0); amSwitch: newGear:= AddGear(hwRound(lx), hwRound(ly), gtSwitcher, 0, _0, _0, 0); amMortar: begin @@ -377,7 +388,7 @@ PlaySound(sndHellishImpact4); cDamageModifier:= _1_5 end; - amInvulnerable: Invulnerable:= true; + amInvulnerable: Effects[heInvulnerable]:= 1; amExtraTime: begin PlaySound(sndSwitchHog); TurnTimeLeft:= TurnTimeLeft + 30000 @@ -437,7 +448,7 @@ amFlamethrower, amLandGun, amResurrector, //amStructure, amTardis, amPiano, - amIceGun: CurAmmoGear:= newGear; + amIceGun, amRubber: CurAmmoGear:= newGear; end; if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then @@ -760,13 +771,13 @@ Gear^.Message:= Gear^.Message and (not gmLJump); DeleteCI(Gear); if TestCollisionYwithGear(Gear, -1) = 0 then - if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then + if TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) = 0 then Gear^.Y:= Gear^.Y - _2 else - if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then + if TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) = 0 then Gear^.Y:= Gear^.Y - _1; - if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) - or (TestCollisionYwithGear(Gear, -1) <> 0)) then + if (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.dY:= -_0_15; if not cArtillery then @@ -854,11 +865,21 @@ Gear^.State:= Gear^.State and (not gstMoving); exit end; -isFalling:= (Gear^.dY.isNegative) or (not TestCollisionYKick(Gear, 1)); +isFalling:= (Gear^.dY.isNegative) or (TestCollisionYKick(Gear, 1) = 0); if isFalling then begin - if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then - Gear^.dY:= _0; + land:= TestCollisionYKick(Gear, -1); + if (Gear^.dY.isNegative) and (land <> 0) then + begin + if land and lfBouncy <> 0 then + begin + doStepFallingGear(Gear); + Gear^.dX:= Gear^.dX * _0_8 + end; + if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then + Gear^.dY:= _0; + Gear^.State:= Gear^.State and not gstCollision + end; Gear^.State:= Gear^.State or gstMoving; if (CurrentHedgehog^.Gear = Gear) and (CurrentHedgehog^.Gear^.State and gstHHDriven <> 0) and (not CurrentTeam^.ExtDriven) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then @@ -883,19 +904,36 @@ else begin land:= TestCollisionYwithGear(Gear, 1); - if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue) and ((land and lfIce) = 0) + if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue) and ((land and lfIce) = 0) + and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); if not Gear^.dY.isNegative then begin + if land and lfBouncy <> 0 then + begin + doStepFallingGear(Gear); + // hogs for some reason have very low friction. slippery little buggers + Gear^.dX:= Gear^.dX * _0_8 + end; + CheckHHDamage(Gear); - if ((Gear^.State and gstHHHJump) <> 0) and (not cArtillery) - and (Gear^.dX.QWordValue < _0_02.QWordValue) then - Gear^.dX.isNegative:= not Gear^.dX.isNegative; // landing after high jump - Gear^.State:= Gear^.State and (not (gstHHJumping or gstHHHJump)); - Gear^.dY:= _0; + if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then + begin + if ((Gear^.State and gstHHHJump) <> 0) and (not cArtillery) + and (Gear^.dX.QWordValue < _0_02.QWordValue) then + begin + if land and lfBouncy <> 0 then + Gear^.dY:= _0; + Gear^.dX.isNegative:= not Gear^.dX.isNegative // landing after high jump + end; + Gear^.State:= Gear^.State and (not (gstHHJumping or gstHHHJump)); + if (land and lfBouncy = 0) or (Gear^.dX.QWordValue < _0_02.QWordValue) then + Gear^.dY:= _0 + end; + Gear^.State:= Gear^.State and not gstCollision end else Gear^.dY:= Gear^.dY + cGravity; @@ -921,43 +959,43 @@ end; if (Gear^.State and gstMoving) <> 0 then - if TestCollisionXKick(Gear, hwSign(Gear^.dX)) then + if TestCollisionXKick(Gear, hwSign(Gear^.dX)) <> 0 then if not isFalling then if hwAbs(Gear^.dX) > _0_01 then - if not (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -1, hwSign(Gear^.dX)) or - (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1))) then + if (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -1, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1) = 0) then begin Gear^.X:= Gear^.X + Gear^.dX; Gear^.dX:= Gear^.dX * _0_96; Gear^.Y:= Gear^.Y - _1 end else - if not (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -2, hwSign(Gear^.dX)) or - (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1))) then + if (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -2, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1) = 0) then begin Gear^.X:= Gear^.X + Gear^.dX; Gear^.dX:= Gear^.dX * _0_93; Gear^.Y:= Gear^.Y - _2 end else - if not (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -3, hwSign(Gear^.dX)) or - (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1))) then + if (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -3, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1) = 0) then begin Gear^.X:= Gear^.X + Gear^.dX; Gear^.dX:= Gear^.dX * _0_9 ; Gear^.Y:= Gear^.Y - _3 end else - if not (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -4, hwSign(Gear^.dX)) or - (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1))) then + if (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -4, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1) = 0) then begin Gear^.X:= Gear^.X + Gear^.dX; Gear^.dX:= Gear^.dX * _0_87; Gear^.Y:= Gear^.Y - _4 end else - if not (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -5, hwSign(Gear^.dX)) or - (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1))) then + if (TestCollisionXwithXYShift(Gear, int2hwFloat(hwSign(Gear^.dX)) - Gear^.dX, -5, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithXYShift(Gear, hwSign(Gear^.dX) - hwRound(Gear^.dX), -1, -1) = 0) then begin Gear^.X:= Gear^.X + Gear^.dX; Gear^.dX:= Gear^.dX * _0_84; @@ -1008,12 +1046,19 @@ // ARTILLERY but not being moved by explosions Gear^.X:= Gear^.X + Gear^.dX; Gear^.Y:= Gear^.Y + Gear^.dY; - if (not Gear^.dY.isNegative) and (not TestCollisionYKick(Gear, 1)) - and TestCollisionYwithXYShift(Gear, 0, 1, 1) then + if (not Gear^.dY.isNegative) and (TestCollisionYKick(Gear, 1) = 0) then begin - CheckHHDamage(Gear); - Gear^.dY:= _0; - Gear^.Y:= Gear^.Y + _1 + land:= TestCollisionYwithXYShift(Gear, 0, 1, 1); + if land and lfBouncy <> 0 then + doStepFallingGear(Gear); + + if (land <> 0) and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) then + begin + CheckHHDamage(Gear); + Gear^.dY:= _0; + Gear^.Y:= Gear^.Y + _1 + end; + Gear^.State:= Gear^.State and not gstCollision end; CheckGearDrowning(Gear); @@ -1157,7 +1202,7 @@ HHGear^.Message:= HHGear^.Message and (not (gmLJump or gmHJump)); - if (not cArtillery) and wasJumping and TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then + if (not cArtillery) and wasJumping and (TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) <> 0) then SetLittle(HHGear^.dX); if Hedgehog^.Gear <> nil then @@ -1301,7 +1346,7 @@ if (WorldEdge <> weBounce) and (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.Kind =gtRope) and (CurAmmoGear^.Elasticity <> _0) then CurAmmoGear^.PortalCounter:= 1; - if (WorldEdge = weWrap) and (TestCollisionXwithGear(Gear, 1) or TestCollisionXwithGear(Gear, -1)) then + if (WorldEdge = weWrap) and ((TestCollisionXwithGear(Gear, 1) <> 0) or (TestCollisionXwithGear(Gear, -1) <> 0)) then begin Gear^.X:= tX; Gear^.dX.isNegative:= (hwRound(tX) > leftX+Gear^.Radius*2) diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsList.pas Tue Dec 17 00:02:52 2013 +0400 @@ -236,16 +236,20 @@ gear^.Hedgehog^.Effects[heResurrectable] := 1; end; gtShell: begin + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; gear^.Radius:= 4; gear^.Density:= _1; + gear^.AdvBounce:= 1; end; gtSnowball: begin gear^.ImpactSound:= sndMudballImpact; gear^.nImpactSounds:= 1; gear^.Radius:= 4; - gear^.Elasticity:= _1; - gear^.Friction:= _1; gear^.Density:= _0_5; + gear^.AdvBounce:= 1; + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; end; gtFlake: begin @@ -327,9 +331,13 @@ gear^.Elasticity:= _0_55; gear^.Friction:= _0_995; gear^.Density:= _1_6; + gear^.AdvBounce:= 1; if gear^.Timer = 0 then gear^.Timer:= 500; end; gtKnife: begin + gear^.AdvBounce:= 1; + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; gear^.Density:= _4; gear^.Radius:= 7 end; @@ -341,6 +349,7 @@ if gear^.Timer = 0 then gear^.Timer:= 500 end; gtExplosives: begin + gear^.AdvBounce:= 1; gear^.ImpactSound:= sndGrenadeImpact; gear^.nImpactSounds:= 1; gear^.Radius:= 16; @@ -366,6 +375,9 @@ if gear^.Timer = 0 then gear^.Timer:= 5000; end; gtCluster: begin + gear^.AdvBounce:= 1; + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; gear^.Radius:= 2; gear^.Density:= _1_5; gear^.RenderTimer:= true @@ -409,6 +421,7 @@ gear^.Z:= cCurrHHZ+1; end; gtMortar: begin + gear^.AdvBounce:= 1; gear^.Radius:= 4; gear^.Elasticity:= _0_2; gear^.Friction:= _0_08; @@ -443,6 +456,9 @@ if gear^.Timer = 0 then gear^.Timer:= 5000 end; gtDrill: begin + gear^.AdvBounce:= 1; + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; if gear^.Timer = 0 then gear^.Timer:= 5000; // Tag for drill strike. if 1 then first impact occured already @@ -484,6 +500,7 @@ gear^.FlightTime := 2; end; gtEgg: begin + gear^.AdvBounce:= 1; gear^.Radius:= 4; gear^.Elasticity:= _0_6; gear^.Friction:= _0_96; @@ -534,6 +551,9 @@ gear^.Tag := 47; end; gtNapalmBomb: begin + gear^.AdvBounce:= 1; + gear^.Elasticity:= _0_8; + gear^.Friction:= _0_8; if gear^.Timer = 0 then gear^.Timer:= 1000; gear^.Radius:= 5; gear^.Density:= _1_5; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsRender.pas Tue Dec 17 00:02:52 2013 +0400 @@ -673,6 +673,7 @@ DrawSpriteRotated(sprHandPlane, hx, hy, sign, 0); defaultPos:= false end; + amRubber, amGirder: begin DrawSpriteRotated(sprHandConstruction, hx, hy, sign, aangle); if WorldEdge = weWrap then @@ -948,7 +949,7 @@ DrawSprite(sprVampiric, sx - 24, sy - 24, 0); end; - if Gear^.Invulnerable then + if (Gear^.Hedgehog^.Effects[heInvulnerable] <> 0) then begin Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750)))); DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uGearsUtils.pas Tue Dec 17 00:02:52 2013 +0400 @@ -135,7 +135,7 @@ //AddFileLog('Damage: ' + inttostr(dmg)); if (Mask and EXPLNoDamage) = 0 then begin - if not Gear^.Invulnerable then + if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then ApplyDamage(Gear, AttackingHog, dmg, dsExplosion) else Gear^.State:= Gear^.State or gstWinner; @@ -148,12 +148,12 @@ Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); - if not Gear^.Invulnerable then + if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); Gear^.Active:= true; if Gear^.Kind <> gtFlame then FollowGear:= Gear end; - if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (not Gear^.Invulnerable) and ((Gear^.State and gstHHDeath) = 0) then + if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) and (Gear^.State and gstHHDeath = 0) then Gear^.Hedgehog^.Effects[hePoisoned] := 1; end; @@ -249,9 +249,8 @@ end; end end; - if ((GameFlags and gfKarma) <> 0) and - ((GameFlags and gfInvulnerable) = 0) - and (not CurrentHedgehog^.Gear^.Invulnerable) then + if (GameFlags and gfKarma <> 0) and (GameFlags and gfInvulnerable = 0) and + (CurrentHedgehog^.Effects[heInvulnerable] = 0) then begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); CurrentHedgehog^.Gear^.LastDamage := CurrentHedgehog; @@ -322,7 +321,7 @@ particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480); end; - if (Gear^.Invulnerable) then + if ((Gear^.Hedgehog^.Effects[heInvulnerable] <> 0)) then exit; //if _0_6 < Gear^.dY then @@ -705,7 +704,7 @@ procedure CheckCollision(Gear: PGear); inline; begin - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) + if (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0) or (TestCollisionYwithGear(Gear, hwSign(Gear^.dY)) <> 0) then Gear^.State := Gear^.State or gstCollision else @@ -714,8 +713,8 @@ procedure CheckCollisionWithLand(Gear: PGear); inline; begin - if TestCollisionX(Gear, hwSign(Gear^.dX)) - or TestCollisionY(Gear, hwSign(Gear^.dY)) then + if (TestCollisionX(Gear, hwSign(Gear^.dX)) <> 0) + or (TestCollisionY(Gear, hwSign(Gear^.dY)) <> 0) then Gear^.State := Gear^.State or gstCollision else Gear^.State := Gear^.State and (not gstCollision) @@ -723,25 +722,25 @@ function MakeHedgehogsStep(Gear: PGear) : boolean; begin - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then if (TestCollisionYwithGear(Gear, -1) = 0) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then if (TestCollisionYwithGear(Gear, -1) = 0) then begin Gear^.Y:= Gear^.Y - _1; - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then Gear^.Y:= Gear^.Y + _6 end else Gear^.Y:= Gear^.Y + _5 else end else Gear^.Y:= Gear^.Y + _4 else @@ -750,7 +749,7 @@ end else Gear^.Y:= Gear^.Y + _1 end; - if not TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0 then begin Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); MakeHedgehogsStep:= true @@ -823,7 +822,7 @@ end; if dmg > 0 then begin - if (not t^.Invulnerable) then + if t^.Hedgehog^.Effects[heInvulnerable] = 0 then ApplyDamage(t, Gear^.Hedgehog, dmg, dsBullet) else Gear^.State:= Gear^.State or gstWinner; @@ -919,7 +918,7 @@ Ammo^.Timer:= 0; exit; end; - if (not Gear^.Invulnerable) then + if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then begin if (Ammo^.Kind = gtKnife) and (tmpDmg > 0) then for j:= 1 to max(1,min(3,tmpDmg div 5)) do @@ -969,16 +968,16 @@ Gear^.State:= Gear^.State or gstMoving; if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); // move the gear upwards a bit to throw it over tiny obstacles at start - if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then + if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then begin - if not (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX)) - or (TestCollisionYwithGear(Gear, -1) <> 0)) then + if (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithGear(Gear, -1) = 0) then Gear^.Y:= Gear^.Y - _1; - if not (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) - or (TestCollisionYwithGear(Gear, -1) <> 0)) then + if (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithGear(Gear, -1) = 0) then Gear^.Y:= Gear^.Y - _1; - if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) - or (TestCollisionYwithGear(Gear, -1) <> 0)) then + if (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) = 0) and + (TestCollisionYwithGear(Gear, -1) = 0) then Gear^.Y:= Gear^.Y - _1; end end; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uInputHandler.pas --- a/hedgewars/uInputHandler.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uInputHandler.pas Tue Dec 17 00:02:52 2013 +0400 @@ -137,7 +137,9 @@ Trusted:= (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0); - +// REVIEW OR FIXME +// ctrl/cmd + q to close engine and frontend - this seems like a bad idea, since we let people set arbitrary binds, and don't warn them of this. +// There's no confirmation at all // ctrl/cmd + q to close engine and frontend if(KeyDown and (code = SDLK_q)) then begin @@ -176,18 +178,30 @@ if KeyDown then begin + if CurrentBinds[code] = 'switch' then + LocalMessage:= LocalMessage or gmSwitch + else if CurrentBinds[code] = '+precise' then + LocalMessage:= LocalMessage or gmPrecise; + ParseCommand(CurrentBinds[code], Trusted); if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true) end else if (CurrentBinds[code][1] = '+') then begin + if CurrentBinds[code] = '+precise' then + LocalMessage:= LocalMessage and not(gmPrecise); s:= CurrentBinds[code]; s[1]:= '-'; ParseCommand(s, Trusted); if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true) - end; + end + else + begin + if CurrentBinds[code] = 'switch' then + LocalMessage:= LocalMessage and not(gmSwitch) + end end end; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uLandGraphics.pas Tue Dec 17 00:02:52 2013 +0400 @@ -47,7 +47,8 @@ procedure DrawThickLine(X1, Y1, X2, Y2, radius: LongInt; color: Longword); procedure DumpLandToLog(x, y, r: LongInt); procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint); -function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; indestructible: boolean): boolean; +function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline; +function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean; LandFlags: Word): boolean; implementation uses SDLh, uLandTexture, uVariables, uUtils, uDebug; @@ -585,7 +586,12 @@ UpdateLandTexture(tx, ddx, ty, ddy, false) end; -function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; indestructible: boolean): boolean; +function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline; +begin +TryPlaceOnLand:= TryPlaceOnLand(cpX, cpY, Obj, Frame, doPlace, indestructible, 0); +end; + +function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean; LandFlags: Word): boolean; var X, Y, bpp, h, w, row, col, gx, gy, numFramesFirstCol: LongInt; p: PByteArray; Image: PSDL_Surface; @@ -650,15 +656,12 @@ gY:= (cpY + y) div 2; end; if indestructible then - Land[cpY + y, cpX + x]:= lfIndestructible + Land[cpY + y, cpX + x]:= lfIndestructible or LandFlags else if (LandPixels[gY, gX] and AMask) shr AShift = 255 then // This test assumes lfBasic and lfObject differ only graphically - Land[cpY + y, cpX + x]:= lfBasic + Land[cpY + y, cpX + x]:= lfBasic or LandFlags else - Land[cpY + y, cpX + x]:= lfObject; - // For testing only. Intent is to flag this on objects with masks, or use it for an ice ray gun - if (Theme = 'Snow') or (Theme = 'Christmas') then - Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or lfIce; - LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^ + Land[cpY + y, cpX + x]:= lfObject or LandFlags; + LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^ end; p:= @(p^[Image^.pitch]); end; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uLandObjects.pas Tue Dec 17 00:02:52 2013 +0400 @@ -26,7 +26,7 @@ procedure FreeLandObjects(); procedure LoadThemeConfig; procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface); inline; -procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; extraFlags: Word); +procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; LandFlags: Word); procedure BlitImageUsingMask(cpX, cpY: Longword; Image, Mask: PSDL_Surface); procedure AddOnLandObjects(Surface: PSDL_Surface); procedure SetLand(var LandWord: Word; Pixel: LongWord); inline; @@ -95,7 +95,7 @@ BlitImageAndGenerateCollisionInfo(cpX, cpY, Width, Image, 0); end; -procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; extraFlags: Word); +procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; LandFlags: Word); var p: PLongwordArray; x, y: Longword; bpp: LongInt; @@ -128,10 +128,7 @@ LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; if (Land[cpY + y, cpX + x] <= lfAllObjMask) and ((p^[x] and AMask) <> 0) then - begin - Land[cpY + y, cpX + x]:= lfObject; - Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags - end; + Land[cpY + y, cpX + x]:= lfObject or LandFlags end; p:= @(p^[Image^.pitch shr 2]) end; @@ -280,8 +277,7 @@ rr.x:= x1; while rr.x < x2 do begin - // For testing only. Intent is to flag this on objects with masks, or use it for an ice ray gun - if (Theme = 'Snow') or (Theme = 'Christmas') then + if cIce then BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf, lfIce) else BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf); @@ -500,7 +496,7 @@ s:= cPathz[ptCurrTheme] + '/' + cThemeCFGFilename; WriteLnToConsole('Reading objects info...'); f:= pfsOpenRead(s); -TryDo(f <> nil, 'Bad data or cannot access file ' + cThemeCFGFilename, true); +TryDo(f <> nil, 'Bad data or cannot access file ' + s, true); ThemeObjects.Count:= 0; SprayObjects.Count:= 0; @@ -710,6 +706,10 @@ cFlattenFlakes:= true else if key = 'flatten-clouds' then cFlattenClouds:= true + else if key = 'ice' then + cIce:= true + else if key = 'snow' then + cSnow:= true else if key = 'sd-water-top' then begin i:= Pos(',', s); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uRender.pas --- a/hedgewars/uRender.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uRender.pas Tue Dec 17 00:02:52 2013 +0400 @@ -335,6 +335,9 @@ if (X + SpritesData[Sprite].Width > RightX) then r.w:= RightX - X + 1; +if (r.h < r.y) or (r.w < r.x) then + exit; + dec(r.h, r.y); dec(r.w, r.x); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uScript.pas Tue Dec 17 00:02:52 2013 +0400 @@ -80,7 +80,7 @@ uRenderUtils, uTextures, uLandGraphics, - SysUtils, + SysUtils, uIO, uVisualGearsList, uGearsHandlersMess, @@ -98,7 +98,8 @@ procedure ScriptPrepareAmmoStore; forward; procedure ScriptApplyAmmoStore; forward; -procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); forward; +procedure ScriptSetAmmo(ammo : TAmmoType; count, probability, delay, reinforcement: Byte); forward; +procedure ScriptSetAmmoDelay(ammo : TAmmoType; delay: Byte); forward; procedure LuaError(s: shortstring); begin @@ -106,6 +107,12 @@ AddChatString(#5 + s); end; +procedure LuaParameterCountError(call, paramsyntax: shortstring; wrongcount: LongInt); +begin + // TODO: i18n? + LuaError('Lua: Wrong number of parameters (' + inttostr(wrongcount) + ') passed to ' + call + '! syntax: ' + call + ' ( ' + paramsyntax + ' )'); +end; + // wrapped calls // // functions called from Lua: @@ -115,9 +122,9 @@ function lc_band(L: PLua_State): LongInt; Cdecl; begin - if lua_gettop(L) <> 2 then + if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to band!'); + LuaParameterCountError('band', 'value1, value2', lua_gettop(L)); lua_pushnil(L); end else @@ -127,9 +134,9 @@ function lc_bor(L: PLua_State): LongInt; Cdecl; begin - if lua_gettop(L) <> 2 then + if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to bor!'); + LuaParameterCountError('bor', 'value1, value2', lua_gettop(L)); lua_pushnil(L); end else @@ -139,9 +146,9 @@ function lc_bnot(L: PLua_State): LongInt; Cdecl; begin - if lua_gettop(L) <> 1 then + if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to bnot!'); + LuaParameterCountError('bnot', 'value', lua_gettop(L)); lua_pushnil(L); end else @@ -151,9 +158,9 @@ function lc_div(L: PLua_State): LongInt; Cdecl; begin - if lua_gettop(L) <> 2 then + if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to div!'); + LuaParameterCountError('div', 'dividend, divisor', lua_gettop(L)); lua_pushnil(L); end else @@ -164,7 +171,7 @@ function lc_getinputmask(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 0 then - LuaError('Lua: Wrong number of parameters passed to GetInputMask!') + LuaParameterCountError('GetInputMask', '', lua_gettop(L)) else lua_pushinteger(L, InputMask); lc_getinputmask:= 1 @@ -173,7 +180,7 @@ function lc_setinputmask(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to SetInputMask!') + LuaParameterCountError('SetInputMask', 'mask', lua_gettop(L)) else InputMask:= lua_tointeger(L, 1); lc_setinputmask:= 0 @@ -186,7 +193,7 @@ WriteLnToConsole('Lua: ' + lua_tostring(L ,1)); end else - LuaError('Lua: Wrong number of parameters passed to WriteLnToConsole!'); + LuaParameterCountError('WriteLnToConsole', 'string', lua_gettop(L)); lc_writelntoconsole:= 0; end; @@ -206,7 +213,7 @@ end else - LuaError('Lua: Wrong number of parameters passed to ParseCommand!'); + LuaParameterCountError('ParseCommand', 'string', lua_gettop(L)); lc_parsecommand:= 0; end; @@ -217,7 +224,7 @@ ShowMission(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4), lua_tointeger(L, 5)); end else - LuaError('Lua: Wrong number of parameters passed to ShowMission!'); + LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L)); lc_showmission:= 0; end; @@ -264,7 +271,7 @@ AddCaption(lua_tostring(L, 1), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3))); end else - LuaError('Lua: Wrong number of parameters passed to AddCaption!'); + LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L)); lc_addcaption:= 0; end; @@ -275,7 +282,7 @@ // to be done end else - LuaError('Lua: Wrong number of parameters passed to CampaignLock!'); + LuaParameterCountError('CampaignLock', 'TODO', lua_gettop(L)); lc_campaignlock:= 0; end; @@ -286,7 +293,7 @@ // to be done end else - LuaError('Lua: Wrong number of parameters passed to CampaignUnlock!'); + LuaParameterCountError('CampaignUnlock', 'TODO', lua_gettop(L)); lc_campaignunlock:= 0; end; @@ -295,7 +302,7 @@ begin if lua_gettop(L) <> 4 then begin - LuaError('Lua: Wrong number of parameters passed to SpawnFakeHealthCrate!'); + LuaParameterCountError('SpawnFakeHealthCrate', 'x, y, explode, poison', lua_gettop(L)); lua_pushnil(L); end else @@ -304,7 +311,7 @@ HealthCrate, lua_toboolean(L, 3), lua_toboolean(L, 4)); lua_pushinteger(L, gear^.uid); end; - lc_spawnfakehealthcrate := 1; + lc_spawnfakehealthcrate := 1; end; function lc_spawnfakeammocrate(L: PLua_State): LongInt; Cdecl; @@ -312,7 +319,7 @@ begin if lua_gettop(L) <> 4 then begin - LuaError('Lua: Wrong number of parameters passed to SpawnFakeAmmoCrate!'); + LuaParameterCountError('SpawnFakeAmmoCrate', 'x, y, explode, poison', lua_gettop(L)); lua_pushnil(L); end else @@ -329,11 +336,11 @@ begin if lua_gettop(L) <> 4 then begin - LuaError('Lua: Wrong number of parameters passed to SpawnFakeUtilityCrate!'); + LuaParameterCountError('SpawnFakeUtilityCrate', 'x, y, explode, poison', lua_gettop(L)); lua_pushnil(L); end else - begin + begin gear := SpawnFakeCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), UtilityCrate, lua_toboolean(L, 3), lua_toboolean(L, 4)); lua_pushinteger(L, gear^.uid); @@ -347,7 +354,7 @@ begin if (lua_gettop(L) < 2) or (lua_gettop(L) > 3) then begin - LuaError('Lua: Wrong number of parameters passed to SpawnHealthCrate!'); + LuaParameterCountError('SpawnHealthCrate', 'x, y[, health]', lua_gettop(L)); lua_pushnil(L); end else @@ -362,7 +369,7 @@ else lua_pushnil(L); end; - lc_spawnhealthcrate := 1; + lc_spawnhealthcrate := 1; end; function lc_spawnammocrate(L: PLua_State): LongInt; Cdecl; @@ -370,12 +377,12 @@ begin if (lua_gettop(L) <> 3) and (lua_gettop(L) <> 4) then begin - LuaError('Lua: Wrong number of parameters passed to SpawnAmmoCrate!'); + LuaParameterCountError('SpawnAmmoCrate', 'x, y, content[, amount]', lua_gettop(L)); lua_pushnil(L); end else begin - if (lua_gettop(L) = 3) then + if (lua_gettop(L) = 3) then gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), 0) else gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), AmmoCrate, lua_tointeger(L, 3), lua_tointeger(L, 4)); if gear <> nil then @@ -391,7 +398,7 @@ begin if (lua_gettop(L) <> 3) and (lua_gettop(L) <> 4) then begin - LuaError('Lua: Wrong number of parameters passed to SpawnUtilityCrate!'); + LuaParameterCountError('SpawnUtilityCrate', 'x, y, content[, amount]', lua_gettop(L)); lua_pushnil(L); end else @@ -415,7 +422,7 @@ begin if lua_gettop(L) <> 7 then begin - LuaError('Lua: Wrong number of parameters passed to AddGear!'); + LuaParameterCountError('AddGear', 'x, y, gearType, state, dx, dy, timer', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -440,7 +447,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to DeleteGear!'); + LuaParameterCountError('DeleteGear', 'gearUid', lua_gettop(L)); end else begin @@ -459,7 +466,7 @@ begin if lua_gettop(L) <> 5 then begin - LuaError('Lua: Wrong number of parameters passed to AddVisualGear!'); + LuaParameterCountError('AddVisualGear', 'x, y, visualGearType, state, critical', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -471,7 +478,7 @@ c:= lua_toboolean(L, 5); vg:= AddVisualGear(x, y, vgt, s, c); - if vg <> nil then + if vg <> nil then begin lastVisualGearByUID:= vg; lua_pushinteger(L, vg^.uid) @@ -487,7 +494,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to DeleteVisualGear!'); + LuaParameterCountError('DeleteVisualGear', 'vgUid', lua_gettop(L)); end else begin @@ -503,7 +510,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetVisualGearValues!'); + LuaParameterCountError('GetVisualGearValues', 'vgUid', lua_gettop(L)); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L) end @@ -537,7 +544,7 @@ begin if lua_gettop(L) <> 11 then begin - LuaError('Lua: Wrong number of parameters passed to SetVisualGearValues!'); + LuaParameterCountError('SetVisualGearValues', 'vgUid, X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -565,7 +572,7 @@ begin if lua_gettop(L) <> 0 then begin - LuaError('Lua: Wrong number of parameters passed to GetFollowGear!'); + LuaParameterCountError('GetFollowGear', '', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -581,7 +588,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearType!'); + LuaParameterCountError('GetGearType', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -600,7 +607,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearMessage!'); + LuaParameterCountError('GetGearMessage', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -619,7 +626,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearElasticity!'); + LuaParameterCountError('GetGearElasticity', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -637,7 +644,7 @@ var gear : PGear; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetGearMessage!') + LuaParameterCountError('SetGearMessage', 'gearUid, message', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -652,7 +659,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearPos!'); + LuaParameterCountError('GetGearPos', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -670,7 +677,7 @@ var gear : PGear; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetGearPos!') + LuaParameterCountError('SetGearPos', 'gearUid, value', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -685,7 +692,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearCollisionMask!'); + LuaParameterCountError('GetGearCollisionMask', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -703,7 +710,7 @@ var gear : PGear; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetGearCollisionMask!') + LuaParameterCountError('SetGearCollisionMask', 'gearUid, mask', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -717,7 +724,7 @@ var gear : PGear; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to GetHogLevel!') + LuaParameterCountError('GetHogLevel', 'gearUid', lua_gettop(L)) else begin gear := GearByUID(lua_tointeger(L, 1)); @@ -733,7 +740,7 @@ var gear : PGear; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetHogLevel!') + LuaParameterCountError('SetHogLevel', 'gearUid, level', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -748,7 +755,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetHogClan!'); + LuaParameterCountError('GetHogClan', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -768,7 +775,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetClanColor!'); + LuaParameterCountError('GetClanColor', 'clan', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color shl 8 or $FF); @@ -782,7 +789,7 @@ i, j : LongInt; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetClanColor!') + LuaParameterCountError('SetClanColor', 'clan, color', lua_gettop(L)) else begin clan := ClansArray[lua_tointeger(L, 1)]; @@ -794,7 +801,7 @@ for j:= 0 to 7 do begin hh:= team^.Hedgehogs[j]; - if (hh.Gear <> nil) or (hh.GearHidden <> nil) then + if (hh.Gear <> nil) or (hh.GearHidden <> nil) then begin FreeTexture(hh.NameTagTex); hh.NameTagTex:= RenderStringTex(hh.Name, clan^.Color, fnt16); @@ -816,7 +823,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetHogTeamName!'); + LuaParameterCountError('GetHogTeamName', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -832,12 +839,36 @@ lc_gethogteamname:= 1 end; +function lc_sethogteamname(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 2 then + begin + LuaParameterCountError('SetHogTeamName', 'gearUid, name', lua_gettop(L)); + lua_pushnil(L); // return value on stack (nil) + end + else + begin + gear := GearByUID(lua_tointeger(L, 1)); + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then + begin + gear^.Hedgehog^.Team^.TeamName := lua_tostring(L, 2); + + FreeTexture(gear^.Hedgehog^.Team^.NameTagTex); + gear^.Hedgehog^.Team^.NameTagTex:= RenderStringTex(gear^.Hedgehog^.Team^.TeamName, gear^.Hedgehog^.Team^.Clan^.Color, fnt16); + end + else + lua_pushnil(L); + end; + lc_sethogteamname:= 1 +end; + function lc_gethogname(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetHogName!'); + LuaParameterCountError('GetHogName', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -855,24 +886,22 @@ function lc_sethogname(L : Plua_State) : LongInt; Cdecl; var gear : PGear; - hogName: ShortString; begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetHogName!'); + LuaParameterCountError('SetHogName', 'gearUid, name', lua_gettop(L)); lua_pushnil(L) end else begin gear:= GearByUID(lua_tointeger(L, 1)); if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then - - hogName:= lua_tostring(L, 2); - gear^.Hedgehog^.Name:= hogName; + begin + gear^.Hedgehog^.Name:= lua_tostring(L, 2); - FreeTexture(gear^.Hedgehog^.NameTagTex); - gear^.Hedgehog^.NameTagTex:= RenderStringTex(gear^.Hedgehog^.Name, gear^.Hedgehog^.Team^.Clan^.Color, fnt16); - + FreeTexture(gear^.Hedgehog^.NameTagTex); + gear^.Hedgehog^.NameTagTex:= RenderStringTex(gear^.Hedgehog^.Name, gear^.Hedgehog^.Team^.Clan^.Color, fnt16) + end end; lc_sethogname:= 0; end; @@ -882,7 +911,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetTimer!'); + LuaParameterCountError('GetTimer', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -901,7 +930,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetHealth!'); + LuaParameterCountError('GetHealth', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -920,7 +949,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetX!'); + LuaParameterCountError('GetX', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -939,7 +968,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetY!'); + LuaParameterCountError('GetY', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -958,7 +987,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to CopyPV!'); + LuaParameterCountError('CopyPV', 'fromGearUid, toGearUid', lua_gettop(L)); end else begin @@ -979,7 +1008,7 @@ var gear : PGear; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to FollowGear!') + LuaParameterCountError('FollowGear', 'gearUid', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1011,13 +1040,14 @@ vgear^.FrameTicks:= lua_tointeger(L, 3); if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1; - lua_pushinteger(L, vgear^.Uid) + lua_pushinteger(L, vgear^.Uid); + AddChatString(#1+'[' + gear^.Hedgehog^.Name + '] '+vgear^.text) end end else lua_pushnil(L) end - else LuaError('Lua: Wrong number of parameters passed to HogSay!'); + else LuaParameterCountError('HogSay', 'gearUid, text, manner[, vgState]', lua_gettop(L)); lc_hogsay:= 1 end; @@ -1025,7 +1055,7 @@ var gear, prevgear : PGear; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to SwitchHog!') + LuaParameterCountError('SwitchHog', 'gearUid', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1040,7 +1070,7 @@ prevgear^.Z := cHHZ; prevgear^.Message:= prevgear^.Message or gmRemoveFromList or gmAddToList; end; - + SwitchCurrentHedgehog(gear^.Hedgehog); CurrentTeam:= CurrentHedgehog^.Team; @@ -1063,7 +1093,7 @@ if (gear <> nil) and (gear^.Hedgehog <> nil) then AddAmmoAmount(gear^.Hedgehog^, TAmmoType(lua_tointeger(L, 2)), lua_tointeger(L,3) ); end else - + if lua_gettop(L) = 2 then begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1071,7 +1101,7 @@ AddAmmo(gear^.Hedgehog^, TAmmoType(lua_tointeger(L, 2))); end else begin - LuaError('Lua: Wrong number of parameters passed to AddAmmo!'); + LuaParameterCountError('AddAmmo', 'TODO', lua_gettop(L)); end; lc_addammo:= 0; @@ -1090,7 +1120,7 @@ else SetAmmo(gear^.Hedgehog^, TAmmoType(lua_tointeger(L, 2)), lua_tointeger(L, 3)) end - else LuaError('Lua: Wrong number of parameters passed to AddAmmo!'); + else LuaParameterCountError('AddAmmo', 'gearUid, ammoType[, ammoCount]', lua_gettop(L)); lc_addammo:= 0 end; @@ -1101,7 +1131,7 @@ if (lua_gettop(L) = 2) then begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and (gear^.Hedgehog <> nil) then begin ammo:= GetAmmoEntry(gear^.Hedgehog^, TAmmoType(lua_tointeger(L, 2))); if ammo^.AmmoType = amNothing then @@ -1111,9 +1141,9 @@ end else lua_pushinteger(L, 0) end - else + else begin - LuaError('Lua: Wrong number of parameters passed to GetAmmoCount!'); + LuaParameterCountError('GetAmmoCount', 'gearUid, ammoType', lua_gettop(L)); lua_pushnil(L) end; lc_getammocount:= 1 @@ -1124,7 +1154,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetHealth!'); + LuaParameterCountError('SetHealth', 'gearUid, health', lua_gettop(L)); end else begin @@ -1134,7 +1164,7 @@ gear^.Health:= lua_tointeger(L, 2); if (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then - begin + begin RenderHealth(gear^.Hedgehog^); RecountTeamHealth(gear^.Hedgehog^.Team) end; @@ -1150,7 +1180,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetTimer!'); + LuaParameterCountError('SetTimer', 'gearUid, timer', lua_gettop(L)); end else begin @@ -1164,7 +1194,7 @@ var gear: PGear; begin if lua_gettop(L) <> 3 then - LuaError('Lua: Wrong number of parameters passed to SetEffect!') + LuaParameterCountError('SetEffect', 'gearUid, effect, enabled', lua_gettop(L)) else begin gear := GearByUID(lua_tointeger(L, 1)); if (gear <> nil) and (gear^.Hedgehog <> nil) then @@ -1172,12 +1202,13 @@ end; lc_seteffect := 0; end; + function lc_geteffect(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to GetEffect!'); + LuaParameterCountError('GetEffect', 'gearUid, effect', lua_gettop(L)); end else begin @@ -1195,7 +1226,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetState!'); + LuaParameterCountError('SetState', 'gearUid, state', lua_gettop(L)); end else begin @@ -1214,7 +1245,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetState!'); + LuaParameterCountError('GetState', 'gearUid', lua_gettop(L)); end else begin @@ -1232,7 +1263,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetX!'); + LuaParameterCountError('GetTag', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -1251,7 +1282,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetTag!'); + LuaParameterCountError('SetTag', 'gearUid, tag', lua_gettop(L)); end else begin @@ -1277,49 +1308,49 @@ var i : LongInt; var color : shortstring; begin - statInfo := TStatInfoType(lua_tointeger(L, 1)); - if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) - and (statInfo <> siClanHealth)) then + statInfo := TStatInfoType(lua_tointeger(L, 1)); + if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) + and (statInfo <> siClanHealth)) then begin - LuaError('Lua: Wrong number of parameters passed to SendStat! Expected 2 parameters.'); + LuaParameterCountError('SendStat', 'statInfoType, color', lua_gettop(L)); end - else if (lua_gettop(L) <> 3) and ((statInfo = siPlayerKills) - or (statInfo = siClanHealth)) then - begin - LuaError('Lua: Wrong number of parameters passed to SendStat! Expected 3 parameters.'); + else if (lua_gettop(L) <> 3) and ((statInfo = siPlayerKills) + or (statInfo = siClanHealth)) then + begin + LuaParameterCountError('SendStat', 'siClanHealth, color, teamname', lua_gettop(L)); end else - begin - if ((statInfo = siPlayerKills) or (statInfo = siClanHealth)) then - begin - // 3: team name - for i:= 0 to Pred(TeamsCount) do - begin - with TeamsArray[i]^ do - begin - if TeamName = lua_tostring(L, 3) then - begin - color := uUtils.IntToStr(Clan^.Color); - Break; - end - end - end; - if (statInfo = siPlayerKills) then - begin - SendStat(siPlayerKills, color + ' ' + - lua_tostring(L, 2) + ' ' + TeamsArray[i]^.TeamName); - end - else if (statInfo = siClanHealth) then - begin - SendStat(siClanHealth, color + ' ' + - lua_tostring(L, 2)); - end - end - else - begin - SendStat(statInfo,lua_tostring(L, 2)); - end; - end; + begin + if ((statInfo = siPlayerKills) or (statInfo = siClanHealth)) then + begin + // 3: team name + for i:= 0 to Pred(TeamsCount) do + begin + with TeamsArray[i]^ do + begin + if TeamName = lua_tostring(L, 3) then + begin + color := uUtils.IntToStr(Clan^.Color); + Break; + end + end + end; + if (statInfo = siPlayerKills) then + begin + SendStat(siPlayerKills, color + ' ' + + lua_tostring(L, 2) + ' ' + TeamsArray[i]^.TeamName); + end + else if (statInfo = siClanHealth) then + begin + SendStat(siClanHealth, color + ' ' + + lua_tostring(L, 2)); + end + end + else + begin + SendStat(statInfo,lua_tostring(L, 2)); + end; + end; lc_sendstat:= 0 end; @@ -1338,7 +1369,7 @@ begin tryhard:= false; if (lua_gettop(L) <> 4) and (lua_gettop(L) <> 5) then - LuaError('Lua: Wrong number of parameters passed to FindPlace!') + LuaParameterCountError('FindPlace', 'gearUid, fall, left, right[, tryHarder]', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1368,7 +1399,7 @@ if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then AddVoice(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack) end - else LuaError('Lua: Wrong number of parameters passed to PlaySound!'); + else LuaParameterCountError('PlaySound', 'soundId', lua_gettop(L)); lc_playsound:= 0; end; @@ -1378,7 +1409,7 @@ np:= lua_gettop(L); if (np < 5) or (np > 6) then begin - LuaError('Lua: Wrong number of parameters passed to AddTeam!'); + LuaParameterCountError('AddTeam', 'teamname, color, grave, fort, voicepack[, flag]', lua_gettop(L)); //lua_pushnil(L) end else @@ -1400,7 +1431,7 @@ begin if lua_gettop(L) <> 4 then begin - LuaError('Lua: Wrong number of parameters passed to AddHog!'); + LuaParameterCountError('AddHog', 'hogname, botlevel, health, hat', lua_gettop(L)); lua_pushnil(L) end else @@ -1418,7 +1449,7 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to HogTurnLeft!'); + LuaParameterCountError('HogTurnLeft', 'gearUid, boolean', lua_gettop(L)); end else begin @@ -1434,7 +1465,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearPosition!'); + LuaParameterCountError('GetGearPosition', 'gearUid', lua_gettop(L)); lua_pushnil(L); lua_pushnil(L) end @@ -1461,7 +1492,7 @@ x, y: LongInt; begin if lua_gettop(L) <> 3 then - LuaError('Lua: Wrong number of parameters passed to SetGearPosition!') + LuaParameterCountError('SetGearPosition', 'gearUid, x, y', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1487,7 +1518,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearTarget!'); + LuaParameterCountError('GetGearTarget', 'gearUid', lua_gettop(L)); lua_pushnil(L); lua_pushnil(L) end @@ -1512,7 +1543,7 @@ var gear: PGear; begin if lua_gettop(L) <> 3 then - LuaError('Lua: Wrong number of parameters passed to SetGearTarget!') + LuaParameterCountError('SetGearTarget', 'gearUid, x, y', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1531,7 +1562,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearVelocity!'); + LuaParameterCountError('GetGearVelocity', 'gearUid', lua_gettop(L)); lua_pushnil(L); lua_pushnil(L) end @@ -1554,7 +1585,7 @@ var gear: PGear; begin if lua_gettop(L) <> 3 then - LuaError('Lua: Wrong number of parameters passed to SetGearVelocity!') + LuaParameterCountError('SetGearVelocity', 'gearUid, dx, dy', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1571,7 +1602,7 @@ function lc_setzoom(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to SetZoom!') + LuaParameterCountError('SetZoom', 'zoomLevel', lua_gettop(L)) else begin ZoomValue:= lua_tonumber(L, 1); @@ -1587,7 +1618,7 @@ begin if lua_gettop(L) <> 0 then begin - LuaError('Lua: Wrong number of parameters passed to GetZoom!'); + LuaParameterCountError('GetZoom', '', lua_gettop(L)); lua_pushnil(L) end else @@ -1600,7 +1631,7 @@ begin np:= lua_gettop(L); if (np < 4) or (np > 5) then - LuaError('Lua: Wrong number of parameters passed to SetAmmo!') + LuaParameterCountError('SetAmmo', 'ammoType, count, probability, delay[, numberInCrate]', lua_gettop(L)) else if np = 4 then ScriptSetAmmo(TAmmoType(lua_tointeger(L, 1)), lua_tointeger(L, 2), lua_tointeger(L, 3), lua_tointeger(L, 4), 1) else @@ -1608,12 +1639,23 @@ lc_setammo:= 0 end; +function lc_setammodelay(L : Plua_State) : LongInt; Cdecl; +var np: LongInt; +begin + np:= lua_gettop(L); + if (np <> 2) then + LuaParameterCountError('SetAmmoDelay', 'ammoType, delay', lua_gettop(L)) + else + ScriptSetAmmoDelay(TAmmoType(lua_tointeger(L, 1)), lua_tointeger(L, 2)); + lc_setammodelay:= 0 +end; + function lc_setammostore(L : Plua_State) : LongInt; Cdecl; var np: LongInt; begin np:= lua_gettop(L); if (np <> 4) then - LuaError('Lua: Wrong number of parameters passed to SetAmmoStore!') + LuaParameterCountError('SetAmmoStore', 'loadouts, probabilities, delays, reinforments', lua_gettop(L)) else begin ScriptAmmoLoadout:= lua_tostring(L, 1); @@ -1629,7 +1671,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetRandom!'); + LuaParameterCountError('GetRandom', 'number', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -1649,7 +1691,7 @@ function lc_setwind(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to SetWind!') + LuaParameterCountError('SetWind', 'windSpeed', lua_gettop(L)) else begin cWindSpeed:= int2hwfloat(lua_tointeger(L, 1)) / 100 * cMaxWindSpeed; @@ -1665,7 +1707,7 @@ begin if lua_gettop(L) <> 0 then begin - LuaError('Lua: Wrong number of parameters passed to GetDataPath!'); + LuaParameterCountError('GetDataPath', '', lua_gettop(L)); lua_pushnil(L); end else @@ -1677,7 +1719,7 @@ begin if lua_gettop(L) <> 0 then begin - LuaError('Lua: Wrong number of parameters passed to GetUserDataPath!'); + LuaParameterCountError('GetUserDataPath', '', lua_gettop(L)); lua_pushnil(L); end else @@ -1689,7 +1731,7 @@ begin if lua_gettop(L) <> 0 then begin - LuaError('Lua: Wrong number of parameters passed to MapHasBorder!'); + LuaParameterCountError('MapHasBorder', '', lua_gettop(L)); lua_pushnil(L); end else @@ -1702,7 +1744,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to GetGearRadius!'); + LuaParameterCountError('GetGearRadius', 'gearUid', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -1720,7 +1762,7 @@ var gear : PGear; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to GetHogHat!') + LuaParameterCountError('GetHogHat', 'gearUid', lua_gettop(L)) else begin gear := GearByUID(lua_tointeger(L, 1)); if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then @@ -1737,20 +1779,22 @@ begin if lua_gettop(L) <> 2 then begin - LuaError('Lua: Wrong number of parameters passed to SetHogHat!'); + LuaParameterCountError('SetHogHat', 'gearUid, hat', lua_gettop(L)); lua_pushnil(L) end else begin gear:= GearByUID(lua_tointeger(L, 1)); if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + begin hat:= lua_tostring(L, 2); gear^.Hedgehog^.Hat:= hat; -AddFileLog('Changed hat to: '+hat); + AddFileLog('Changed hat to: '+hat); if (Length(hat) > 39) and (Copy(hat,1,8) = 'Reserved') and (Copy(hat,9,32) = gear^.Hedgehog^.Team^.PlayerHash) then LoadHedgehogHat(gear^.Hedgehog^, 'Reserved/' + Copy(hat,9,Length(hat)-8)) else - LoadHedgehogHat(gear^.Hedgehog^, hat); + LoadHedgehogHat(gear^.Hedgehog^, hat) + end end; lc_sethoghat:= 0; end; @@ -1758,7 +1802,7 @@ function lc_placegirder(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 3 then - LuaError('Lua: Wrong number of parameters passed to PlaceGirder!') + LuaParameterCountError('PlaceGirder', 'x, y, state', lua_gettop(L)) else TryPlaceOnLand( lua_tointeger(L, 1) - SpritesData[sprAmGirder].Width div 2, @@ -1770,7 +1814,7 @@ function lc_getcurammotype(L : Plua_State): LongInt; Cdecl; begin if lua_gettop(L) <> 0 then - LuaError('Lua: Wrong number of parameters passed to GetCurAmmoType!') + LuaParameterCountError('GetCurAmmoType', '', lua_gettop(L)) else lua_pushinteger(L, ord(CurrentHedgehog^.CurAmmoType)); lc_getcurammotype := 1; @@ -1779,7 +1823,7 @@ function lc_savecampaignvar(L : Plua_State): LongInt; Cdecl; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SaveCampaignVar!') + LuaParameterCountError('SaveCampaignVar', 'varname, value', lua_gettop(L)) else begin SendIPC('V!' + lua_tostring(L, 1) + ' ' + lua_tostring(L, 2) + #0); end; @@ -1789,9 +1833,9 @@ function lc_getcampaignvar(L : Plua_State): LongInt; Cdecl; begin if (lua_gettop(L) <> 1) then - LuaError('Lua: Wrong number of parameters passed to GetCampaignVar!') + LuaParameterCountError('GetCampaignVar', 'varname', lua_gettop(L)) else - SendIPCAndWaitReply('V?' + lua_tostring(L, 1)); + SendIPCAndWaitReply('V?' + lua_tostring(L, 1) + #0); lua_pushstring(L, str2pchar(CampaignVariable)); lc_getcampaignvar := 1; end; @@ -1800,7 +1844,7 @@ var gear: PGear; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to HideHog!') + LuaParameterCountError('HideHog', 'gearUid', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1814,7 +1858,7 @@ uid: LongWord; begin if lua_gettop(L) <> 1 then - LuaError('Lua: Wrong number of parameters passed to RestoreHog!') + LuaParameterCountError('RestoreHog', 'gearUid', lua_gettop(L)) else begin uid:= LongWord(lua_tointeger(L, 1)); @@ -1836,7 +1880,7 @@ begin if lua_gettop(L) <> 5 then begin - LuaError('Lua: Wrong number of parameters passed to TestRectForObstacle!'); + LuaParameterCountError('TestRectForObstacle', 'x1, y1, x2, y2, landOnly', lua_gettop(L)); lua_pushnil(L); // return value on stack (nil) end else @@ -1858,7 +1902,7 @@ var gear: PGear; begin if lua_gettop(L) <> 2 then - LuaError('Lua: Wrong number of parameters passed to SetAIHintOnGear!') + LuaParameterCountError('SetAIHintOnGear', 'gearUid, aiHints', lua_gettop(L)) else begin gear:= GearByUID(lua_tointeger(L, 1)); @@ -1873,7 +1917,7 @@ begin if lua_gettop(L) <> 1 then begin - LuaError('Lua: Wrong number of parameters passed to HedgewarsScriptLoad!'); + LuaParameterCountError('HedgewarsScriptLoad', 'scriptPath', lua_gettop(L)); lua_pushnil(L) end else @@ -1885,7 +1929,7 @@ function lc_declareachievement(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) <> 4 then - LuaError('Lua: Wrong number of parameters passed to DeclareAchievement!') + LuaParameterCountError('DeclareAchievement', 'achievementId, teamname, location, value', lua_gettop(L)) else declareAchievement(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4)); lc_declareachievement:= 0 @@ -2024,7 +2068,7 @@ if StoreCnt-1 < k then AddAmmoStore; inc(k) end -else +else for i:= 0 to Pred(TeamsCount) do begin for j:= 0 to Pred(TeamsArray[i]^.HedgehogsNumber) do @@ -2080,7 +2124,7 @@ end; f:= pfsOpenRead(s); -if f = nil then +if f = nil then exit; physfsReaderSetBuffer(@buf); @@ -2231,17 +2275,30 @@ end; end; -procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); +procedure ScriptSetAmmo(ammo : TAmmoType; count, probability, delay, reinforcement: Byte); begin -//if (ord(ammo) < 1) or (count > 9) or (count < 0) or (propability < 0) or (propability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then -if (ord(ammo) < 1) or (count > 9) or (propability > 8) or (delay > 9) or (reinforcement > 8) then +//if (ord(ammo) < 1) or (count > 9) or (count < 0) or (probability < 0) or (probability > 8) or (delay < 0) or (delay > 9) or (reinforcement < 0) or (reinforcement > 8) then +if (ord(ammo) < 1) or (count > 9) or (probability > 8) or (delay > 9) or (reinforcement > 8) then exit; ScriptAmmoLoadout[ord(ammo)]:= inttostr(count)[1]; -ScriptAmmoProbability[ord(ammo)]:= inttostr(propability)[1]; -ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1]; +ScriptAmmoProbability[ord(ammo)]:= inttostr(probability)[1]; +ScriptSetAmmoDelay(ammo, delay); ScriptAmmoReinforcement[ord(ammo)]:= inttostr(reinforcement)[1]; end; +procedure ScriptSetAmmoDelay(ammo : TAmmoType; delay: Byte); +begin +// change loadout string if ammo store hasn't been initialized yet +if (StoreCnt = 0) then +begin + if (delay <= 9) then + ScriptAmmoDelay[ord(ammo)]:= inttostr(delay)[1]; +end +// change "live" delay values +else if (CurrentTeam <> nil) then + ammoz[ammo].SkipTurns:= CurrentTeam^.Clan^.TurnNumber + delay; +end; + procedure ScriptApplyAmmoStore; var i, j, k : LongInt; begin @@ -2278,7 +2335,7 @@ AddAmmoStore; TeamsArray[i]^.Hedgehogs[j].AmmoStore:= StoreCnt - 1 end -else +else for i:= 0 to Pred(TeamsCount) do begin if ScriptExists('onNewAmmoStore') then @@ -2461,6 +2518,7 @@ lua_register(luaState, _P'HideMission', @lc_hidemission); lua_register(luaState, _P'AddCaption', @lc_addcaption); lua_register(luaState, _P'SetAmmo', @lc_setammo); +lua_register(luaState, _P'SetAmmoDelay', @lc_setammodelay); lua_register(luaState, _P'SetAmmoStore', @lc_setammostore); lua_register(luaState, _P'PlaySound', @lc_playsound); lua_register(luaState, _P'AddTeam', @lc_addteam); @@ -2475,6 +2533,7 @@ lua_register(luaState, _P'GetClanColor', @lc_getclancolor); lua_register(luaState, _P'SetClanColor', @lc_setclancolor); lua_register(luaState, _P'GetHogTeamName', @lc_gethogteamname); +lua_register(luaState, _P'SetHogTeamName', @lc_sethogteamname); lua_register(luaState, _P'GetHogName', @lc_gethogname); lua_register(luaState, _P'SetHogName', @lc_sethogname); lua_register(luaState, _P'GetHogLevel', @lc_gethoglevel); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uStore.pas --- a/hedgewars/uStore.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uStore.pas Tue Dec 17 00:02:52 2013 +0400 @@ -153,15 +153,19 @@ drY: LongInt; texsurf, flagsurf, iconsurf: PSDL_Surface; foundBot: boolean; + year, month, md : word; begin if cOnlyStats then exit; r.x:= 0; r.y:= 0; drY:= - 4; +DecodeDate(Date, year, month, md); for t:= 0 to Pred(TeamsCount) do with TeamsArray[t]^ do begin NameTagTex:= RenderStringTexLim(TeamName, Clan^.Color, Font, cTeamHealthWidth); + if length(Owner) > 0 then + OwnerTex:= RenderStringTexLim(Owner, Clan^.Color, Font, cTeamHealthWidth); r.x:= 0; r.y:= 0; @@ -236,6 +240,16 @@ if Gear <> nil then begin NameTagTex:= RenderStringTexLim(Name, Clan^.Color, fnt16, cTeamHealthWidth); + if Hat = 'NoHat' then + begin + if ((month = 4) and (md = 20)) then + Hat := 'eastertop'; // Easter + if ((month = 12) and (md = 25)) then + Hat := 'Santa'; // Christmas + if ((month = 10) and (md = 31)) then + Hat := 'fr_pumpkin'; // Halloween/Hedgewars' birthday + end; + if Hat <> 'NoHat' then begin if (Length(Hat) > 39) and (Copy(Hat,1,8) = 'Reserved') and (Copy(Hat,9,32) = PlayerHash) then @@ -330,7 +344,7 @@ if (((cReducedQuality and (rqNoBackground or rqLowRes)) = 0) or // why rqLowRes? (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]))) and (((cReducedQuality and rqPlainSplash) = 0) or ((not (ii in [sprSplash, sprDroplet, sprSDSplash, sprSDDroplet])))) and - (((cReducedQuality and rqKillFlakes) = 0) or (Theme = 'Snow') or (Theme = 'Christmas') or ((not (ii in [sprFlake, sprSDFlake])))) and + (((cReducedQuality and rqKillFlakes) = 0) or cSnow or ((not (ii in [sprFlake, sprSDFlake])))) and ((cCloudsNumber > 0) or (ii <> sprCloud)) and ((vobCount > 0) or (ii <> sprFlake)) then begin @@ -630,14 +644,18 @@ procedure LoadHedgehogHat(var HH: THedgehog; newHat: shortstring); var texsurf: PSDL_Surface; begin + // free the mem of any previously assigned texture. This was previously only if the new one could be loaded, but, NoHat is usually a better choice + if HH.HatTex <> nil then + begin + FreeTexture(HH.HatTex); + HH.HatTex:= nil + end; texsurf:= LoadDataImage(ptHats, newHat, ifNone); AddFileLog('Hat => '+newHat); // only do something if the hat could be loaded if texsurf <> nil then begin AddFileLog('Got Hat'); - // free the mem of any previously assigned texture - FreeTexture(HH.HatTex); // assign new hat to hedgehog HH.HatTex:= Surface2Tex(texsurf, true); diff -r 7d0329f37181 -r f2b18754742f hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uTeams.pas Tue Dec 17 00:02:52 2013 +0400 @@ -41,13 +41,14 @@ procedure TeamGoneEffect(var Team: TTeam); procedure SwitchCurrentHedgehog(newHog: PHedgehog); +var MaxTeamHealth: LongInt; + implementation uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uGearsUtils, uGearsList, uVisualGearsList, uTextures {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}; -var MaxTeamHealth: LongInt; - GameOver: boolean; +var GameOver: boolean; NextClan: boolean; function CheckForWin: boolean; @@ -480,17 +481,11 @@ else if Hedgehogs[i].GearHidden <> nil then inc(TeamHealth, Hedgehogs[i].GearHidden^.Health); - if not hasGone then - NewTeamHealthBarWidth:= TeamHealth - else - NewTeamHealthBarWidth:= 0; - - if NewTeamHealthBarWidth > MaxTeamHealth then + if TeamHealth > MaxTeamHealth then begin - MaxTeamHealth:= NewTeamHealthBarWidth; + MaxTeamHealth:= TeamHealth; RecountAllTeamsHealth; - end else if NewTeamHealthBarWidth > 0 then - NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth + end end; RecountClanHealth(team^.Clan); @@ -528,7 +523,7 @@ if Gear <> nil then begin - Gear^.Invulnerable:= false; + Gear^.Hedgehog^.Effects[heInvulnerable]:= 0; Gear^.Damage:= Gear^.Health; Gear^.State:= (Gear^.State or gstHHGone) and (not gstHHDriven) end @@ -547,11 +542,11 @@ SplitBySpace(id, s); SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]); CurrentHedgehog^.BotLevel:= StrToInt(id); + CurrentHedgehog^.Team:= CurrentTeam; Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0); SplitBySpace(s, id); Gear^.Health:= StrToInt(s); TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true); - Gear^.Hedgehog^.Team:= CurrentTeam; if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex else if (GameFlags and gfPerHogAmmo) <> 0 then @@ -684,6 +679,62 @@ end; +procedure chSetHat(var s: shortstring); +begin +if (not isDeveloperMode) or (CurrentTeam = nil) then exit; +with CurrentTeam^ do + begin + if not CurrentHedgehog^.King then + if (s = '') + or (((GameFlags and gfKing) <> 0) and (s = 'crown')) + or ((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then + CurrentHedgehog^.Hat:= 'NoHat' + else + CurrentHedgehog^.Hat:= s + end; +end; + +procedure chGrave(var s: shortstring); +begin + if CurrentTeam = nil then + OutError(errmsgIncorrectUse + ' "/grave"', true); + if s[1]='"' then + Delete(s, 1, 1); + if s[byte(s[0])]='"' then + Delete(s, byte(s[0]), 1); + CurrentTeam^.GraveName:= s +end; + +procedure chFort(var s: shortstring); +begin + if CurrentTeam = nil then + OutError(errmsgIncorrectUse + ' "/fort"', true); + if s[1]='"' then + Delete(s, 1, 1); + if s[byte(s[0])]='"' then + Delete(s, byte(s[0]), 1); + CurrentTeam^.FortName:= s +end; + +procedure chFlag(var s: shortstring); +begin + if CurrentTeam = nil then + OutError(errmsgIncorrectUse + ' "/flag"', true); + if s[1]='"' then + Delete(s, 1, 1); + if s[byte(s[0])]='"' then + Delete(s, byte(s[0]), 1); + CurrentTeam^.flag:= s +end; + +procedure chOwner(var s: shortstring); +begin + if CurrentTeam = nil then + OutError(errmsgIncorrectUse + ' "/owner"', true); + + CurrentTeam^.Owner:= s +end; + procedure initModule; begin RegisterVariable('addhh', @chAddHH, false); @@ -692,6 +743,11 @@ RegisterVariable('bind', @chBind, true ); RegisterVariable('teamgone', @chTeamGone, true ); RegisterVariable('finish', @chFinish, true ); // all teams gone +RegisterVariable('fort' , @chFort , false); +RegisterVariable('grave' , @chGrave , false); +RegisterVariable('hat' , @chSetHat , false); +RegisterVariable('flag' , @chFlag , false); +RegisterVariable('owner' , @chOwner , false); CurrentTeam:= nil; PreviousTeam:= nil; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uTypes.pas Tue Dec 17 00:02:52 2013 +0400 @@ -86,7 +86,7 @@ sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb, sprBulletHit, sprSnowball, sprHandSnowball, sprSnow, sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis, - sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun, sprFrozenHog + sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun, sprFrozenHog, sprAmRubber, sprBoing ); // Gears that interact with other Gears and/or Land @@ -152,7 +152,7 @@ amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35 amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42 amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48 - amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, amIceGun, amKnife); // 54 + amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, amIceGun, amKnife, amRubber); // 56 // Different kind of crates that e.g. hedgehogs can pick up TCrateType = (HealthCrate, AmmoCrate, UtilityCrate); @@ -172,8 +172,8 @@ TRenderMode = (rmDefault, rmLeftEye, rmRightEye); TStereoMode = (smNone, smRedCyan, smCyanRed, smRedBlue, smBlueRed, smRedGreen, smGreenRed, smHorizontal, smVertical); - TWorldEdge = (weNone, weWrap, weBounce, weSea, weSky); + TUIDisplay = (uiAll, uiNoTeams, uiNone); THHFont = record Handle: PTTF_Font; @@ -258,7 +258,6 @@ ImpactSound: TSound; // first sound, others have to be after it in the sounds def. nImpactSounds: Word; // count of ImpactSounds. // Don't use these if you want to take damage normally, otherwise health/damage are commonly used for other purposes - Invulnerable: Boolean; Health, Damage, Karma: LongInt; // DirAngle is a "real" - if you don't need it for rotation of sprite in uGearsRender, you can use it for any visual-only value DirAngle: real; @@ -370,6 +369,7 @@ King: boolean; // Flag for a bunch of hedgehog attributes Unplaced: boolean; // Flag for hog placing mode Timer: Longword; + HealthBarHealth: LongInt; Effects: array[THogEffect] of LongInt; end; @@ -380,16 +380,17 @@ Binds: TBinds; Hedgehogs: array[0..cMaxHHIndex] of THedgehog; CurrHedgehog: LongWord; - NameTagTex: PTexture; + NameTagTex, + OwnerTex: PTexture; GraveTex, AIKillsTex, FlagTex: PTexture; Flag: shortstring; GraveName: shortstring; FortName: shortstring; + Owner: shortstring; TeamHealth: LongInt; - TeamHealthBarWidth, - NewTeamHealthBarWidth: LongInt; + TeamHealthBarHealth: LongInt; DrawHealthY: LongInt; AttackBar: LongWord; HedgehogsNumber: Longword; @@ -434,7 +435,7 @@ sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, - {sidStructure,} sidLandGun, sidIceGun, sidKnife); + {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber); TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused, sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync, diff -r 7d0329f37181 -r f2b18754742f hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uVariables.pas Tue Dec 17 00:02:52 2013 +0400 @@ -46,6 +46,9 @@ cShowFPS : boolean; cFlattenFlakes : boolean; cFlattenClouds : boolean; + cIce : boolean; + cSnow : boolean; + cAltDamage : boolean; cReducedQuality : LongWord; UserNick : shortstring; @@ -161,6 +164,7 @@ cMaxWindSpeed : hwFloat; cWindSpeed : hwFloat; cWindSpeedf : real; + cElastic : hwFloat; cGravity : hwFloat; cGravityf : real; cDamageModifier : hwFloat; @@ -195,6 +199,9 @@ ScreenFadeValue : LongInt; ScreenFadeSpeed : LongInt; + UIDisplay : TUIDisplay; + LocalMessage : LongWord; + Theme : shortstring; disableLandBack : boolean; @@ -446,7 +453,7 @@ (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprKamikaze (FileName: 'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWhip + Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWhip (FileName: 'Kowtow'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprKowtow (FileName: 'Sad'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; @@ -675,7 +682,11 @@ (FileName: 'amIceGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 32; imageHeight: 32; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false), // sprIceGun (FileName: 'amFrozenHog'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 64; Height: 64; imageWidth: 64; imageHeight: 64; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprFrozenHog + Width: 64; Height: 64; imageWidth: 64; imageHeight: 64; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false), // sprFrozenHog + (FileName: 'amRubber'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil; + Width: 160; Height:160; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprAmRubber + (FileName: 'boing'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 101; Height: 97; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: false) // sprBoing ); const @@ -1868,7 +1879,7 @@ AmmoType: amPortalGun; AttackVoice: sndNone; Bounciness: 1000); - Slot: 6; + Slot: 7; TimeAfterTurn: 0; minAngle: 0; maxAngle: 0; @@ -2133,7 +2144,7 @@ AmmoType: amTardis; AttackVoice: sndNone; Bounciness: 1000); - Slot: 7; + Slot: 8; TimeAfterTurn: 0; minAngle: 0; maxAngle: 0; @@ -2246,6 +2257,33 @@ PosCount: 1; PosSprite: sprWater; ejectX: 0; + ejectY: 0), +// Rubber + (NameId: sidRubber; + NameTex: nil; + Probability: 150; + NumberInCase: 1; + Ammo: (Propz: ammoprop_NoRoundEnd or + ammoprop_NoCrosshair or + ammoprop_NeedTarget or + ammoprop_Utility or + ammoprop_AttackingPut; + Count: 1; + NumPerTurn: 0; + Timer: 0; + Pos: 0; + AmmoType: amRubber; + AttackVoice: sndNone; + Bounciness: 1000); + Slot: 6; + TimeAfterTurn: 3000; + minAngle: 0; + maxAngle: 0; + isDamaging: false; + SkipTurns: 0; + PosCount: 4; + PosSprite: sprAmRubber; + ejectX: 0; ejectY: 0) ); @@ -2384,6 +2422,8 @@ cFlattenFlakes := false; cFlattenClouds := false; + cIce := false; + cSnow := false; lastVisualGearByUID := nil; lastGearByUID := nil; cReadyDelay := 5000; @@ -2431,6 +2471,7 @@ cMaxWindSpeed.QWordValue:= 1073742; // 0.00025 cWindSpeed.QWordValue := 0; // 0.0 cWindSpeedf := 0.0; + cElastic := _0_9; cGravity := cMaxWindSpeed * 2; cGravityf := 0.00025 * 2; cDamageModifier := _1; @@ -2553,6 +2594,9 @@ cMapName:= ''; LuaTemplateNumber:= 0; + + UIDisplay:= uiAll; + LocalMessage:= 0; end; procedure freeModule; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uVisualGears.pas Tue Dec 17 00:02:52 2013 +0400 @@ -219,6 +219,13 @@ else DrawSprite(sprDroplet, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame); vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8); + vgtStraightShot: begin + if Gear^.dX < 0 then + i:= -1 + else + i:= 1; + DrawTextureRotatedF(SpritesData[TSprite(Gear^.State)].Texture, Gear^.Scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, i, SpritesData[TSprite(Gear^.State)].Width, SpritesData[TSprite(Gear^.State)].Height, Gear^.Angle); + end; end; //if (Gear^.Tint <> $FFFFFFFF) or tinted then untint; if (Gear^.Tint <> $FFFFFFFF) then @@ -487,7 +494,7 @@ if (cReducedQuality and rqKillFlakes) <> 0 then exit; -if hasBorder or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then +if hasBorder or (not cSnow) then for i:= 0 to Pred(vobCount * cScreenSpace div 4096) do AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake) else @@ -515,7 +522,7 @@ end else vg:= vg^.NextGear; end; -if ((GameFlags and gfBorder) <> 0) or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then +if hasBorder or (not cSnow) then for i:= 0 to Pred(vobSDCount * cScreenSpace div 4096) do AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake) else diff -r 7d0329f37181 -r f2b18754742f hedgewars/uVisualGearsHandlers.pas --- a/hedgewars/uVisualGearsHandlers.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uVisualGearsHandlers.pas Tue Dec 17 00:02:52 2013 +0400 @@ -71,6 +71,7 @@ procedure doStepSmoothWindBar(Gear: PVisualGear; Steps: Longword); procedure doStepStraightShot(Gear: PVisualGear; Steps: Longword); +function isSorterActive: boolean; inline; procedure initModule; implementation @@ -481,11 +482,17 @@ dy, ny, dw: LongInt; team: PTeam; SortFactor: QWord; + hdw: array[0..cMaxHHIndex] of LongInt; end; currsorter: PVisualGear = nil; +function isSorterActive: boolean; inline; +begin + isSorterActive:= currsorter <> nil +end; + procedure doStepTeamHealthSorterWork(Gear: PVisualGear; Steps: Longword); -var i, t: LongInt; +var i, t, h: LongInt; begin for t:= 1 to min(Steps, Gear^.Timer) do begin @@ -496,7 +503,13 @@ begin {$WARNINGS OFF} team^.DrawHealthY:= ny + dy * LongInt(Gear^.Timer) div cSorterWorkTime; - team^.TeamHealthBarWidth:= team^.NewTeamHealthBarWidth + dw * LongInt(Gear^.Timer) div cSorterWorkTime; + team^.TeamHealthBarHealth:= team^.TeamHealth + dw * LongInt(Gear^.Timer) div cSorterWorkTime; + + for h:= 0 to cMaxHHIndex do + if (team^.Hedgehogs[h].Gear <> nil) then + team^.Hedgehogs[h].HealthBarHealth:= team^.Hedgehogs[h].Gear^.Health + hdw[h] * LongInt(Gear^.Timer) div cSorterWorkTime + else + team^.Hedgehogs[h].HealthBarHealth:= hdw[h] * LongInt(Gear^.Timer) div cSorterWorkTime; {$WARNINGS ON} end; end; @@ -513,7 +526,7 @@ procedure doStepTeamHealthSorter(Gear: PVisualGear; Steps: Longword); var i: Longword; b: boolean; - t: LongInt; + t, h: LongInt; begin Steps:= Steps; // avoid compiler hint @@ -522,7 +535,7 @@ begin team:= TeamsArray[t]; dy:= team^.DrawHealthY; - dw:= team^.TeamHealthBarWidth - team^.NewTeamHealthBarWidth; + dw:= team^.TeamHealthBarHealth - team^.TeamHealth; if team^.TeamHealth > 0 then begin SortFactor:= team^.Clan^.ClanHealth; @@ -531,6 +544,12 @@ end else SortFactor:= 0; + + for h:= 0 to cMaxHHIndex do + if (team^.Hedgehogs[h].Gear <> nil) then + hdw[h]:= team^.Hedgehogs[h].HealthBarHealth - team^.Hedgehogs[h].Gear^.Health + else + hdw[h]:= team^.Hedgehogs[h].HealthBarHealth; end; if TeamsCount > 1 then @@ -569,7 +588,7 @@ if (Gear^.Hedgehog^.Gear <> nil) then begin - Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2 - Gear^.FrameTicks); + Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2 - Gear^.Tag); Gear^.Y:= hwFloat2Float(Gear^.Hedgehog^.Gear^.Y) - (16 + Gear^.Tex^.h); end; @@ -595,10 +614,11 @@ Gear^.Tex:= RenderSpeechBubbleTex(Gear^.Text, Gear^.FrameTicks, fnt16); +// FrameTicks cannot hold negative values case Gear^.FrameTicks of - 1: Gear^.FrameTicks:= SpritesData[sprSpeechTail].Width-28; - 2: Gear^.FrameTicks:= SpritesData[sprThoughtTail].Width-20; - 3: Gear^.FrameTicks:= SpritesData[sprShoutTail].Width-10; + 1: Gear^.Tag:= SpritesData[sprSpeechTail].Width-28; + 2: Gear^.Tag:= SpritesData[sprThoughtTail].Width-20; + 3: Gear^.Tag:= SpritesData[sprShoutTail].Width-10; end; Gear^.doStep:= @doStepSpeechBubbleWork; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uVisualGearsList.pas --- a/hedgewars/uVisualGearsList.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uVisualGearsList.pas Tue Dec 17 00:02:52 2013 +0400 @@ -24,7 +24,8 @@ function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline; function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline; -function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear; +function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear; inline; +function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean; Layer: LongInt): PVisualGear; procedure DeleteVisualGear(Gear: PVisualGear); function VisualGearByUID(uid : Longword) : PVisualGear; @@ -39,15 +40,20 @@ function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline; begin - AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false); + AddVisualGear:= AddVisualGear(X, Y, Kind, 0, false, -1); end; function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord): PVisualGear; inline; begin - AddVisualGear:= AddVisualGear(X, Y, Kind, State, false); + AddVisualGear:= AddVisualGear(X, Y, Kind, State, false, -1); end; -function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear; +function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean): PVisualGear; inline; +begin + AddVisualGear:= AddVisualGear(X, Y, Kind, State, Critical, -1); +end; + +function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord; Critical: Boolean; Layer: LongInt): PVisualGear; var gear: PVisualGear; t: Longword; sp: real; @@ -401,6 +407,8 @@ vgtCircle: gear^.Layer:= 2 end; +if Layer <> -1 then gear^.Layer:= Layer; + if VisualGearLayers[gear^.Layer] <> nil then begin VisualGearLayers[gear^.Layer]^.PrevGear:= gear; diff -r 7d0329f37181 -r f2b18754742f hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sat Dec 14 21:16:20 2013 +0400 +++ b/hedgewars/uWorld.pas Tue Dec 17 00:02:52 2013 +0400 @@ -60,9 +60,10 @@ , uCaptions , uCursor , uCommands -{$IFDEF USE_VIDEO_RECORDING} + , uTeams +{$IFDEF USE_VIDEO_RECORDING} , uVideoRec -{$ENDIF} +{$ENDIF} ; var cWaveWidth, cWaveHeight: LongInt; @@ -1231,7 +1232,7 @@ procedure RenderTeamsHealth; -var t, i, h, smallScreenOffset : LongInt; +var t, i, h, smallScreenOffset, TeamHealthBarWidth : LongInt; r: TSDL_Rect; highlight: boolean; htex: PTexture; @@ -1248,7 +1249,6 @@ with TeamsArray[t]^ do if TeamHealth > 0 then begin - h:= 0; highlight:= bShowFinger and (CurrentTeam = TeamsArray[t]) and ((RealTicks mod 1000) < 500); if highlight then @@ -1259,12 +1259,18 @@ else htex:= Clan^.HealthTex; - // draw name + // draw owner + if OwnerTex <> nil then + DrawTexture(-OwnerTex^.w - NameTagTex^.w - 18, cScreenHeight + DrawHealthY + smallScreenOffset, OwnerTex); + + // draw name DrawTexture(-NameTagTex^.w - 16, cScreenHeight + DrawHealthY + smallScreenOffset, NameTagTex); // draw flag DrawTexture(-14, cScreenHeight + DrawHealthY + smallScreenOffset, FlagTex); + TeamHealthBarWidth:= cTeamHealthWidth * TeamHealthBarHealth div MaxTeamHealth; + // draw health bar r.x:= 0; r.y:= 0; @@ -1277,13 +1283,14 @@ r.w:= 3; DrawTextureFromRect(TeamHealthBarWidth + 15, cScreenHeight + DrawHealthY + smallScreenOffset, @r, htex); + h:= 0; if not hasGone then for i:= 0 to cMaxHHIndex do - if Hedgehogs[i].Gear <> nil then - begin - inc(h,Hedgehogs[i].Gear^.Health); - if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture); - end; + begin + inc(h, Hedgehogs[i].HealthBarHealth); + if (h < TeamHealthBarHealth) and (Hedgehogs[i].HealthBarHealth > 0) then + DrawTexture(15 + h * TeamHealthBarWidth div TeamHealthBarHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture); + end; // draw ai kill counter for gfAISurvival if (GameFlags and gfAISurvival) <> 0 then @@ -1439,37 +1446,40 @@ SetScale(cDefaultZoomLevel); // Turn time -{$IFDEF USE_TOUCH_INTERFACE} -offsetX:= cScreenHeight - 13; -{$ELSE} -offsetX:= 48; -{$ENDIF} -offsetY:= cOffsetY; -if ((TurnTimeLeft <> 0) and (TurnTimeLeft < 1000000)) or (ReadyTimeLeft <> 0) then +if UIDisplay <> uiNone then begin - if ReadyTimeLeft <> 0 then - i:= Succ(Pred(ReadyTimeLeft) div 1000) - else - i:= Succ(Pred(TurnTimeLeft) div 1000); - - if i>99 then - t:= 112 - else if i>9 then - t:= 96 - else - t:= 80; - DrawSprite(sprFrame, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, 1); - while i > 0 do +{$IFDEF USE_TOUCH_INTERFACE} + offsetX:= cScreenHeight - 13; +{$ELSE} + offsetX:= 48; +{$ENDIF} + offsetY:= cOffsetY; + if ((TurnTimeLeft <> 0) and (TurnTimeLeft < 1000000)) or (ReadyTimeLeft <> 0) then begin - dec(t, 32); - DrawSprite(sprBigDigit, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, i mod 10); - i:= i div 10 + if ReadyTimeLeft <> 0 then + i:= Succ(Pred(ReadyTimeLeft) div 1000) + else + i:= Succ(Pred(TurnTimeLeft) div 1000); + + if i>99 then + t:= 112 + else if i>9 then + t:= 96 + else + t:= 80; + DrawSprite(sprFrame, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, 1); + while i > 0 do + begin + dec(t, 32); + DrawSprite(sprBigDigit, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, i mod 10); + i:= i div 10 + end; + DrawSprite(sprFrame, -(cScreenWidth shr 1) + t - 4 + offsetY, cScreenHeight - offsetX, 0); end; - DrawSprite(sprFrame, -(cScreenWidth shr 1) + t - 4 + offsetY, cScreenHeight - offsetX, 0); - end; // Captions -DrawCaptions; + DrawCaptions + end; {$IFDEF USE_TOUCH_INTERFACE} // Draw buttons Related to the Touch interface @@ -1485,13 +1495,16 @@ DrawScreenWidget(@utilityWidget); {$ENDIF} -RenderTeamsHealth; +if UIDisplay = uiAll then + RenderTeamsHealth; // Lag alert if isInLag then DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12); // Wind bar +if UIDisplay <> uiNone then + begin {$IFDEF USE_TOUCH_INTERFACE} offsetX:= cScreenHeight - 13; offsetY:= (cScreenWidth shr 1) + 74; @@ -1513,14 +1526,15 @@ else if WindBarWidth < 0 then begin - {$WARNINGS OFF} - r.x:= (Longword(WindBarWidth) + RealTicks shr 6) mod 8; - {$WARNINGS ON} - r.y:= 0; - r.w:= - WindBarWidth; - r.h:= 13; - DrawSpriteFromRect(sprWindL, r, (cScreenWidth shr 1) - offsetY + 74 + WindBarWidth, cScreenHeight - offsetX + 2, 13, 0); - end; + {$WARNINGS OFF} + r.x:= (Longword(WindBarWidth) + RealTicks shr 6) mod 8; + {$WARNINGS ON} + r.y:= 0; + r.w:= - WindBarWidth; + r.h:= 13; + DrawSpriteFromRect(sprWindL, r, (cScreenWidth shr 1) - offsetY + 74 + WindBarWidth, cScreenHeight - offsetX + 2, 13, 0); + end + end; // AmmoMenu if bShowAmmoMenu and ((AMState = AMHidden) or (AMState = AMHiding)) then @@ -1747,13 +1761,15 @@ procedure MoveCamera; var EdgesDist, wdy, shs,z, amNumOffsetX, amNumOffsetY: LongInt; + inbtwnTrgtAttks: Boolean; begin {$IFNDEF MOBILE} if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu) and autoCameraOn)) and cHasFocus and (GameState <> gsConfirm) then uCursor.updatePosition(); {$ENDIF} z:= round(200/zoom); -if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) and autoCameraOn then +inbtwnTrgtAttks := (CurrentHedgehog <> nil) and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0) and ((GameFlags and gfInfAttack) <> 0); +if autoCameraOn and not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) and not inbtwnTrgtAttks then if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then begin FollowGear:= nil; diff -r 7d0329f37181 -r f2b18754742f project_files/hedgewars.pro --- a/project_files/hedgewars.pro Sat Dec 14 21:16:20 2013 +0400 +++ b/project_files/hedgewars.pro Tue Dec 17 00:02:52 2013 +0400 @@ -114,7 +114,8 @@ ../QTfrontend/ui/widget/feedbackdialog.h \ ../QTfrontend/ui/widget/lineeditcursor.h \ ../QTfrontend/servermessages.h \ - ../QTfrontend/ui/widget/roomnameprompt.h + ../QTfrontend/ui/widget/roomnameprompt.h \ + ../QTfrontend/weapons.h SOURCES += ../QTfrontend/model/ammoSchemeModel.cpp \ diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Graphics/Hedgehog/amWhip.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amWhip.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Graphics/amRubber.png Binary file share/hedgewars/Data/Graphics/amRubber.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Graphics/boing.png Binary file share/hedgewars/Data/Graphics/boing.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/en.txt Tue Dec 17 00:02:52 2013 +0400 @@ -58,6 +58,7 @@ 00:54=Land Spray 00:55=Freezer 00:56=Cleaver +00:57=Rubber 01:00=Let's fight! 01:01=Round draw diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ar.ts --- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Tue Dec 17 00:02:52 2013 +0400 @@ -154,6 +154,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -370,6 +377,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -634,7 +654,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. + SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -647,19 +667,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -667,6 +674,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -794,6 +813,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -906,6 +937,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1225,14 +1263,6 @@ Room Name: رقم الغرقة - - Rules: - - - - Weapons: - - %1 players online @@ -1257,10 +1287,6 @@ - Clear filters - - - Open server administration page @@ -1387,6 +1413,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1483,13 +1525,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1626,6 +1666,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1646,10 +1718,6 @@ - Any - - - Disabled @@ -1852,10 +1920,6 @@ متفجرات - Tip: - - - Quality @@ -1997,6 +2061,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2019,10 +2095,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2247,6 +2319,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2383,6 +2462,10 @@ Create room + + set password + + RoomsListModel @@ -2430,6 +2513,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2497,13 +2584,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3098,4 +3178,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -369,6 +376,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -633,7 +653,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf се натъкна на грешка при показването на текста, най-вероятно свързана с програмна грешка в библиотеката freetype2. Препоръчително е да я обновите. + SDL_ttf се натъкна на грешка при показването на текста, най-вероятно свързана с програмна грешка в библиотеката freetype2. Препоръчително е да я обновите. @@ -646,19 +666,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -666,6 +673,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -793,6 +812,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -905,6 +936,13 @@ Save Запазване + + (%1 %2) + + + + + PageInGame @@ -1226,11 +1264,11 @@ Rules: - Правила: + Правила: Weapons: - Оръжия: + Оръжия: Search: @@ -1264,10 +1302,6 @@ - Clear filters - - - Open server administration page @@ -1394,6 +1428,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1490,13 +1540,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1633,6 +1681,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1654,7 +1734,7 @@ Any - Без значение + Без значение In lobby @@ -1868,7 +1948,7 @@ Tip: - Съвет: + Съвет: Quality @@ -2012,6 +2092,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2034,10 +2126,6 @@ Hedgewars %1 Таралежови войни %1 - - -r%1 (%2) - - QMessageBox @@ -2263,6 +2351,13 @@ + QObject + + No description available + + + + QPushButton Play demo @@ -2399,6 +2494,10 @@ Create room + + set password + + RoomsListModel @@ -2446,6 +2545,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2513,13 +2616,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3114,4 +3210,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Tue Dec 17 00:02:52 2013 +0400 @@ -154,6 +154,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -375,6 +382,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -639,7 +659,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf vyhodil chybu v renderování textu, s největší pravděpodobností je to spojeno s chybou ve freetype2. Je doporučeno aktualizovat Vaši freetype knihovnu. + SDL_ttf vyhodil chybu v renderování textu, s největší pravděpodobností je to spojeno s chybou ve freetype2. Je doporučeno aktualizovat Vaši freetype knihovnu. @@ -652,19 +672,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -672,6 +679,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -799,6 +818,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -917,6 +948,14 @@ Save Uložit + + (%1 %2) + + + + + + PageInGame @@ -1238,11 +1277,11 @@ Rules: - Pravidla: + Pravidla: Weapons: - Zbraně: + Zbraně: Search: @@ -1277,10 +1316,6 @@ - Clear filters - - - Open server administration page @@ -1407,6 +1442,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1504,13 +1555,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1647,6 +1696,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1668,7 +1749,7 @@ Any - Jakékoliv + Jakékoliv In lobby @@ -1882,7 +1963,7 @@ Tip: - Tip: + Tip: Quality @@ -2026,6 +2107,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2048,10 +2141,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2278,6 +2367,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2414,6 +2510,10 @@ Create room + + set password + + RoomsListModel @@ -2461,6 +2561,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2528,13 +2632,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3129,4 +3226,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_da.ts --- a/share/hedgewars/Data/Locale/hedgewars_da.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Tue Dec 17 00:02:52 2013 +0400 @@ -157,6 +157,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -373,6 +380,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -637,7 +657,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf returnerede en fejl under tekstrendering, højst sandsynligt er den relateret til en fejl i freetype2. Det anbefales at opdatere dit freetype bibliotek. + SDL_ttf returnerede en fejl under tekstrendering, højst sandsynligt er den relateret til en fejl i freetype2. Det anbefales at opdatere dit freetype bibliotek. @@ -650,19 +670,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -670,6 +677,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -797,6 +816,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -909,6 +940,13 @@ Save Gem + + (%1 %2) + + + + + PageInGame @@ -1230,11 +1268,11 @@ Rules: - Regler: + Regler: Weapons: - Våben: + Våben: Search: @@ -1268,10 +1306,6 @@ - Clear filters - - - Open server administration page @@ -1398,6 +1432,22 @@ Add an indestructible border along the bottom Tilføj en kant under banen som ikke kan destrueres + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1494,13 +1544,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1637,6 +1685,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1658,7 +1738,7 @@ Any - Ethvert + Ethvert In lobby @@ -1872,7 +1952,7 @@ Tip: - Tip: + Tip: Quality @@ -2020,6 +2100,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2042,10 +2134,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2271,6 +2359,13 @@ + QObject + + No description available + Ingen beskrivelse tilgængelig + + + QPushButton default @@ -2407,6 +2502,10 @@ Create room + + set password + + RoomsListModel @@ -2454,6 +2553,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2521,13 +2624,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3122,4 +3218,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Tue Dec 17 00:02:52 2013 +0400 @@ -5,7 +5,7 @@ About Unknown Compiler - + Unbekannter Compiler @@ -30,89 +30,101 @@ BanDialog IP - IP + IP-Adresse Nick - + Spitzname IP/Nick - + IP-Adresse/Spitzname Reason - + Grund Duration - + Dauer Ok - + OK Cancel - Abbrechen + Abbrechen you know why - + du weißt schon, warum Warning - + Warnung Please, specify %1 - + Bitte leg %1 fest nickname - + Spitzname permanent - + Spitzname DataManager Use Default - + Verwende Standard FeedbackDialog View - + Ansehen Cancel - Abbrechen + Abbrechen Send Feedback - + Feedback senden + + + Please give us feedback! + Bitte gib uns Feedback! We are always happy about suggestions, ideas, or bug reports. - + Wir freuen uns immer über Vorschläge, Ideen oder Fehlerberichte. + + + If you found a bug, you can see if it's already known here (english): + Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch): + + + Your email address is optional, but we may want to contact you. + Deine E-Mail-Adresse ist optional, aber wir könnten sie brauchen, um dich zu kontaktieren. Send us feedback! - + Schicke uns dein Feedback! If you found a bug, you can see if it's already been reported here: - + Falls du einen Fehler gefunden hast, kannst du hier sehen, ob er bereits bekannt is (auf Englisch): Your email address is optional, but necessary if you want us to get back at you. - + Deine E-Mail-Adresse ist optional, es sei denn du möchtest, dass wir dich zurückkontaktieren. @@ -145,68 +157,75 @@ Game scheme will auto-select a weapon - + Spielschema wird eine Waffe automatisch aussuchen Map - Karte + Karte Game options - + Spieloptionen + + + + GameUIConfig + + Guest + Gast HWApplication %1 minutes - - - + + %1 Minute + %1 Minuten %1 hour - - - + + %1 Stunde + %1 Stunden %1 hours - - - + + %1 Stunde + %1 Stunden %1 day - - - + + %1 Tag + %1 Tage %1 days - - - + + %1 Tag + %1 Tage Scheme '%1' not supported - + Das Schema »%1« wird nicht unterstützt Cannot create directory %1 - Verzeichnis %1 konnte nicht angelegt werden + Das Verzeichnis %1 konnte nicht angelegt werden Failed to open data directory: %1 Please check your installation! - Konnte Daten-Verzeichnis nicht öffnen: + Ich konnte dieses Daten-Verzeichnis nicht öffnen: %1 Bitte überprüfe deine Installation! @@ -239,11 +258,11 @@ Stylesheet imported from %1 - Style-Sheet aus %1 importiert + Stylesheet aus %1 importiert Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - Gib %1 ein wenn du das jetzige Style-Sheet in Zukunft weiterverwenden willst, gib %2 ein um es zurückzusetzen! + Gib %1 ein, wenn du das jetzige Stylesheet in Zukunft weiterverwenden willst; gib %2 ein, um es zurückzusetzen! Couldn't read %1 @@ -251,27 +270,27 @@ StyleSheet discarded - Style-Sheet verworfen + Stylesheet verworfen StyleSheet saved to %1 - Style-Sheet wurde nach %1 gesichert + Stylesheet wurde nach %1 gesichert Failed to save StyleSheet to %1 - Style-Sheet konnte nich nach %1 gesichert werden + Stylesheet konnte nicht nach %1 gesichert werden %1 has joined - + %1 ist beigetreten %1 has left - + %1 ist gegangen %1 has left (%2) - + %1 ist gegangen @@ -321,11 +340,11 @@ %1's Team - + Team von %1 Hedgewars - Nick registered - + Hedgewars – Spitzname registriert This nick is registered, and you haven't specified a password. @@ -333,48 +352,71 @@ If this nick isn't yours, please register your own nick at www.hedgewars.org Password: - + Dieser Spitzname ist registriert und du hast kein Passwort angegeben. + +Falls dieser Spitzname nicht deiner ist, dann registirier bitte deinen eigenen Spitznamen an www.hedgewars.org. + +Passwort: Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Dein Spitzname ist nicht registriert. +Um Andere von der Benutzung abzuhalten, registrier +ihn bitte auf www.hedgewars.org Your password wasn't saved either. - + + +Außerdem wurde auch dein Passwort nicht gespeichert. Hedgewars - Empty nickname - + Hedgewars – leerer Spitzname Hedgewars - Wrong password - + Hedgewars – falsches Passwort You entered a wrong password. - + Du hast ein falsches Passwort eingegeben. Try Again - + noch einmal versuchen Hedgewars - Connection error - + Hedgewars – Verbindungsfehler You reconnected too fast. Please wait a few seconds and try again. - + Du hast dich zu früh erneut verbunden. +Bitte warte ein paar Sekunden und versuch es noch einmal. + + + Guest + Gast + + + Room password + Raumkennwort + + + The room is protected with password. +Please, enter the password: + Der Raum wird durch ein Kennwort geschützt. +Bitte Kennwort eingeben: This page requires an internet connection. - + Diese Seite benötigt eine Internetverbindung. @@ -428,91 +470,95 @@ Map type: - + Kartentyp: Image map - + Bild-Karte Mission map - + Missions-Karte Hand-drawn - Handgemalt + Handgemalt Randomly generated - + Zufallsgeneriert Random maze - + Zufälliges Labyrinth Random - Zufall + Zufall Map preview: - + Kartenvorschau: Load map drawing - + Lade gezeichnete Karte Edit map drawing - + Bearbeite gezeichnete Karte Small islands - + Kleine Inseln Medium islands - + Mittelgroße Inseln Large islands - + Große Inseln Map size: - + Kartengröße: Maze style: - + Labyrinth-Art: Mission: - + Mission: Map: - + Karte: + + + Theme: + Thema: Load drawn map - Gezeichnete Karte laden + Gezeichnete Karte laden Drawn Maps - Gezeichnete Karten + Gezeichnete Karten All files - Alle Dateien + Alle Dateien Large tunnels - + Große Tunnel Theme: %1 - + Thema: %1 @@ -585,22 +631,25 @@ HWPasswordDialog Login - + Einloggen To connect to the server, please log in. If you don't have an account on www.hedgewars.org, just enter your nickname. - + Um dich zu dem Server zu verbinden, log dich bitte ein. + +Wenn du kein Benutzerkonto von www.hedgewars.org hast, +dann trag einfach nur deinen Spitznamen ein. Nickname: - + Spitzname: Password: - + Passwort: @@ -618,36 +667,36 @@ HatButton Change hat (%1) - + Hut wechseln (%1) HatPrompt Cancel - Abbrechen + Abbrechen Use selected hat - + Gewählten Hut auswählen Search for a hat: - + Nach einem Hut suchen: KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf meldete einen Fehler beim Rendern des Textes, dies liegt vermutlich an einem Fehler in freetype2. Es wird empfohlen die freetype Bibliothek auf den neuesten Stand zu bringen. + SDL_ttf meldete einen Fehler beim Rendern des Textes, dies liegt vermutlich an einem Fehler in freetype2. Es wird empfohlen, die freetype-Bibliothek auf dem neuesten Stand zu bringen. KeyBinder Category - + Kategorie @@ -655,30 +704,42 @@ Duration: %1m %2s - Dauer: %1m %2s + Dauer: %1m %2s Video: %1x%2, - Video: %1x%2, + Video: %1x%2, %1 fps, - %1 fps, + %1 Bilder pro Sekunde, Audio: - Audio: + Audio: unknown - + unbekannt + + + Duration: %1m %2s + Dauer: %1m %2s + + + Video: %1x%2 + Video: %1x%2 + + + %1 fps + %1 Bilder pro Sekunde, MapModel No description available. - + Keine Beschreibung verfügbar. @@ -701,7 +762,7 @@ Latest version protocol number: - Letzte Protokoll-Version + Protokollnummer der neuesten Version: MOTD preview: @@ -713,35 +774,35 @@ General - Allgemein + Allgemein Bans - + Verbannungen IP/Nick - + IP-Adr./Spitzname Expiration - + Ablaufzeitpunkt Reason - + Grund Refresh - + Aktualisieren Add - + Hinzufügen Remove - + Entfernen @@ -755,11 +816,11 @@ PageDataDownload Loading, please wait. - + Ladevorgang. Bitte warten. This page requires an internet connection. - + Diese Seite benötigt eine Internetverbindung. @@ -800,6 +861,18 @@ Eraser Radierer + + Polyline + Linienzug + + + Rectangle + Rechteck + + + Ellipse + Ellipse + PageEditTeam @@ -809,39 +882,39 @@ Select an action to choose a custom key bind for this team - + Wählt eine Aktion, um eine benutzerdefinierte Taste für dieses Team auszuwählen Use my default - + Verwende meine Vorgabe Reset all binds - + Alle Tastenbelegungen zurücksetzen Custom Controls - + Benutzerdefinierte Steuerung Hat - Cooliehat + Hut Name - Name + Name This hedgehog's name - + Name dieses Igels Randomize this hedgehog's name - + Zufälligen Igelnamen generieren Random Team - Zufallsteam + Zufallsteam @@ -886,8 +959,8 @@ <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - <b>%1</b> dachte es ist gut seinen eigenen Igel mit <b>%2</b> Punkten zu verletzen. - <b>%1</b> dachte es ist gut seine eigenen Igel mit <b>%2</b> Punkten zu verletzen. + <b>%1</b> dachte, es sei gut, die eigenen Igel mit <b>%2</b> Punkten zu verletzen. + <b>%1</b> dachte, es sei gut, die eigenen Igel mit <b>%2</b> Punkten zu verletzen. @@ -906,11 +979,18 @@ Play again - + Nochmal spielen Save - Sichern + Sichern + + + (%1 %2) + + (%1 %2) + (%1 %2) + @@ -967,23 +1047,23 @@ Play a game across a local area network - + ein Spiel über ein lokales Netzwerk (LAN) spielen Play a game on an official server - + ein Spiel auf einem offiziellen Server spielen Feedback - + Feedback Play local network game - + Spiel im lokalen Netzwerk Play official network game - + Spiel im offiziellem Netzwerk @@ -994,7 +1074,7 @@ Edit game preferences - Bearbeite Spieleinstellungen + Bearbeite Spieleinstellungen @@ -1005,30 +1085,30 @@ Edit game preferences - Bearbeite Spieleinstellungen + Bearbeite Spieleinstellungen Start - Start + Start Update - Aktualisieren + Aktualisieren Room controls - + Raumeinstellungen PageNetServer Click here for details - + Klick hier, um mehr zu erfahren Insert your address here - + Gib deine Adress hier ein @@ -1047,7 +1127,7 @@ You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - Du kannst keine Teams bei der Team-Auswahl ändern. Gehe zum Hauptmenü zurück um Teams hinzuzufügen, zu editieren oder zu löschen. + Du kannst keine Teams bei der Team-Auswahl ändern. Gehe zum Hauptmenü zurück, um Teams hinzuzufügen, zu editieren oder zu löschen. New scheme @@ -1115,91 +1195,91 @@ Select an action to change what key controls it - + Wähle eine Aktion, um zu ändern, durch welche Taste sie kontrolliert wird Reset to default - + Auf Standard zurücksetzen Reset all binds - + Alle Tastenbelegungen zurücksetzen Game - + Spiel Graphics - + Grafik Audio - + Ton Controls - + Steuerung Video Recording - + Videoaufzeichnung Network - + Netzwerk Teams - Teams + Teams Schemes - + Schemata Weapons - Waffen + Waffen Frontend - + Benutzeroberfläche Custom colors - Benutzerdefinierte Farben + Benutzerdefinierte Farben Game audio - + Ton im Spiel Frontend audio - + Ton in der Benutzeroberfläche Account - + Benutzerkonto Proxy settings - Proxy-Einstellungen + Proxy-Einstellungen Miscellaneous - Verschiedenes + Verschiedenes Updates - + Updates Check for updates - + nach Updates suchen Video recording options - Videoaufnahmeoptionen + Videoaufnahmeoptionen @@ -1233,11 +1313,11 @@ Rules: - Regeln: + Regeln: Weapons: - Waffen: + Waffen: Search: @@ -1256,27 +1336,27 @@ Search for a room: - + Nach einem Raum suchen: Create room - + Raum erstellen Join room - + Raum beitreten Room state - + Raum-Status Clear filters - + Filter leeren Open server administration page - + Server-Administrationsseite öffnen @@ -1395,11 +1475,27 @@ Add an indestructible border around the terrain - Fügt eine unzerstörbare Randbegrenzung um das Spielfeld herum hinzu. + Füge dem Spielfeld eine unzerstörbare Randbegrenzung hinzu Add an indestructible border along the bottom - Fügt eine unzerstörbare Randbegrenzung am unteren Kartenrand hinzu. + Füge dem unteren Kartenrand eine unzerstörbare Randbegrenzung an + + + None (Default) + Keine (Standard) + + + Wrap (World wraps) + Umbrechen (Welt wiederholt sich) + + + Bounce (Edges reflect) + Abprallen (Grenzen reflektieren) + + + Sea (Edges connect to sea) + Ozean (Grenzen sind mit dem Wasser verbunden) @@ -1429,7 +1525,7 @@ Play a hotseat game against your friends, or AI teams - Spiele gegen deine Freunde oder Computer-Teams. + Spiele gegen deine Freunde oder Computer-Teams Campaign Mode @@ -1499,19 +1595,27 @@ Date: %1 - + Datum: %1 Size: %1 - + Größe: %1 + + + Date: %1 + Datum: %1 + + + Size: %1 + Größe: %1 QAction Kick - Rauswerfen + Hinauswerfen Restrict Joins @@ -1555,15 +1659,15 @@ Restrict Unregistered Players Join - + Verhindere das Beitreten unregistrierter Spieler Show games in lobby - + Zeige Spiele in Vorbereitung Show games in-progress - + Zeige zur Zeit laufende Spiele @@ -1614,31 +1718,63 @@ Visual effects - + Visuelle Effekte Sound - + Ton In-game sound effects - + Toneffekte im Spiel Music - + Musik In-game music - + Musik im Spiel Frontend sound effects - + Toneffekte in der Benutzeroberfläche Frontend music - + Musik in der Benutzeroberfläche + + + Team + Team + + + Enable team tags by default + Aktiviere Team-Kennzeichnung bei Spielstart + + + Hog + Igel + + + Enable hedgehog tags by default + Aktiviere Igel-Kennzeichnung bei Spielstart + + + Health + Lebenspunkte + + + Enable health tags by default + Aktiviere Lebenspunkte-Kennzeichnung bei Spielstart + + + Translucent + Durchsichtig + + + Enable translucent tags by default + Aktiviere durchsichtige bei Spielstart @@ -1661,7 +1797,7 @@ Any - Alle + Alle In lobby @@ -1875,7 +2011,7 @@ Tip: - Tipp: + Tipp: Quality @@ -1983,47 +2119,59 @@ This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! - + Diese Entwicklungsversion ist unfertig und könnte nicht kompatibel mit anderen Versionen des Spiels sein, wobei sogar einige Funktionen sogar kaputt oder unfertig sein könnten. Fullscreen - Vollbild + Vollbild Fullscreen Resolution - + Vollbild-Auflösung Windowed Resolution - + Fenster-Auflösung Your Email - + Deine E-Mail-Adresse Summary - + Zusammenfassung Send system information - + Systeminformation senden Type the security code: - + Gib den Sicherheitscode ein: Revision - + Revision This program is distributed under the %1 - + Dieses Programm wird unter der %1 veröffentlicht + + + Tip: %1 + Tipp: %1 + + + Displayed tags above hogs and translucent tags + Angezeigte Infos über Igel und Info-Durchsichtigkeit This setting will be effective at next restart. - + Diese Einstellung tritt ab nächstem Neustart in Kraft. + + + World Edge + Spielfeldgrenze @@ -2047,10 +2195,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2227,7 +2371,7 @@ Do you really want to cancel uploading %1? - Willst du das Hochladen von %1 wirklich abbrechen_ + Willst du das Hochladen von %1 wirklich abbrechen? File error @@ -2267,40 +2411,48 @@ Hedgewars - Nick not registered - + Hedgewars – Spitzname nicht registriert System Information Preview - + Systeminformations-Vorschau Failed to generate captcha - + Captcha-Generierung fehlgeschlagen Failed to download captcha - + Captcha-Download fehlgeschlagen Please fill out all fields. Email is optional. - + Bitte füll alle Felder aus. Das Feld »E-Mail« ist optional. Hedgewars - Warning - + Hedgewars – Warnung Hedgewars - Information - + Hedgewars – Information Not all players are ready - + Es sind nicht alle Spieler bereit Are you sure you want to start this game? Not all players are ready. - + Bist du sicher, dass du diesees Spiel staren willst? +Es sind nicht alle Spieler bereit. + + + + QObject + + No description available + Keine Beschreibung verfügbar @@ -2387,58 +2539,66 @@ Restore default coding parameters - + Standard-Kodierungs-Einstellungen wiederherstellen Open the video directory in your system - + das Videoverzeichnis deines Systems öffnen Play this video - + dieses Video abspielen Delete this video - + dieses Video löschen Upload this video to your Youtube account - + dieses Video zu deinem YouTube-Benutzerkonto hochladen Reset - + Zurücksetzen Set the default server port for Hedgewars - + den Standard-Server-Port für Hedgewars setzen Invite your friends to your server in just 1 click! - + Lad deine Freunde zu deinem Server mit nur einem Klick ein! + + + Click to copy your unique server URL in your clipboard. Send this link to your friends and they will be able to join you. + Klick, um deine einzigartige URL in die Zwischenablage zu kopieren. Versende diesen Link an deine Freunde, damit sie dich auf deinem Server besuchen können. + + + Start private server + privaten Server starten Click to copy your unique server URL to your clipboard. Send this link to your friends and they will be able to join you. - - - - Start private server - + Klicke um deine Server-Adresse in die Zwischenablage zu kopieren. Sende diese als Link zu deinen Freunden damit sie dir beitreten können. RoomNamePrompt Enter a name for your room. - + Gib einen Namen für deinen Raum ein. Cancel - Abbrechen + Abbrechen Create room - + Raum erstellen + + + set password + Kennwort setzen @@ -2487,24 +2647,28 @@ Hand-drawn Handgemalt + + Script + Skript + SeedPrompt The map seed is the basis for all random values generated by the game. - + Der sog. Seed (wörtlich übersetzt: engl. für »Saat«) ist die Basis für alle Zufallswerte, die vom Spiel generiert werden. Cancel - Abbrechen + Abbrechen Set seed - + Seed setzen Close - + Schließen @@ -2538,41 +2702,42 @@ TCPBase Unable to start server at %1. - + Ich bin unfähig, den Server auf %1 zu starten. Unable to run engine at %1 Error code: %2 - + Ich bin unfähig, die Engine auf %1 laufen zu lassen. +Fehlercode: %2 TeamSelWidget At least two teams are required to play! - + Es sind mindestens zwei Teams für ein Spiel nötig! TeamShowWidget %1's team - + Team von %1 ThemePrompt Cancel - Abbrechen + Abbrechen Search for a theme: - + Nach einem Thema suchen: Use selected theme - + Ausgewähltes Thema benutzen @@ -2743,26 +2908,26 @@ hedgehog info - + Igel-Info binds (categories) Movement - + Bewegung Weapons - Waffen + Waffen Camera - + Kamera Miscellaneous - Verschiedenes + Verschiedenes @@ -2833,7 +2998,7 @@ Hedgehog movement - + Igel-Bewegung @@ -3155,4 +3320,127 @@ Steuerkreuz + + server + + Authentication failed + Authentifizierung fehlgeschlagen + + + 60 seconds cooldown after kick + 60 Sekunden Abkühlzeit nach Hinauswurf + + + kicked + hinausgeworfen + + + Ping timeout + Ping-Timeout + + + bye + tschüss + + + Empty config entry + Leerer Konfigurations-Eintrag + + + Corrupted hedgehogs info + Kaputte Igel-Info + + + too many teams + zu viele Teams + + + too many hedgehogs + zu viele Igel + + + There's already a team with same name in the list + Es gibt bereits ein Team mit dem selben Namen in der Liste + + + round in progress + laufende Runde + + + restricted + eingeschränkt + + + REMOVE_TEAM: no such team + REMOVE_TEAM: kein solches Team + + + Not team owner! + Nicht Team-Besitzer*In! + + + Less than two clans! + Weniger als zwei Clans! + + + Room with such name already exists + ein Raum mit einem solchen Namen existiert bereits + + + Illegal room name + verbotener Raumname + + + No such room + kein solcher Raum + + + Joining restricted + eingeschränkter Zugang + + + Registered users only + nur für registrierte Benutzer + + + You are banned in this room + Du wurdest von diesem Raum verbannt + + + Nickname already chosen + Spitzname bereits gewählt + + + Illegal nickname + Verbotener Spitzname + + + Protocol already known + Protokoll bereits bekannt + + + Bad number + Schlechte Zahl + + + Nickname is already in use + Spitzname bereits in Benutzung + + + Restricted + + + + Not room master + + + + No checker rights + + + + Room version incompatible to your hedgewars version + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_el.ts --- a/share/hedgewars/Data/Locale/hedgewars_el.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -371,6 +378,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -635,7 +655,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - Το SDL_ttf επέστρεψε σφάλμα καθώς διερμήνευσε κείμενο. Το πιο πιθανό είναι αυτό να σχετίζεται με το σφάλμα στο freetype2. Προτείνεται να αναβαθμίσετε το freetype lib. + Το SDL_ttf επέστρεψε σφάλμα καθώς διερμήνευσε κείμενο. Το πιο πιθανό είναι αυτό να σχετίζεται με το σφάλμα στο freetype2. Προτείνεται να αναβαθμίσετε το freetype lib. @@ -648,19 +668,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -668,6 +675,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -795,6 +814,18 @@ Save drawn map + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -907,6 +938,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1228,11 +1266,11 @@ Rules: - Κανόνες : + Κανόνες : Weapons: - Όπλα : + Όπλα : Search: @@ -1266,10 +1304,6 @@ - Clear filters - - - Open server administration page @@ -1396,6 +1430,22 @@ Copy + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1492,13 +1542,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1635,6 +1683,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1656,7 +1736,7 @@ Any - Οποιοσδήποτε + Οποιοσδήποτε In lobby @@ -1870,7 +1950,7 @@ Tip: - Συμβουλή : + Συμβουλή : Quality @@ -2014,6 +2094,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2036,10 +2128,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2265,6 +2353,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2401,6 +2496,10 @@ Create room + + set password + + RoomsListModel @@ -2448,6 +2547,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2515,13 +2618,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3116,4 +3212,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -369,6 +376,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -633,7 +653,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. + SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -646,19 +666,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -666,6 +673,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -793,6 +812,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -905,6 +936,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1224,14 +1262,6 @@ Room Name: Room Name: - - Rules: - - - - Weapons: - - %1 players online @@ -1256,10 +1286,6 @@ - Clear filters - - - Open server administration page @@ -1386,6 +1412,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1482,13 +1524,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1625,6 +1665,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1645,10 +1717,6 @@ - Any - - - Disabled @@ -1851,10 +1919,6 @@ Explosives - Tip: - - - Quality @@ -1996,6 +2060,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2018,10 +2094,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2247,6 +2319,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2383,6 +2462,10 @@ Create room + + set password + + RoomsListModel @@ -2430,6 +2513,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2497,13 +2584,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3098,4 +3178,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Tue Dec 17 00:02:52 2013 +0400 @@ -157,6 +157,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -373,6 +380,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -637,7 +657,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf ha devuelto un error al dibujar texto, probablemente relacionado con un bug en freetype2. Se recomienda actualizar la librería freetype. + SDL_ttf ha devuelto un error al dibujar texto, probablemente relacionado con un bug en freetype2. Se recomienda actualizar la librería freetype. @@ -650,19 +670,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -670,6 +677,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -797,6 +816,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -909,6 +940,13 @@ Save Guardar + + (%1 %2) + + + + + PageInGame @@ -1230,11 +1268,11 @@ Rules: - Reglas: + Reglas: Weapons: - Armas: + Armas: Search: @@ -1268,10 +1306,6 @@ - Clear filters - - - Open server administration page @@ -1398,6 +1432,22 @@ Add an indestructible border along the bottom Añade un borde indestructible en la parta inferior + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1494,13 +1544,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1637,6 +1685,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1658,7 +1738,7 @@ Any - Cualquiera + Cualquiera In lobby @@ -1872,7 +1952,7 @@ Tip: - Consejo: + Consejo: Quality @@ -2016,6 +2096,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2038,10 +2130,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2267,6 +2355,13 @@ + QObject + + No description available + + + + QPushButton Go! @@ -2403,6 +2498,10 @@ Create room + + set password + + RoomsListModel @@ -2450,6 +2549,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2517,13 +2620,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3118,4 +3214,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -369,6 +376,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -633,7 +653,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf palautti virheen mallintaessaan tekstiä, todennäköisesti syy on freetype2:n ohjelmavirheessä. Freetype-kirjaston päivitys on suosiltetavaa. + SDL_ttf palautti virheen mallintaessaan tekstiä, todennäköisesti syy on freetype2:n ohjelmavirheessä. Freetype-kirjaston päivitys on suosiltetavaa. @@ -646,19 +666,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -666,6 +673,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -793,6 +812,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -905,6 +936,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1226,11 +1264,11 @@ Rules: - Säännöt: + Säännöt: Weapons: - Aseet: + Aseet: Search: @@ -1264,10 +1302,6 @@ - Clear filters - - - Open server administration page @@ -1394,6 +1428,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1490,13 +1540,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1633,6 +1681,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1654,7 +1734,7 @@ Any - Mikä tahansa + Mikä tahansa In lobby @@ -1868,7 +1948,7 @@ Tip: - Vinkki: + Vinkki: Quality @@ -2012,6 +2092,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2034,10 +2126,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2263,6 +2351,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2399,6 +2494,10 @@ Create room + + set password + + RoomsListModel @@ -2446,6 +2545,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2513,13 +2616,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3114,4 +3210,127 @@ Hiiri: Vasen nappi + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Tue Dec 17 00:02:52 2013 +0400 @@ -165,6 +165,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -394,6 +401,19 @@ This page requires an internet connection. Cette page nécessite une connexion internet. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -665,7 +685,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf a renvoyé une erreur pendant l'affichage du texte, cela est sûrement causé par le bug de freetype2. Il est recommandé de mettre à jour la librairie freetype. + SDL_ttf a renvoyé une erreur pendant l'affichage du texte, cela est sûrement causé par le bug de freetype2. Il est recommandé de mettre à jour la librairie freetype. @@ -680,15 +700,15 @@ Duration: %1m %2s - Durée: %1m %2s + Durée: %1m %2s Video: %1x%2, - Vidéo: %1x%2 + Vidéo: %1x%2 %1 fps, - %1 fps, + %1 fps, Audio: @@ -698,6 +718,18 @@ unknown inconnu + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -825,6 +857,18 @@ Eraser Gomme + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -937,6 +981,13 @@ Save Enregistrer + + (%1 %2) + + + + + PageInGame @@ -1258,11 +1309,11 @@ Rules: - Règles : + Règles : Weapons: - Armes : + Armes : Search: @@ -1297,7 +1348,7 @@ Clear filters - Enlever les filtres + Enlever les filtres Open server administration page @@ -1427,6 +1478,22 @@ Add an indestructible border along the bottom Ajouter une bordure indestructible en bas + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1525,12 +1592,20 @@ Date: %1 - Date: %1 + Date: %1 Size: %1 - Taille: %1 + Taille: %1 + + + Date: %1 + Date: %1 {1?} + + + Size: %1 + Taille: %1 {1?} @@ -1666,6 +1741,38 @@ Frontend music Musique de l'interface + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1687,7 +1794,7 @@ Any - Tout + Tout In lobby @@ -1901,7 +2008,7 @@ Tip: - Conseil: + Conseil: Quality @@ -2047,6 +2154,18 @@ This setting will be effective at next restart. Le changement sera opérationnel au prochain redémarrage. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2071,7 +2190,7 @@ -r%1 (%2) - -r%1 (%2) + -r%1 (%2) @@ -2301,6 +2420,13 @@ + QObject + + No description available + Aucune description disponible + + + QPushButton Play demo @@ -2437,6 +2563,10 @@ Create room Créer une salle + + set password + + RoomsListModel @@ -2484,6 +2614,10 @@ Hand-drawn Dessinée + + Script + + SeedPrompt @@ -2555,7 +2689,7 @@ TeamShowWidget %1's team - Equipe de %1 + Equipe de %1 @@ -3158,111 +3292,123 @@ server Authentication failed - Echec d'authentification + Echec d'authentification 60 seconds cooldown after kick - Bannis pour 60 sec après un kick + Bannis pour 60 sec après un kick kicked - Exclus (kick) + Exclus (kick) Ping timeout - Met trop de temps à répondre + Met trop de temps à répondre bye - Aurevoir + Aurevoir Empty config entry - Configuration vide + Configuration vide Not room master - Vous n'êtes pas le propriétaire de la room + Vous n'êtes pas le propriétaire de la room Corrupted hedgehogs info - Info hérisson corrompus + Info hérisson corrompus too many teams - trop d'équipes + trop d'équipes too many hedgehogs - trop de hérissons + trop de hérissons There's already a team with same name in the list - Il y a déja une équipe avec le même nom dans la liste + Il y a déja une équipe avec le même nom dans la liste round in progress - La partie est en cour + La partie est en cour restricted - Ajout interdis + Ajout interdis REMOVE_TEAM: no such team - REMOVE_TEAM: aucune équipe de ce nom + REMOVE_TEAM: aucune équipe de ce nom Not team owner! - Vous n'êtes pas le propriétaire de cette équipe! + Vous n'êtes pas le propriétaire de cette équipe! Less than two clans! - Il faut 2 clans minimum! + Il faut 2 clans minimum! Room with such name already exists - Ce nom de room existe déjà + Ce nom de room existe déjà Illegal room name - Nom de room invalide + Nom de room invalide No such room - Cette room n'existe pas + Cette room n'existe pas Joining restricted - Accès interdis + Accès interdis Registered users only - Accès réservé aux utilisateurs enregistré + Accès réservé aux utilisateurs enregistré You are banned in this room - Vous avez été bannis de cette room + Vous avez été bannis de cette room Nickname already chosen - Pseudo déjà choisis + Pseudo déjà choisis Illegal nickname - Pseudo invalide + Pseudo invalide Protocol already known - Protocole déjà connu + Protocole déjà connu Bad number - Mauvais numéro + Mauvais numéro Nickname is already in use - Ce pseudo est actuellement utilisé sur le serveur + Ce pseudo est actuellement utilisé sur le serveur + + + Restricted + + + + No checker rights + + + + Room version incompatible to your hedgewars version + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_gl.ts --- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -369,6 +376,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -633,7 +653,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf devolveu un erro ao renderizar o texto, seguramente sexa por mor do erro de freetype2. Cómpre que actualices a túa biblioteca freetype. + SDL_ttf devolveu un erro ao renderizar o texto, seguramente sexa por mor do erro de freetype2. Cómpre que actualices a túa biblioteca freetype. @@ -646,19 +666,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -666,6 +673,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -793,6 +812,18 @@ Save drawn map + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -905,6 +936,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1225,14 +1263,6 @@ Nome da sala: - Rules: - - - - Weapons: - - - Clear Borrado @@ -1260,10 +1290,6 @@ - Clear filters - - - Open server administration page @@ -1390,6 +1416,22 @@ Copy + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1486,13 +1528,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1629,6 +1669,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1708,10 +1780,6 @@ Green/Red grayscale - - Any - - QGroupBox @@ -1877,10 +1945,6 @@ - Tip: - - - Locale @@ -2000,6 +2064,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2022,10 +2098,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2250,6 +2322,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2386,6 +2465,10 @@ Create room + + set password + + RoomsListModel @@ -2433,6 +2516,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2500,13 +2587,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3101,4 +3181,127 @@ Mando + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_hu.ts --- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Tue Dec 17 00:02:52 2013 +0400 @@ -152,6 +152,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -363,6 +370,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -627,7 +647,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf hibát dobott a szöveg kiírásakor, ezt valószínűleg a freetype2 egy hibája okozza. Ajánlott a freetype lib frissítése. + SDL_ttf hibát dobott a szöveg kiírásakor, ezt valószínűleg a freetype2 egy hibája okozza. Ajánlott a freetype lib frissítése. @@ -640,19 +660,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -660,6 +667,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -787,6 +806,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -893,6 +924,12 @@ Save + + (%1 %2) + + + + PageInGame @@ -1213,14 +1250,6 @@ Szoba neve: - Rules: - - - - Weapons: - - - Clear Törlés @@ -1247,10 +1276,6 @@ - Clear filters - - - Open server administration page @@ -1377,6 +1402,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1472,13 +1513,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1615,6 +1654,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1635,10 +1706,6 @@ - Any - - - Disabled @@ -1841,10 +1908,6 @@ Robbanótöltetek - Tip: - - - Quality @@ -1986,6 +2049,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2008,10 +2083,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2235,6 +2306,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2371,6 +2449,10 @@ Create room + + set password + + RoomsListModel @@ -2418,6 +2500,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2485,13 +2571,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3086,4 +3165,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Tue Dec 17 00:02:52 2013 +0400 @@ -169,6 +169,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -398,6 +405,19 @@ This page requires an internet connection. Questa pagina richiede una connessione a Internet. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -669,7 +689,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf ha restituito un errore durante il rendering del testo, probabilmente relativo ad un bug della libreria freetype2. Si raccomanda di aggiornare le proprie librerie freetype. + SDL_ttf ha restituito un errore durante il rendering del testo, probabilmente relativo ad un bug della libreria freetype2. Si raccomanda di aggiornare le proprie librerie freetype. @@ -684,15 +704,15 @@ Duration: %1m %2s - Durata: %1m %2s + Durata: %1m %2s Video: %1x%2, - Video: %1x%2, + Video: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: @@ -702,6 +722,18 @@ unknown sconosciuto + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -829,6 +861,18 @@ Eraser Gomma + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -941,6 +985,13 @@ Save Salva + + (%1 %2) + + + + + PageInGame @@ -1262,11 +1313,11 @@ Rules: - Regole: + Regole: Weapons: - Armi: + Armi: Search: @@ -1301,7 +1352,7 @@ Clear filters - Rimuovi filtri + Rimuovi filtri Open server administration page @@ -1430,6 +1481,22 @@ Add an indestructible border along the bottom Aggiungi un bordo indistruttibile lungo la parte inferiore della mappa + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1528,15 +1595,25 @@ Date: %1 - Data: %1 + Data: %1 Size: %1 - Dimensione: %1 + Dimensione: %1 + + Date: %1 + Data: %1 + {1?} + + + Size: %1 + Dimensione: %1 + {1?} + QAction @@ -1671,6 +1748,38 @@ Frontend music Musica in presentazione + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1692,7 +1801,7 @@ Any - Qualsiasi + Qualsiasi In lobby @@ -1906,7 +2015,7 @@ Tip: - Suggerimento: + Suggerimento: Quality @@ -2056,6 +2165,18 @@ This setting will be effective at next restart. Questa impostazione avrà effetto al prossimo riavvio. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2080,7 +2201,7 @@ -r%1 (%2) - -r%1 (%2) + -r%1 (%2) @@ -2338,6 +2459,13 @@ + QObject + + No description available + Nessuna descrizione disponibile + + + QPushButton Go! @@ -2474,6 +2602,10 @@ Create room Crea stanza + + set password + + RoomsListModel @@ -2521,6 +2653,10 @@ Hand-drawn Disegnata a mano + + Script + + SeedPrompt @@ -2592,7 +2728,7 @@ TeamShowWidget %1's team - Squadra di %1 + Squadra di %1 @@ -3194,111 +3330,123 @@ server Not room master - Non proprietario della stanza + Non proprietario della stanza Corrupted hedgehogs info - Informazioni ricci corrotte + Informazioni ricci corrotte too many teams - troppe squadre + troppe squadre too many hedgehogs - troppi ricci + troppi ricci There's already a team with same name in the list - C'è già una quadra collo stesso nome in lista + C'è già una quadra collo stesso nome in lista round in progress - turno in corso + turno in corso restricted - proibito + proibito REMOVE_TEAM: no such team - CANCELLA_SQUADRA: squadra non presente + CANCELLA_SQUADRA: squadra non presente Not team owner! - Non proprietario della squadra! + Non proprietario della squadra! Less than two clans! - Meno di due clan! + Meno di due clan! Room with such name already exists - Esiste già una stanza con questo nome + Esiste già una stanza con questo nome Nickname already chosen - Nome già scelto + Nome già scelto Illegal nickname - Nome non valido + Nome non valido Protocol already known - Protocollo già conosciuto + Protocollo già conosciuto Bad number - Numero non valido + Numero non valido Nickname is already in use - Nome già in uso + Nome già in uso Authentication failed - Autenticazione fallita + Autenticazione fallita 60 seconds cooldown after kick - 60 secondi di raffreddamento prima dell'espulsione + 60 secondi di raffreddamento prima dell'espulsione kicked - espulso + espulso Ping timeout - Scadenza ping + Scadenza ping bye - ciao + ciao Illegal room name - Nome stanza non valido + Nome stanza non valido No such room - Stanza non esistente + Stanza non esistente Joining restricted - Ingresso riservato + Ingresso riservato Registered users only - Solo utenti registrati + Solo utenti registrati You are banned in this room - Sei stato espulso dalla stanza + Sei stato espulso dalla stanza Empty config entry - Configurazione vuota + Configurazione vuota + + + Restricted + + + + No checker rights + + + + Room version incompatible to your hedgewars version + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Tue Dec 17 00:02:52 2013 +0400 @@ -152,6 +152,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -363,6 +370,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -627,7 +647,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. + SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -640,19 +660,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -660,6 +667,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -787,6 +806,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -893,6 +924,12 @@ Save セーブ + + (%1 %2) + + + + PageInGame @@ -1212,14 +1249,6 @@ Room Name: ルーム名: - - Rules: - - - - Weapons: - - %1 players online @@ -1243,10 +1272,6 @@ - Clear filters - - - Open server administration page @@ -1373,6 +1398,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1468,13 +1509,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1611,6 +1650,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1631,10 +1702,6 @@ - Any - - - Disabled @@ -1837,10 +1904,6 @@ - Tip: - - - Quality @@ -1982,6 +2045,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2004,10 +2079,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2231,6 +2302,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2367,6 +2445,10 @@ Create room + + set password + + RoomsListModel @@ -2414,6 +2496,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2481,13 +2567,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3082,4 +3161,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ko.ts --- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Tue Dec 17 00:02:52 2013 +0400 @@ -152,6 +152,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -363,6 +370,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -620,13 +640,6 @@ - KB - - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - - - - KeyBinder Category @@ -636,19 +649,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -656,6 +656,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -783,6 +795,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -889,6 +913,12 @@ Save + + (%1 %2) + + + + PageInGame @@ -1192,14 +1222,6 @@ Admin features - - Rules: - - - - Weapons: - - %1 players online @@ -1223,10 +1245,6 @@ - Clear filters - - - Open server administration page @@ -1353,6 +1371,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1448,13 +1482,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1587,6 +1619,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1607,10 +1671,6 @@ - Any - - - Disabled @@ -1809,10 +1869,6 @@ - Tip: - - - Quality @@ -1954,6 +2010,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -1976,10 +2044,6 @@ Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2195,6 +2259,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2331,6 +2402,10 @@ Create room + + set password + + RoomsListModel @@ -2378,6 +2453,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2445,13 +2524,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3046,4 +3118,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_lt.ts --- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Tue Dec 17 00:02:52 2013 +0400 @@ -4,7 +4,7 @@ About - + Unknown Compiler @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -186,6 +186,14 @@ + GameUIConfig + + + Guest + + + + HWApplication @@ -238,7 +246,7 @@ - + Scheme '%1' not supported @@ -335,44 +343,52 @@ HWForm - + DefaultTeam - + Game aborted - + Nickname + + + No nickname supplied. + + + - - No nickname supplied. - - - - Someone already uses your nickname %1 on the server. Please pick another nickname: - + + + + + Guest + + + + %1's Team - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -381,81 +397,92 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + + Room password + + + + + The room is protected with password. +Please, enter the password: + + + + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. @@ -463,13 +490,13 @@ HWGame - + en.txt lt.txt - + Cannot open demofile %1 @@ -477,158 +504,158 @@ HWMapContainer - + Map type: - + Image map - + Mission map - + Hand-drawn - + Randomly generated - + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - + All - + Small - + Medium - + Large + + Cavern + + + + + Wacky + + + + + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + + Large islands + + + + + Map size: + + + + + Maze style: + + + + + Mission: + + + + + Map: + + + + + + Theme: %1 + + + + + Load drawn map + + + + + Drawn Maps + + + + + All files + + + - Cavern + Small tunnels - Wacky - - - - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - - - Large islands - - - - - Map size: - - - - - Maze style: - - - - - Mission: - - - - - Map: - - - - - - Theme: %1 - - - - - Load drawn map - - - - - Drawn Maps - - - - - All files - - - - - Small tunnels - - - - Medium tunnels - + Seed @@ -659,53 +686,53 @@ - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. - + Connection refused - + The server is too old. Disconnecting now. - + Room destroyed - + You got kicked - - + + %1 *** %2 has joined the room - + %1 *** %2 has left - + %1 *** %2 has left (%3) - + Quit reason: @@ -752,7 +779,7 @@ HatButton - + Change hat (%1) @@ -776,14 +803,6 @@ - KB - - - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - - - - KeyBinder @@ -794,28 +813,27 @@ LibavInteraction - - Duration: %1m %2s - - - - - - Video: %1x%2, + + Duration: %1m %2s - %1 fps, + Video: %1x%2 - Audio: + %1 fps + Audio: + + + + unknown @@ -823,7 +841,7 @@ MapModel - + No description available. @@ -930,49 +948,64 @@ PageDrawMap - + Eraser - - Undo - - - - Clear - - - - - Load + Undo + Polyline + + + + + Rectangle + + + + + Ellipse + + + + + Clear + + + + + Load + + + + Save - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1033,37 +1066,38 @@ PageGameStats - + Details - + + Health graph - + Ranking - - Play again - - - + Play again + + + + Save - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. @@ -1072,7 +1106,7 @@ - + A total of <b>%1</b> hedgehog(s) were killed during this round. @@ -1081,7 +1115,7 @@ - + (%1 kill) @@ -1090,7 +1124,16 @@ - + + (%1 %2) + + + + + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. @@ -1099,7 +1142,7 @@ - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. @@ -1108,7 +1151,7 @@ - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1374,97 +1417,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - - Account - - - - - Proxy settings - - - - - Proxy host - - - + Account + + + + + Proxy settings + + + + + Proxy host + + + + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1505,32 +1548,17 @@ - - Rules: - - - - - Weapons: - - - - - Clear filters - - - - + Admin features - + Open server administration page - + %1 players online @@ -1677,17 +1705,37 @@ - + + None (Default) + + + + + Wrap (World wraps) + + + + + Bounce (Edges reflect) + + + + + Sea (Edges connect to sea) + + + + Copy - + New - + Delete @@ -1799,14 +1847,12 @@ - Date: %1 - + Date: %1 - Size: %1 - + Size: %1 @@ -1844,23 +1890,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -1903,54 +1949,94 @@ - + + Team + + + + + Enable team tags by default + + + + + Hog + + + + + Enable hedgehog tags by default + + + + + Health + + + + + Enable health tags by default + + + + + Translucent + + + + + Enable translucent tags by default + + + + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Append date and time to record file name - + Check for updates at startup - + Fullscreen @@ -1961,7 +2047,7 @@ - + Save password @@ -1976,12 +2062,12 @@ - + Record audio - + Use game resolution @@ -1999,12 +2085,12 @@ - + Community - + (System default) @@ -2083,12 +2169,6 @@ Green/Red grayscale - - - - Any - - QGroupBox @@ -2141,12 +2221,12 @@ QLabel - + Revision - + This program is distributed under the %1 @@ -2201,16 +2281,16 @@ - - Tip: - - - This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + Tip: %1 + + + Server name: @@ -2221,22 +2301,22 @@ - + Locale - + Nickname - + This setting will be effective at next restart. - + Resolution @@ -2266,7 +2346,12 @@ - + + Displayed tags above hogs and translucent tags + + + + Initial sound volume @@ -2352,6 +2437,11 @@ + World Edge + + + + Scheme Name: @@ -2418,27 +2508,27 @@ - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2446,18 +2536,18 @@ QLineEdit - + unnamed - + hedgehog %1 - + anonymous @@ -2469,111 +2559,106 @@ Hedgewars %1 - - - -r%1 (%2) - - QMessageBox - + Teams - Are you sure? - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. - - Error - - - + Error + + + + Cannot use the ammo '%1'! @@ -2641,38 +2726,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2703,20 +2788,20 @@ - - - + + + File error - + Cannot open '%1' for writing - - + + Cannot open '%1' for reading @@ -2758,6 +2843,15 @@ + QObject + + + + No description available + + + + QPushButton @@ -2776,7 +2870,7 @@ - + Go! @@ -2832,7 +2926,7 @@ - + Associate file extensions @@ -2865,12 +2959,12 @@ - + Set default options - + Restore default coding parameters @@ -2920,17 +3014,22 @@ RoomNamePrompt - + Enter a name for your room. - + + set password + + + + Cancel - + Create room @@ -2969,26 +3068,31 @@ - Rules + Script + Rules + + + + Weapons - - Random Map - - - - Random Maze + Random Map + Random Maze + + + + Hand-drawn @@ -3074,14 +3178,6 @@ - TeamShowWidget - - - %1's team - - - - ThemePrompt @@ -3467,7 +3563,7 @@ - + Keyboard @@ -3827,4 +3923,157 @@ + + server + + + Restricted + + + + + Not room master + + + + + Corrupted hedgehogs info + + + + + too many teams + + + + + too many hedgehogs + + + + + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + + Not team owner! + + + + + Less than two clans! + + + + + Illegal room name + + + + + Room with such name already exists + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number + + + + + Nickname is already in use + + + + + No checker rights + + + + + Authentication failed + + + + + 60 seconds cooldown after kick + + + + + kicked + + + + + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ms.ts --- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Tue Dec 17 00:02:52 2013 +0400 @@ -4,7 +4,7 @@ About - + Unknown Compiler @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -184,6 +184,14 @@ + GameUIConfig + + + Guest + + + + HWApplication @@ -226,7 +234,7 @@ - + Scheme '%1' not supported @@ -323,27 +331,35 @@ HWForm - + + + + + Guest + + + + DefaultTeam - + %1's Team - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -352,98 +368,109 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - - Nickname - - - - - Someone already uses your nickname %1 on the server. -Please pick another nickname: - - - - - No nickname supplied. + Nickname - + Someone already uses your nickname %1 on the server. +Please pick another nickname: + + + + + + No nickname supplied. + + + + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + + Room password + + + + + The room is protected with password. +Please, enter the password: + + + + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. @@ -451,13 +478,13 @@ HWGame - + en.txt ms.txt - + Cannot open demofile %1 @@ -465,158 +492,158 @@ HWMapContainer - + Map type: - + Image map - + Mission map - + Hand-drawn - + Randomly generated - + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - + All - + Small - + Medium - + Large + + Cavern + + + + + Wacky + + + + + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + + Large islands + + + + + Map size: + + + + + Maze style: + + + + + Mission: + + + + + Map: + + + + + + Theme: %1 + + + + + Load drawn map + + + + + Drawn Maps + + + + + All files + + + - Cavern + Small tunnels - Wacky - - - - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - - - Large islands - - - - - Map size: - - - - - Maze style: - - - - - Mission: - - - - - Map: - - - - - - Theme: %1 - - - - - Load drawn map - - - - - Drawn Maps - - - - - All files - - - - - Small tunnels - - - - Medium tunnels - + Seed @@ -642,7 +669,7 @@ HWNewNet - + Quit reason: @@ -652,48 +679,48 @@ - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. - + Connection refused - + The server is too old. Disconnecting now. - + You got kicked - + %1 *** %2 has left - + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Room destroyed @@ -740,7 +767,7 @@ HatButton - + Change hat (%1) @@ -764,14 +791,6 @@ - KB - - - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - - - - KeyBinder @@ -782,28 +801,27 @@ LibavInteraction - - Duration: %1m %2s - - - - - - Video: %1x%2, + + Duration: %1m %2s - %1 fps, + Video: %1x%2 - Audio: + %1 fps + Audio: + + + + unknown @@ -811,7 +829,7 @@ MapModel - + No description available. @@ -918,49 +936,64 @@ PageDrawMap - + Eraser - - Undo - - - - Clear - - - - - Load + Undo + Polyline + + + + + Rectangle + + + + + Ellipse + + + + + Clear + + + + + Load + + + + Save - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1021,72 +1054,80 @@ PageGameStats - + Details - + + Health graph - + Ranking - - Play again - - - + Play again + + + + Save - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + + (%1 %2) + + + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1350,97 +1391,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - - Account - - - - - Proxy settings - - - - - Proxy host - - - + Account + + + + + Proxy settings + + + + + Proxy host + + + + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1481,32 +1522,17 @@ - - Rules: - - - - - Weapons: - - - - - Clear filters - - - - + Admin features - + Open server administration page - + %1 players online @@ -1651,17 +1677,37 @@ - + + None (Default) + + + + + Wrap (World wraps) + + + + + Bounce (Edges reflect) + + + + + Sea (Edges connect to sea) + + + + Copy - + New - + Delete @@ -1771,14 +1817,12 @@ - Date: %1 - + Date: %1 - Size: %1 - + Size: %1 @@ -1831,23 +1875,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -1866,7 +1910,7 @@ QCheckBox - + Save password @@ -1881,12 +1925,12 @@ - + Check for updates at startup - + Fullscreen @@ -1906,54 +1950,94 @@ - + + Team + + + + + Enable team tags by default + + + + + Hog + + + + + Enable hedgehog tags by default + + + + + Health + + + + + Enable health tags by default + + + + + Translucent + + + + + Enable translucent tags by default + + + + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Append date and time to record file name - + Record audio - + Use game resolution @@ -1971,12 +2055,12 @@ - + Community - + (System default) @@ -2055,12 +2139,6 @@ Green/Red grayscale - - - - Any - - QGroupBox @@ -2210,16 +2288,16 @@ - - Tip: - - - This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + Tip: %1 + + + Server name: @@ -2235,22 +2313,22 @@ - + Locale - + Nickname - + This setting will be effective at next restart. - + Resolution @@ -2280,7 +2358,12 @@ - + + Displayed tags above hogs and translucent tags + + + + Initial sound volume @@ -2366,41 +2449,46 @@ + World Edge + + + + Scheme Name: - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) - + Revision - + This program is distributed under the %1 @@ -2418,18 +2506,18 @@ QLineEdit - + unnamed - + hedgehog %1 - + anonymous @@ -2441,101 +2529,96 @@ Hedgewars %1 - - - -r%1 (%2) - - QMessageBox - + Teams - Are you sure? - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2603,38 +2686,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2663,30 +2746,30 @@ - - - + + + File error - + Cannot open '%1' for writing - - + + Cannot open '%1' for reading - - Error - - - + Error + + + + Cannot use the ammo '%1'! @@ -2728,6 +2811,15 @@ + QObject + + + + No description available + + + + QPushButton @@ -2751,7 +2843,7 @@ - + Go! @@ -2807,7 +2899,7 @@ - + Associate file extensions @@ -2835,12 +2927,12 @@ - + Set default options - + Restore default coding parameters @@ -2890,17 +2982,22 @@ RoomNamePrompt - + Enter a name for your room. - + + set password + + + + Cancel - + Create room @@ -2939,26 +3036,31 @@ - Rules + Script + Rules + + + + Weapons - - Random Map - - - - Random Maze + Random Map + Random Maze + + + + Hand-drawn @@ -3044,14 +3146,6 @@ - TeamShowWidget - - - %1's team - - - - ThemePrompt @@ -3755,7 +3849,7 @@ - + Keyboard @@ -3797,4 +3891,157 @@ + + server + + + Restricted + + + + + Not room master + + + + + Corrupted hedgehogs info + + + + + too many teams + + + + + too many hedgehogs + + + + + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + + Not team owner! + + + + + Less than two clans! + + + + + Illegal room name + + + + + Room with such name already exists + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number + + + + + Nickname is already in use + + + + + No checker rights + + + + + Authentication failed + + + + + 60 seconds cooldown after kick + + + + + kicked + + + + + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_nl.ts --- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -369,6 +376,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -626,13 +646,6 @@ - KB - - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - - - - KeyBinder Category @@ -642,19 +655,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -662,6 +662,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -789,6 +801,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -901,6 +925,13 @@ Save + + (%1 %2) + + + + + PageInGame @@ -1204,14 +1235,6 @@ Admin features - - Rules: - - - - Weapons: - - %1 players online @@ -1236,10 +1259,6 @@ - Clear filters - - - Open server administration page @@ -1366,6 +1385,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1462,13 +1497,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1601,6 +1634,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1621,10 +1686,6 @@ - Any - - - Disabled @@ -1823,10 +1884,6 @@ - Tip: - - - Quality @@ -1968,6 +2025,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -1990,10 +2059,6 @@ Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2210,6 +2275,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2346,6 +2418,10 @@ Create room + + set password + + RoomsListModel @@ -2393,6 +2469,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2460,13 +2540,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3061,4 +3134,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Tue Dec 17 00:02:52 2013 +0400 @@ -403,6 +403,15 @@ Guest Gość + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -670,7 +679,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf zwrócił problem podczas przetwarzania tekstu, najprawdopodobniej jest to związane z błędem we freetype2. Zaleca się zaktualizowanie biblioteki freetype. + SDL_ttf zwrócił problem podczas przetwarzania tekstu, najprawdopodobniej jest to związane z błędem we freetype2. Zaleca się zaktualizowanie biblioteki freetype. @@ -685,15 +694,15 @@ Duration: %1m %2s - Długość: %1m %2s + Długość: %1m %2s Video: %1x%2, - Wideo: %1x%2, + Wideo: %1x%2, %1 fps, - %1 kl/s, + %1 kl/s, Audio: @@ -703,6 +712,18 @@ unknown nieznany + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -830,6 +851,18 @@ Eraser Gumka + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -948,6 +981,14 @@ Save Zapisz + + (%1 %2) + + + + + + PageInGame @@ -1269,11 +1310,11 @@ Rules: - Zasady: + Zasady: Weapons: - Uzbrojenie: + Uzbrojenie: Search: @@ -1309,7 +1350,7 @@ Clear filters - Usuń filtry + Usuń filtry Open server administration page @@ -1438,6 +1479,22 @@ Add an indestructible border along the bottom Dodaje niezniszczalną ramkę u dołu mapy + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1537,12 +1594,20 @@ Date: %1 - Data: %1 + Data: %1 Size: %1 - Rozmiar: %1 + Rozmiar: %1 + + + Date: %1 + Data: %1 {1?} + + + Size: %1 + Rozmiar: %1 {1?} @@ -1678,6 +1743,38 @@ Frontend music Muzyka w menu + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1699,7 +1796,7 @@ Any - Dowolne + Dowolne In lobby @@ -1913,7 +2010,7 @@ Tip: - Rada: + Rada: Quality @@ -2063,6 +2160,18 @@ This setting will be effective at next restart. Ustawienia zadziałają po restarcie gry. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2087,7 +2196,7 @@ -r%1 (%2) - -r%1 (%2) + -r%1 (%2) @@ -2342,6 +2451,13 @@ + QObject + + No description available + Brak opisu + + + QPushButton Go! @@ -2478,6 +2594,10 @@ Create room Stwórz pokój + + set password + + RoomsListModel @@ -2525,6 +2645,10 @@ Hand-drawn Rys. ręcznie + + Script + + SeedPrompt @@ -2596,7 +2720,7 @@ TeamShowWidget %1's team - Drużyna %1 + Drużyna %1 @@ -3194,4 +3318,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Tue Dec 17 00:02:52 2013 +0400 @@ -153,6 +153,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -382,6 +389,19 @@ This page requires an internet connection. Esta página exige uma conexão com a Internet. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -650,7 +670,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf retornou um erro enquanto renderizava o texto, o mais provável é que esse esteja relacionado a um problema na freetype2. Recomendamos que você atualize sua biblioteca freetype. + SDL_ttf retornou um erro enquanto renderizava o texto, o mais provável é que esse esteja relacionado a um problema na freetype2. Recomendamos que você atualize sua biblioteca freetype. @@ -665,15 +685,15 @@ Duration: %1m %2s - Duração: %1m %2s + Duração: %1m %2s Video: %1x%2, - Vídeo: %1x%2, + Vídeo: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: @@ -683,6 +703,18 @@ unknown desconhecido + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -810,6 +842,18 @@ Eraser Borracha + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -922,6 +966,13 @@ Save Salvar + + (%1 %2) + + + + + PageInGame @@ -1243,11 +1294,11 @@ Rules: - Regras: + Regras: Weapons: - Armas: + Armas: Search: @@ -1282,7 +1333,7 @@ Clear filters - Limpar filtros + Limpar filtros Open server administration page @@ -1411,6 +1462,22 @@ Add an indestructible border along the bottom Adicione uma borda indestrutível na parte inferior + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1509,12 +1576,20 @@ Date: %1 - Data: %1 + Data: %1 Size: %1 - Tamanho: %1 + Tamanho: %1 + + + Date: %1 + Data: %1 {1?} + + + Size: %1 + Tamanho: %1 {1?} @@ -1650,6 +1725,38 @@ Frontend music Música da interface + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1671,7 +1778,7 @@ Any - Qualquer + Qualquer In lobby @@ -1885,7 +1992,7 @@ Tip: - Dica: + Dica: Quality @@ -2031,6 +2138,18 @@ This setting will be effective at next restart. Esta configuração se efetivará no próximo reinício. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2055,7 +2174,7 @@ -r%1 (%2) - -r%1 (%2) + -r%1 (%2) @@ -2283,6 +2402,13 @@ + QObject + + No description available + Não há descrição disponível + + + QPushButton Go! @@ -2419,6 +2545,10 @@ Create room Criar sala + + set password + + RoomsListModel @@ -2466,6 +2596,10 @@ Hand-drawn Desenhado à mão + + Script + + SeedPrompt @@ -2537,7 +2671,7 @@ TeamShowWidget %1's team - Equipe de %1 + Equipe de %1 @@ -3137,4 +3271,127 @@ DPad + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Tue Dec 17 00:02:52 2013 +0400 @@ -157,6 +157,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -386,6 +393,19 @@ This page requires an internet connection. Esta página requer ligação à internet + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -657,7 +677,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf retornou um erro ao renderizar o texto, muito provavelmente está relacionado com o bug no freetype2. É recomendado atualizar a sua lib freetype. + SDL_ttf retornou um erro ao renderizar o texto, muito provavelmente está relacionado com o bug no freetype2. É recomendado atualizar a sua lib freetype. @@ -672,16 +692,16 @@ Duration: %1m %2s - Duração: %1m %2s + Duração: %1m %2s Video: %1x%2, - Vídeo: %1x%2, + Vídeo: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: @@ -691,6 +711,18 @@ unknown desconhecido + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -818,6 +850,18 @@ Eraser Apagador + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -930,6 +974,13 @@ Save Gravar + + (%1 %2) + + + + + PageInGame @@ -1235,11 +1286,11 @@ Rules: - Regras: + Regras: Weapons: - Armamento: + Armamento: %1 players online @@ -1266,7 +1317,7 @@ Clear filters - Limpar filtros + Limpar filtros Open server administration page @@ -1395,6 +1446,22 @@ Add an indestructible border along the bottom Adiciona uma barreira indestrutível ao longo do fundo do terreno + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1493,15 +1560,25 @@ Date: %1 - Data: %1 + Data: %1 Size: %1 - Tamanho: %1 + Tamanho: %1 + + Date: %1 + Data: %1 + {1?} + + + Size: %1 + Tamanho: %1 + {1?} + QAction @@ -1632,6 +1709,38 @@ Frontend music Musica no frontend + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1653,7 +1762,7 @@ Any - Qualquer + Qualquer Disabled @@ -1855,7 +1964,7 @@ Tip: - Dica: + Dica: Quality @@ -2001,6 +2110,18 @@ This setting will be effective at next restart. Esta opção entrará em efeito quando o jogo for reiniciado. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2025,7 +2146,7 @@ -r%1 (%2) - -r%1 (%2) + -r%1 (%2) @@ -2285,6 +2406,13 @@ + QObject + + No description available + Sem descrição disponível + + + QPushButton default @@ -2421,6 +2549,10 @@ Create room Criar sala + + set password + + RoomsListModel @@ -2468,6 +2600,10 @@ Hand-drawn Desenhado à mão + + Script + + SeedPrompt @@ -2539,7 +2675,7 @@ TeamShowWidget %1's team - Equipa de %1 + Equipa de %1 @@ -3141,115 +3277,123 @@ server Not room master - Não és o anfitrião da sala + Não és o anfitrião da sala Corrupted hedgehogs info - Informação dos ouriços corrompida + Informação dos ouriços corrompida too many teams - demasiadas equipas + demasiadas equipas too many hedgehogs - demasiados ouriços + demasiados ouriços There's already a team with same name in the list - Já existe uma equipa com o mesmo nome na lista + Já existe uma equipa com o mesmo nome na lista round in progress - partida em progresso + partida em progresso restricted - limitada + limitada REMOVE_TEAM: no such team - REMOVE_TEAM: equipa inexistente + REMOVE_TEAM: equipa inexistente Not team owner! - A equipa não te pertence! + A equipa não te pertence! Less than two clans! - Menos de 2 clãs! + Menos de 2 clãs! Room with such name already exists - Já existe uma sala com esse nome + Já existe uma sala com esse nome Nickname already chosen - Utilizador já em uso + Utilizador já em uso Illegal nickname - Nome de utilizador ilegal + Nome de utilizador ilegal Protocol already known - Protocolo já conhecido + Protocolo já conhecido Bad number - Número inválido + Número inválido Nickname is already in use - Nome de utilizador já em uso + Nome de utilizador já em uso No checker rights - Não possui permissões para verificar + Não possui permissões para verificar Authentication failed - A autenticação falhou + A autenticação falhou 60 seconds cooldown after kick - É necessário aguardar 60 segundos após uma expulsão + É necessário aguardar 60 segundos após uma expulsão kicked - expulso + expulso Ping timeout - Ping timeout + Ping timeout bye - tchau (bye) + tchau (bye) Illegal room name - Nome da sala ilegal + Nome da sala ilegal No such room - Sala inexistente + Sala inexistente Joining restricted - Entrada restrita + Entrada restrita Registered users only - Apenas utilizadores registados + Apenas utilizadores registados You are banned in this room - Estás banido desta sala + Estás banido desta sala Empty config entry - Campo vazio na configuração + Campo vazio na configuração + + + Restricted + + + + Room version incompatible to your hedgewars version + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ro.ts --- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Tue Dec 17 00:02:52 2013 +0400 @@ -154,6 +154,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -375,6 +382,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -639,7 +659,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. + SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -652,19 +672,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -672,6 +679,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -799,6 +818,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -917,6 +948,14 @@ Save + + (%1 %2) + + + + + + PageInGame @@ -1236,14 +1275,6 @@ Room Name: Room Name: - - Rules: - - - - Weapons: - - %1 players online @@ -1269,10 +1300,6 @@ - Clear filters - - - Open server administration page @@ -1399,6 +1426,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1496,13 +1539,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1639,6 +1680,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1659,10 +1732,6 @@ - Any - - - Disabled @@ -1865,10 +1934,6 @@ Explosives - Tip: - - - Quality @@ -2010,6 +2075,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2032,10 +2109,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2262,6 +2335,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2398,6 +2478,10 @@ Create room + + set password + + RoomsListModel @@ -2445,6 +2529,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2512,13 +2600,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3113,4 +3194,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Tue Dec 17 00:02:52 2013 +0400 @@ -158,6 +158,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -384,6 +391,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -648,7 +668,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf возвратил ошибку при выводе текста, наиболее вероятно это вызвано багом в библиотеке freetype2. Рекомендуется обновить библиотеку. + SDL_ttf возвратил ошибку при выводе текста, наиболее вероятно это вызвано багом в библиотеке freetype2. Рекомендуется обновить библиотеку. @@ -663,15 +683,15 @@ Duration: %1m %2s - Длительность: %1мин %2сек + Длительность: %1мин %2сек Video: %1x%2, - Видео: %1x%2, + Видео: %1x%2, %1 fps, - %1 кадров/сек, + %1 кадров/сек, Audio: @@ -681,6 +701,18 @@ unknown неизвестно + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -808,6 +840,18 @@ Eraser Стирательная резинка + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -926,6 +970,14 @@ Save Сохранить + + (%1 %2) + + + + + + PageInGame @@ -1247,11 +1299,11 @@ Rules: - Правила: + Правила: Weapons: - Оружие: + Оружие: Search: @@ -1287,7 +1339,7 @@ Clear filters - Очистить фильтры + Очистить фильтры Open server administration page @@ -1416,6 +1468,22 @@ Add an indestructible border along the bottom Добавить неразрушимую границу внизу карты + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1515,12 +1583,20 @@ Date: %1 - Дата: %1 + Дата: %1 Size: %1 - Размер: %1 + Размер: %1 + + + Date: %1 + Дата: %1 {1?} + + + Size: %1 + Размер: %1 {1?} @@ -1656,6 +1732,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1677,7 +1785,7 @@ Any - Любой + Любой In lobby @@ -1891,7 +1999,7 @@ Tip: - Подсказка: + Подсказка: Quality @@ -2041,6 +2149,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2063,10 +2183,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2294,6 +2410,13 @@ + QObject + + No description available + Описание отсутствует + + + QPushButton Play demo @@ -2430,6 +2553,10 @@ Create room Создать комнату + + set password + + RoomsListModel @@ -2477,12 +2604,16 @@ Hand-drawn Рисованная карта + + Script + + SeedPrompt The map seed is the basis for all random values generated by the game. - Зерно карты - это основа для всех псведослучайных значений, используемых в игре. + Зерно карты - это основа для всех псевдослучайных значений, используемых в игре. Cancel @@ -2547,7 +2678,7 @@ TeamShowWidget %1's team - Команда %1 + Команда %1 @@ -3145,4 +3276,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Tue Dec 17 00:02:52 2013 +0400 @@ -158,6 +158,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -382,6 +389,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -646,7 +666,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf vrátil chybu počas renderovania textu, s najväčšou pravdepodobnosťou sa jedná o chybu vo freetype2. Doporučujeme aktualizovať vašu knižnicu freetype. + SDL_ttf vrátil chybu počas renderovania textu, s najväčšou pravdepodobnosťou sa jedná o chybu vo freetype2. Doporučujeme aktualizovať vašu knižnicu freetype. @@ -661,15 +681,15 @@ Duration: %1m %2s - Trvanie: %1m %2s + Trvanie: %1m %2s Video: %1x%2, - Video: %1x%2, + Video: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: @@ -679,6 +699,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -806,6 +838,18 @@ Eraser Guma + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -924,6 +968,14 @@ Save Uložiť + + (%1 %2) + + + + + + PageInGame @@ -1245,11 +1297,11 @@ Rules: - Pravidlá: + Pravidlá: Weapons: - Zbrane: + Zbrane: Search: @@ -1284,10 +1336,6 @@ - Clear filters - - - Open server administration page @@ -1414,6 +1462,22 @@ Add an indestructible border along the bottom Pridať nezničiteľný okraj popri spodku obrazovky + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1511,13 +1575,11 @@ uploadujem - Date: %1 - + Date: %1 - Size: %1 - + Size: %1 @@ -1654,6 +1716,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1675,7 +1769,7 @@ Any - Ľubovoľný + Ľubovoľný In lobby @@ -1889,7 +1983,7 @@ Tip: - Tip: + Tip: Quality @@ -2037,6 +2131,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2059,10 +2165,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2315,6 +2417,13 @@ + QObject + + No description available + Žiaden popis nie je dostupný + + + QPushButton Go! @@ -2451,6 +2560,10 @@ Create room + + set password + + RoomsListModel @@ -2498,6 +2611,10 @@ Hand-drawn Ručne kreslená + + Script + + SeedPrompt @@ -2565,13 +2682,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3166,4 +3276,127 @@ Pravý joystick (Doľava) + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Tue Dec 17 00:02:52 2013 +0400 @@ -157,6 +157,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -373,6 +380,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -637,7 +657,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - Fel uppstod då SDL_ttf skulle rendera text. Det beror högst troligen på felet i freetype2. Du rekommenderas att uppdatera ditt freetype-bibliotek. + Fel uppstod då SDL_ttf skulle rendera text. Det beror högst troligen på felet i freetype2. Du rekommenderas att uppdatera ditt freetype-bibliotek. @@ -650,19 +670,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -670,6 +677,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -797,6 +816,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -909,6 +940,13 @@ Save Spara + + (%1 %2) + + + + + PageInGame @@ -1230,11 +1268,11 @@ Rules: - Regler: + Regler: Weapons: - Vapen: + Vapen: Search: @@ -1268,10 +1306,6 @@ - Clear filters - - - Open server administration page @@ -1398,6 +1432,22 @@ Add an indestructible border along the bottom Lägg till en oförstörbar barriär längs botten + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1494,13 +1544,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1637,6 +1685,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1658,7 +1738,7 @@ Any - Vilken som + Vilken som In lobby @@ -1872,7 +1952,7 @@ Tip: - Tips: + Tips: Quality @@ -2016,6 +2096,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2038,10 +2130,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2267,6 +2355,13 @@ + QObject + + No description available + + + + QPushButton Go! @@ -2403,6 +2498,10 @@ Create room + + set password + + RoomsListModel @@ -2450,6 +2549,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2517,13 +2620,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3118,4 +3214,127 @@ Styrkors + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Tue Dec 17 00:02:52 2013 +0400 @@ -152,6 +152,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -363,6 +370,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -623,7 +643,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf yazıyı yorumlarken hata verdi. Bu büyük ihtimalle freetype2'deki bir hatadan kaynaklanıyor. Freetype kurulumunuzu güncellemenizi öneririz. + SDL_ttf yazıyı yorumlarken hata verdi. Bu büyük ihtimalle freetype2'deki bir hatadan kaynaklanıyor. Freetype kurulumunuzu güncellemenizi öneririz. @@ -636,19 +656,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -656,6 +663,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -783,6 +802,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -889,6 +920,12 @@ Save + + (%1 %2) + + + + PageInGame @@ -1204,14 +1241,6 @@ Admin features Yönetici görevleri - - Rules: - - - - Weapons: - - %1 players online @@ -1235,10 +1264,6 @@ - Clear filters - - - Open server administration page @@ -1365,6 +1390,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1460,13 +1501,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1603,6 +1642,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1623,10 +1694,6 @@ - Any - - - Disabled @@ -1829,10 +1896,6 @@ - Tip: - - - Quality @@ -1974,6 +2037,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -1996,10 +2071,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2223,6 +2294,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2359,6 +2437,10 @@ Create room + + set password + + RoomsListModel @@ -2406,6 +2488,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2473,13 +2559,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3074,4 +3153,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Tue Dec 17 00:02:52 2013 +0400 @@ -158,6 +158,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -379,6 +386,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -643,7 +663,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf повернула помилку при виведенні тексту, найімовірніше через помилку у бібліотеці freetype2. Рекомендується оновити бібліотеку freetype2. + SDL_ttf повернула помилку при виведенні тексту, найімовірніше через помилку у бібліотеці freetype2. Рекомендується оновити бібліотеку freetype2. @@ -656,19 +676,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -676,6 +683,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -803,6 +822,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -921,6 +952,14 @@ Save Зберегти + + (%1 %2) + + + + + + PageInGame @@ -1242,11 +1281,11 @@ Rules: - Правила: + Правила: Weapons: - Зброя: + Зброя: Search: @@ -1281,10 +1320,6 @@ - Clear filters - - - Open server administration page @@ -1411,6 +1446,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1508,13 +1559,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1651,6 +1700,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1672,7 +1753,7 @@ Any - Усі + Усі In lobby @@ -1886,7 +1967,7 @@ Tip: - Порада: + Порада: Quality @@ -2030,6 +2111,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2052,10 +2145,6 @@ Hedgewars %1 Hedgewars %1 - - -r%1 (%2) - - QMessageBox @@ -2282,6 +2371,13 @@ + QObject + + No description available + + + + QPushButton default @@ -2418,6 +2514,10 @@ Create room + + set password + + RoomsListModel @@ -2465,6 +2565,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2532,13 +2636,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3133,4 +3230,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Tue Dec 17 00:02:52 2013 +0400 @@ -4,7 +4,7 @@ About - + Unknown Compiler @@ -20,12 +20,12 @@ AmmoSchemeModel - + new - + copy of @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -184,6 +184,14 @@ + GameUIConfig + + + Guest + + + + HWApplication @@ -226,7 +234,7 @@ - + Scheme '%1' not supported @@ -323,27 +331,35 @@ HWForm - + + + + + Guest + + + + DefaultTeam - + %1's Team - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -352,98 +368,109 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - - Nickname - - - - - Someone already uses your nickname %1 on the server. -Please pick another nickname: - - - - - No nickname supplied. + Nickname - + Someone already uses your nickname %1 on the server. +Please pick another nickname: + + + + + + No nickname supplied. + + + + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + + Room password + + + + + The room is protected with password. +Please, enter the password: + + + + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - + This page requires an internet connection. - - + + Cannot save record to file %1 无法录入文件 %1 @@ -451,13 +478,13 @@ HWGame - + en.txt zh_CN.txt - + Cannot open demofile %1 DEMO %1 打不开 @@ -465,158 +492,158 @@ HWMapContainer - + Small tunnels - + Medium tunnels - + Seed - - Map type: - - - - - Image map - - - - - Mission map - - - + Map type: + + + + + Image map + + + + + Mission map + + + + Hand-drawn - + Randomly generated - + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - + All 全部 - + Small 小型 - + Medium 中型 - + Large 大型 - + Cavern 洞穴 - + Wacky 曲折 - + Large tunnels - + Small islands - + Medium islands - + Large islands - + Map size: - + Maze style: - + Mission: - + Map: - - + + Theme: %1 - + Load drawn map - + Drawn Maps - + All files @@ -647,53 +674,53 @@ - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. 错误没找到这个主机。请检查主机名和端口设置。 - + Connection refused 连接被拒绝 - + The server is too old. Disconnecting now. - + %1 *** %2 has left - + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Quit reason: 退出原因: - + Room destroyed 房间损坏 - + You got kicked 被踢出 @@ -740,7 +767,7 @@ HatButton - + Change hat (%1) @@ -766,9 +793,8 @@ KB - SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf 返回错误-渲染文字失败,可能有关freetype2的bug。建议升级 freetype。 + SDL_ttf 返回错误-渲染文字失败,可能有关freetype2的bug。建议升级 freetype。 @@ -782,28 +808,27 @@ LibavInteraction - - Duration: %1m %2s - - - - - - Video: %1x%2, + + Duration: %1m %2s - %1 fps, + Video: %1x%2 - Audio: + %1 fps + Audio: + + + + unknown @@ -811,7 +836,7 @@ MapModel - + No description available. @@ -918,49 +943,64 @@ PageDrawMap - + Eraser - - Undo - - - - Clear - - - - - Load - 读取 + Undo + + Polyline + + + + + Rectangle + + + + + Ellipse + + + + + Clear + + + + + Load + 读取 + + + Save 保存 - + Load drawn map - - + + Drawn Maps - - + + All files - + Save drawn map @@ -1021,72 +1061,80 @@ PageGameStats - + Details - + + Health graph - + Ranking - - Play again - - - + Play again + + + + Save 保存 - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + + (%1 %2) + + + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1354,97 +1402,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - - Account - - - - - Proxy settings - - - - - Proxy host - - - + Account + + + + + Proxy settings + + + + + Proxy host + + + + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1485,22 +1533,7 @@ - - Rules: - - - - - Weapons: - - - - - Clear filters - - - - + Open server administration page @@ -1513,14 +1546,14 @@ 加入 - + %1 players online - + Admin features 管理员功能 @@ -1663,17 +1696,37 @@ - + + None (Default) + + + + + Wrap (World wraps) + + + + + Bounce (Edges reflect) + + + + + Sea (Edges connect to sea) + + + + Copy - + New 新游戏 - + Delete 删除 @@ -1783,14 +1836,12 @@ - Date: %1 - + Date: %1 - Size: %1 - + Size: %1 @@ -1847,23 +1898,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -1881,7 +1932,7 @@ QCheckBox - + Fullscreen 游戏全屏幕 @@ -1896,44 +1947,84 @@ 另一种伤害显示方式 - + + Team + + + + + Enable team tags by default + + + + + Hog + + + + + Enable hedgehog tags by default + + + + + Health + + + + + Enable health tags by default + + + + + Translucent + + + + + Enable translucent tags by default + + + + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Check for updates at startup @@ -1943,13 +2034,13 @@ - + Append date and time to record file name 记录名称中包含具体时间日期 - + Save password @@ -1964,12 +2055,12 @@ - + Record audio - + Use game resolution @@ -1982,7 +2073,7 @@ 玩家 - + Community @@ -1992,7 +2083,7 @@ Lv 级别 - + (System default) @@ -2071,12 +2162,6 @@ Green/Red grayscale - - - - Any - - QGroupBox @@ -2129,22 +2214,27 @@ QLabel - + Locale - + Nickname - + + Displayed tags above hogs and translucent tags + + + + This setting will be effective at next restart. - + Resolution 分辨率 @@ -2179,12 +2269,12 @@ FPS 上限 - + Revision - + This program is distributed under the %1 @@ -2218,7 +2308,7 @@ 版本 - + Initial sound volume 初始音量 @@ -2294,6 +2384,11 @@ + World Edge + + + + Scheme Name: 设置名称: @@ -2390,37 +2485,37 @@ - - Tip: - - - This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! - + + Tip: %1 + + + + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2438,18 +2533,18 @@ QLineEdit - + unnamed 无名 - + hedgehog %1 - + anonymous @@ -2461,111 +2556,106 @@ Hedgewars %1 刺猬大作战 %1 - - - -r%1 (%2) - - QMessageBox - + Error 错误 - + Cannot use the ammo '%1'! - + Teams - Are you sure? - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost 服务器连接丢失 - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2633,38 +2723,38 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? @@ -2693,20 +2783,20 @@ - - - + + + File error - + Cannot open '%1' for writing - - + + Cannot open '%1' for reading @@ -2748,6 +2838,15 @@ + QObject + + + + No description available + + + + QPushButton @@ -2761,7 +2860,7 @@ 连接 - + Go! 上场! @@ -2850,17 +2949,17 @@ - + Associate file extensions - + Set default options - + Restore default coding parameters @@ -2910,17 +3009,22 @@ RoomNamePrompt - + Enter a name for your room. - + + set password + + + + Cancel 取消 - + Create room @@ -2959,26 +3063,31 @@ - Rules + Script + Rules + + + + Weapons 武器 - - Random Map - - - - Random Maze + Random Map + Random Maze + + + + Hand-drawn @@ -3064,14 +3173,6 @@ - TeamShowWidget - - - %1's team - - - - ThemePrompt @@ -3775,7 +3876,7 @@ - + Keyboard @@ -3817,4 +3918,157 @@ + + server + + + Restricted + + + + + Not room master + + + + + Corrupted hedgehogs info + + + + + too many teams + + + + + too many hedgehogs + + + + + There's already a team with same name in the list + + + + + round in progress + + + + + restricted + + + + + REMOVE_TEAM: no such team + + + + + Not team owner! + + + + + Less than two clans! + + + + + Illegal room name + + + + + Room with such name already exists + + + + + Nickname already chosen + + + + + Illegal nickname + + + + + Protocol already known + + + + + Bad number + + + + + Nickname is already in use + + + + + No checker rights + + + + + Authentication failed + + + + + 60 seconds cooldown after kick + + + + + kicked + + + + + Ping timeout + + + + + bye + + + + + No such room + + + + + Room version incompatible to your hedgewars version + + + + + Joining restricted + + + + + Registered users only + + + + + You are banned in this room + + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Tue Dec 17 00:02:52 2013 +0400 @@ -152,6 +152,13 @@ + GameUIConfig + + Guest + + + + HWApplication %1 minutes @@ -363,6 +370,19 @@ This page requires an internet connection. + + Guest + + + + Room password + + + + The room is protected with password. +Please, enter the password: + + HWGame @@ -627,7 +647,7 @@ KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf 返回錯誤-渲染文字失敗,可能有關freetype2的bug。建議升級 freetype。 + SDL_ttf 返回錯誤-渲染文字失敗,可能有關freetype2的bug。建議升級 freetype。 @@ -640,19 +660,6 @@ LibavInteraction - Duration: %1m %2s - - - - - Video: %1x%2, - - - - %1 fps, - - - Audio: @@ -660,6 +667,18 @@ unknown + + Duration: %1m %2s + + + + Video: %1x%2 + + + + %1 fps + + MapModel @@ -787,6 +806,18 @@ Eraser + + Polyline + + + + Rectangle + + + + Ellipse + + PageEditTeam @@ -893,6 +924,12 @@ Save + + (%1 %2) + + + + PageInGame @@ -1213,14 +1250,6 @@ 房間名: - Rules: - - - - Weapons: - - - Clear 清除 @@ -1247,10 +1276,6 @@ - Clear filters - - - Open server administration page @@ -1377,6 +1402,22 @@ Add an indestructible border along the bottom + + None (Default) + + + + Wrap (World wraps) + + + + Bounce (Edges reflect) + + + + Sea (Edges connect to sea) + + PageSelectWeapon @@ -1472,13 +1513,11 @@ - Date: %1 - - - - - Size: %1 - + Date: %1 + + + + Size: %1 @@ -1615,6 +1654,38 @@ Frontend music + + Team + + + + Enable team tags by default + + + + Hog + + + + Enable hedgehog tags by default + + + + Health + + + + Enable health tags by default + + + + Translucent + + + + Enable translucent tags by default + + QComboBox @@ -1635,10 +1706,6 @@ - Any - - - Disabled @@ -1841,10 +1908,6 @@ - Tip: - - - Quality @@ -1986,6 +2049,18 @@ This setting will be effective at next restart. + + Tip: %1 + + + + Displayed tags above hogs and translucent tags + + + + World Edge + + QLineEdit @@ -2008,10 +2083,6 @@ Hedgewars %1 刺蝟大作戰 %1 - - -r%1 (%2) - - QMessageBox @@ -2235,6 +2306,13 @@ + QObject + + No description available + + + + QPushButton Play demo @@ -2371,6 +2449,10 @@ Create room + + set password + + RoomsListModel @@ -2418,6 +2500,10 @@ Hand-drawn + + Script + + SeedPrompt @@ -2485,13 +2571,6 @@ - TeamShowWidget - - %1's team - - - - ThemePrompt Cancel @@ -3086,4 +3165,127 @@ + + server + + Restricted + + + + Not room master + + + + Corrupted hedgehogs info + + + + too many teams + + + + too many hedgehogs + + + + There's already a team with same name in the list + + + + round in progress + + + + restricted + + + + REMOVE_TEAM: no such team + + + + Not team owner! + + + + Less than two clans! + + + + Illegal room name + + + + Room with such name already exists + + + + Nickname already chosen + + + + Illegal nickname + + + + Protocol already known + + + + Bad number + + + + Nickname is already in use + + + + No checker rights + + + + Authentication failed + + + + 60 seconds cooldown after kick + + + + kicked + + + + Ping timeout + + + + bye + + + + No such room + + + + Room version incompatible to your hedgewars version + + + + Joining restricted + + + + Registered users only + + + + You are banned in this room + + + + Empty config entry + + + diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Maps/TrophyRace/map.lua --- a/share/hedgewars/Data/Maps/TrophyRace/map.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua Tue Dec 17 00:02:52 2013 +0400 @@ -74,31 +74,49 @@ SetAmmo(amSkip, 9, 1, 0) end +function killHog() + SetHealth(CurrentHedgehog, 0) + SetEffect(CurrentHedgehog, heInvulnerable, 0) + x, y = GetGearPosition(CurrentHedgehog) + AddGear(x, y, gtShell, 0, 0, 0, 0) + worsttime = 99999 + worsthog = nil + lasthog = nil +end + +function onHogAttack() + if TurnTimeLeft == 0 then + killHog() + end +end + +function onNewTurn() + if lasthog ~= nil then + SetGearPosition(lasthog, p , 0) + if not reached then + end + end + startTime = 0 + reached = false + if CurrentHedgehog ~= nil then + SetGearVelocity(CurrentHedgehog, 1, 0) + SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2) + ParseCommand("setweap " .. string.char(amRope)) + lasthog = CurrentHedgehog + end +end + function onGameTick() if startTime == 0 and TurnTimeLeft < maxtime then startTime = GameTime end if CurrentHedgehog ~= nil and TurnTimeLeft == 1 then - SetHealth(CurrentHedgehog, 0) - x, y = GetGearPosition(CurrentHedgehog) - AddGear(x, y, gtShell, 0, 0, 0, 0) - worsttime = 99999 - worsthog = nil - elseif TurnTimeLeft == maxtime-1 and CurrentHedgehog ~= nil then - if lasthog ~= nil then - SetGearPosition(lasthog, p , 0) - end - reached = false - SetGearVelocity(CurrentHedgehog, 1, 0) - SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2) - ParseCommand("setweap " .. string.char(amRope)) - lasthog = CurrentHedgehog + killHog() elseif CurrentHedgehog ~= nil then x, y = GetGearPosition(CurrentHedgehog) if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle reached = true local ttime = GameTime-startTime - startTime = 0 --give it a sound;) if ttime < besttime then PlaySound (sndHomerun) @@ -135,13 +153,15 @@ if clan == ClansCount -1 then -- Time for elimination - worst hog is out and the worst hog vars are reset. - SetHealth(worsthog, 0) - --Place a grenade to make inactive slowest hog active - x, y = GetGearPosition(worsthog) - AddGear(x, y, gtShell, 0, 0, 0, 0) - worsttime = 0 - worsthog = nil + if worsthog ~= nil then + SetHealth(worsthog, 0) + --Place a grenade to make inactive slowest hog active + x, y = GetGearPosition(worsthog) + AddGear(x, y, gtShell, 0, 0, 0, 0) + worsttime = 0 + worsthog = nil end + end for i=0, ClansCount -1 do local tt = "" .. (clantimes[i] / 1000) .. " s" @@ -175,7 +195,7 @@ --end function onAchievementsDeclaration() - for team,time in pairs(realBestTimes) do - DeclareAchievement("rope race", team, "TrophyRace", time) + for team,time in pairs(bestTimes) do + DeclareAchievement("rope race", team, "TrophyRace", time) end end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua Tue Dec 17 00:02:52 2013 +0400 @@ -17,10 +17,10 @@ local saucerAcquired = false local status local checkPointReached = 1 -- 1 is start of the game -local objectives = loc("Go to moon by the flying saucer and complete the main mission").."|".. +local objectives = loc("Go to the moon by using the flying saucer and complete the main mission").."|".. loc("Come back to this mission and visit the other planets to collect the crates").."|".. loc("Visit the Death Planet after completing all the other planets' main missions").."|".. -loc("Come back to this mission after collecting all the parts") +loc("Come back to this mission after collecting all the device parts") -- dialogs local dialog01 = {} local dialog02 = {} @@ -33,12 +33,12 @@ -- mission objectives local goals = { [dialog01] = {missionName, loc("Getting ready"), loc("Go and collect the crate").."|"..loc("Try not to get spotted by the guards!"), 1, 4500}, - [dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuels are limited"), 1, 4500}, + [dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuel is limited"), 1, 4500}, [dialog03] = {missionName, loc("An unexpected event!"), loc("Use the saucer and fly away").."|"..loc("Beware, any damage taken will stay until you complete the moon's main mission"), 1, 7000}, [dialog04] = {missionName, loc("Objectives"), objectives, 1, 7000}, [dialog05] = {missionName, loc("Objectives"), objectives, 1, 7000}, [dialog06] = {missionName, loc("Objectives"), objectives, 1, 7000}, - [dialog07] = {missionName, loc("Searching the stars!"), loc("Use the saucer and fly away").."|"..loc("Visit first the planets of Ice, Desert and Fruit"), 1, 6000}, + [dialog07] = {missionName, loc("Searching the stars!"), loc("Use the saucer and fly away").."|"..loc("Visit the planets of Ice, Desert and Fruit before you proceed to the Death Planet"), 1, 6000}, [dialog08] = {missionName, loc("Saving Hogera"), loc("Fly to the meteorite and detonate the explosives"), 1, 7000} } -- crates @@ -98,11 +98,11 @@ Theme = "Nature" -- I had originally hero in PAoTH team and changed it, may reconsider though -- PAoTH - AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") + AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") - AnimSetGearPosition(hero.gear, hero.x, hero.y) + AnimSetGearPosition(hero.gear, hero.x, hero.y) HogTurnLeft(hero.gear, true) - AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") + AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") director.gear = AddHog(director.name, 0, 100, "hair_yellow") AnimSetGearPosition(director.gear, director.x, director.y) doctor.gear = AddHog(doctor.name, 0, 100, "Glasses") @@ -144,7 +144,7 @@ AnimSetGearPosition(hero.gear, 3080, 850) end end - + AnimInit() AnimationSetup() end @@ -156,14 +156,14 @@ FollowGear(hero.gear) ShowMission(loc("Spacetrip"), loc("Getting ready"), loc("Help Hog Solo to find all the parts of the anti-gravity device.").. "|"..loc("Travel to all the neighbor planets and collect all the pieces"), -amSkip, 0) - + -- do checkpoint stuff needed after game starts - if checkPointReached == 1 then + if checkPointReached == 1 then AddAnim(dialog01) AddAmmo(hero.gear, amRope, 1) AddAmmo(guard1.gear, amDEagle, 2) AddAmmo(guard2.gear, amDEagle, 2) - SpawnAmmoCrate(saucerX, saucerY, amJetpack) + SpawnAmmoCrate(saucerX, saucerY, amJetpack) -- EVENT HANDLERS AddEvent(onHeroBeforeTreePosition, {hero.gear}, heroBeforeTreePosition, {hero.gear}, 0) AddEvent(onHeroAtSaucerPosition, {hero.gear}, heroAtSaucerPosition, {hero.gear}, 0) @@ -180,7 +180,7 @@ -- Hero has visited a planet, he has plenty of fuels and can change planet AddAmmo(hero.gear, amJetpack, 99) end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onNoFuelAtLand, {hero.gear}, noFuelAtLand, {hero.gear}, 0) -- always check for landings @@ -189,7 +189,7 @@ end if GetCampaignVar("Planet") ~= "desertPlanet" then AddEvent(onDesertPlanetLanding, {hero.gear}, desertPlanetLanding, {hero.gear}, 0) - end + end if GetCampaignVar("Planet") ~= "fruitPlanet" then AddEvent(onFruitPlanetLanding, {hero.gear}, fruitPlanetLanding, {hero.gear}, 0) end @@ -199,14 +199,14 @@ if GetCampaignVar("Planet") ~= "deathPlanet" then AddEvent(onDeathPlanetLanding, {hero.gear}, deathPlanetLanding, {hero.gear}, 0) end - + if status.death01 and not status.final then AddAnim(dialog08) if GetCampaignVar("Planet") ~= "meteorite" then AddEvent(onMeteoriteLanding, {hero.gear}, meteoriteLanding, {hero.gear}, 0) end end - + SendHealthStatsOff() end @@ -228,7 +228,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -315,7 +315,7 @@ end function onNoFuelAtLand(gear) - if checkPointReached > 1 and GetHealth(hero.gear) and GetY(gear) > 1400 and + if checkPointReached > 1 and GetHealth(hero.gear) and GetY(gear) > 1400 and GetAmmoCount(gear, amJetpack) == 0 and StoppedGear(gear) then return true end @@ -338,7 +338,7 @@ function heroAtSaucerPosition(gear) TurnTimeLeft = 0 - -- save check point + -- save check point SaveCampaignVar("CosmosCheckPoint", "2") checkPointReached = 2 AddAnim(dialog02) @@ -346,7 +346,7 @@ if guard1.turn and GetX(hero.gear) > saucerX-150 then guard1.keepTurning = false AddAnim(dialog03) - end + end end function heroOutOfGuardSight(gear) @@ -383,7 +383,7 @@ function fruitPlanetLanding(gear) if checkPointReached < 5 then AddAnim(dialog06) - else + else AnimCaption(hero.gear,loc("Welcome to the Fruit Planet!")) SaveCampaignVar("Planet", "fruitPlanet") if status.fruit02 then @@ -405,7 +405,7 @@ function desertPlanetLanding(gear) if checkPointReached < 5 then AddAnim(dialog06) - else + else AnimCaption(hero.gear,loc("Welcome to the Desert Planet!")) SaveCampaignVar("Planet", "desertPlanet") SaveCampaignVar("UnlockedMissions", "4") @@ -492,7 +492,7 @@ table.insert(dialog01, {func = AnimWait, args = {doctor.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near secret base 17 of PAotH in the rural Hogland..."), 4000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("So Hog Solo, here we are..."), SAY_SAY, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the East there is secret base 17"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Behind these trees on the east side there is secret base 17"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("You have to continue alone from now on."), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {director.gear, loc("Be careful, the future of Hogera is in your hands!"), SAY_SAY, 7200}}) table.insert(dialog01, {func = AnimSay, args = {doctor.gear, loc("We'll use our communicators to contact you"), SAY_SAY, 2600}}) @@ -509,12 +509,12 @@ table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("CheckPoint reached!"), 4000}}) table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Got the saucer!"), SAY_SHOUT, 2000}}) table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Nice!"), SAY_SHOUT, 1000}}) - table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Now use it and go to the moon PAotH station to get more fuels!"), SAY_SHOUT, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {director.gear, loc("Now use it and go to the moon PAotH station to get more fuel!"), SAY_SHOUT, 5000}}) table.insert(dialog02, {func = AnimGearWait, args = {hero.gear, 500}}) -- DIALOG 03 - Hero got spotted by guard AddSkipFunction(dialog03, Skipanim, {dialog03}) table.insert(dialog03, {func = AnimWait, args = {guard1.gear, 4000}}) - table.insert(dialog03, {func = AnimCaption, args = {guard1.gear, loc("Prepare to flee!"), 4000}}) + table.insert(dialog03, {func = AnimCaption, args = {guard1.gear, loc("Prepare to flee!"), 4000}}) table.insert(dialog03, {func = AnimSay, args = {guard1.gear, loc("Hey").." "..guard2.name.."! "..loc("Look, someone is stealing the saucer!"), SAY_SHOUT, 4000}}) table.insert(dialog03, {func = AnimSay, args = {guard2.gear, loc("I'll get him!"), SAY_SAY, 4000}}) table.insert(dialog03, {func = startCombat, args = {guard1.gear}}) @@ -532,17 +532,17 @@ -- DIALOG 06 - Landing on wrong planet or on earth if not enough fuels AddSkipFunction(dialog06, Skipanim, {dialog06}) table.insert(dialog06, {func = AnimCaption, args = {hero.gear, loc("You have to try again!"), 5000}}) - table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm... Now I run out of fuels..."), SAY_THINK, 3000}}) + table.insert(dialog06, {func = AnimSay, args = {hero.gear, loc("Hm... Now I ran out of fuel..."), SAY_THINK, 3000}}) table.insert(dialog06, {func = sendStatsOnRetry, args = {hero.gear}}) -- DIALOG 07 - Hero lands on Death Planet but isn't allowed yet to play this map AddSkipFunction(dialog07, Skipanim, {dialog07}) table.insert(dialog07, {func = AnimCaption, args = {hero.gear, loc("This planet seems dangerous!"), 5000}}) - table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other parts"), SAY_THINK, 4000}}) + table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other device parts"), SAY_THINK, 4000}}) -- DIALOG 08 - Hero wins death01 AddSkipFunction(dialog08, Skipanim, {dialog08}) table.insert(dialog08, {func = AnimCaption, args = {hero.gear, loc("Under the meteorite shadow..."), 4000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("You did great Hog Solo! However we aren't out of danger yet!"), SAY_SHOUT, 4500}}) - table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to get it out of order"), SAY_SHOUT, 5000}}) + table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to stop it now"), SAY_SHOUT, 5000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need it to get split into at least two parts"), SAY_SHOUT, 3000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("PAotH has sent explosives but unfortunately the trigger mechanism seems to be faulty!"), SAY_SHOUT, 5000}}) table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need you to go there and detonate them yourself! Good luck!"), SAY_SHOUT, 500}}) @@ -559,17 +559,17 @@ end function sendStats(planet) - SendStat(siGameResult, loc("Hog Solo arrived to "..planet)) + SendStat(siGameResult, loc("Hog Solo arrived at "..planet)) SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button")) - SendStat(siCustomAchievement, loc("Choose another planet by replaying the mission")) + SendStat(siCustomAchievement, loc("You can choose another planet by replaying this mission")) SendStat(siPlayerKills,'1',teamC.name) EndGame() end function sendStatsOnRetry() SendStat(siGameResult, loc("You have to travel again")) - SendStat(siCustomAchievement, loc("Your first destination is moon in order to get more fuels")) - SendStat(siCustomAchievement, loc("You have to complete the moon main mission in order to travel to other planets")) + SendStat(siCustomAchievement, loc("Your first destination is the moon in order to get more fuel")) + SendStat(siCustomAchievement, loc("You have to complete the main mission on moon in order to travel to other planets")) SendStat(siCustomAchievement, loc("You have to be careful and not die!")) SendStat(siPlayerKills,'0',teamC.name) EndGame() diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua Tue Dec 17 00:02:52 2013 +0400 @@ -99,7 +99,7 @@ SuddenDeathTurns = 100 Map = "death01_map" Theme = "Hell" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -112,7 +112,7 @@ paoth2.gear = AddHog(paoth2.name, 0, 100, "Glasses") AnimSetGearPosition(paoth2.gear, paoth2.x, paoth2.y) HogTurnLeft(paoth2.gear, true) - -- Professor and Thugs + -- Professor and Thugs AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") professor.human = AddHog(professor.name, 0, 300, "tophats") AnimSetGearPosition(professor.human, hero.x + 70, hero.y) @@ -127,9 +127,9 @@ AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) end - + initCheckpoint("death01") - + AnimInit() AnimationSetup() end @@ -137,10 +137,10 @@ function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onEnemiesDeath, {hero.gear}, enemiesDeath, {hero.gear}, 0) - + -- add crates SpawnAmmoCrate(teleportCrate.x, teleportCrate.y, amTeleport) SpawnAmmoCrate(drillCrate.x, drillCrate.y, amTeleport) @@ -169,7 +169,7 @@ PlaceGirder(3770, 1370, 4) PlaceGirder(3700, 1460, 6) PlaceGirder(3840, 1460, 6) - + -- add ammo -- hero ammo AddAmmo(hero.gear, amRope, 2) @@ -190,10 +190,10 @@ AddAmmo(professor.gear, amSwitch, 100) AddAmmo(professor.gear, amGrenade, 8) AddAmmo(professor.gear, amDEagle, 8) - + HideHog(professor.bot) AddAnim(dialog01) - + SendHealthStatsOff() end @@ -233,7 +233,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -248,7 +248,7 @@ function onEnemiesDeath(gear) local allDead = true - if professor.dead then + if GetHealth(hero.gear) and professor.dead then for i=1,table.getn(thugs) do if GetHealth(thugs[i]) then allDead = false @@ -274,9 +274,9 @@ function enemiesDeath(gear) saveCompletedStatus(6) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You have successfuly eliminated Professor Hogevil")) + SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil")) SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius")) - SendStat(siCustomAchievement, loc("You have acquired the last part")) + SendStat(siCustomAchievement, loc("You have acquired the last device part")) SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'0',teamC.name) @@ -297,16 +297,16 @@ AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surpised to see me?"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured..."), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) - table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = startBattle, args = {}}) + table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = startBattle, args = {}}) end -------------- OTHER FUNCTIONS ----------------- diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua Tue Dec 17 00:02:52 2013 +0400 @@ -12,12 +12,12 @@ local missionName = loc("Killing the specialists") local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. loc("Each time you play this missions enemy hogs will play in a random order").."|".. - loc("At the start of the game each enemy hog has only the weapon that he is named of").."|".. - loc("A random hog will inherit the weapons of the deceased hogs").."|".. - loc("If you kill a hog with the weapon your hp will be 100").."|".. - loc("If you injure a hog you'll get 35% of the damage dealt").."|".. - loc("Every time you kill an enemy hog your ammo will get reseted").."|".. - loc("Rope won't get reseted") + loc("At the start of the game each enemy hog has only the weapon that he is named after").."|".. + loc("A random hedgehog will inherit the weapons of his deceased team-mates").."|".. + loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100").."|".. + loc("If you injure a hedgehog you'll get 35% of the damage dealt").."|".. + loc("Every time you kill an enemy hog your ammo will get reset").."|".. + loc("Rope won't get reset") -- dialogs local dialog01 = {} -- mission objectives @@ -63,7 +63,7 @@ Explosives = 0 Map = "death02_map" Theme = "Hell" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -75,9 +75,9 @@ enemies[i].gear = AddHog(enemies[i].name, 1, 100, "war_desertgrenadier1") AnimSetGearPosition(enemies[i].gear, enemies[i].x, enemies[i].y) end - + initCheckpoint("death02") - + AnimInit() AnimationSetup() end @@ -86,7 +86,7 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) @@ -119,7 +119,7 @@ hero.bazookaAmmo = 0 elseif deadHog.weapon == amGrenade then hero.grenadeAmmo = 0 - end + end local randomHog = math.random(1,table.getn(enemies)) while not GetHealth(enemies[randomHog].gear) do randomHog = math.random(1,table.getn(enemies)) @@ -149,7 +149,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -177,8 +177,8 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamA.name) EndGame() @@ -187,8 +187,8 @@ function heroWin(gear) saveBonus(3, 4) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) - SendStat(siCustomAchievement, loc("The next 4 times you'll play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end @@ -209,14 +209,14 @@ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named of"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hog will inherit the weapons of the deceased hogs"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hog with the weapon your hp will be 100"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hog you'll get 35% of the damage dealt"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reseted"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reseted"), 2000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startBattle, args = {hero.gear}}) + table.insert(dialog01, {func = startBattle, args = {hero.gear}}) end ------------ Other Functions ------------------- diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua Tue Dec 17 00:02:52 2013 +0400 @@ -24,7 +24,7 @@ local dialog01 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Getting ready"), loc("The part is hidden in one of the crates! Go and get it!"), 1, 4500}, + [dialog01] = {missionName, loc("Getting ready"), loc("The device part is hidden in one of the crates! Go and get it!"), 1, 4500}, } -- crates local btorch1Y = 60 @@ -43,6 +43,9 @@ local portalX = 1465 local girderY = 1630 local girderX = 3350 +-- win crates +local btorch2 = {} +local girder = {} -- hogs local hero = {} local ally = {} @@ -90,7 +93,7 @@ HealthCaseAmount = 30 Map = "desert01_map" Theme = "Desert" - + -- get the check point checkPointReached = initCheckpoint("desert01") -- get hero health @@ -98,7 +101,7 @@ if checkPointReached > 1 and tonumber(GetCampaignVar("HeroHealth")) then heroHealth = tonumber(GetCampaignVar("HeroHealth")) end - + -- Hog Solo AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") @@ -113,10 +116,10 @@ smuggler1.gear = AddHog(smuggler1.name, 1, 100, "hair_orange") AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y) smuggler2.gear = AddHog(smuggler2.name, 1, 100, "lambda") - AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) + AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) smuggler3.gear = AddHog(smuggler3.name, 1, 100, "beefeater") - AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) - + AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) + if checkPointReached == 1 then -- Start of the game elseif checkPointReached == 2 then @@ -128,42 +131,54 @@ elseif checkPointReached == 4 then AnimSetGearPosition(hero.gear, 1160, 1180) elseif checkPointReached == 5 then - AnimSetGearPosition(hero.gear, girderX+40, girderY-30) + local positions = GetCampaignVar("HogsPosition") + positions = split(positions,",") + local x + local y + if positions[1] then + x = positions[1] + y = positions[2] + else + -- this should *NEVER* happen, remove? + x = girderX+40 + y = girderY-30 + end + AnimSetGearPosition(hero.gear, x, y) end - + AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroAtFirstBattle, {hero.gear}, heroAtFirstBattle, {hero.gear}, 1) - AddEvent(onHeroFleeFirstBattle, {hero.gear}, heroFleeFirstBattle, {hero.gear}, 1) AddEvent(onHeroAtCheckpoint4, {hero.gear}, heroAtCheckpoint4, {hero.gear}, 0) AddEvent(onHeroAtThirdBattle, {hero.gear}, heroAtThirdBattle, {hero.gear}, 0) AddEvent(onCheckForWin1, {hero.gear}, checkForWin1, {hero.gear}, 0) AddEvent(onCheckForWin2, {hero.gear}, checkForWin2, {hero.gear}, 0) - + AddEvent(onCrateDestroyed, {hero.gear}, crateDestroyed, {hero.gear}, 0) + -- smugglers ammo AddAmmo(smuggler1.gear, amBazooka, 2) AddAmmo(smuggler1.gear, amGrenade, 2) - AddAmmo(smuggler1.gear, amDEagle, 2) + AddAmmo(smuggler1.gear, amDEagle, 2) AddAmmo(smuggler3.gear, amRope, 2) - + -- spawn crates SpawnAmmoCrate(btorch2X, btorch2Y, amBlowTorch) SpawnAmmoCrate(btorch3X, btorch3Y, amBlowTorch) SpawnAmmoCrate(rope1X, rope1Y, amRope) SpawnAmmoCrate(rope2X, rope2Y, amRope) SpawnAmmoCrate(rope3X, rope3Y, amRope) - SpawnAmmoCrate(portalX, portalY, amPortalGun) + SpawnAmmoCrate(portalX, portalY, amPortalGun) SpawnAmmoCrate(girderX, girderY, amGirder) - + SpawnHealthCrate(3300, 970) - + -- adding mines - BOOM! AddGear(1280, 460, gtMine, 0, 0, 0, 0) AddGear(270, 460, gtMine, 0, 0, 0, 0) @@ -171,7 +186,7 @@ AddGear(3500, 240, gtMine, 0, 0, 0, 0) AddGear(3410, 670, gtMine, 0, 0, 0, 0) AddGear(3450, 720, gtMine, 0, 0, 0, 0) - + local x = 800 while x < 1630 do AddGear(x, 900, gtMine, 0, 0, 0, 0) @@ -192,8 +207,9 @@ AddGear(x, 470, gtMine, 0, 0, 0, 0) x = x + math.random(8,20) end - - if checkPointReached == 1 then + + if checkPointReached == 1 then + AddEvent(onHeroFleeFirstBattle, {hero.gear}, heroFleeFirstBattle, {hero.gear}, 1) AddEvent(onHeroAtCheckpoint2, {hero.gear}, heroAtCheckpoint2, {hero.gear}, 0) AddEvent(onHeroAtCheckpoint3, {hero.gear}, heroAtCheckpoint3, {hero.gear}, 0) -- crates @@ -206,18 +222,18 @@ AddAmmo(hero.gear, amGrenade, 6) AddAmmo(hero.gear, amDEagle, 4) AddAmmo(hero.gear, amRCPlane, tonumber(getBonus(1))) - + AddAnim(dialog01) elseif checkPointReached == 2 or checkPointReached == 3 then - ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0) + ShowMission(campaignName, missionName, loc("The device part is hidden in one of the crates! Go and get it!"), -amSkip, 0) loadHeroAmmo() - + secondBattle() elseif checkPointReached == 4 or checkPointReached == 5 then - ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0) + ShowMission(campaignName, missionName, loc("The part device is hidden in one of the crates! Go and get it!"), -amSkip, 0) loadHeroAmmo() end - + SendHealthStatsOff() end @@ -252,11 +268,38 @@ function onAmmoStoreInit() SetAmmo(amBlowTorch, 0, 0, 0, 1) SetAmmo(amRope, 0, 0, 0, 1) - SetAmmo(amPortalGun, 0, 0, 0, 1) + SetAmmo(amPortalGun, 0, 0, 0, 1) SetAmmo(amGirder, 0, 0, 0, 3) end +function onGearAdd(gear) + if GetGearType(gear) == gtCase then + if GetX(gear) == btorch2X and GetY(gear) == btorch2Y then + btorch2.gear = gear + btorch2.destroyed = false + btorch2.deleted = false + elseif GetX(gear) == girderX and GetY(gear) == girderY then + girder.gear = gear + girder.destroyed = false + girder.deleted = false + end + end +end + +function onGearDamage(gear, damage) + if gear == girder.gear then + girder.destroyed = true + elseif gear == btorch2.gear then + btorch2.destroyed = true + end +end + function onGearDelete(gear) + if gear == girder.gear then + girder.deleted = true + elseif gear == btorch2.gear then + btorch2.deleted = true + end if gear == hero.gear then hero.dead = true elseif (gear == smuggler1.gear or gear == smuggler2.gear or gear == smuggler3.gear) and heroIsInBattle then @@ -267,7 +310,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -281,16 +324,16 @@ end function onHeroAtFirstBattle(gear) - if not hero.dead and not heroIsInBattle and GetHealth(smuggler1.gear) and GetX(hero.gear) <= 1450 - and GetY(hero.gear) <= GetY(smuggler1.gear)+5 and GetY(hero.gear) >= GetY(smuggler1.gear)-5 then + if not hero.dead and not heroIsInBattle and GetHealth(smuggler1.gear) and GetX(hero.gear) <= 1450 and GetX(hero.gear) > 80 + and GetY(hero.gear) <= GetY(smuggler1.gear)+5 and GetY(hero.gear) >= GetY(smuggler1.gear)-40 and StoppedGear(hero.gear) then return true end return false end function onHeroFleeFirstBattle(gear) - if not hero.dead and GetHealth(smuggler1.gear) and heroIsInBattle and ongoingBattle == 1 and (GetX(hero.gear) > 1450 - or (GetY(hero.gear) < GetY(smuggler1.gear)-80 or GetY(hero.gear) > smuggler1.y+300)) then + if GetHealth(hero.gear) and GetHealth(smuggler1.gear) and heroIsInBattle + and distance(hero.gear, smuggler1.gear) > 1400 and StoppedGear(hero.gear) then return true end return false @@ -299,7 +342,7 @@ -- saves the location of the hero and prompts him for the second battle function onHeroAtCheckpoint2(gear) if not hero.dead and GetX(hero.gear) > 1000 and GetX(hero.gear) < 1100 - and GetY(hero.gear) > 590 and GetY(hero.gear) < 700 then + and GetY(hero.gear) > 590 and GetY(hero.gear) < 700 and StoppedGear(hero.gear) then return true end return false @@ -307,7 +350,7 @@ function onHeroAtCheckpoint3(gear) if not hero.dead and GetX(hero.gear) > 1610 and GetX(hero.gear) < 1680 - and GetY(hero.gear) > 850 and GetY(hero.gear) < 1000 then + and GetY(hero.gear) > 850 and GetY(hero.gear) < 1000 and StoppedGear(hero.gear) then return true end return false @@ -330,16 +373,21 @@ end function onCheckForWin1(gear) - if not hero.dead and GetX(hero.gear) > btorch2X-30 and GetX(hero.gear) < btorch2X+30 - and GetY(hero.gear) > btorch2Y-30 and GetY(hero.gear) < btorch2Y+30 then + if not hero.dead and not btorch2.destroyed and btorch2.deleted then return true end return false end function onCheckForWin2(gear) - if not hero.dead and GetX(hero.gear) > girderX-30 and GetX(hero.gear) < girderX+30 - and GetY(hero.gear) > girderY-30 and GetY(hero.gear) < girderY+30 then + if not hero.dead and not girder.destroyed and girder.deleted then + return true + end + return false +end + +function onCrateDestroyed(gear) + if not hero.dead and girder.destroyed or btorch2.destroyed then return true end return false @@ -348,20 +396,14 @@ -------------- ACTIONS ------------------ function heroDeath(gear) - SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("To win the game you have to find the right crate")) - SendStat(siCustomAchievement, loc("You can avoid some battles")) - SendStat(siCustomAchievement, loc("Use your ammo wisely")) - SendStat(siPlayerKills,'1',teamB.name) - SendStat(siPlayerKills,'0',teamC.name) - EndGame() + lose() end function heroAtFirstBattle(gear) AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000) TurnTimeLeft = 0 heroIsInBattle = true - ongoingBattle = 1 + ongoingBattle = 1 AnimSwitchHog(smuggler1.gear) TurnTimeLeft = 0 end @@ -394,11 +436,15 @@ function heroAtThirdBattle(gear) heroIsInBattle = true ongoingBattle = 3 - AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000) + AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000) AnimSwitchHog(smuggler3.gear) TurnTimeLeft = 0 end +function crateDestroyed(gear) + lose() +end + -- for some weird reson I couldn't call the same action for both events function checkForWin1(gear) checkForWin() @@ -408,9 +454,10 @@ -- ok lets place one more checkpoint as next part seems challenging without rope if cratesFound == 0 then saveCheckPointLocal("5") + SaveCampaignVar("HogsPosition", GetX(hero.gear)..","..GetY(hero.gear)) end - - checkForWin() + + checkForWin() end -------------- ANIMATIONS ------------------ @@ -430,14 +477,14 @@ AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Planet of Sand, you have to double check your moves..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finaly you are here..."), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me in such a short notice!"), SAY_SAY, 3000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heared the local tribes saying that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confimed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware though! Many smugglers come often to explore these tunnels and scavage whatever valuable items they can find"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}}) @@ -447,7 +494,7 @@ table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is the tunnel entrance"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startMission, args = {hero.gear}}) + table.insert(dialog01, {func = startMission, args = {hero.gear}}) end --------------- OTHER FUNCTIONS ------------------ @@ -459,16 +506,19 @@ function secondBattle() -- second battle + if heroIsInBattle and ongoingBattle == 1 then + AnimSay(smuggler1.gear, loc("Get him Spike!"), SAY_SHOUT, 4000) + end heroIsInBattle = true ongoingBattle = 2 - AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000) + AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000) AnimSwitchHog(smuggler2.gear) TurnTimeLeft = 0 end function saveCheckPointLocal(cpoint) -- save checkpoint - saveCheckpoint(cpoint) + saveCheckpoint(cpoint) SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) -- bazooka - grenade - rope - parachute - deagle - btorch - construct - portal - rcplane SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amBazooka)..GetAmmoCount(hero.gear, amGrenade).. @@ -497,13 +547,13 @@ function checkForWin() if cratesFound == 0 then - -- have to look more + -- have to look more AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000) cratesFound = cratesFound + 1 elseif cratesFound == 1 then -- end game saveCompletedStatus(5) - AnimSay(hero.gear, loc("Hoo Ray!!!"), SAY_SHOUT, 5000) + AnimSay(hero.gear, loc("Hoorah!!!"), SAY_SHOUT, 5000) SendStat(siGameResult, loc("Congratulations, you won!")) SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order")) SendStat(siPlayerKills,'1',teamC.name) @@ -511,3 +561,14 @@ EndGame() end end + +function lose() + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game you have to find the right crate")) + SendStat(siCustomAchievement, loc("You can avoid some battles")) + SendStat(siCustomAchievement, loc("Use your ammo wisely")) + SendStat(siCustomAchievement, loc("Don't destroy the device crate!")) + SendStat(siPlayerKills,'1',teamB.name) + SendStat(siPlayerKills,'0',teamC.name) + EndGame() +end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua Tue Dec 17 00:02:52 2013 +0400 @@ -15,7 +15,7 @@ local dialog01 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500}, + [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope to quickly get to the surface!"), 1, 4500}, } -- health crates healthX = 565 @@ -34,7 +34,7 @@ teamA.color = tonumber("38D61C",16) -- green -- way points local current waypoint = 1 -local waypoints = { +local waypoints = { [1] = {x=1450, y=140}, [2] = {x=990, y=580}, [3] = {x=1650, y=950}, @@ -70,15 +70,15 @@ HealthDecrease = 0 Map = "desert02_map" Theme = "Desert" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) HogTurnLeft(hero.gear, true) - + initCheckpoint("desert02") - + AnimInit() AnimationSetup() end @@ -86,15 +86,15 @@ function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroSafe, {hero.gear}, heroSafe, {hero.gear}, 0) - + SpawnHealthCrate(healthX, health1Y) SpawnHealthCrate(healthX, health2Y) - + AddAmmo(hero.gear, amRope, 99) - + SendHealthStatsOff() AddAnim(dialog01) end @@ -120,7 +120,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -174,7 +174,7 @@ table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface asap..."), SAY_THINK, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface as quickly as I can..."), SAY_THINK, 4000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = challengeStart, args = {hero.gear}}) end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua Tue Dec 17 00:02:52 2013 +0400 @@ -9,10 +9,10 @@ -- globals local missionName = loc("Precise flying") -local challengeObjectives = loc("Use the rc plane and destroy the all the targets").."|".. - loc("Each time you destroy your level targets you'll get teleported to the next level").."|".. - loc("You'll have only one rc plane at the start of the mission").."|".. - loc("During the game you can get new planes by getting the weapon crates") +local challengeObjectives = loc("Use the RC plane and destroy the all the targets").."|".. + loc("Each time you destroy all the targets on your current level you'll get teleported to the next level").."|".. + loc("You'll have only one RC plane at the start of the mission").."|".. + loc("During the game you can get new RC planes by collecting the weapon crates") local currentTarget = 1 -- dialogs local dialog01 = {} @@ -66,14 +66,14 @@ Explosives = 0 Map = "desert03_map" Theme = "Desert" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - + initCheckpoint("desert03") - + AnimInit() AnimationSetup() end @@ -89,7 +89,7 @@ -- original crates and targets SpawnAmmoCrate(rcCrates[1].x, rcCrates[1].y, amRCPlane) targets[1].gear = AddGear(targets[1].x, targets[1].y, gtTarget, 0, 0, 0, 0) - + -- hero ammo AddAmmo(hero.gear, amRCPlane, 1) @@ -117,7 +117,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -159,11 +159,11 @@ -- DIALOG 01 - Start, game instructions AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy your level targets you'll get teleported to the next level"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one rc plane at the start of the mission"), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new planes by getting the weapon crates"), 5000}}) - table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy all the targets on your current level you'll get teleported to the next level"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one RC plane at the start of the mission"), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new RC planes by collecting the weapon crates"), 5000}}) + table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) end ----------------- Other Functions ----------------- @@ -184,7 +184,7 @@ setTargets(currentTarget) end elseif currentTarget == 3 then - + else win() end @@ -209,18 +209,18 @@ function win() saveBonus(1, 1) SendStat(siGameResult, loc("Congratulations, you are the best!")) - SendStat(siCustomAchievement, loc("You have destroyed all the targets")) + SendStat(siCustomAchievement, loc("You have destroyed all the targets")) SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot")) - SendStat(siCustomAchievement, loc("Next you play \"Searching in the dust\" you'll have an RC plane available")) + SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end function gameOver() SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to destroy all the targets")) - SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to destroy all the targets")) + SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'0',teamA.name) EndGame() end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.hwp Binary file share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.hwp has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua Tue Dec 17 00:02:52 2013 +0400 @@ -12,7 +12,9 @@ ----------------- VARIABLES -------------------- -- globals local missionName = loc("The big bang") -local challengeObjectives = loc("Find a way to detonate all the explosives and stay alive!") +local challengeObjectives = loc("Find a way to detonate all the explosives and stay alive!").."|".. + loc("Red areas are indestructible").."|".. + loc("Green areas aren't portal enabled") local explosives = {} local currentHealth = 1 local currentDamage = 0 @@ -38,17 +40,17 @@ MinesNum = 0 MinesTime = 1 Explosives = 0 - HealthCaseAmount = 50 + HealthCaseAmount = 35 Map = "final_map" Theme = "EarthRise" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - + initCheckpoint("final") - + AnimInit() end @@ -56,7 +58,7 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + -- explosives x = 400 while x < 815 do @@ -70,20 +72,20 @@ AddGear(x, 480, gtMine, 0, 0, 0, 0) x = x + math.random(5,20) end - -- health crate - SpawnHealthCrate(900, 5) + -- health crate + SpawnHealthCrate(910, 5) -- ammo crates SpawnAmmoCrate(930, 1000,amRCPlane) SpawnAmmoCrate(1220, 672,amPickHammer) SpawnAmmoCrate(1220, 672,amGirder) - + -- ammo - AddAmmo(hero.gear, amPortalGun, 1) + AddAmmo(hero.gear, amPortalGun, 1) AddAmmo(hero.gear, amFirePunch, 1) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + SendHealthStatsOff() end @@ -141,6 +143,8 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) SendStat(siCustomAchievement, loc("You have to destroy all the explosives without dying!")) + SendStat(siCustomAchievement, loc("Red areas are indestructible")) + SendStat(siCustomAchievement, loc("Green areas aren't portal enabled")) SendStat(siPlayerKills,'0',teamA.name) EndGame() end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua Tue Dec 17 00:02:52 2013 +0400 @@ -33,8 +33,8 @@ -- mission objectives local goals = { [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 4000}, - [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have choose to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000}, - [dialog03] = {missionName, loc("Time to run!"), loc("You have choose to flee... Unfortunately the only place where you can launch your saucer is in the most left side of the map"), 1, 4000}, + [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000}, + [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee... Unfortunately the only place where you can launch your saucer is the left-most place on the map"), 1, 4000}, } -- crates local crateWMX = 2170 @@ -88,7 +88,7 @@ {name = loc("Naranja Jed"), x = 960 , y = 516, health = 40}, } teamA.name = loc("Hog Solo") -teamA.color = tonumber("38D61C",16) -- green +teamA.color = tonumber("38D61C",16) -- green teamB.name = loc("Green Bananas") teamB.color = tonumber("38D61C",16) -- green teamC.name = loc("Yellow Watermelons") @@ -108,7 +108,7 @@ HealthCaseAmount = 50 Map = "fruit01_map" Theme = "Fruit" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -145,27 +145,20 @@ yellowArmy[i].gear = AddHog(yellowArmy[i].name, 1, yellowArmy[i].health, yellowHats[math.random(1,4)]) AnimSetGearPosition(yellowArmy[i].gear, yellowArmy[i].x, yellowArmy[i].y) end - + initCheckpoint("fruit01") AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroSelect, {hero.gear}, heroSelect, {hero.gear}, 0) - - -- Hog Solo weapons - AddAmmo(hero.gear, amRope, 2) - AddAmmo(hero.gear, amBazooka, 3) - AddAmmo(hero.gear, amParachute, 1) - AddAmmo(hero.gear, amGrenade, 6) - AddAmmo(hero.gear, amDEagle, 4) - AddAmmo(hero.gear, amSkip, 100) + -- Green team weapons local greenArmy = { green1, green2 } for i=1,2 do @@ -174,8 +167,8 @@ AddAmmo(greenArmy[i].gear, amBazooka, 10) AddAmmo(greenArmy[i].gear, amGrenade, 7) AddAmmo(greenArmy[i].gear, amFirePunch, 2) - AddAmmo(greenArmy[i].gear, amDrill, 3) - AddAmmo(greenArmy[i].gear, amSwitch, 2) + AddAmmo(greenArmy[i].gear, amDrill, 3) + AddAmmo(greenArmy[i].gear, amSwitch, 2) AddAmmo(greenArmy[i].gear, amSkip, 100) end -- Yellow team weapons @@ -184,21 +177,21 @@ AddAmmo(yellow1.gear, amBazooka, 10) AddAmmo(yellow1.gear, amGrenade, 10) AddAmmo(yellow1.gear, amFirePunch, 5) - AddAmmo(yellow1.gear, amDrill, 3) - AddAmmo(yellow1.gear, amBee, 1) + AddAmmo(yellow1.gear, amDrill, 3) + AddAmmo(yellow1.gear, amBee, 1) AddAmmo(yellow1.gear, amMortar, 3) AddAmmo(yellow1.gear, amDEagle, 4) - AddAmmo(yellow1.gear, amDynamite, 1) + AddAmmo(yellow1.gear, amDynamite, 1) AddAmmo(yellow1.gear, amSwitch, 100) for i=3,7 do HideHog(yellowArmy[i].gear) end HideHog(green1.bot) - + -- crates SpawnHealthCrate(health1X, health1Y) SpawnAmmoCrate(crateWMX, crateWMY, amWatermelon) - + AddAnim(dialog01) SendHealthStatsOff() end @@ -208,6 +201,8 @@ TurnTimeLeft = 0 elseif not heroPlayedFirstTurn and CurrentHedgehog == hero.gear and startBattleCalled then heroPlayedFirstTurn = true + elseif not heroPlayedFirstTurn and CurrentHedgehog == green1.gear then + TurnTimeLeft = 0 else if chooseToBattle then if CurrentHedgehog == green1.gear then @@ -244,7 +239,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -337,7 +332,7 @@ -- add stats saveVariables() SendStat(siGameResult, loc("Green Bananas won!")) - SendStat(siCustomAchievement, loc("You have eliminated all the visible enemy hogs!")) + SendStat(siCustomAchievement, loc("You have eliminated all visible enemy hedgehogs!")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamC.name) @@ -348,7 +343,7 @@ -- add stats saveVariables() SendStat(siGameResult, loc("Hog Solo escaped successfully!")) - SendStat(siCustomAchievement, loc("You have reached the flying area successfully!")) + SendStat(siCustomAchievement, loc("You have reached the take-off area successfully!")) SendStat(siPlayerKills,'1',teamA.name) SendStat(siPlayerKills,'0',teamB.name) SendStat(siPlayerKills,'0',teamC.name) @@ -359,7 +354,7 @@ TurnTimeLeft = 0 FollowGear(hero.gear) if GetX(hero.gear) < hero.x then - chooseToBattle = true + chooseToBattle = true AddEvent(onGreen1Death, {green1.gear}, green1Death, {green1.gear}, 0) AddEvent(onBattleWin, {hero.gear}, battleWin, {hero.gear}, 0) AddAnim(dialog02) @@ -392,7 +387,7 @@ -- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Fruits a terrible war is about to begin..."), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I was told that as the leader of the king's guard, no one knows this world better than you!"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}}) @@ -405,18 +400,19 @@ table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 7000}}) table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) - -- DIALOG 02 - Hero selects to fight + -- DIALOG 02 - Hero selects to fight AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well Hog Solo!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As more experienced I want you to lead them to the battle"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of cource will observe the battle and intervene if necessary"), SAY_SAY, 5000}}) - table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) - table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain! The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 5000}}) - table.insert(dialog02, {func = AnimWait, args = {green1.gear, 5000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be fool son, they'll be more"), SAY_SAY, 3000}}) - table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare the rest!"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to the battle"), SAY_SAY, 4000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of course will observe the battle and intervene if necessary"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimWait, args = {hero.gear, 4500}}) + table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain!"), SAY_SAY, 2000}}) + table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}}) + table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish son, there will be more"), SAY_SAY, 2000}}) + table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) table.insert(dialog02, {func = startBattle, args = {hero.gear}}) -- DIALOG 03 - Hero selects to flee @@ -424,8 +420,8 @@ table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place that you can fly would be the most left part of the map"), SAY_SAY, 5000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our anti flying weapons"), SAY_SAY, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area"), SAY_SAY, 5000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons"), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}}) table.insert(dialog03, {func = startBattle, args = {hero.gear}}) @@ -434,6 +430,13 @@ ------------- OTHER FUNCTIONS --------------- function startBattle() + -- Hog Solo weapons + AddAmmo(hero.gear, amRope, 2) + AddAmmo(hero.gear, amBazooka, 3) + AddAmmo(hero.gear, amParachute, 1) + AddAmmo(hero.gear, amGrenade, 6) + AddAmmo(hero.gear, amDEagle, 4) + AddAmmo(hero.gear, amSkip, 100) RestoreHog(green1.bot) DeleteGear(green1.human) green1.gear = green1.bot @@ -443,18 +446,18 @@ function gameLost() if chooseToBattle then - SendStat(siGameResult, loc("Green Bananas lost, try again!")) + SendStat(siGameResult, loc("The Green Bananas lost, try again!")) SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies")) SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game")) - SendStat(siCustomAchievement, loc("You are controlling all the active ally units")) + SendStat(siCustomAchievement, loc("You are in control of all the active ally units")) SendStat(siCustomAchievement, loc("The ally units share their ammo")) SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible")) else SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!")) - SendStat(siCustomAchievement, loc("You have to get to the most left land and remove any enemy hog from there")) + SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there")) SendStat(siCustomAchievement, loc("You will play every 3 turns")) SendStat(siCustomAchievement, loc("Green hogs won't intenionally hurt you")) - end + end SendStat(siPlayerKills,'1',teamC.name) SendStat(siPlayerKills,'0',teamA.name) SendStat(siPlayerKills,'0',teamB.name) @@ -464,7 +467,7 @@ function getNextWave() if TotalRounds == 4 then RestoreHog(yellowArmy[3].gear) - AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000) + AnimCaption(hero.gear, loc("Next wave in 3 turns"), 5000) if not chooseToBattle and not GetHealth(yellow1.gear) then SetGearPosition(yellowArmy[3].gear, yellow1.x, yellow1.y) end @@ -478,7 +481,7 @@ elseif TotalRounds == 10 then RestoreHog(yellowArmy[6].gear) RestoreHog(yellowArmy[7].gear) - if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) + if not chooseToBattle and not GetHealth(yellow1.gear) and not GetHealth(yellowArmy[3].gear) and not GetHealth(yellowArmy[4].gear) then SetGearPosition(yellowArmy[6].gear, yellow1.x, yellow1.y) end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Tue Dec 17 00:02:52 2013 +0400 @@ -14,6 +14,7 @@ local tookPartInBattle = false local previousHog = -1 local checkPointReached = 1 -- 1 is normal spawn +local permitCaptainLimeDeath = false -- dialogs local dialog01 = {} local dialog02 = {} @@ -21,10 +22,10 @@ local dialog04 = {} -- mission objectives local goals = { - [dialog01] = {missionName, loc("Exploring the tunnel"), loc("With the help of the other hogs search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, - [dialog02] = {missionName, loc("Exploring the tunnel"), loc("Explore the tunnel with the other hogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, + [dialog01] = {missionName, loc("Exploring the tunnel"), loc("Search for the device with the help of the other hedgehogs ").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, + [dialog02] = {missionName, loc("Exploring the tunnel"), loc("Explore the tunnel with the other hedgehogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000}, [dialog03] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack Captain Lime before he attacks back"), 1, 4000}, - [dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assasins before they attack back"), 1, 4000}, + [dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assassins before they attack back"), 1, 4000}, } -- crates local eagleCrate = {name = amDEagle, x = 1680, y = 1650} @@ -80,7 +81,7 @@ SuddenDeathTurns = 200 Map = "fruit02_map" Theme = "Fruit" - + -- load checkpoints, problem getting the campaign variable local health = 100 checkPointReached = initCheckpoint("fruit02") @@ -88,12 +89,12 @@ loadHogsPositions() health = tonumber(GetCampaignVar("HeroHealth")) end - + -- Hog Solo and Green Bananas AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, health, "war_desertgrenadier1") AnimSetGearPosition(hero.gear, hero.x, hero.y) - HogTurnLeft(hero.gear, true) + HogTurnLeft(hero.gear, true) green2.gear = AddHog(green2.name, 0, 100, "war_britmedic") AnimSetGearPosition(green2.gear, green2.x, green2.y) HogTurnLeft(green2.gear, true) @@ -116,20 +117,20 @@ end AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + if GetCampaignVar("Fruit01JoinedBattle") and GetCampaignVar("Fruit01JoinedBattle") == "true" then tookPartInBattle = true end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onDeviceCrates, {hero.gear}, deviceCrates, {hero.gear}, 0) - + -- Hog Solo and GB weapons AddAmmo(hero.gear, amSwitch, 100) -- Captain Lime weapons @@ -144,7 +145,7 @@ for i=1,table.getn(redHedgehogs) do HideHog(redHedgehogs[i].gear) end - + -- explosives -- I wanted to use FindPlace but doesn't accept height values... local x1 = 950 @@ -165,7 +166,7 @@ x2 = x2 - 25 end AddGear(3128, 1680, gtExplosives, 0, 0, 0, 0) - + --mines AddGear(3135, 1680, gtMine, 0, 0, 0, 0) AddGear(3145, 1680, gtMine, 0, 0, 0, 0) @@ -176,7 +177,7 @@ AddGear(3105, 1680, gtMine, 0, 0, 0, 0) AddGear(3095, 1680, gtMine, 0, 0, 0, 0) AddGear(3085, 1680, gtMine, 0, 0, 0, 0) - AddGear(3075, 1680, gtMine, 0, 0, 0, 0) + AddGear(3075, 1680, gtMine, 0, 0, 0, 0) if checkPointReached == 1 then AddAmmo(hero.gear, amFirePunch, 3) @@ -198,20 +199,20 @@ AddEvent(onCheckPoint3, {hero.gear}, checkPoint3, {hero.gear}, 0) AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) elseif checkPointReached == 4 then - AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) + AddEvent(onCheckPoint4, {hero.gear}, checkPoint4, {hero.gear}, 0) elseif checkPointReached == 5 then -- EMPTY end if checkPointReached ~= 1 then loadWeapons() end - + -- girders if checkPointReached > 1 then PlaceGirder(1580, 875, 4) PlaceGirder(1800, 875, 4) end - + -- place crates if checkPointReached < 2 then SpawnAmmoCrate(girderCrate.x, girderCrate.y, girderCrate.name) @@ -224,9 +225,9 @@ if tookPartInBattle then SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon) else - SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) + SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) end - + SendHealthStatsOff() end @@ -266,6 +267,17 @@ CheckEvents() end +function onGameTick20() + if not permitCaptainLimeDeath and not GetHealth(green1.gear) then + -- game ends with the according stat messages + heroDeath() + permitCaptainLimeDeath = true + end + if CurrentHedgehog and GetY(CurrentHedgehog) > 1350 then + SetWind(-40) + end +end + function onGearDelete(gear) if gear == hero.gear then hero.dead = true @@ -274,6 +286,14 @@ end end +function onGearDamage(gear, damage) + if GetGearType(gear) == gtCase then + -- in this mode every crate is essential in order to complete the mission + -- destroying a crate ends the game + heroDeath() + end +end + function onAmmoStoreInit() SetAmmo(amDEagle, 0, 0, 0, 6) SetAmmo(amGirder, 0, 0, 0, 2) @@ -289,7 +309,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -336,7 +356,7 @@ function onCheckPoint1(gear) -- before barrel jump - if not hero.dead and GetX(hero.gear) > 2850 and GetX(hero.gear) < 2945 + if not hero.dead and GetX(hero.gear) > 2850 and GetX(hero.gear) < 2945 and GetY(hero.gear) > 808 and GetY(hero.gear) < 852 and not isHeroAtWrongPlace() then return true end @@ -355,7 +375,7 @@ function onCheckPoint3(gear) -- after barrel jump - if ((GetHealth(green2.gear) and GetY(green2.gear) > 1550 and GetX(green2.gear) < 3000 and StoppedGear(green2.gear)) + if ((GetHealth(green2.gear) and GetY(green2.gear) > 1550 and GetX(green2.gear) < 3000 and StoppedGear(green2.gear)) or (GetHealth(green3.gear) and GetY(green3.gear) > 1550 and GetX(green3.gear) < 3000 and StoppedGear(green2.gear))) and not isHeroAtWrongPlace() then return true @@ -365,7 +385,7 @@ function onCheckPoint4(gear) -- hero at crates - if not hero.dead and GetX(hero.gear) > 1288 and GetX(hero.gear) < 1420 + if not hero.dead and GetX(hero.gear) > 1288 and GetX(hero.gear) < 1420 and GetY(hero.gear) > 1840 and not isHeroAtWrongPlace() then return true end @@ -373,18 +393,24 @@ end -------------- ACTIONS ------------------ +ended = false function heroDeath(gear) - SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("To win the game Hog Solo has to get the bottom crates and come back to the surface")) - SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you")) - if tookPartInBattle then - SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assasins at the end")) - else - SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end")) + if not ended then + SendStat(siGameResult, loc("Hog Solo lost, try again!")) + SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface")) + SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you")) + SendStat(siCustomAchievement, loc("Do not destroy the crates")) + if tookPartInBattle then + SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end")) + else + SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end")) + SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!")) + end + SendStat(siPlayerKills,'0',teamA.name) + EndGame() + ended = true end - SendStat(siPlayerKills,'0',teamA.name) - EndGame() end function deviceCrates(gear) @@ -397,6 +423,8 @@ end AddAnim(dialog04) end + -- needs to be set to true for both plots + permitCaptainLimeDeath = true AddAmmo(hero.gear, amSwitch, 0) AddEvent(onSurface, {hero.gear}, surface, {hero.gear}, 0) end @@ -474,17 +502,17 @@ -- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Captain Lime helps Hog Solo..."), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Captain Lime helps Hog Solo..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking for is hidden."), SAY_SAY, 7000}}) - table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send with you two of my best hogs to assist you."), SAY_SAY, 7000}}) + table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send two of my best hogs to assist you."), SAY_SAY, 7000}}) table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) -- DIALOG02 - Start, Hog Solo escaped from the previous battle AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Hog Solo gets closer to the device..."), 5000}}) + table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device..."), 5000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}}) table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands"), SAY_SAY, 4000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}}) @@ -500,15 +528,15 @@ AddSkipFunction(dialog03, Skipanim, {dialog03}) table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}}) table.insert(dialog03, {func = FollowGear, args = {hero.gear}}) - table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}}) - table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! I am gonna shoot him when he returns and keep his device for me!"), SAY_THINK, 4000}}) + table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! When he returns I'll shoot him and keep that device for myself!"), SAY_THINK, 4000}}) table.insert(dialog03, {func = goToThesurface, args = {hero.gear}}) -- DIALOG04 - At crates, hero learns about the assasins ambush AddSkipFunction(dialog04, Skipanim, {dialog04}) table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}}) table.insert(dialog04, {func = FollowGear, args = {hero.gear}}) - table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoo Ray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) + table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}}) table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}}) table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}}) table.insert(dialog04, {func = goToThesurface, args = {hero.gear}}) @@ -521,11 +549,7 @@ end function wind() - if GetY(CurrentHedgehog) > 1350 then - SetWind(-40) - else - SetWind(math.random(-100,100)) - end + SetWind(math.random(-100,100)) end function saveHogsPositions() @@ -533,9 +557,13 @@ positions = GetX(hero.gear)..","..GetY(hero.gear) if GetHealth(green2.gear) then positions = positions..","..GetX(green2.gear)..","..GetY(green2.gear) + else + positions = positions..",1,1" end if GetHealth(green3.gear) then positions = positions..","..GetX(green3.gear)..","..GetY(green3.gear) + else + positions = positions..",1,1" end SaveCampaignVar("HogsPosition", positions) end @@ -584,25 +612,6 @@ return false end --- splits number by delimiter -function split(s, delimiter) - local res = {} - local first = "" - for i=1,s:len() do - if s:sub(1,1) == delimiter then - table.insert(res, tonumber(first)) - first = "" - else - first = first..s:sub(1,1) - end - s = s:sub(2) - end - if first:len() > 0 then - table.insert(res, tonumber(first)) - end - return res -end - function saveCheckPointLocal(cpoint) AnimCaption(hero.gear, loc("Checkpoint reached!"), 3000) saveCheckpoint(cpoint) diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Tue Dec 17 00:02:52 2013 +0400 @@ -19,7 +19,7 @@ loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles").."|".. loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports").."|".. loc("The first turn will last 25 sec and every other turn 15 sec").."|".. - loc("If you skip the game your time left will be added to your next turn").."|".. + loc("If you skip a turn then the turn time left will be added to your next turn").."|".. loc("Some parts of the land are indestructible") -- dialogs local dialog01 = {} @@ -79,7 +79,7 @@ Explosives = 0 Map = "fruit03_map" Theme = "Fruit" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -91,15 +91,15 @@ for i=1,table.getn(enemiesEven) do enemiesEven[i].gear = AddHog(enemiesEven[i].name, 1, 100, hats[math.random(1,table.getn(hats))]) AnimSetGearPosition(enemiesEven[i].gear, enemiesEven[i].x, enemiesEven[i].y) - end + end AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") for i=1,table.getn(enemiesOdd) do enemiesOdd[i].gear = AddHog(enemiesOdd[i].name, 1, 100, hats[math.random(1,table.getn(hats))]) AnimSetGearPosition(enemiesOdd[i].gear, enemiesOdd[i].x, enemiesOdd[i].y) end - + initCheckpoint("fruit03") - + AnimInit() AnimationSetup() end @@ -108,10 +108,10 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + --hero ammo AddAmmo(hero.gear, amTeleport, 2) AddAmmo(hero.gear, amSniperRifle, 2) @@ -125,7 +125,7 @@ AddAmmo(enemiesEven[1].gear, amSniperRifle, 100) AddAmmo(enemiesEven[1].gear, amWatermelon, 1) AddAmmo(enemiesEven[1].gear, amGrenade, 5) - + SendHealthStatsOff() AddAnim(dialog01) end @@ -171,7 +171,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -203,8 +203,8 @@ function heroDeath(gear) SendStat(siGameResult, loc("Hog Solo lost, try again!")) - SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) - SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) + SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) + SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) SendStat(siPlayerKills,'1',teamB.name) SendStat(siPlayerKills,'0',teamA.name) EndGame() @@ -213,8 +213,8 @@ function heroWin(gear) saveBonus(2, 1) SendStat(siGameResult, loc("Congratulations, you won!")) - SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) - SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) + SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) + SendStat(siCustomAchievement, loc("You will gain some extra ammo from the crates the next time you play the \"Getting to the device\" mission")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end @@ -243,7 +243,7 @@ table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you skip the game your time left will be added to your next turn"), 5000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Some parts of the land are indestructible"), 5000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startBattle, args = {hero.gear}}) + table.insert(dialog01, {func = startBattle, args = {hero.gear}}) end ------------------ Other Functions ------------------- diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/global_functions.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/global_functions.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/global_functions.lua Tue Dec 17 00:02:52 2013 +0400 @@ -5,9 +5,10 @@ if tonumber(GetCampaignVar("MainMissionsStatus")) then status = GetCampaignVar("MainMissionsStatus") end - if i == 1 then - status = "1"..status:sub(planetNum+1) - elseif i == status:len() then + + if planetNum == 1 then + status = "1"..status:sub(2) + elseif planetNum == status:len() then status = status:sub(1,planetNum-1).."1" else status = status:sub(1,planetNum-1).."1"..status:sub(planetNum+1) @@ -60,6 +61,7 @@ if GetCampaignVar("CurrentMission") ~= mission then SaveCampaignVar("CurrentMission", mission) SaveCampaignVar("CurrentMissionCheckpoint", 1) + SaveCampaignVar("HogsPosition", "") else checkPoint = tonumber(GetCampaignVar("currentMissionCheckpoint")) end @@ -79,9 +81,9 @@ if tonumber(GetCampaignVar("SideMissionsBonuses")) then bonus = GetCampaignVar("SideMissionsBonuses") end - if i == 1 then - bonus = times..bonus:sub(index+1) - elseif i == bonus:len() then + if index == 1 then + bonus = times..bonus:sub(2) + elseif index == bonus:len() then bonus = bonus:sub(1,index-1)..times else bonus = bonus:sub(1,index-1)..times..bonus:sub(index+1) @@ -97,3 +99,28 @@ end return bonus end + +-- splits number by delimiter +function split(s, delimiter) + local res = {} + local first = "" + for i=1,s:len() do + if s:sub(1,1) == delimiter then + table.insert(res, tonumber(first)) + first = "" + else + first = first..s:sub(1,1) + end + s = s:sub(2) + end + if first:len() > 0 then + table.insert(res, tonumber(first)) + end + return res +end + +-- returns the distance of 2 gears +function distance(gear1, gear2) + local dist = math.sqrt(math.pow((GetX(gear1) - GetX(gear2)),2) + math.pow((GetY(gear1) - GetY(gear2)),2)) + return dist +end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua Tue Dec 17 00:02:52 2013 +0400 @@ -24,7 +24,7 @@ -- mission objectives local goals = { [dialog01] = {missionName, loc("Getting ready"), loc("Collect the icegun and get the device part from Thanta"), 1, 4500}, - [dialog02] = {missionName, loc("Win"), loc("Congratulations, you got the part!"), 1, 3500}, + [dialog02] = {missionName, loc("Win"), loc("Congratulations, you collected the device part!"), 1, 3500}, } -- crates local icegunY = 1950 @@ -90,7 +90,7 @@ Delay = 3 Map = "ice01_map" Theme = "Snow" - + -- get the check point checkPointReached = initCheckpoint("ice01") -- get hero health @@ -98,15 +98,15 @@ if tonumber(GetCampaignVar("HeroHealth")) then heroHealth = tonumber(GetCampaignVar("HeroHealth")) end - + if heroHealth ~= 100 then heroHealth = heroHealth + 5 if heroHealth > 100 then heroHealth = 100 end - SaveCampaignVar("HeroHealth", heroHealth) + SaveCampaignVar("HeroHealth", heroHealth) end - + -- Hog Solo AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") @@ -119,7 +119,7 @@ -- Frozen Bandits AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") bandit1.gear = AddHog(bandit1.name, 1, 120, "Santa") - AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y) + AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y) HogTurnLeft(bandit1.gear, true) bandit2.gear = AddHog(bandit2.name, 1, 100, "ushanka") AnimSetGearPosition(bandit2.gear, bandit2.x, bandit2.y) @@ -131,52 +131,52 @@ bandit5.gear = AddHog(bandit5.name, 1, 40, "Sniper") AnimSetGearPosition(bandit5.gear, bandit5.x, bandit5.y) HogTurnLeft(bandit5.gear, true) - + if checkPointReached == 1 then -- Start of the game elseif checkPointReached == 2 then iceGunTaken = true AnimSetGearPosition(hero.gear, 840, 1650) - elseif checkPointReached == 3 then + elseif checkPointReached == 3 then iceGunTaken = true heroAtFinalStep = true heroVisitedAntiFlyArea = true AnimSetGearPosition(hero.gear, 1450, 910) end - + AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + -- Add mines AddGear(1612, 940, gtMine, 0, 0, 0, 0) AddGear(1622, 945, gtMine, 0, 0, 0, 0) AddGear(1645, 950, gtMine, 0, 0, 0, 0) AddGear(1655, 960, gtMine, 0, 0, 0, 0) AddGear(1665, 965, gtMine, 0, 0, 0, 0) - + AddGear(1800, 1000, gtMine, 0, 0, 0, 0) AddGear(1810, 1005, gtMine, 0, 0, 0, 0) AddGear(1820, 1010, gtMine, 0, 0, 0, 0) AddGear(1830, 1015, gtMine, 0, 0, 0, 0) AddGear(1840, 1020, gtMine, 0, 0, 0, 0) - + AddGear(1900, 1020, gtMine, 0, 0, 0, 0) AddGear(1910, 1020, gtMine, 0, 0, 0, 0) AddGear(1920, 1020, gtMine, 0, 0, 0, 0) AddGear(1930, 1030, gtMine, 0, 0, 0, 0) AddGear(1940, 1040, gtMine, 0, 0, 0, 0) - + AddGear(2130, 1110, gtMine, 0, 0, 0, 0) AddGear(2140, 1120, gtMine, 0, 0, 0, 0) AddGear(2180, 1120, gtMine, 0, 0, 0, 0) AddGear(2200, 1130, gtMine, 0, 0, 0, 0) AddGear(2210, 1130, gtMine, 0, 0, 0, 0) - + local x=2300 local step=0 while x<3100 do @@ -189,14 +189,15 @@ x = x + math.random(10,30) end end - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) + AddEvent(onAntiFlyAreaVelocity, {hero.gear}, antiFlyAreaVelocity, {hero.gear}, 1) AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 0) AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) - + AddAmmo(hero.gear, amJetpack, 99) AddAmmo(bandit1.gear, amBazooka, 5) AddAmmo(bandit2.gear, amBazooka, 4) @@ -204,7 +205,9 @@ AddAmmo(bandit3.gear, amGrenade, 3) AddAmmo(bandit4.gear, amBazooka, 5) AddAmmo(bandit5.gear, amBazooka, 5) - + + goToThantaString = loc("Go to Thanta and get the device part!") + if checkPointReached == 1 then AddAmmo(hero.gear, amBazooka, 1) SpawnAmmoCrate(icegunX, icegunY, amIceGun) @@ -213,12 +216,12 @@ AddAnim(dialog01) elseif checkPointReached == 2 then AddAmmo(hero.gear, amIceGun, 8) - AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) + AnimCaption(hero.gear, goToThantaString, 5000) elseif checkPointReached == 3 then AddAmmo(hero.gear, amIceGun, 6) - AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) + AnimCaption(hero.gear, goToThantaString, 5000) end - + SendHealthStatsOff() end @@ -229,7 +232,7 @@ TurnTimeLeft = 0 elseif not heroVisitedAntiFlyArea and CurrentHedgehog == hero.gear then TurnTimeLeft = -1 - elseif not heroAtFinalStep and (CurrentHedgehog == bandit1.gear or CurrentHedgehog == bandit4.gear or CurrentHedgehog == bandit5.gear) then + elseif not heroAtFinalStep and (CurrentHedgehog == bandit1.gear or CurrentHedgehog == bandit4.gear or CurrentHedgehog == bandit5.gear) then AnimSwitchHog(hero.gear) TurnTimeLeft = 0 elseif heroAtFinalStep and (CurrentHedgehog == bandit2.gear or CurrentHedgehog == bandit3.gear) then @@ -290,7 +293,7 @@ end ExecuteAfterAnimations() CheckEvents() - + if GetEffect(bandit1.gear, heFrozen) > 256 and not bandit1.frozen then bandit1.frozen = true SetEffect(bandit1.gear, heFrozen, 9999999999) @@ -322,7 +325,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -341,6 +344,13 @@ return false end +function onAntiFlyAreaVelocity(gear) + if not hero.dead and GetY(gear) < 1300 and GetX(gear) < 1190 then + return true + end + return false +end + function onNonAntiFlyArea(gear) if not hero.dead and (GetX(gear) < 860 and GetY(gear) > 1400) and heroAtAntiFlyArea then return true @@ -395,17 +405,20 @@ function antiFlyArea(gear) heroAtAntiFlyArea = true - if TurnTimeLeft < -1 then - heroVisitedAntiFlyArea = true - TurnTimeLeft = 0 + if not heroVisitedAntiFlyArea then + TurnTimeLeft = 0 FollowGear(hero.gear) - AddAmmo(hero.gear, amJetpack, 0) - AnimSwitchHog(bandit1.gear) + AnimSwitchHog(bandit1.gear) FollowGear(hero.gear) TurnTimeLeft = 0 - else - AddAmmo(hero.gear, amJetpack, 0) end + AddAmmo(hero.gear, amJetpack, 0) + heroVisitedAntiFlyArea = true +end + +function antiFlyAreaVelocity(gear) + dx, dy = GetGearVelocity(hero.gear) + SetGearVelocity(hero.gear, dx, math.max(dy, 0)) end function nonAntiFlyArea(gear) @@ -468,6 +481,8 @@ end if anim == dialog02 then actionsOnWin() + else + AnimSwitchHog(hero.gear) end end @@ -475,12 +490,12 @@ -- DIALOG 01 - Start, welcome to moon AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Ice Planet, where ice rules..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finaly you are here..."), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules..."), 5000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefuly! The bandit leader, Thanta, has recently found a very strange device"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device"), SAY_SAY, 4000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device"), SAY_SAY, 2500}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}}) @@ -492,20 +507,20 @@ -- DIALOG 02 - Hero got to Thant2 AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) - table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's part..."), 5000}}) + table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part..."), 5000}}) table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}}) table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}}) - table.insert(dialog02, {func = actionsOnWin, args = {}}) + table.insert(dialog02, {func = actionsOnWin, args = {}}) end -------------- Other Functions ------------------- function actionsOnWin() - saveCompletedStatus(4) - SendStat(siGameResult, loc("Congratulations, you got the part!")) + saveCompletedStatus(4) + SendStat(siGameResult, loc("Congratulations, you acquired the device part!")) SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear)) -- maybe add number of tries for each part? SendStat(siPlayerKills,'1',teamC.name) diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua Tue Dec 17 00:02:52 2013 +0400 @@ -21,7 +21,7 @@ local challengeObjectives = loc("To win the game you have to pass into the rings in time").. "|"..loc("You'll get extra time in case you need it when you pass a ring").."|".. loc("Every 2 rings, the ring color will be green and you'll get an extra flying saucer").."|".. - loc("Use space button twice to change flying saucer while being on air") + loc("Use space button twice to change flying saucer while floating in mid-air") -- dialogs local dialog01 = {} -- mission objectives @@ -48,7 +48,7 @@ teamB.color = tonumber("FF0000",16) -- red -- way points local current waypoint = 1 -local waypoints = { +local waypoints = { [1] = {x=1450, y=140}, [2] = {x=990, y=580}, [3] = {x=1650, y=950}, @@ -78,7 +78,7 @@ Explosives = 0 Map = "ice02_map" Theme = "Snow" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") @@ -88,9 +88,9 @@ ally.gear = AddHog(ally.name, 0, 100, "war_airwarden02") AnimSetGearPosition(ally.gear, ally.x, ally.y) HogTurnLeft(ally.gear, true) - + initCheckpoint("ice02") - + AnimInit() AnimationSetup() end @@ -99,14 +99,14 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) - + AddAmmo(hero.gear, amJetpack, 3) - + -- place a waypoint placeNextWaypoint() - + SendHealthStatsOff() AddAnim(dialog01) end @@ -137,10 +137,10 @@ totalTime = totalTime / 1000 local saucersLeft = GetAmmoCount(hero.gear, amJetpack) local saucersUsed = totalSaucers - saucersLeft - SendStat(siGameResult, loc("Hoo Ray! You are a champion!")) - SendStat(siCustomAchievement, loc("You complete the mission in "..totalTime.." seconds")) - SendStat(siCustomAchievement, loc("You have used "..saucersUsed.." flying saucers")) - SendStat(siCustomAchievement, loc("You had "..saucersLeft.." more flying saucers left")) + SendStat(siGameResult, loc("Hoorah! You are a champion!")) + SendStat(siCustomAchievement, loc("You completed the mission in "..totalTime.." seconds")) + SendStat(siCustomAchievement, loc("You have used "..saucersUsed.." flying saucers")) + SendStat(siCustomAchievement, loc("You had "..saucersLeft.." more flying saucers left")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end @@ -155,7 +155,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -189,13 +189,13 @@ table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Ice Planet flying saucer stadium..."), 5000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("This is the olympic stadium of saucer flying..."), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("All the saucer pilots dream one day to come here and compete with the best!"), SAY_SAY, 5000}}) - table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now you have the chance to try and get the place that you deserve between the best..."), SAY_SAY, 6000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use the saucer and pass from the rings..."), 5000}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Pause the game by pressing \"P\" for more details"), 5000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("All the saucer pilots dream to come here one day in order to compete with the best!"), SAY_SAY, 5000}}) + table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now you have the chance to try and claim the place that you deserve among the best..."), SAY_SAY, 6000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use the saucer and pass through the rings..."), 5000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Pause the game by pressing the pause key (default \"P\") for more details"), 5000}}) table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("... can you do it?"), SAY_SAY, 2000}}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) - table.insert(dialog01, {func = startFlying, args = {hero.gear}}) + table.insert(dialog01, {func = startFlying, args = {hero.gear}}) end ------------------ Other Functions ------------------- @@ -236,7 +236,7 @@ AnimCaption(hero.gear, loc("6 more seconds added to the clock"), 4000) end end - end + end radius = radius - 4 currentWaypoint = currentWaypoint + 1 return true diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Tue Dec 17 00:02:52 2013 +0400 @@ -18,6 +18,7 @@ local weaponsAcquired = false local battleZoneReached = false local checkPointReached = 1 -- 1 is start of the game +local afterDialog02 = false -- dialogs local dialog01 = {} local dialog02 = {} @@ -102,7 +103,7 @@ MinesNum = 0 MinesTime = 3000 Explosives = 0 - Delay = 5 + Delay = 5 Map = "moon01_map" Theme = "Cheese" -- Because ofc moon is made of cheese :) -- Hog Solo @@ -143,32 +144,32 @@ minion3.gear = AddHog(minion3.name, 1, 50, "Gasmask") AnimSetGearPosition(minion3.gear, minion3.x, minion3.y) HogTurnLeft(minion3.gear, true) - + -- get the check point checkPointReached = initCheckpoint("moon01") if checkPointReached == 1 then -- Start of the game elseif checkPointReached == 2 then AnimSetGearPosition(hero.gear, parachuteX, weaponsY) - if GetHealth(hero.gear) + 5 > 100 then + if GetHealth(hero.gear) + 5 > 100 then SaveCampaignVar("HeroHealth", 100) else SaveCampaignVar("HeroHealth", GetHealth(hero.gear) + 5) end end - + AnimInit() - AnimationSetup() + AnimationSetup() end function onGameStart() -- wait for the first turn to start AnimWait(hero.gear, 3000) FollowGear(hero.gear) - + ShowMission(campaignName, missionName, loc("Hog Solo has to refuel his saucer.").. - "|"..loc("Rescue the imprisoned PAotH team and get your fuels!"), -amSkip, 0) - + "|"..loc("Rescue the imprisoned PAotH team and get the fuel!"), -amSkip, 0) + AddAmmo(minion1.gear, amDEagle, 10) AddAmmo(minion2.gear, amDEagle, 10) AddAmmo(minion3.gear, amDEagle, 10) @@ -178,7 +179,7 @@ AddAmmo(minion1.gear, amGrenade, 2) AddAmmo(minion2.gear, amGrenade, 2) AddAmmo(minion3.gear, amGrenade, 2) - + -- check for death has to go first AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) AddEvent(onProfessorDeath, {professor.gear}, professorDeath, {professor.gear}, 0) @@ -194,20 +195,21 @@ AddEvent(onWeaponsPlatform, {hero.gear}, weaponsPlatform, {hero.gear}, 0) TurnTimeLeft = 0 AddAnim(dialog01) - elseif checkPointReached == 2 then + elseif checkPointReached == 2 then AddAmmo(hero.gear, amBazooka, 3) AddAmmo(hero.gear, amParachute, 1) AddAmmo(hero.gear, amGrenade, 6) AddAmmo(hero.gear, amDEagle, 4) - SetWind(60) + SetWind(60) GameFlags = bor(GameFlags,gfDisableWind) weaponsAcquired = true + afterDialog02 = true TurnTimeLeft = 0 AddAnim(dialog02) end -- this event check goes here to be executed after the onWeaponsPlatform check AddEvent(onBattleZone, {hero.gear}, battleZone, {hero.gear}, 0) - + SendHealthStatsOff() end @@ -230,13 +232,12 @@ end end -function onNewTurn() +function onNewTurn() -- rounds start if hero got his weapons or got near the enemies if not weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then TurnTimeLeft = 0 - elseif weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then - battleZoneReached = true - AddAnim(dialog04) + elseif weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear and afterDialog02 then + battleZone(hero.gear) elseif not weaponsAcquired and not battleZoneReached and CurrentHedgehog == hero.gear then TurnTimeLeft = -1 elseif CurrentHedgehog == paoth1.gear or CurrentHedgehog == paoth2.gear @@ -250,7 +251,7 @@ function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -265,7 +266,7 @@ -------------- EVENTS ------------------ function onWeaponsPlatform(gear) - if not hero.dead and (GetAmmoCount(hero.gear, amBazooka) > 0 or GetAmmoCount(hero.gear, amParachute) > 0 or + if not hero.dead and (GetAmmoCount(hero.gear, amBazooka) > 0 or GetAmmoCount(hero.gear, amParachute) > 0 or GetAmmoCount(hero.gear, amGrenade) > 0 or GetAmmoCount(hero.gear, amDEagle) > 0) and StoppedGear(hero.gear) then return true end @@ -318,8 +319,8 @@ saveCheckpoint("2") SaveCampaignVar("HeroHealth",GetHealth(hero.gear)) TurnTimeLeft = 0 - weaponsAqcuired = true - SetWind(60) + weaponsAcquired = true + SetWind(60) GameFlags = bor(GameFlags,gfDisableWind) AddAmmo(hero.gear, amRope, 0) if GetX(hero.gear) < 1900 then @@ -338,7 +339,7 @@ function battleZone(gear) TurnTimeLeft = 0 battleZoneReached = true - if weaponsAqcuired then + if weaponsAcquired then AddAnim(dialog04) else AddAnim(dialog03) @@ -361,11 +362,11 @@ end ParseCommand("teamgone " .. teamB.name) AnimCaption(hero.gear, loc("Congrats! You made them run away!"), 6000) - AnimWait(hero.gear,5000) - + AnimWait(hero.gear,5000) + saveCompletedStatus(1) - SendStat(siGameResult, loc("Hog Solo win, conrgatulations!")) - SendStat(siCustomAchievement, loc("Eliminated the professor Hogevil")) + SendStat(siGameResult, loc("Hog Solo wins, congratulations!")) + SendStat(siCustomAchievement, loc("Eliminated the Professor Hogevil")) SendStat(siCustomAchievement, loc("Drove the minions away")) SendStat(siPlayerKills,'1',teamD.name) SendStat(siPlayerKills,'0',teamC.name) @@ -375,18 +376,18 @@ function minionsDeath(gear) -- do staffs here - AnimSay(professor.gear, loc("I may lost that battle, but I haven't lost the war yet!"), SAY_SHOUT, 6000) + AnimSay(professor.gear, loc("I may lost this battle, but I haven't lost the war yet!"), SAY_SHOUT, 6000) ParseCommand("teamgone " .. teamC.name) AnimCaption(hero.gear, loc("Congrats! You won!"), 6000) - AnimWait(hero.gear,5000) - + AnimWait(hero.gear,5000) + saveCompletedStatus(1) SendStat(siGameResult, loc("Congratulations, you won!")) SendStat(siCustomAchievement, loc("Eliminated the evil minions")) - SendStat(siCustomAchievement, loc("Drove the professor away")) + SendStat(siCustomAchievement, loc("Drove the Professor away")) SendStat(siPlayerKills,'1',teamD.name) SendStat(siPlayerKills,'0',teamC.name) - SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels + SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels EndGame() end @@ -396,7 +397,9 @@ if goals[anim] ~= nil then ShowMission(unpack(goals[anim])) end - if anim == dialog03 then + if anim == dialog02 then + setAfterDialog02() + elseif anim == dialog03 then startCombat() else AnimSwitchHog(hero.gear) @@ -408,22 +411,23 @@ AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAotH base at moon..."), 4000}}) - table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finaly you have come..."), SAY_SAY, 2000}}) - table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil learned for your arrival!"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Now he have captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}}) + table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finally you have come..."), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil has prepared for your arrival!"), SAY_SAY, 4000}}) + table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("He has captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}}) table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}}) - table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) + table.insert(dialog01, {func = AnimWait, args = {hero.gear, 450}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}}) - table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 500}}) - table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the waepons we have hidden in case of an emergency!"), SAY_SAY, 7000}}) - table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take that rope and hurry!"), SAY_SAY, 7000}}) + table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 3200}}) + table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the weapons we have hidden in case of an emergency!"), SAY_SAY, 7000}}) + table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take this rope and hurry!"), SAY_SAY, 7000}}) table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm... ok..."), SAY_SAY, 2500}}) table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) -- DIALOG 02 - To the weapons platform AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"), 4000}}) table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! YEAAAAAH!"), SAY_SHOUT, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry up and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}}) + table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}}) + table.insert(dialog02, {func = setAfterDialog02, args = {}}) table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}}) -- DIALOG 03 - Hero spotted and has no weapons AddSkipFunction(dialog03, Skipanim, {dialog03}) @@ -444,7 +448,11 @@ ------------------- custom "animation" functions -------------------------- function startCombat() - -- use this so guard2 will gain control + -- use this so minion3 will gain control AnimSwitchHog(minion3.gear) TurnTimeLeft = 0 end + +function setAfterDialog02() + afterDialog02 = true +end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.hwp Binary file share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.hwp has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua Tue Dec 17 00:02:52 2013 +0400 @@ -10,7 +10,7 @@ ----------------- VARIABLES -------------------- -- globals local missionName = loc("Chasing the blue hog") -local challengeObjectives = loc("Use your available weapons in order to catch the other hog").."|".. +local challengeObjectives = loc("Use the rope in order to catch the blue hedgehog").."|".. loc("You have to stand very close to him") local currentPosition = 1 local previousTimeLeft = 0 @@ -59,7 +59,7 @@ Explosives = 0 Map = "moon02_map" Theme = "Cheese" - + -- Hog Solo AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1") @@ -69,9 +69,9 @@ runner.gear = AddHog(runner.name, 0, 100, "sth_Sonic") AnimSetGearPosition(runner.gear, runner.places[1].x, runner.places[1].y) HogTurnLeft(runner.gear, true) - + initCheckpoint("moon02") - + AnimInit() AnimationSetup() end @@ -80,19 +80,18 @@ AnimWait(hero.gear, 3000) FollowGear(hero.gear) ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) - + AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) - + AddAmmo(hero.gear, amRope, 1) - AddAmmo(hero.gear, amSkip, 1) - + SendHealthStatsOff() hogTurn = runner.gear AddAnim(dialog01) end function onNewTurn() - if startChallenge then + if startChallenge and currentPosition < 5 then if CurrentHedgehog ~= hero.gear then TurnTimeLeft = 0 else @@ -116,14 +115,14 @@ end function onGameTick20() - if isHeroNextToRunner() then + if GetHealth(hero.gear) and startChallenge and isHeroNextToRunner() and currentPosition < 5 then moveRunner() end end function onPrecise() if GameTime > 3000 then - SetAnimSkip(true) + SetAnimSkip(true) end end @@ -150,6 +149,8 @@ end if anim == dialog01 then moveRunner() + elseif anim == dialog02 then + win() end end @@ -157,25 +158,25 @@ -- DIALOG 01 - Start, game instructions AddSkipFunction(dialog01, Skipanim, {dialog01}) table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3200}}) - table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the other side of the moon..."), 5000}}) - table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Pr. Hogevil"), SAY_SAY, 3000}}) + table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the other side of the moon..."), 5000}}) + table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first"), SAY_SAY, 3000}}) table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times"), SAY_SAY, 4000}}) - table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}}) + table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}}) table.insert(dialog01, {func = moveRunner, args = {}}) - -- DIALOG 02 - Hog Solo story + -- DIALOG 02 - Hog Solo story AddSkipFunction(dialog02, Skipanim, {dialog02}) table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}}) - table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Pr. Hogevil"), 5000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in running before!"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Pr. Hogevil..."), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Pr. Hogevil, then known as James Hogus, worked for PAotH back in my time"), SAY_SAY, 4000}}) + table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil..."), SAY_SAY, 4000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Professor Hogevil, then known as James Hogus, worked for PAotH back in my time"), SAY_SAY, 4000}}) table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device"), SAY_SAY, 5000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In one of the last tests during the construction of the device an accident happpened"), SAY_SAY, 5000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident Pr. Hogevil lost all his nails from his head!"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("During the final testing of the device an accident happened"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident Professor Hogevil lost all his spines on his head!"), SAY_SAY, 5000}}) table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then"), SAY_SAY, 4000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he got underground and start working his plan to steal the device"), SAY_SAY, 5000}}) - table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very taugh and very determined hedgehog. I would be extremely careful if I were you"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he went underground and started working on his plan to steal the device"), SAY_SAY, 5000}}) + table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very tough and very determined hedgehog. I would be extremely careful if I were you"), SAY_SAY, 5000}}) table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("I should go now, goodbye!"), SAY_SAY, 3000}}) table.insert(dialog02, {func = win, args = {}}) end @@ -191,13 +192,14 @@ end function moveRunner() - if currentPosition > 3 then + if currentPosition == 4 then + currentPosition = currentPosition + 1 if GetX(hero.gear) > GetX(runner.gear) then HogTurnLeft(runner.gear, false) end + AddAnim(dialog02) TurnTimeLeft = 0 - AddAnim(dialog02) - else + elseif currentPosition < 4 then if not startChallenge then startChallenge = true end @@ -211,6 +213,7 @@ previousTimeLeft = TurnTimeLeft end currentPosition = currentPosition + 1 + AddVisualGear(GetX(runner.gear), GetY(runner.gear), vgtExplosion, 0, false) SetGearPosition(runner.gear, runner.places[currentPosition].x, runner.places[currentPosition].y) TurnTimeLeft = 0 end @@ -218,8 +221,8 @@ function lose() SendStat(siGameResult, loc("Too slow! Try again...")) - SendStat(siCustomAchievement, loc("You have to caught the other hog 3 times")) - SendStat(siCustomAchievement, loc("The time that you'll have left when you reach the hog will be added to the next turn")) + SendStat(siCustomAchievement, loc("You have to catch the other hog 3 times")) + SendStat(siCustomAchievement, loc("The time that you have left when you reach the blue hedgehog will be added to the next turn")) SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use")) SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up")) SendStat(siPlayerKills,'0',teamA.name) @@ -228,7 +231,7 @@ function win() SendStat(siGameResult, loc("Congratulations, you are the fastest!")) - SendStat(siCustomAchievement, loc("You have managed to caught the other hog in time")) + SendStat(siCustomAchievement, loc("You have managed to catch the blue hedgehog in time")) SendStat(siPlayerKills,'1',teamA.name) EndGame() end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua --- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua Tue Dec 17 00:02:52 2013 +0400 @@ -126,7 +126,7 @@ if (gear == enemy) and (failed == false) then ShowMission(loc("Newton's Hammock"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0) elseif gear == player then - ShowMission(loc("Newton's Hammock"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) + ShowMission(loc("Newton's Hammock"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) end end diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Themes/Christmas/theme.cfg --- a/share/hedgewars/Data/Themes/Christmas/theme.cfg Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Themes/Christmas/theme.cfg Tue Dec 17 00:02:52 2013 +0400 @@ -14,3 +14,5 @@ spray = holly, 4 spray = holly2, 4 flakes = 100, 3, 99999999, 100, 300 +ice = yes +snow = yes diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Themes/Olympics/SkyL.png Binary file share/hedgewars/Data/Themes/Olympics/SkyL.png has changed diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/Themes/Snow/theme.cfg --- a/share/hedgewars/Data/Themes/Snow/theme.cfg Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/Themes/Snow/theme.cfg Tue Dec 17 00:02:52 2013 +0400 @@ -10,3 +10,5 @@ object = plant3, 3, 26, 0, 48, 1, 1, 25, 15, 50, 60 object = plant4, 3, 45, 4, 1, 45, 1, 20, 45, 20, 60 flakes = 100, 3, 99999999, 100, 300 +ice = yes +snow = yes diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/misc/hedgewars.desktop --- a/share/hedgewars/Data/misc/hedgewars.desktop Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/misc/hedgewars.desktop Tue Dec 17 00:02:52 2013 +0400 @@ -16,9 +16,9 @@ GenericName[cs]=Bojující ježci GenericName[sv]=Stridande igelkottar GenericName[tr]=Dövüşen Kirpiler -Icon=hedgewars.png +Icon=hedgewars Exec=hedgewars %U Terminal=false StartupNotify=false Categories=Application;Game;StrategyGame; -MimeType=x-scheme-handler/hwplay +MimeType=x-scheme-handler/hwplay; diff -r 7d0329f37181 -r f2b18754742f share/hedgewars/Data/misc/hwengine.desktop.in --- a/share/hedgewars/Data/misc/hwengine.desktop.in Sat Dec 14 21:16:20 2013 +0400 +++ b/share/hedgewars/Data/misc/hwengine.desktop.in Tue Dec 17 00:02:52 2013 +0400 @@ -16,11 +16,11 @@ GenericName[cs]=Engine hry Hedgewars pro přehrávání uložených her a ukázkových souborů GenericName[sv]=Hedgewarsmotorn, för att öppna demo- och sparfiler GenericName[da]=Kæmpende Pindsvin -Icon=hedgewars.png +Icon=hedgewars Exec=${CMAKE_INSTALL_PREFIX}/${target_binary_install_dir}/hwengine %f Path=/tmp Terminal=false StartupNotify=false NoDisplay=true Categories=Application;Game;StrategyGame; -MimeType=application/x-hedgewars-demo;application/x-hedgewars-save +MimeType=application/x-hedgewars-demo;application/x-hedgewars-save;