Skip to content

Commit

Permalink
(Aegis) turn more industries into custom layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Oct 5, 2023
1 parent 426a523 commit 377abec
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 4 deletions.
31 changes: 29 additions & 2 deletions industry/industries/farm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
import grf
from industry.lib.industry import AIndustry
from industry.lib.industry import AIndustry, transcribe, symmetrize

medium_set = [
(
"eed",
"abd",
"cff",
),
(
"cddc",
"eabf",
"eeff",
),
(
"ddee",
"cffe",
"abec",
),
]

tile_map = {
"a": grf.OldIndustryTileID(0x21), # house (left)
"b": grf.OldIndustryTileID(0x22), # house (right)
"c": grf.OldIndustryTileID(0x23), # warehouse with straws
"d": grf.OldIndustryTileID(0x24), # warehouse
"e": grf.OldIndustryTileID(0x25), # silo
"f": grf.OldIndustryTileID(0x26), # piggery
}

the_industry = AIndustry(
name="Farm",
substitute_type=0x09,
layouts=[[{"xofs": i, "yofs": j, "gfx": grf.NewIndustryTileID(0x23)} for i in range(4) for j in range(4)]],
# layouts=[[{"xofs": i, "yofs": j, "gfx": grf.NewIndustryTileID(0x23)} for i in range(4) for j in range(4)]],
layouts=transcribe(symmetrize(medium_set), tile_map),
)
42 changes: 40 additions & 2 deletions industry/industries/oil_wells.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
from industry.lib.industry import AIndustry
import grf
from industry.lib.industry import AIndustry, transcribe, symmetrize


the_industry = AIndustry(name="Oil Wells", substitute_type=0x0B)
medium_set = [
(
"x ",
"x ",
"xxx",
),
(
"x ",
"xx ",
" xx",
),
(
"x ",
"xx ",
" xx",
),
(
" x ",
"xxx ",
" x",
),
(
" x ",
"x x ",
"x x",
),
(
"x ",
"x ",
"x xx",
),
]

the_industry = AIndustry(
name="Oil Wells",
substitute_type=0x0B,
layouts=transcribe(symmetrize(medium_set), {"x": grf.OldIndustryTileID(0x1D)}),
)

0 comments on commit 377abec

Please sign in to comment.