Exception when creating a building with female only resident

Locked
User avatar
druha
Posts: 275
Joined: Sat Jul 20, 2013 10:09 pm

Exception when creating a building with female only resident

Post by druha » Fri Oct 24, 2014 1:49 am

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.
Attachments
ForgeModLoader-client-0.log
(139.28 KiB) Downloaded 146 times
millenaire.log
(2.89 KiB) Downloaded 158 times

User avatar
Kinniken
Site Admin
Posts: 332
Joined: Thu Jul 21, 2011 4:51 pm

Re: Exception when creating a building with female only resi

Post by Kinniken » Sat Nov 01, 2014 1:20 pm

Indeed! Fixed for the next release. Good catch.

Locked