MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / House_StringToType

Function House_StringToType

src/house.c:281–291  ·  view source on GitHub ↗

* Convert the name of a house to the type value of that house, or * HOUSE_INVALID if not found. */

Source from the content-addressed store, hash-verified

279 * HOUSE_INVALID if not found.
280 */
281uint8 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.

Callers 4

Scenario_Load_UnitFunction · 0.85
Scenario_Load_StructureFunction · 0.85
Scenario_Load_TeamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected