Add game event flag for disaster vehicles
This commit is contained in:
@@ -116,6 +116,12 @@ void DisasterVehicle::UpdateImage()
|
||||
this->UpdateSpriteSeqBound();
|
||||
}
|
||||
|
||||
DisasterVehicle::DisasterVehicle() :
|
||||
SpecializedVehicleBase()
|
||||
{
|
||||
RegisterGameEvents(GEF_DISASTER_VEH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the disaster vehicle.
|
||||
* @param x The X coordinate.
|
||||
@@ -127,6 +133,8 @@ void DisasterVehicle::UpdateImage()
|
||||
DisasterVehicle::DisasterVehicle(int x, int y, Direction direction, DisasterSubType subtype, VehicleID big_ufo_destroyer_target) :
|
||||
SpecializedVehicleBase(), big_ufo_destroyer_target(big_ufo_destroyer_target)
|
||||
{
|
||||
RegisterGameEvents(GEF_DISASTER_VEH);
|
||||
|
||||
this->vehstatus = VS_UNCLICKABLE;
|
||||
|
||||
this->x_pos = x;
|
||||
|
@@ -42,7 +42,7 @@ struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DI
|
||||
byte flags; ///< Flags about the state of the vehicle, @see AirVehicleFlags
|
||||
|
||||
/** For use by saveload. */
|
||||
DisasterVehicle() : SpecializedVehicleBase() {}
|
||||
DisasterVehicle();
|
||||
DisasterVehicle(int x, int y, Direction direction, DisasterSubType subtype, VehicleID big_ufo_destroyer_target = VEH_INVALID);
|
||||
/** We want to 'destruct' the right class. */
|
||||
virtual ~DisasterVehicle() {}
|
||||
|
@@ -1734,5 +1734,6 @@ char *DumpGameEventFlags(GameEventFlags events, char *b, const char *last)
|
||||
dump('m', GEF_COMPANY_MERGE);
|
||||
dump('n', GEF_RELOAD_NEWGRF);
|
||||
dump('t', GEF_TBTR_REPLACEMENT);
|
||||
dump('D', GEF_DISASTER_VEH);
|
||||
return b;
|
||||
}
|
||||
|
@@ -92,6 +92,7 @@ enum GameEventFlags : uint32 {
|
||||
GEF_COMPANY_MERGE = 1 << 1, ///< (m) A company has been bought by another
|
||||
GEF_RELOAD_NEWGRF = 1 << 2, ///< (n) ReloadNewGRFData() has been called
|
||||
GEF_TBTR_REPLACEMENT = 1 << 3, ///< (t) CMD_TEMPLATE_REPLACE_VEHICLE has been called
|
||||
GEF_DISASTER_VEH = 1 << 4, ///< (D) A disaster vehicle exists or has been created
|
||||
};
|
||||
DECLARE_ENUM_AS_BIT_SET(GameEventFlags)
|
||||
|
||||
|
Reference in New Issue
Block a user