Add CargoTypesBit helper method to CargoSpec

pull/293/head
Jonathan G Rennison 3 years ago
parent 9b1783809d
commit f901da344e

@ -90,6 +90,15 @@ struct CargoSpec {
return this - CargoSpec::array;
}
/**
* Determine CargoTypes bit of this cargospec
* @return CargoTypes bit
*/
inline CargoTypes CargoTypesBit() const
{
return static_cast<CargoTypes>(1) << this->Index();
}
/**
* Tests for validity of this cargospec
* @return is this cargospec valid?

Loading…
Cancel
Save