34 for (MarketAPI market :
Global.
getSector().getEconomy().getMarketsCopy()) {
35 if (market.isHidden())
continue;
42 for (Industry curr : market.getIndustries()) {
43 if (!curr.isIndustry())
continue;
45 if (curr.getSpec().hasTag(Industries.TAG_URBAN)) {
48 if (curr.getSpec().hasTag(Industries.TAG_RURAL)) {
51 if (curr.getSpec().hasTag(Industries.TAG_INDUSTRIAL)) {
57 if (market.hasCondition(Conditions.URBANIZED_POLITY)) {
58 if (urban <= 0 || industrial > 0 || rural > 0) {
59 market.removeCondition(Conditions.URBANIZED_POLITY);
62 if (market.hasCondition(Conditions.RURAL_POLITY)) {
63 if (rural <= 0 || urban > 0 || industrial > 0) {
64 market.removeCondition(Conditions.RURAL_POLITY);
67 if (market.hasCondition(Conditions.INDUSTRIAL_POLITY)) {
68 if (industrial <= 0 || urban > 0 || rural > 0) {
69 market.removeCondition(Conditions.INDUSTRIAL_POLITY);
73 if (market.getSize() <= 3) {
77 if (!market.hasCondition(Conditions.URBANIZED_POLITY)) {
78 if (urban > 0 && industrial + rural <= 0) {
79 market.addCondition(Conditions.URBANIZED_POLITY);
82 if (!market.hasCondition(Conditions.RURAL_POLITY)) {
83 if (rural > 0 && industrial + urban <= 0) {
84 market.addCondition(Conditions.RURAL_POLITY);
87 if (!market.hasCondition(Conditions.INDUSTRIAL_POLITY)) {
88 if (industrial > 0 && rural + urban <= 0) {
89 market.addCondition(Conditions.INDUSTRIAL_POLITY);
93 if (!market.hasCondition(Conditions.POLLUTION) && market.hasCondition(Conditions.HABITABLE) &&
94 market.getSize() >= 5 && pollution >= 3) {
95 market.addCondition(Conditions.POLLUTION);