* This is unnecessary now that a resource has an index * TODO: * - Change name to GetResourceCountIndex * - Fix anything that breaks by just using the index of the resource (not id) * - Get rid of this function */
| 481 | * - Get rid of this function |
| 482 | */ |
| 483 | int cResourceCount::GetResourceCountID(const cString& res_name) |
| 484 | { |
| 485 | for (int i = 0; i < resource_name.GetSize(); i++) { |
| 486 | if (resource_name[i] == res_name) return i; |
| 487 | } |
| 488 | cerr << "Error: Unknown resource '" << res_name << "'." << endl; |
| 489 | return -1; |
| 490 | } |
| 491 | |
| 492 | double cResourceCount::GetInflow(const cString& name) |
| 493 | { |