* Called when new facility is built on the station. If it is the first facility * it initializes also 'xy' and 'random_bits' members */
| 228 | * it initializes also 'xy' and 'random_bits' members |
| 229 | */ |
| 230 | void Station::AddFacility(StationFacility new_facility_bit, TileIndex facil_xy) |
| 231 | { |
| 232 | if (this->facilities.None()) { |
| 233 | this->MoveSign(facil_xy); |
| 234 | this->random_bits = Random(); |
| 235 | } |
| 236 | this->facilities.Set(new_facility_bit); |
| 237 | this->owner = _current_company; |
| 238 | this->build_date = TimerGameCalendar::date; |
| 239 | SetWindowClassesDirty(WC_VEHICLE_ORDERS); |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * Marks the tiles of the station as dirty. |
no test coverage detected