-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Aegis) start adding a fourth economy
- Loading branch information
Showing
7 changed files
with
144 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import grf | ||
from industry.lib.cargo import ACargo | ||
|
||
the_cargo = ACargo(b"NH3_", grf.CargoClass.LIQUID | grf.CargoClass.HAZARDOUS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import grf | ||
from industry.lib.cargo import ACargo | ||
|
||
the_cargo = ACargo(b"PEAT", grf.CargoClass.BULK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import grf | ||
from industry.lib.cargo import ACargo | ||
|
||
the_cargo = ACargo(b"PORE", grf.CargoClass.BULK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
from industry.lib.economy import Economy, PrimaryIndustry, SecondaryIndustry, TertiaryIndustry, Town | ||
from industry.cargos import ( | ||
ammonia, | ||
pyrite_ore, | ||
peat, | ||
coal, | ||
food, | ||
goods, | ||
gold, | ||
livestock, | ||
mail, | ||
oil, | ||
paper, | ||
passengers, | ||
wheat, | ||
wood, | ||
farm_supplies, | ||
engineering_supplies, | ||
water, | ||
workers, | ||
) | ||
from industry.industries import ( | ||
peatlands, | ||
bank, | ||
coal_mine, | ||
food_processing_plant, | ||
farm, | ||
forest, | ||
paper_mill, | ||
oil_refinery, | ||
printing_works, | ||
oil_wells, | ||
power_station, | ||
gold_mine, | ||
towns, | ||
port, | ||
trading_centre, | ||
water_supply, | ||
water_tower, | ||
worker_yard, | ||
) | ||
|
||
|
||
class TheEconomy: | ||
def __init__(self): | ||
self.name = "FIRS Arctic" | ||
|
||
def get_economy(self, parameters): | ||
ret = Economy( | ||
{ | ||
coal_mine: PrimaryIndustry(coal), | ||
farm: PrimaryIndustry((livestock, wheat)), | ||
forest: PrimaryIndustry(wood), | ||
oil_wells: PrimaryIndustry(oil), | ||
gold_mine: PrimaryIndustry(gold), | ||
peatlands: PrimaryIndustry(peat), | ||
food_processing_plant: SecondaryIndustry( | ||
( | ||
livestock, | ||
wheat, | ||
), | ||
food, | ||
), | ||
paper_mill: SecondaryIndustry(wood, paper), | ||
oil_refinery: SecondaryIndustry(oil, goods), | ||
printing_works: SecondaryIndustry(paper, goods), | ||
power_station: TertiaryIndustry(coal), | ||
bank: TertiaryIndustry(gold), | ||
towns: Town(passengers, mail, food, goods), | ||
}, | ||
parameters, | ||
) | ||
if parameters["POLICY"] == "SELF_SUFFICIENT": | ||
ret.graph[port] = SecondaryIndustry(wood, paper) | ||
elif parameters["POLICY"] in ("FREE_TRADE", "EXPORT"): | ||
ret.graph[port] = SecondaryIndustry(wood, paper) | ||
del ret.graph[paper_mill] | ||
|
||
if parameters["BOOSTER"] == "UNIVERSAL": | ||
ret.graph[coal_mine].booster = engineering_supplies | ||
ret.graph[oil_wells].booster = engineering_supplies | ||
ret.graph[gold_mine].booster = engineering_supplies | ||
ret.graph[farm].booster = engineering_supplies | ||
ret.graph[forest].booster = engineering_supplies | ||
|
||
ret.graph[printing_works].produces += (engineering_supplies,) | ||
elif parameters["BOOSTER"] == "GENERIC": | ||
ret.graph[coal_mine].booster = engineering_supplies | ||
ret.graph[oil_wells].booster = engineering_supplies | ||
ret.graph[gold_mine].booster = engineering_supplies | ||
ret.graph[farm].booster = farm_supplies | ||
ret.graph[forest].booster = farm_supplies | ||
|
||
ret.graph[printing_works].produces += (engineering_supplies,) | ||
ret.graph[oil_refinery].produces += (farm_supplies,) | ||
elif parameters["BOOSTER"] == "GENERIC_PASSENGERS": | ||
ret.graph[coal_mine].booster = engineering_supplies | ||
ret.graph[oil_wells].booster = passengers | ||
ret.graph[gold_mine].booster = engineering_supplies | ||
ret.graph[farm].booster = farm_supplies | ||
ret.graph[forest].booster = farm_supplies | ||
|
||
ret.graph[printing_works].produces += (engineering_supplies,) | ||
ret.graph[oil_refinery].produces += (farm_supplies,) | ||
|
||
if parameters["WORKER"].startswith("YETI"): | ||
ret.graph[worker_yard] = PrimaryIndustry(workers) | ||
|
||
# FIXME | ||
ret.graph[coal_mine].booster = workers | ||
|
||
if port in ret.graph: | ||
if parameters["LAND_PORTS"] == "LAND_ONLY": | ||
ret.graph[trading_centre] = ret.graph[port] | ||
del ret.graph[port] | ||
elif parameters["LAND_PORTS"] == "BOTH": | ||
ret.graph[trading_centre] = ret.graph[port] | ||
|
||
if parameters["TOWN_GOODS"] == "SUBTROPICAL": | ||
ret.graph[water_supply] = PrimaryIndustry(water) | ||
ret.graph[water_tower] = TertiaryIndustry(water) | ||
|
||
return ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from industry.lib.industry import AIndustry | ||
|
||
the_industry = AIndustry( | ||
name="Peatlands", | ||
substitute_type=0x26, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters