#include <explosivemines.h>
Inheritance diagram for Mine:

Public Member Functions | |
| Mine (MineTypes type, int strength, int player, GameMap *gamemap) | |
| Mine (MineTypes type, int strength, int player, GameMap *gamemap, int identifier) | |
| bool | attacksunit (const Vehicle *veh) const |
| can the mine attack this unit | |
| void | paint (Surface &surf, SPoint pos) const |
| display the mine | |
| void | read (tnstream &stream) |
| void | write (tnstream &stream) const |
Static Public Member Functions | |
| static Mine | newFromStream (tnstream &stream) |
Public Attributes | |
| int | identifier |
| a unique identifier that allows the identification of a single mine | |
| MineTypes | type |
| int | strength |
| the effective punch of the mine | |
| int | player |
| the player who placed the mine; range 0 .. 7 | |
Definition at line 30 of file explosivemines.h.
Definition at line 65 of file explosivemines.cpp.
References cgp_antipersonnelmine_lifetime, GameMap::getgameparameter(), GameMap::IDManager::getNewNetworkID(), identifier, GameMap::idManager, and AgeableItem::lifetimer.
Definition at line 76 of file explosivemines.cpp.
References cgp_antipersonnelmine_lifetime, GameMap::getgameparameter(), and AgeableItem::lifetimer.
Definition at line 113 of file explosivemines.cpp.
References read().
Referenced by RemoveMine::undoAction().
| bool Mine::attacksunit | ( | const Vehicle * | veh | ) | const |
can the mine attack this unit
Definition at line 40 of file explosivemines.cpp.
References chfahrend, chgetaucht, chschwimmend, cmantipersonnelmine, cmantitankmine, cmfloatmine, cmm_trooper, cmmooredmine, Player::diplomacy, ContainerBase::getMap(), ContainerBase::getOwner(), GameMap::getPlayer(), DiplomaticStateVector::getState(), ContainerBaseType::hasFunction(), Vehicle::height, ContainerBaseType::ImmuneToMines, VehicleType::movemalustyp, PEACE, player, Vehicle::typ, and type.
display the mine
Definition at line 58 of file explosivemines.cpp.
References MineType::paint(), player, and type.
Referenced by GetAttackerImage::visit().
| void Mine::read | ( | tnstream & | stream | ) |
Definition at line 88 of file explosivemines.cpp.
References identifier, mineVersion, player, tnstream::readInt(), strength, and type.
Referenced by newFromStream().
| void Mine::write | ( | tnstream & | stream | ) | const |
Definition at line 100 of file explosivemines.cpp.
References identifier, mineVersion, player, strength, type, and tnstream::writeInt().
| int Mine::identifier |
a unique identifier that allows the identification of a single mine
Definition at line 40 of file explosivemines.h.
Definition at line 42 of file explosivemines.h.
Referenced by attacksunit(), paint(), read(), tspfldloaders::readfields(), tmineattacksunit::setup(), and write().
| int Mine::strength |
the effective punch of the mine
Definition at line 45 of file explosivemines.h.
Referenced by read(), tmineattacksunit::setup(), and write().
| int Mine::player |
the player who placed the mine; range 0 .. 7
Definition at line 48 of file explosivemines.h.
Referenced by attacksunit(), paint(), read(), and write().
1.5.1