forked from github/server
allow config to override first unit equipment
This commit is contained in:
parent
594cbc4a05
commit
4675cf1d05
|
@ -286,12 +286,14 @@ faction *addfaction(const char *email, const char *password,
|
|||
unit *addplayer(region * r, faction * f)
|
||||
{
|
||||
unit *u;
|
||||
const char * name;
|
||||
const struct equipment* eq;
|
||||
|
||||
assert(f->units == NULL);
|
||||
faction_setorigin(f, 0, r->x, r->y);
|
||||
u = create_unit(r, f, 1, f->race, 0, NULL, NULL);
|
||||
eq = get_equipment("first_unit");
|
||||
name = config_get("rules.equip_first");
|
||||
eq = get_equipment(name ? name : "first_unit");
|
||||
if (eq) {
|
||||
equip_items(&u->items, eq);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue