/// <summary> /// /// </summary> internal bool canBuildNewFactory(Province where, Agent builder) { if (where.hasFactory(this)) { return(false); } if (isResourceGathering() && basicProduction.Product != where.getResource() || (builder != null && !builder.Country.InventedFactory(this)) || // check it out side (builder != null && !allowsForeignInvestments.checkIftrue(builder, where)) // check it out side //|| !basicProduction.Product.IsInventedByAnyOne() ) { return(false); } return(true); }
/// <summary> /// Doesn't care about builder reforms /// </summary> internal bool canBuildNewFactory(Province where, Agent investor) { if (where.hasFactory(this)) { return(false); } if (isResourceGathering() && basicProduction.getProduct() != where.getResource() //|| !where.GetCountry().isInvented(basicProduction.getProduct()) || !investor.GetCountry().Invented(this) //|| isManufacture() && !investor.GetCountry().Invented(Invention.Manufactures) //|| (basicProduction.getProduct() == Product.Cattle && !investor.GetCountry().Invented(Invention.Domestication)) || !allowsForeignInvestments.checkIftrue(investor, where) ) { return(false); } return(true); }