Pol  Rev 533
UBoat Class Reference

#include <boat.h>

+ Inheritance diagram for UBoat:
+ Collaboration diagram for UBoat:

List of all members.

Classes

class  BoatContext

Public Types

enum  RELATIVE_DIR { NO_TURN, RIGHT, AROUND, LEFT }

Public Member Functions

void adjust_traveller_z (s8 delta_z)
virtual UBoatas_boat ()
UFACING boat_facing () const
void cleanup_deck ()
bool deck_empty () const
void destroy_components ()
bool has_offline_mobiles () const
bool hold_empty () const
virtual BObjectImpmake_ref ()
bool move (UFACING dir)
bool move_xy (unsigned short x, unsigned short y, int flags, Realm *oldrealm)
virtual void on_color_changed ()
void realm_changed ()
virtual void register_object (UObject *obj)
void regself ()
void remove_orphans ()
bool turn (RELATIVE_DIR dir)
void unregself ()

Static Public Member Functions

static bool navigable (const MultiDef &, unsigned short x, unsigned short y, short z, Realm *realm)
static BObjectImpscripted_create (const ItemDesc &descriptor, u16 x, u16 y, s8 z, Realm *realm, int flags)

Public Attributes

Itemhold
Itemportplank
Itemstarboardplank
Itemtillerman

Protected Member Functions

 UBoat (const ItemDesc &descriptor)
const BoatShapeboatshape () const
BObjectImpcomponent_list (unsigned char type) const
void do_tellmoves ()
virtual class BObjectImpget_script_member (const char *membername) const
virtual class BObjectImpget_script_member_id (const int id) const
 id test
BObjectImpitems_list () const
BObjectImpmobiles_list () const
void move_components (Realm *oldrealm)
void move_offline_mobiles (xcoord x, ycoord y, zcoord z, Realm *realm)
void move_travellers (enum UFACING facing, const BoatContext &oldlocation, unsigned short x=USHRT_MAX, unsigned short y=USHRT_MAX, Realm *oldrealm=NULL)
const MultiDefmulti_ifturn (RELATIVE_DIR dir)
unsigned short multiid_ifturn (RELATIVE_DIR dir)
virtual void printProperties (std::ostream &os) const
virtual void readProperties (ConfigElem &elem)
void reread_components ()
void rescan_components ()
virtual bool script_isa (unsigned isatype) const
virtual class BObjectImpscript_method (const char *methodname, Executor &ex)
 id test
virtual class BObjectImpscript_method_id (const int id, Executor &ex)
void transform_components (const BoatShape &old_boatshape, Realm *oldrealm)
void turn_traveller_coords (Character *chr, RELATIVE_DIR dir)
void turn_travellers (RELATIVE_DIR dir, const BoatContext &oldlocation)

Static Protected Member Functions

static bool on_ship (const BoatContext &bc, const UObject *obj)

Private Types

typedef UMulti base
typedef UObjectRef Traveller
typedef std::vector< TravellerTravellers

Private Member Functions

void create_components ()

Private Attributes

vector< Item * > Components
Travellers travellers_

Friends

class EUBoatRefObjImp
class UMulti

Detailed Description

Definition at line 27 of file boat.h.


Member Typedef Documentation

typedef UMulti UBoat::base [private]

Reimplemented from UMulti.

Definition at line 29 of file boat.h.

typedef UObjectRef UBoat::Traveller [private]

Definition at line 113 of file boat.h.

typedef std::vector< Traveller > UBoat::Travellers [private]

Definition at line 114 of file boat.h.


Member Enumeration Documentation

Enumerator:
NO_TURN 
RIGHT 
AROUND 
LEFT 

Definition at line 48 of file boat.h.


Constructor & Destructor Documentation

UBoat::UBoat ( const ItemDesc descriptor) [explicit, protected]

Definition at line 358 of file boat.cpp.

References boatshapes, hold, UMulti::multiid, passert, portplank, starboardplank, and tillerman.

Referenced by scripted_create().

+ Here is the caller graph for this function:


Member Function Documentation

void UBoat::adjust_traveller_z ( s8  delta_z)

Definition at line 784 of file boat.cpp.

References Components, travellers_, and UObject::z.

UBoat * UBoat::as_boat ( ) [virtual]

Reimplemented from UMulti.

Definition at line 367 of file boat.cpp.

Referenced by getUBoatParam().

+ Here is the caller graph for this function:

Definition at line 969 of file boat.cpp.

References UMulti::multiid.

Referenced by UBoatExecutorModule::mf_MoveBoatRelative().

+ Here is the caller graph for this function:

const BoatShape & UBoat::boatshape ( ) const [protected]

Definition at line 974 of file boat.cpp.

References boatshapes, UMulti::multiid, and passert.

Referenced by create_components(), move_components(), readProperties(), transform_components(), and turn().

+ Here is the caller graph for this function:

Definition at line 713 of file boat.cpp.

References on_ship(), UObject::orphan(), remove_orphans(), UObject::set_dirty(), and travellers_.

Referenced by destroy_boat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UBoat::component_list ( unsigned char  type) const [protected]

Definition at line 1312 of file boat.cpp.

References ObjArray::addElement(), COMPONENT_ALL, Components, get_component_objtype(), make_itemref(), UObject::objtype_, and UObject::orphan().

Referenced by get_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UBoat::deck_empty ( ) const

Definition at line 840 of file boat.cpp.

References travellers_.

Referenced by destroy_boat().

+ Here is the caller graph for this function:

Definition at line 1334 of file boat.cpp.

References Components, destroy_item(), and UObject::orphan().

Referenced by destroy_boat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::do_tellmoves ( ) [protected]

Definition at line 856 of file boat.cpp.

References UObject::CLASS_NPC, Character::has_active_client(), UObject::isa(), UObject::ismobile(), Character::tellmove(), and travellers_.

Referenced by move_travellers(), and turn_travellers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UBoat::get_script_member ( const char *  membername) const [protected, virtual]

Reimplemented from UMulti.

Definition at line 2758 of file uoscrobj.cpp.

References get_script_member_id(), getKnownObjMember(), and ObjMember::id.

+ Here is the call graph for this function:

Definition at line 732 of file boat.cpp.

References UObject::ismobile(), Character::logged_in, on_ship(), UObject::orphan(), and travellers_.

Referenced by destroy_boat(), and get_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UBoat::hold_empty ( ) const

Definition at line 845 of file boat.cpp.

References UContainer::count(), and hold.

Referenced by destroy_boat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UBoat::items_list ( ) const [protected]

Definition at line 1278 of file boat.cpp.

References ObjArray::addElement(), IsItem(), make_itemref(), on_ship(), UObject::orphan(), UObject::serial, and travellers_.

Referenced by get_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * UBoat::make_ref ( ) [virtual]

Reimplemented from UMulti.

Definition at line 2687 of file uoscrobj.cpp.

References EUBoatRefObjImp.

Referenced by UBoatExecutorModule::mf_BoatFromItem(), and UBoatExecutorModule::mf_SystemFindBoatBySerial().

+ Here is the caller graph for this function:

BObjectImp * UBoat::mobiles_list ( ) const [protected]

Definition at line 1295 of file boat.cpp.

References ObjArray::addElement(), UObject::ismobile(), Character::logged_in, make_mobileref(), on_ship(), UObject::orphan(), and travellers_.

Referenced by get_script_member_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::move_components ( Realm oldrealm) [protected]

Definition at line 1013 of file boat.cpp.

References boatshape(), Components, BoatShape::Componentshapes, move_boat_item(), UObject::orphan(), UObject::set_dirty(), UObject::x, UObject::y, and UObject::z.

Referenced by move(), and move_xy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::move_offline_mobiles ( xcoord  x,
ycoord  y,
zcoord  z,
Realm realm 
) [protected]

Definition at line 755 of file boat.cpp.

References UObject::ismobile(), Character::logged_in, on_ship(), UObject::orphan(), UObject::realm, Character::realm_changed(), remove_orphans(), UObject::set_dirty(), travellers_, UObject::x, UObject::y, and UObject::z.

Referenced by script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UBoat::move_xy ( unsigned short  x,
unsigned short  y,
int  flags,
Realm oldrealm 
)
const MultiDef & UBoat::multi_ifturn ( RELATIVE_DIR  dir) [protected]

Definition at line 962 of file boat.cpp.

References MultiDefByMultiID(), MultiDefByMultiIDExists(), UMulti::multiid, multiid_ifturn(), and passert.

Referenced by turn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned short UBoat::multiid_ifturn ( RELATIVE_DIR  dir) [inline, protected]

Definition at line 957 of file boat.cpp.

References UMulti::multiid.

Referenced by multi_ifturn(), and turn().

+ Here is the caller graph for this function:

bool UBoat::navigable ( const MultiDef md,
unsigned short  x,
unsigned short  y,
short  z,
Realm realm 
) [static]
void UBoat::on_color_changed ( ) [virtual]

Reimplemented from Item.

Definition at line 800 of file boat.cpp.

References send_boat_to_inrange().

+ Here is the call graph for this function:

bool UBoat::on_ship ( const BoatContext bc,
const UObject obj 
) [static, protected]
void UBoat::printProperties ( std::ostream &  os) const [protected, virtual]

Reimplemented from Item.

Definition at line 1169 of file boat.cpp.

References Components, UMulti::multiid, on_ship(), UObject::orphan(), pf_endl, Item::printProperties(), UObject::serial, and travellers_.

+ Here is the call graph for this function:

void UBoat::register_object ( UObject obj) [virtual]

Reimplemented from UMulti.

Definition at line 1067 of file boat.cpp.

References UObject::set_dirty(), and travellers_.

Referenced by UBoatExecutorModule::mf_RegisterItemWithBoat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::regself ( )

Definition at line 375 of file boat.cpp.

References Realm::encode_global_hull(), Realm::global_hulls, MultiDef::hull, UMulti::multidef(), UObject::realm, UObject::x, and UObject::y.

Referenced by move(), move_xy(), readProperties(), scripted_create(), and turn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 691 of file boat.cpp.

References UObject::set_dirty(), and travellers_.

Referenced by cleanup_deck(), move_offline_mobiles(), move_travellers(), and turn_travellers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::reread_components ( ) [protected]
void UBoat::rescan_components ( ) [protected]

Definition at line 1076 of file boat.cpp.

References UObject::orphan(), portplank, UPlank::setboat(), and starboardplank.

Referenced by readProperties(), and scripted_create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UBoat::script_isa ( unsigned  isatype) const [protected, virtual]

Reimplemented from UMulti.

Definition at line 3710 of file uoscrobj.cpp.

References POLCLASS_BOAT, and UMulti::script_isa().

+ Here is the call graph for this function:

BObjectImp * UBoat::script_method ( const char *  methodname,
Executor ex 
) [protected, virtual]

id test

Reimplemented from Item.

Definition at line 2831 of file uoscrobj.cpp.

References getKnownObjMethod(), ObjMethod::id, and script_method_id().

+ Here is the call graph for this function:

BObjectImp * UBoat::script_method_id ( const int  id,
Executor ex 
) [protected, virtual]
void UBoat::transform_components ( const BoatShape old_boatshape,
Realm oldrealm 
) [protected]

Definition at line 981 of file boat.cpp.

References boatshape(), Components, BoatShape::Componentshapes, extobj, UObject::graphic, move_boat_item(), UObject::objtype_, UObject::orphan(), ExternalObject::port_plank, UObject::set_dirty(), ExternalObject::starboard_plank, UObject::x, UObject::y, and UObject::z.

Referenced by turn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UBoat::turn_traveller_coords ( Character chr,
RELATIVE_DIR  dir 
) [protected]

Definition at line 575 of file boat.cpp.

References AROUND, UObject::facing, Character::lastx, Character::lasty, LEFT, NO_TURN, RIGHT, UObject::x, and UObject::y.

Referenced by turn_travellers().

+ Here is the caller graph for this function:

void UBoat::unregself ( )

Definition at line 390 of file boat.cpp.

References Realm::encode_global_hull(), Realm::global_hulls, MultiDef::hull, UMulti::multidef(), UObject::realm, UObject::x, and UObject::y.

Referenced by destroy_boat(), move(), move_xy(), and turn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class EUBoatRefObjImp [friend]

Definition at line 110 of file boat.h.

Referenced by make_ref().

friend class UMulti [friend]

Definition at line 99 of file boat.h.


Member Data Documentation


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