(svn r9880) -Add: [NewGRF] Add action 7/9 condition 0B/0C (cargo type availability)
authorglx
Sat, 19 May 2007 19:13:12 +0000
changeset 6649 4fe2c8ec0ba6
parent 6648 d0ab85b643a8
child 6650 b9c81a1f8b7e
(svn r9880) -Add: [NewGRF] Add action 7/9 condition 0B/0C (cargo type availability)
src/newgrf.cpp
--- a/src/newgrf.cpp	Sat May 19 12:46:48 2007 +0000
+++ b/src/newgrf.cpp	Sat May 19 19:13:12 2007 +0000
@@ -3199,6 +3199,10 @@
 				break;
 			case 5: result = (param_val & mask) > cond_val;
 				break;
+			case 11: result = GetCargoIDByLabel(BSWAP32(cond_val)) == CT_INVALID;
+				break;
+			case 12: result = GetCargoIDByLabel(BSWAP32(cond_val)) != CT_INVALID;
+				break;
 
 			default: grfmsg(1, "SkipIf: Unsupported test %d. Ignoring", condtype); return;
 		}