| 657 | } |
| 658 | |
| 659 | static void UpdateStationSignCoord(BaseStation *st) |
| 660 | { |
| 661 | const StationRect *r = &st->rect; |
| 662 | |
| 663 | if (r->IsEmpty()) return; // no tiles belong to this station |
| 664 | |
| 665 | /* clamp sign coord to be inside the station rect */ |
| 666 | TileIndex new_xy = TileXY(ClampU(TileX(st->xy), r->left, r->right), ClampU(TileY(st->xy), r->top, r->bottom)); |
| 667 | st->MoveSign(new_xy); |
| 668 | |
| 669 | if (!Station::IsExpected(st)) return; |
| 670 | Station *full_station = Station::From(st); |
| 671 | for (const GoodsEntry &ge : full_station->goods) { |
| 672 | LinkGraphID lg = ge.link_graph; |
| 673 | if (!LinkGraph::IsValidID(lg)) continue; |
| 674 | (*LinkGraph::Get(lg))[ge.node].UpdateLocation(st->xy); |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | /** |
| 679 | * Common part of building various station parts and possibly attaching them to an existing one. |
no test coverage detected