mirror of https://github.com/OpenTTD/OpenTTD
(svn r1505) -Fix: Refit engine button is now disabled when cargo capacity equals zero
parent
febac23b25
commit
314a4245a9
|
@ -816,6 +816,10 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
|
||||||
|
|
||||||
w->disabled_state = (v->owner == _local_player) ? 0 : 0x380;
|
w->disabled_state = (v->owner == _local_player) ? 0 : 0x380;
|
||||||
|
|
||||||
|
if (v->cargo_cap == 0) {
|
||||||
|
//we cannot refit this engine
|
||||||
|
SETBIT(w->disabled_state, 12);
|
||||||
|
}
|
||||||
|
|
||||||
/* draw widgets & caption */
|
/* draw widgets & caption */
|
||||||
SetDParam(0, v->string_id);
|
SetDParam(0, v->string_id);
|
||||||
|
|
Loading…
Reference in New Issue