Commit 48e99d99 authored by Romain Bignon's avatar Romain Bignon

eiffel tower is the special building of France

parent 9f9b349a
...@@ -23,6 +23,25 @@ ...@@ -23,6 +23,25 @@
#include "Channels.h" #include "Channels.h"
#include <assert.h> #include <assert.h>
/********************************************************************************************
* ECBEiffelTower *
********************************************************************************************/
bool ECBEiffelTower::CanBeCreated(ECBPlayer* pl) const
{
assert(pl);
if (pl->Nation() != ECBPlayer::N_FRANCE)
return false;
std::vector<ECBEntity*> ents = pl->Entities()->List();
for(std::vector<ECBEntity*>::const_iterator it = ents.begin(); it != ents.end(); ++it)
if(((*it)->Type() == E_RADAR || (*it)->Type() == E_EIFFELTOWER) &&
!((*it)->EventType() & ARM_SELL))
return false;
return true;
}
/******************************************************************************************** /********************************************************************************************
* ECBRadar * * ECBRadar *
********************************************************************************************/ ********************************************************************************************/
...@@ -30,6 +49,9 @@ ...@@ -30,6 +49,9 @@
bool ECBRadar::CanBeCreated(ECBPlayer* pl) const bool ECBRadar::CanBeCreated(ECBPlayer* pl) const
{ {
assert(pl); assert(pl);
if (pl->Nation() == ECBPlayer::N_FRANCE)
return false;
std::vector<ECBEntity*> ents = pl->Entities()->List(); std::vector<ECBEntity*> ents = pl->Entities()->List();
for(std::vector<ECBEntity*>::const_iterator it = ents.begin(); it != ents.end(); ++it) for(std::vector<ECBEntity*>::const_iterator it = ents.begin(); it != ents.end(); ++it)
if(((*it)->Type() == E_RADAR || (*it)->Type() == E_EIFFELTOWER) && if(((*it)->Type() == E_RADAR || (*it)->Type() == E_EIFFELTOWER) &&
......
/* lib/Batiments.h - Header of Batiments.cpp /* lib/Batiments.h - Header of Batiments.cpp
* *
* Copyright (C) 2005-2007 Romain Bignon <Progs@headfucking.net> * Copyright (C) 2005-2011 Romain Bignon <romain@menareants.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
/******************************************************************** /********************************************************************
* *
* FOR HACKERS * DEAR CHEATERS
* *
* It's useless to change this values in your client, because this * It's useless to change this values in your client, because this
* is the server who decides if an action is accepted or not. * is the server who decides if an action is accepted or not.
* For example, if you change a price, your client will show you * For example, if you change a price, your client will show you
* this new price, but the server will use the REAL price ! * this new price, but the server will use the REAL price!
* Idem for Initial Number, Visibility, Porty, etc. * Idem for Initial Number, Visibility, Porty, etc.
* *
* Regards. * Regards.
...@@ -209,7 +209,7 @@ public: ...@@ -209,7 +209,7 @@ public:
virtual bool WantAttaq(uint x, uint y, bool) { return false; } virtual bool WantAttaq(uint x, uint y, bool) { return false; }
bool CanCreate(const ECBEntity*) { return false; } bool CanCreate(const ECBEntity*) { return false; }
virtual bool CanBeCreated(ECBPlayer* pl) const { return false; } virtual bool CanBeCreated(ECBPlayer* pl) const;
}; };
...@@ -233,7 +233,6 @@ public: ...@@ -233,7 +233,6 @@ public:
virtual uint Cost() const { return 30000; } virtual uint Cost() const { return 30000; }
virtual uint InitNb() const { return 1000;} virtual uint InitNb() const { return 1000;}
virtual bool CanBeSold() const { return true; } virtual bool CanBeSold() const { return true; }
virtual e_type MyUpgrade() const { return E_EIFFELTOWER; }
virtual bool CanAttaq(const ECBEntity* e) { return false; } virtual bool CanAttaq(const ECBEntity* e) { return false; }
......
/* lib/Units.h - Header of Units.cpp /* lib/Units.h - Header of Units.cpp
* *
* Copyright (C) 2005-2006 Romain Bignon <Progs@headfucking.net> * Copyright (C) 2005-2011 Romain Bignon <romain@menareants.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
/******************************************************************** /********************************************************************
* *
* FOR HACKERS * DEAR CHEATERS
* *
* It's useless to change this values in your client, because this * It's useless to change this values in your client, because this
* is the server who decide if an action is accepted or not. * is the server who decide if an action is accepted or not.
* For example, if you change a price, your client will show you * For example, if you change a price, your client will show you
* this new price, but the server will use the REAL price ! * this new price, but the server will use the REAL price!
* Idem for Initial Number, Visibility, Porty, etc. * Idem for Initial Number, Visibility, Porty, etc.
* *
* Regards. * Regards.
......
...@@ -223,7 +223,7 @@ public: ...@@ -223,7 +223,7 @@ public:
virtual const char* Infos() const { return _("Show all units on map."); } virtual const char* Infos() const { return _("Show all units on map."); }
virtual const char* Description() const virtual const char* Description() const
{ {
return _("Eiffel Tower shows all units on the map."); return _("Eiffel Tower shows all the map including units.");
} }
virtual ECImage* Icon() const { return Resources::EiffelTower_Icon(); } virtual ECImage* Icon() const { return Resources::EiffelTower_Icon(); }
}; };
...@@ -255,7 +255,7 @@ public: ...@@ -255,7 +255,7 @@ public:
virtual const char* Infos() const { return _("Show all map."); } virtual const char* Infos() const { return _("Show all map."); }
virtual const char* Description() const virtual const char* Description() const
{ {
return _("This radar shows all the map. If you want to see all units on the map, upgrade it."); return _("This radar shows all the map.");
} }
virtual ECImage* Icon() const { return Resources::Radar_Icon(); } virtual ECImage* Icon() const { return Resources::Radar_Icon(); }
}; };
......
/* src/Channels.cpp - Channels functions /* src/Channels.cpp - Channels functions
* *
* Copyright (C) 2005-2006 Romain Bignon <Progs@headfucking.net> * Copyright (C) 2005-2011 Romain Bignon <romain@menareants.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -34,7 +34,7 @@ const struct nations_str_t nations_str[] = { ...@@ -34,7 +34,7 @@ const struct nations_str_t nations_str[] = {
/* N_NONE */ { gettext_noop("Random"), gettext_noop("Your nation will be selected by random.") }, /* N_NONE */ { gettext_noop("Random"), gettext_noop("Your nation will be selected by random.") },
/* N_NOISY */ { gettext_noop("Noisy"), gettext_noop("Region of Noisy and its caves.") }, /* N_NOISY */ { gettext_noop("Noisy"), gettext_noop("Region of Noisy and its caves.") },
/* N_USA */ { gettext_noop("USA"), gettext_noop("The United States invests the world with of McDonalds.") }, /* N_USA */ { gettext_noop("USA"), gettext_noop("The United States invests the world with of McDonalds.") },
/* N_FRANCE */ { gettext_noop("France"), gettext_noop("France of Dominique de Villepin.") }, /* N_FRANCE */ { gettext_noop("France"), gettext_noop("France and its Eiffel Tower to see all map.") },
/* N_URSS */ { gettext_noop("URSS"), gettext_noop("The USSR and its goulags...") }, /* N_URSS */ { gettext_noop("URSS"), gettext_noop("The USSR and its goulags...") },
/* N_ALQUAIDA */ { gettext_noop("Al-Quaïda"), gettext_noop("Al-Quaïda network and its diverted boïngs.") }, /* N_ALQUAIDA */ { gettext_noop("Al-Quaïda"), gettext_noop("Al-Quaïda network and its diverted boïngs.") },
/* N_ESPAGNE */ { gettext_noop("Spain"), gettext_noop("The Spanish teacher who impose weak rules and fuck us .") }, /* N_ESPAGNE */ { gettext_noop("Spain"), gettext_noop("The Spanish teacher who impose weak rules and fuck us .") },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment