Logo Search packages:      
Sourcecode: widelands version File versions  Download package

TrainingSite Class Reference

#include <trainingsite.h>

Inheritance diagram for TrainingSite:


List of all members.

Detailed Description

A building to change soldiers' abilities. Soldiers can gain hitpoints, or experience in attack, defense and evasion.

A training site does not change influence areas. If you lose the surrounding strongholds, the training site will burn even if it contains soldiers!

Definition at line 85 of file trainingsite.h.

Public Types

enum  { PCap_Bulldoze = 0, PCap_Stopable = 1, PCap_Enhancable = 3 }
enum  {
enum  { header_Map_Object = 1, header_Immovable = 2, header_Battle = 3, header_AttackController = 4 }
enum  Attribute {
enum  Type {
enum  WalkingDir {
  IDLE = 0, WALK_NE = 1, WALK_E = 2, WALK_SE = 3,
  WALK_SW = 4, WALK_W = 5, WALK_NW = 6

Public Member Functions

 __attribute__ ((deprecated)) const char *get_name() const throw ()
 __attribute__ ((noreturn)) virtual const std
virtual void act (Game *g, uint data)
void add_pri (enum tAttribute atr)
void add_worker (Worker *)
virtual bool burn_on_destroy ()
virtual const std::string & census_string () const throw ()
virtual void change_train_priority (uint, int)
virtual void cleanup (Editor_Game_Base *g)
void collect_priorities (std::map< int, std::map< int, int > > &p) const
virtual void conquered_by (Player *)
virtual void create_debug_panels (Editor_Game_Base *egbase, UI::Tab_Panel *tabs)
const std::string & descname () const throw ()
virtual void destroy (Editor_Game_Base *)
virtual void drop_soldier (uint nr)
Economy & economy () const throw ()
const std::vector< char * > & enhances_to () const throw ()
virtual bool fetch_from_flag (Game *g)
virtual Flagget_base_flag ()
int get_base_priority () const
bool get_build_heros ()
virtual int get_building_type () const throw ()
virtual bool get_building_work (Game *g, Worker *w, bool success)
uint get_capacity () const throw ()
uint get_conquers () const throw ()
const std::string & get_continue_icon () const throw ()
Economy * get_economy () const throw ()
LogSink * get_logsink ()
Playerget_owner () const
virtual bool get_passable () const throw ()
virtual uint get_playercaps () const throw ()
virtual Coords get_position () const throw ()
uint get_pri (enum tAttribute atr)
int get_priority (int type, int ware_index, bool adjust=true) const
uint get_serial () const
virtual int get_size () const throw ()
virtual const std::vector
< Soldier * > & 
get_soldiers () const throw ()
char get_statistics_percent ()
virtual std::string get_statistics_string ()
bool get_stop () const throw ()
const std::string & get_stop_icon () const throw ()
virtual int get_type () const throw ()
virtual uint get_ui_anim () const
std::vector< WaresQueue * > * get_warequeues ()
const std::vector< Worker * > & get_workers () const
std::vector< Worker * > * get_workers ()
bool has_attribute (const uint attr) const throw ()
virtual bool has_new_save_support ()
virtual bool has_soldiers ()
 Testing stuff.
void hide_options ()
virtual void init (Editor_Game_Base *g)
bool leave_check_and_wait (Game *g, Worker *w)
void log_general_info (Editor_Game_Base *egbase)
const std::string & name () const throw ()
Playerowner () const
void remove (Editor_Game_Base *)
virtual void remove_worker (Worker *w)
virtual void save (Editor_Game_Base *, Widelands_Map_Map_Object_Saver *, FileWrite &)
uint schedule_act (Game *g, uint tdelta, uint data=0)
void schedule_destroy (Game *g)
void set_build_heros (bool b_heros)
void set_defeating_player (const Player_Number player_number) throw ()
 Stores the Player_Number of the player who has defeated this building.
virtual void set_economy (Economy *e)
void set_logsink (LogSink *sink)
void set_priority (int type, int ware_index, int new_priority)
void set_priority (int new_priority)
virtual void set_stop (bool stop)
void show_options (Interactive_Player *plr)
virtual void soldier_capacity_down ()
virtual void soldier_capacity_up ()
void sub_pri (enum tAttribute atr)
void switch_heros ()
virtual void switch_train_mode ()
 TrainingSite (const TrainingSite_Descr &)
virtual uint vision_range () const throw ()

Protected Member Functions

void add_statistics_value (bool val)
void calc_statistics ()
bool can_start_working () const throw ()
virtual void change_soldier_capacity (int)
virtual UI::Windowcreate_options_window (Interactive_Player *plr, UI::Window **registry)
virtual void draw (const Editor_Game_Base &, RenderTarget &, const FCoords, const Point)
void draw_help (const Editor_Game_Base &, RenderTarget &, const FCoords, const Point)
State * get_current_program ()
void molog (const char *fmt,...) const __attribute__((format(printf
void program_act (Game *g)
void program_step (const uint phase=0)
void request_worker (const char *const worker_name)
void set_owner (Player *owner)
void set_position (Editor_Game_Base *g, Coords c)
void set_post_timer (int t)
void start_animation (Editor_Game_Base *g, uint anim)
void unset_position (Editor_Game_Base *g, Coords c)

Static Protected Member Functions

static void request_worker_callback (Game *g, Request *rq, int ware, Worker *w, void *data)

Protected Attributes

uint m_anim
int m_animstart
Player_Number m_defeating_player
const Map_Object_Descr * m_descr
int m_fetchfromflag
std::vector< WaresQueue * > m_input_queues
char m_last_stat_percent
Object_Ptr m_leave_allow
std::vector< Object_Ptrm_leave_queue
uint m_leave_time
LogSink * m_logsink
Coords m_position
int m_post_timer
int m_priority
std::vector< State > m_program
int m_program_time
bool m_program_timer
uint m_serial
std::vector< bool > m_statistics
char m_statistics_buf [40]
bool m_statistics_changed
bool m_stop
std::map< int, int > m_ware_priorities
std::vector< Request * > m_worker_requests
std::vector< Worker * > m_workers

Private Member Functions

void calc_list_upgrades (Game *g)
void call_soldiers ()
void drop_soldier (Game *g, uint nr)
void drop_unupgradable_soldiers (Game *g)
void find_and_start_next_program (Game *g)
 MO_DESCR (TrainingSite_Descr)
void modif_priority (enum tAttribute, int)
void program_end (Game *g, bool success)
void program_start (Game *g, std::string name)
void request_soldier ()

Static Private Member Functions

static void request_soldier_callback (Game *g, Request *rq, int ware, Worker *w, void *data)

Private Attributes

bool m_build_heros
uint m_capacity
std::vector< std::string > m_list_upgrades
uint m_pri_attack
int m_pri_attack_mod
uint m_pri_defense
int m_pri_defense_mod
uint m_pri_evade
int m_pri_evade_mod
uint m_pri_hp
int m_pri_hp_mod
std::string m_prog_name
std::vector< Request * > m_soldier_requests
std::vector< Soldier * > m_soldiers
bool m_success
uint m_total_soldiers


class TrainingSite_Window
class Widelands_Map_Buildingdata_Data_Packet

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index