# HG changeset patch # User truebrain # Date 1216343106 0 # Node ID 9f636bd0ff2d9947b374450e80eb9f214b45ed58 # Parent 17960948c3afa6e75537907bccf37d02b42223a0 (svn r13725) [NoAI] -Fix r13723: yexo ducks diff -r 17960948c3af -r 9f636bd0ff2d bin/ai/regression/regression.txt --- a/bin/ai/regression/regression.txt Fri Jul 18 01:00:03 2008 +0000 +++ b/bin/ai/regression/regression.txt Fri Jul 18 01:05:06 2008 +0000 @@ -4958,7 +4958,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 12 + GetStockpiledCargo(): -1 Industry 2 IsValidIndustry(): true GetName(): Fudinghattan Forest @@ -4967,7 +4967,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 56 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 28 + GetStockpiledCargo(): -1 Industry 3 IsValidIndustry(): true GetName(): Benville Forest @@ -4976,7 +4976,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 14 + GetStockpiledCargo(): -1 Industry 4 IsValidIndustry(): true GetName(): Netfingbridge Forest @@ -4985,7 +4985,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 120 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 15 + GetStockpiledCargo(): -1 Industry 5 IsValidIndustry(): true GetName(): Hutfingford Forest @@ -4994,7 +4994,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 14 + GetStockpiledCargo(): -1 Industry 6 IsValidIndustry(): true GetName(): Great Hinninghall Forest @@ -5003,7 +5003,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 72 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 7 IsValidIndustry(): true GetName(): Tondston Forest @@ -5012,7 +5012,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 152 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 8 IsValidIndustry(): true GetName(): Planfield Sawmill @@ -5063,7 +5063,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 144 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 16 IsValidIndustry(): true GetName(): Kennville Coal Mine @@ -5072,7 +5072,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 17 IsValidIndustry(): true GetName(): Great Hinninghall Coal Mine @@ -5081,7 +5081,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 160 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 18 IsValidIndustry(): true GetName(): Little Fruford Coal Mine @@ -5090,7 +5090,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 136 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 19 IsValidIndustry(): true GetName(): Hutfingford Coal Mine @@ -5099,7 +5099,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 20 IsValidIndustry(): true GetName(): Mendingston Coal Mine @@ -5108,7 +5108,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 136 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 21 IsValidIndustry(): true GetName(): Tondston Coal Mine @@ -5117,7 +5117,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 104 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 22 IsValidIndustry(): true GetName(): Quartfingfield Coal Mine @@ -5126,7 +5126,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 152 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 23 IsValidIndustry(): true GetName(): Muningville Coal Mine @@ -5135,7 +5135,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 24 IsValidIndustry(): true GetName(): Grinnway Coal Mine @@ -5144,7 +5144,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 72 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 25 IsValidIndustry(): true GetName(): Sadtown Power Station @@ -5195,7 +5195,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 120 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 33 IsValidIndustry(): true GetName(): Nuntfingburg Oil Wells @@ -5204,7 +5204,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 64 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 34 IsValidIndustry(): true GetName(): Benville Oil Wells @@ -5213,7 +5213,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 35 IsValidIndustry(): true GetName(): Grinnway Oil Wells @@ -5222,7 +5222,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 36 IsValidIndustry(): true GetName(): Muningville Oil Wells @@ -5231,7 +5231,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 37 IsValidIndustry(): true GetName(): Tondston Oil Wells @@ -5240,7 +5240,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 128 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 16 + GetStockpiledCargo(): -1 Industry 38 IsValidIndustry(): true GetName(): Fort Frindston Iron Ore Mine @@ -5249,7 +5249,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 39 IsValidIndustry(): true GetName(): Tondston Iron Ore Mine @@ -5258,7 +5258,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 40 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 40 IsValidIndustry(): true GetName(): Fudinghattan Iron Ore Mine @@ -5267,7 +5267,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 72 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 41 IsValidIndustry(): true GetName(): Nuntfingburg Iron Ore Mine @@ -5276,7 +5276,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 56 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 42 IsValidIndustry(): true GetName(): Lardborough Iron Ore Mine @@ -5285,7 +5285,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 43 IsValidIndustry(): true GetName(): Tunford Iron Ore Mine @@ -5294,7 +5294,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 44 IsValidIndustry(): true GetName(): Chentfingbourne Iron Ore Mine @@ -5303,7 +5303,7 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 45 IsValidIndustry(): true GetName(): Naborough Farm @@ -5312,10 +5312,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 46 IsValidIndustry(): true GetName(): Lardborough Farm @@ -5324,10 +5324,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 56 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 47 IsValidIndustry(): true GetName(): Chentfingbourne Farm @@ -5336,10 +5336,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 64 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 48 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 48 IsValidIndustry(): true GetName(): Wrundtown Farm @@ -5348,10 +5348,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 88 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 104 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 49 IsValidIndustry(): true GetName(): Little Fruford Farm @@ -5360,10 +5360,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 40 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 50 IsValidIndustry(): true GetName(): Hutfingford Farm @@ -5372,10 +5372,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 112 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 88 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 51 IsValidIndustry(): true GetName(): Tondston Farm @@ -5384,10 +5384,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 64 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 64 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 52 IsValidIndustry(): true GetName(): Nuntfingburg Farm @@ -5396,10 +5396,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 104 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 72 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 53 IsValidIndustry(): true GetName(): Sadtown Farm @@ -5408,10 +5408,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 64 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 54 IsValidIndustry(): true GetName(): Quartfingfield Farm @@ -5420,10 +5420,10 @@ IsCargoAccepted(): false GetLastMonthProduction(): 80 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 GetLastMonthProduction(): 96 GetLastMonthTransported(): 0 - GetStockpiledCargo(): 0 + GetStockpiledCargo(): -1 Industry 55 IsValidIndustry(): true GetName(): Little Fruford Steel Mill diff -r 17960948c3af -r 9f636bd0ff2d src/ai/api/ai_industry.cpp --- a/src/ai/api/ai_industry.cpp Fri Jul 18 01:00:03 2008 +0000 +++ b/src/ai/api/ai_industry.cpp Fri Jul 18 01:05:06 2008 +0000 @@ -73,10 +73,10 @@ if (!AICargo::IsValidCargo(cargo_id)) return -1; Industry *ind = ::GetIndustry(industry_id); - for (uint i = 0; i < lengthof(ind->produced_cargo); i++) { - CargoID cid = ind->produced_cargo[i]; + for (uint i = 0; i < lengthof(ind->accepts_cargo); i++) { + CargoID cid = ind->accepts_cargo[i]; if (cid == cargo_id) { - return ind->produced_cargo_waiting[i]; + return ind->incoming_cargo_waiting[i]; } }