const ship_type *st_find(const char *name) { ship_type *st = st_find_i(name); if (!st) { log_warning("st_find: could not find ship '%s'\n", name); } return st; }
ship_type *st_get_or_create(const char * name) { ship_type * st = st_find_i(name); if (!st) { st = (ship_type *)calloc(sizeof(ship_type), 1); st->_name = _strdup(name); st->storm = 1.0; ql_push(&shiptypes, (void *)st); } return st; }
ship_type *st_get_or_create(const char * name) { ship_type * st = st_find_i(name); assert(!snames); if (!st) { st = (ship_type *)calloc(1, sizeof(ship_type)); if (!st) abort(); st->_name = str_strdup(name); st->storm = 1.0; st->tac_bonus = 1.0; st_register(st); } return st; }
const ship_type *st_find(const char *name) { return st_find_i(name); }