Page 1 of 1

Exception when creating a building with female only resident

Posted: Fri Oct 24, 2014 1:49 am
by druha
When a village creates a building that only has a female villager defined an exception is thrown. This looks to be a coding error in the Building class. Attached are the millenaire.log file and the Forge log.

Pretty sure the error in the code is on this line:
if ((this.location.femaleResident.size() > 0) && (!this.culture.getVillagerType((String)this.location.maleResident.get(0)).isChild)) {

And it should be:
if ((this.location.femaleResident.size() > 0) && (!this.culture.getVillagerType((String)this.location.femaleResident.get(0)).isChild)) {

Looks like just a copy/paste mistake but one you would probably not have encountered as there are no female only buildings in the default cultures.

Re: Exception when creating a building with female only resi

Posted: Sat Nov 01, 2014 1:20 pm
by Kinniken
Indeed! Fixed for the next release. Good catch.