forked from github/server
Merge branch 'master' into develop
This commit is contained in:
commit
609d0daed3
|
@ -46,5 +46,5 @@ tests/data/185.dat
|
|||
/cutest/
|
||||
/critbit/
|
||||
*.mo
|
||||
/CMakeSettings.json
|
||||
/.vs
|
||||
/CMakeSettings.json
|
||||
|
|
|
@ -6,6 +6,10 @@ local function equip_first(u)
|
|||
equip_unit(u, name, 255)
|
||||
end
|
||||
|
||||
local function equip_demon(u)
|
||||
u.race_name = 'human'
|
||||
end
|
||||
|
||||
local mysets = {
|
||||
['first_unit'] = {
|
||||
['items'] = {
|
||||
|
@ -77,7 +81,8 @@ local mysets = {
|
|||
['seed_demon'] = {
|
||||
['skills'] = {
|
||||
['stamina'] = 15
|
||||
}
|
||||
},
|
||||
['callback'] = equip_demon
|
||||
},
|
||||
['seed_insect'] = {
|
||||
['items'] = {
|
||||
|
|
|
@ -258,11 +258,14 @@ unit *addplayer(region * r, faction * f)
|
|||
const char * name;
|
||||
|
||||
assert(r->land);
|
||||
assert(f->units == NULL);
|
||||
if (rpeasants(r) < PEASANT_MIN) {
|
||||
rsetpeasants(r, PEASANT_MIN + rng_int() % (PEASANT_MAX - PEASANT_MIN));
|
||||
}
|
||||
if (rtrees(r, TREE_TREE) < 50) {
|
||||
rsettrees(r, TREE_TREE, 50);
|
||||
}
|
||||
|
||||
assert(f->units == NULL);
|
||||
faction_setorigin(f, 0, r->x, r->y);
|
||||
u = create_unit(r, f, 1, f->race, 0, NULL, NULL);
|
||||
u->status = ST_FLEE;
|
||||
|
|
|
@ -223,6 +223,7 @@ char *parse_token(const char **str, char *lbuf, size_t buflen)
|
|||
}
|
||||
|
||||
*cursor = '\0';
|
||||
unicode_utf8_trim(lbuf);
|
||||
*str = ctoken;
|
||||
return lbuf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue