18 #include "../../bscript/bobject.h" 19 #include "../../clib/compilerspecifics.h" 20 #include "../../clib/rawtypes.h" 21 #include "../poltype.h" 22 #include "../reftypes.h" 23 #include "../uconst.h" 68 class EUBoatRefObjImp;
84 ComponentShape(
const std::string& str,
const std::string& altstr,
unsigned char type );
89 static bool objtype_is_component(
unsigned int objtype );
92 size_t estimateSize()
const;
117 if ( boat !=
nullptr )
122 if ( _boat !=
nullptr )
132 bool move_xy(
unsigned short x,
unsigned short y,
int flags,
Realms::Realm* oldrealm );
148 u16 newy,
bool relative );
152 void send_display_boat_to_inrange(
u16 oldx = USHRT_MAX,
u16 oldy = USHRT_MAX );
159 bool hold_empty()
const;
160 bool deck_empty()
const;
161 bool has_offline_mobiles()
const;
162 void remove_orphans();
163 void destroy_components();
171 static
bool navigable( const
MultiDef&,
unsigned short x,
unsigned short y,
short z,
172 Realms::Realm* realm );
173 void realm_changed();
174 void adjust_traveller_z(
s8 delta_z );
176 virtual
void on_color_changed() POL_OVERRIDE;
187 unsigned short x = USHRT_MAX,
unsigned short y = USHRT_MAX,
188 Realms::Realm* oldrealm =
nullptr );
191 static
bool on_ship( const
BoatContext& bc, const Core::UObject* obj );
192 void move_offline_mobiles( Core::
xcoord new_x, Core::
ycoord new_y, Core::
zcoord new_z,
193 Realms::Realm* new_realm );
200 void rescan_components();
201 void reread_components();
202 void transform_components( const
BoatShape& old_boatshape, Realms::Realm* oldrealm );
203 void move_components( Realms::Realm* oldrealm );
206 virtual
void fixInvalidGraphic() POL_OVERRIDE;
207 virtual
void readProperties( Clib::ConfigElem& elem ) POL_OVERRIDE;
208 virtual
void printProperties( Clib::StreamWriter& sw ) const POL_OVERRIDE;
211 virtual Bscript::
BObjectImp* get_script_member( const
char* membername ) const POL_OVERRIDE;
212 virtual Bscript::
BObjectImp* get_script_member_id( const
int id ) const POL_OVERRIDE;
213 virtual Bscript::
BObjectImp* script_method( const
char* methodname,
214 Bscript::
Executor& ex ) POL_OVERRIDE;
215 virtual Bscript::
BObjectImp* script_method_id( const
int id, Bscript::
Executor& ex ) POL_OVERRIDE;
216 virtual
bool script_isa(
unsigned isatype ) const POL_OVERRIDE;
219 Bscript::
BObjectImp* component_list(
unsigned char type ) const;
225 void create_components();
228 Travellers travellers_;
233 std::vector<Component> Components;
std::vector< Traveller > Travellers
BoatContext & operator=(const BoatContext &)
bool BoatShapeExists(u16 multiid)
std::vector< ComponentShape > Componentshapes
unsigned short altgraphic
unsigned int get_component_objtype(unsigned char type)
BoatMoveGuard(UBoat *boat)
ref_ptr< Items::Item > ItemRef
Bscript::BObjectImp * destroy_boat(UBoat *boat)