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

Carrier Struct Reference

#include <carrier.h>

Inheritance diagram for Carrier:

Worker Bob

List of all members.

Detailed Description

Carrier is a worker who is employed by a Road.

Definition at line 26 of file carrier.h.

Public Types

enum  {
enum  { header_Map_Object = 1, header_Immovable = 2, header_Battle = 3, header_AttackController = 4 }
enum  Attribute {
typedef void(Bob::* Ptr )(Game *, State *)
enum  Type { CRITTER, WORKER }
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

virtual void act (Game *, uint data)
Point calc_drawpos (const Editor_Game_Base &, const Point) const
void cancel_task_transfer (Game *g)
 Carrier (const Descr &carrier_descr)
virtual void cleanup (Editor_Game_Base *g)
virtual void create_debug_panels (Editor_Game_Base *egbase, UI::Tab_Panel *tabs)
void create_needed_experience (Game *)
const std::string & descname () const throw ()
virtual void destroy (Editor_Game_Base *)
void end_walk ()
WareInstancefetch_carried_item (Game *g)
void force_skip_act ()
void gain_experience (Game *)
uint get_animation (const char *const str) const
int get_animstart () const
const char * get_becomes () const throw ()
virtual Bob::Type get_bob_type () const throw ()
const WareInstanceget_carried_item (const Editor_Game_Base *game) const
WareInstanceget_carried_item (Editor_Game_Base *egbase)
uint get_current_anim () const
int get_current_experience () const
Economy * get_economy () const throw ()
PlayerImmovableget_location (Editor_Game_Base *egbase)
LogSink * get_logsink ()
uint get_menu_pic () const throw ()
virtual uint get_movecaps () const throw ()
int get_needed_experience () const
Bobget_next_bob () const throw ()
Playerget_owner () const
const FCoords & get_position () const
uint get_serial () const
std::string get_signal ()
State * get_state (Task *task)
State * get_state ()
const Tribe_Descr * get_tribe () const throw ()
virtual int get_type () const throw ()
virtual Worker_Descr::Worker_Type get_worker_type () const throw ()
bool has_attribute (const uint attr) const throw ()
virtual bool has_new_save_support ()
void incorporate (Game *g)
virtual void init (Editor_Game_Base *g)
bool is_walking ()
bool is_world_bob () const throw ()
void level (Game *)
void log_general_info (Editor_Game_Base *)
const std::string & name () const throw ()
bool notify_ware (Game *g, int flag)
void pop_task ()
void push_task (const Task &task)
void remove (Editor_Game_Base *)
void reset_tasks (Game *)
virtual void save (Editor_Game_Base *, Widelands_Map_Map_Object_Saver *, FileWrite &)
uint schedule_act (Game *g, uint tdelta, uint data=0)
void schedule_act (Game *g, uint tdelta)
void schedule_destroy (Game *g)
void schedule_incorporate (Game *g)
void send_signal (Game *, std::string sig)
void set_animation (Editor_Game_Base *g, uint anim)
void set_carried_item (Game *g, WareInstance *item)
void set_economy (Economy *economy)
void set_location (PlayerImmovable *location)
void set_logsink (LogSink *sink)
void set_owner (Player *player)
void set_position (Editor_Game_Base *g, Coords f)
void set_signal (std::string sig)
void skip_act ()
void start_task_buildingwork ()
void start_task_dropoff (Game *g, WareInstance *item)
void start_task_fetchfromflag ()
void start_task_forcemove (const int dir, const DirAnimations &)
void start_task_fugitive (Game *g)
void start_task_geologist (const int attempts, const int radius, const std::string &subcommand)
virtual void start_task_gowarehouse ()
void start_task_idle (Game *, uint anim, int timeout)
void start_task_leavebuilding (Game *g, bool changelocation)
bool start_task_movepath (const Map &, const Path &, const int index, const DirAnimations &, const bool forceonlast=false, const int only_step=-1)
void start_task_movepath (const Path &, const DirAnimations &, const bool forceonlast=false, const int only_step=-1)
bool start_task_movepath (Game *, const Coords dest, const int persist, const DirAnimations &, const bool forceonlast=false, const int only_step=-1)
void start_task_program (const std::string &programname)
void start_task_return (Game *g, bool dropitem)
void start_task_road ()
void start_task_transfer (Game *g, Transfer *t)
void start_task_transport (int fromflag)
bool start_task_waitforcapacity (Game *g, Flag *flag)
bool start_task_walktoflag (Game *g, int flag, bool offset=false)
int start_walk (Game *g, WalkingDir dir, uint anim, bool force=false)
State & top_state ()
void update_task_buildingwork (Game *g)
void update_task_road (Game *g)
uint vision_range () const
bool wakeup_flag_capacity (Game *g, Flag *flag)
bool wakeup_leave_building (Game *g, Building *building)

Protected Member Functions

bool does_carry_ware ()
virtual void draw (const Editor_Game_Base &, RenderTarget &, const Point) const
void draw_inner (const Editor_Game_Base &, RenderTarget &, const Point) const
virtual void init_auto_task (Game *g)
void molog (const char *fmt,...) const __attribute__((format(printf

Protected Attributes

const Map_Object_Descr * m_descr
LogSink * m_logsink
uint m_serial

Static Protected Attributes

static Task taskBuildingwork
static Task taskDropoff
static Task taskFetchfromflag
static Task taskFugitive
static Task taskGeologist
static Task taskGowarehouse
static Task taskLeavebuilding
static Task taskProgram
static Task taskReturn
static Task taskTransfer
static Task taskWaitforcapacity

Private Member Functions

void deliver_to_building (Game *g, State *state)
void drop_item (Game *g, State *s)
void enter_building (Game *g, State *s)
int find_closest_flag (Game *g)
void find_pending_item (Game *g)
 MO_DESCR (Descr)
void pickup_from_flag (Game *g, State *s)
void road_signal (Game *g, State *state)
void road_update (Game *g, State *state)
bool swap_or_wait (Game *g, State *s)
void transport_signal (Game *g, State *state)
void transport_update (Game *g, State *state)

Private Attributes

int m_acked_ware
 -1: no ware acked; 0/1: acked ware for start/end flag of road

Static Private Attributes

static Task taskRoad
static Task taskTransport


class Widelands_Map_Bob_Data_Packet
class Widelands_Map_Bobdata_Data_Packet


struct  Descr

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

Generated by  Doxygen 1.6.0   Back to index