* Convert the name of a house to the type value of that house, or * HOUSE_INVALID if not found. */
| 279 | * HOUSE_INVALID if not found. |
| 280 | */ |
| 281 | uint8 House_StringToType(const char *name) |
| 282 | { |
| 283 | uint8 index; |
| 284 | if (name == NULL) return HOUSE_INVALID; |
| 285 | |
| 286 | for (index = 0; index < 6; index++) { |
| 287 | if (strcasecmp(g_table_houseInfo[index].name, name) == 0) return index; |
| 288 | } |
| 289 | |
| 290 | return HOUSE_INVALID; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Gives a harvester to the given house if it has a refinery and no harvesters. |
no outgoing calls
no test coverage detected