Skip to content

Commit

Permalink
(Aegis) Create more layouts for farm & oil wells
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Oct 6, 2023
1 parent e789f76 commit 0755701
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 35 deletions.
22 changes: 20 additions & 2 deletions industry/industries/farm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
import grf
from industry.lib.industry import AIndustry, SplitDefinition, transcribe, symmetrize

large_set = symmetrize(
[
(
"cddc",
"cddc",
"cabc",
"eeff",
"eeff",
),
(
"ddeec",
"ddefc",
"cffff",
"abecf",
),
]
)

medium_set = symmetrize(
[
(
Expand Down Expand Up @@ -52,8 +70,8 @@
substitute_type=0x09,
layouts=SplitDefinition(
{
0: transcribe(medium_set, tile_map),
1: transcribe(medium_set, tile_map),
0: transcribe(large_set, tile_map),
1: transcribe(large_set, tile_map),
2: transcribe(medium_set, tile_map),
3: transcribe(small_set, tile_map),
4: transcribe(tiny_set, tile_map),
Expand Down
119 changes: 86 additions & 33 deletions industry/industries/oil_wells.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,95 @@
import grf
from industry.lib.industry import AIndustry, transcribe, symmetrize
from industry.lib.industry import AIndustry, SplitDefinition, transcribe, symmetrize


medium_set = [
(
"x ",
"x ",
"xxx",
),
(
"x ",
"xx ",
" xx",
),
(
"x ",
"xx ",
" xx",
),
(
" x ",
"xxx ",
" x",
),
(
" x ",
"x x ",
"x x",
),
(
"x ",
"x ",
"x xx",
),
large_set = symmetrize(
[
(
"x ",
"x ",
"xx ",
" xxx",
),
(
"xx ",
"x x",
" xx",
" x ",
),
]
)
medium_set = symmetrize(
[
(
"x ",
"x ",
"xxx",
),
(
"x ",
"xx ",
" xx",
),
(
"x ",
"xx ",
" xx",
),
(
" x ",
"xxx ",
" x",
),
(
" x ",
"x x ",
"x x",
),
(
"x ",
"x ",
"x xx",
),
]
)

small_set = symmetrize(
[
(
"x ",
"xx",
"x ",
),
]
)

tiny_set = symmetrize(
[
(
"x ",
" x",
),
]
)

one_tile_set = [
("x",),
]

tile_map = {"x": grf.OldIndustryTileID(0x1D)}

the_industry = AIndustry(
name="Oil Wells",
substitute_type=0x0B,
layouts=transcribe(symmetrize(medium_set), {"x": grf.OldIndustryTileID(0x1D)}),
layouts=SplitDefinition(
{
0: transcribe(large_set, tile_map),
1: transcribe(large_set, tile_map),
2: transcribe(medium_set, tile_map),
3: transcribe(small_set, tile_map),
4: transcribe(tiny_set, tile_map),
5: transcribe(one_tile_set, tile_map),
6: [[{"xofs": 0, "yofs": 0, "gfx": grf.NewIndustryTileID(0x23)}]],
}
),
)

0 comments on commit 0755701

Please sign in to comment.