#include <Upgrade.h>
Inherits SubsystemInterface.
Public Member Functions | |
| UpgradeCenter (void) | |
| virtual | ~UpgradeCenter (void) |
| void | init (void) |
| subsystem interface | |
| void | reset (void) |
| subsystem interface | |
| void | update (void) |
| subsystem interface | |
| UpgradeTemplate * | firstUpgradeTemplate (void) |
| return the first upgrade template | |
| const UpgradeTemplate * | findUpgradeByKey (NameKeyType key) const |
| find upgrade by name key | |
| const UpgradeTemplate * | findUpgrade (const AsciiString &name) const |
| find and return upgrade by name | |
| const UpgradeTemplate * | findVeterancyUpgrade (VeterancyLevel level) const |
| find and return upgrade by name | |
| UpgradeTemplate * | newUpgrade (const AsciiString &name) |
| allocate, link, and return new upgrade | |
| Bool | canAffordUpgrade (Player *player, const UpgradeTemplate *upgradeTemplate, Bool displayReason=FALSE) const |
| does this player have all the necessary things to make this upgrade | |
| std::vector< AsciiString > | getUpgradeNames (void) const |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Static Public Member Functions | |
| static void | parseUpgradeDefinition (INI *ini) |
Protected Member Functions | |
| UpgradeTemplate * | findNonConstUpgradeByKey (NameKeyType key) |
| find upgrade by name key | |
| void | linkUpgrade (UpgradeTemplate *upgrade) |
| link upgrade to list | |
| void | unlinkUpgrade (UpgradeTemplate *upgrade) |
| remove upgrade from list | |
Protected Attributes | |
| UpgradeTemplate * | m_upgradeList |
| list of all upgrades we can have | |
| Int | m_nextTemplateMaskBit |
| Each instantiated UpgradeTemplate will be given a Int64 bit as an identifier. | |
| Bool | buttonImagesCached |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
The upgrade center keeps some basic information about the possible upgrades
| UpgradeCenter::UpgradeCenter | ( | void | ) |
Definition at line 225 of file Upgrade.cpp.
|
virtual |
Definition at line 236 of file Upgrade.cpp.
| Bool UpgradeCenter::canAffordUpgrade | ( | Player * | player, |
| const UpgradeTemplate * | upgradeTemplate, | ||
| Bool | displayReason = FALSE ) const |
does this player have all the necessary things to make this upgrade
does this player have all the necessary things to make this upgrade
Definition at line 433 of file Upgrade.cpp.
|
protected |
| const UpgradeTemplate * UpgradeCenter::findUpgrade | ( | const AsciiString & | name | ) | const |
find and return upgrade by name
Find upgrade matching name
Definition at line 352 of file Upgrade.cpp.
| const UpgradeTemplate * UpgradeCenter::findUpgradeByKey | ( | NameKeyType | key | ) | const |
| const UpgradeTemplate * UpgradeCenter::findVeterancyUpgrade | ( | VeterancyLevel | level | ) | const |
find and return upgrade by name
Find upgrade matching name key
Definition at line 300 of file Upgrade.cpp.
| UpgradeTemplate * UpgradeCenter::firstUpgradeTemplate | ( | void | ) |
return the first upgrade template
Return the first upgrade template
Definition at line 326 of file Upgrade.cpp.
| std::vector< AsciiString > UpgradeCenter::getUpgradeNames | ( | void | ) | const |
generate a list of upgrade names for WorldBuilder
Definition at line 461 of file Upgrade.cpp.
|
virtual |
subsystem interface
Upgrade center initialization
Implements SubsystemInterface.
Definition at line 260 of file Upgrade.cpp.
|
protected |
| UpgradeTemplate * UpgradeCenter::newUpgrade | ( | const AsciiString & | name | ) |
allocate, link, and return new upgrade
Allocate a new upgrade template
Definition at line 362 of file Upgrade.cpp.
|
static |
Parse an upgrade definition
Definition at line 475 of file Upgrade.cpp.
|
virtual |
subsystem interface
Upgrade center system reset
Implements SubsystemInterface.
Definition at line 284 of file Upgrade.cpp.
|
protected |
remove upgrade from list
Unlink an upgrade from our list
Definition at line 414 of file Upgrade.cpp.
|
inlinevirtual |
|
protected |
Each instantiated UpgradeTemplate will be given a Int64 bit as an identifier.
|
protected |