equal
deleted
inserted
replaced
99 } else { |
99 } else { |
100 /* time's up for this engine. |
100 /* time's up for this engine. |
101 * We will now completely retire this design */ |
101 * We will now completely retire this design */ |
102 e->player_avail = 0; |
102 e->player_avail = 0; |
103 e->reliability = e->reliability_final; |
103 e->reliability = e->reliability_final; |
104 InvalidateWindowClassesData(WC_BUILD_VEHICLE); // Kick this engine out of the lists |
104 /* Kick this engine out of the lists */ |
|
105 AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type); |
105 } |
106 } |
106 InvalidateWindowClasses(WC_BUILD_VEHICLE); // Update to show the new reliability |
107 InvalidateWindowClasses(WC_BUILD_VEHICLE); // Update to show the new reliability |
|
108 InvalidateWindowClasses(WC_REPLACE_VEHICLE); |
107 } |
109 } |
108 |
110 |
109 void AddTypeToEngines(void) |
111 void AddTypeToEngines(void) |
110 { |
112 { |
111 Engine* e = _engines; |
113 Engine* e = _engines; |
193 SETBIT(p->avail_railtypes, rvi->railtype); |
195 SETBIT(p->avail_railtypes, rvi->railtype); |
194 } |
196 } |
195 |
197 |
196 e->preview_player = INVALID_PLAYER; |
198 e->preview_player = INVALID_PLAYER; |
197 if (player == _local_player) { |
199 if (player == _local_player) { |
198 InvalidateWindowClassesData(WC_BUILD_VEHICLE); |
200 AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type); |
199 InvalidateWindowClasses(WC_REPLACE_VEHICLE); |
|
200 } |
201 } |
201 } |
202 } |
202 |
203 |
203 static PlayerID GetBestPlayer(PlayerID pp) |
204 static PlayerID GetBestPlayer(PlayerID pp) |
204 { |
205 { |
317 } |
318 } |
318 } |
319 } |
319 } |
320 } |
320 |
321 |
321 e->flags = (e->flags & ~ENGINE_INTRODUCING) | ENGINE_AVAILABLE; |
322 e->flags = (e->flags & ~ENGINE_INTRODUCING) | ENGINE_AVAILABLE; |
322 InvalidateWindowClassesData(WC_BUILD_VEHICLE); |
323 AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type); |
323 InvalidateWindowClasses(WC_REPLACE_VEHICLE); |
|
324 |
324 |
325 // Now available for all players |
325 // Now available for all players |
326 e->player_avail = (byte)-1; |
326 e->player_avail = (byte)-1; |
327 |
327 |
328 // Do not introduce new rail wagons |
328 // Do not introduce new rail wagons |