BUG 2281: fix maxsize of guard towers.

This commit is contained in:
Enno Rehling 2017-02-14 20:51:03 +01:00
parent 1dcb21b08c
commit 4ce415be50
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<xi:include href="config://default/buildings/castle-2.xml" /> <xi:include href="config://default/buildings/castle-2.xml" />
<building name="watch" capacity="1" fort="yes"> <building name="watch" maxsize="10" capacity="1" fort="yes">
<function name="name" value="fort_name"/> <function name="name" value="fort_name"/>
<function name="protection" value="building_protection"/> <function name="protection" value="building_protection"/>
<function name="taxes" value="lua_building_taxes"/> <function name="taxes" value="lua_building_taxes"/>

View File

@ -595,7 +595,7 @@ int build(unit * u, const construction * ctype, int completed, int want)
else else
break; break;
} }
if (type->materials) if (type->materials) {
for (c = 0; type->materials[c].number; c++) { for (c = 0; type->materials[c].number; c++) {
const struct resource_type *rtype = type->materials[c].rtype; const struct resource_type *rtype = type->materials[c].rtype;
int prebuilt = int prebuilt =
@ -620,6 +620,7 @@ int build(unit * u, const construction * ctype, int completed, int want)
use_pooled(u, rtype, GET_DEFAULT, use_pooled(u, rtype, GET_DEFAULT,
(need - prebuilt + multi - 1) / multi); (need - prebuilt + multi - 1) / multi);
} }
}
made += n; made += n;
skills -= n * type->minskill; skills -= n * type->minskill;
want -= n; want -= n;