(svn r1505) -Fix: Refit engine button is now disabled when cargo capacity equals zero
authorcelestar
Fri, 14 Jan 2005 09:36:29 +0000
changeset 1006 c55d1a0359a3
parent 1005 8c6a9bf44bf1
child 1007 65b0cbc302cc
(svn r1505) -Fix: Refit engine button is now disabled when cargo capacity equals zero
train_gui.c
--- a/train_gui.c	Fri Jan 14 09:20:12 2005 +0000
+++ b/train_gui.c	Fri Jan 14 09:36:29 2005 +0000
@@ -816,6 +816,10 @@
 
 		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 */
 		SetDParam(0, v->string_id);