* Convert GoodsEntry status to the form required for NewGRF variables. * @return NewGRF representation of GoodsEntry state. */
| 58 | * @return NewGRF representation of GoodsEntry state. |
| 59 | */ |
| 60 | uint8_t GoodsEntry::ConvertState() const |
| 61 | { |
| 62 | uint8_t res = 0; |
| 63 | if (this->status.Test(GoodsEntry::State::EverAccepted)) SetBit(res, 0); |
| 64 | if (this->status.Test(GoodsEntry::State::LastMonth)) SetBit(res, 1); |
| 65 | if (this->status.Test(GoodsEntry::State::CurrentMonth)) SetBit(res, 2); |
| 66 | if (this->status.Test(GoodsEntry::State::AcceptedBigtick)) SetBit(res, 3); |
| 67 | return res; |
| 68 | } |
| 69 | |
| 70 | enum TriggerArea : uint8_t { |
| 71 | TA_TILE, |
no test coverage detected