Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 11fa8b6

Browse files
committed
- Revised street entry code to create cleaner transitions.
1 parent a841e43 commit 11fa8b6

File tree

2 files changed

+42
-17
lines changed

2 files changed

+42
-17
lines changed

src/scripts/grower.lua

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,7 +3478,9 @@ function Grower_grammatical_room(R, pass, is_emergency)
34783478
elseif pass == "streets" then
34793479
apply_num = rand.irange(5,10)
34803480

3481-
elseif pass == "streets_entry" then
3481+
elseif pass == "streets_entry_4"
3482+
or pass == "streets_entry_6"
3483+
or pass == "streets_entry_8" then
34823484
apply_num = 1
34833485

34843486
elseif pass == "sidewalk" then
@@ -3751,7 +3753,16 @@ end
37513753
function Grower_make_street(R)
37523754
if R.is_streeted then return end
37533755

3754-
Grower_grammatical_room(R, "streets_entry")
3756+
R.areas[1]:calc_volume()
3757+
R.svolume = R.areas[1].svolume
3758+
if R.svolume == 4 then
3759+
Grower_grammatical_room(R, "streets_entry_4")
3760+
elseif R.svolume == 6 then
3761+
Grower_grammatical_room(R, "streets_entry_6")
3762+
elseif R.svolume == 8 then
3763+
Grower_grammatical_room(R, "streets_entry_8")
3764+
end
3765+
37553766
Grower_grammatical_room(R, "streets")
37563767
Grower_grammatical_room(R, "street_fixer")
37573768

@@ -3769,7 +3780,6 @@ function Grower_make_street(R)
37693780

37703781
-- sanity check: failed street rooms shall now become just
37713782
-- regular rooms
3772-
R.areas[1]:calc_volume()
37733783
if R.areas[1].svolume < 16 then
37743784
R.is_street = false
37753785
R.areas[1].is_road = false

src/scripts/shapes.lua

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6804,33 +6804,48 @@ GROW_SEWER_STAIRS_SIDE_EXIT_NEW_AREA =
68046804
-- It works now. Cheer up, buddy. -- March, 2019
68056805
-- MSSP's city streets. ExperiMENTAL. [STREETS]
68066806

6807-
STREETS_ENTRY =
6807+
STREETS_ENTRY_RSVOL_4 =
68086808
{
6809-
prob = 500
6809+
prob = 5
68106810

6811-
pass = "streets_entry"
6811+
pass = "streets_entry_4"
68126812

68136813
structure =
68146814
{
6815-
"xx....","xx1111"
6816-
"11....","111111"
6817-
"11....","111111"
6818-
"xx....","xx1111"
6815+
"11..","1111"
6816+
"11..","1111"
6817+
"....","1111"
6818+
"....","1111"
68196819
}
68206820
}
68216821

6822-
STREETS_ENTRY_LONG_OFFSET =
6822+
STREETS_ENTRY_RSVOL_6 =
68236823
{
6824-
prob = 500
6824+
prob = 5
68256825

6826-
pass = "streets_entry"
6826+
pass = "streets_entry_6"
68276827

68286828
structure =
68296829
{
6830-
"xxxx....","xxxx1111"
6831-
"1111....","11111111"
6832-
"1111....","11111111"
6833-
"xxxx....","xxxx1111"
6830+
"11..","1111"
6831+
"11..","1111"
6832+
"11..","1111"
6833+
"....","1111"
6834+
}
6835+
}
6836+
6837+
STREETS_ENTRY_RSVOL_8 =
6838+
{
6839+
prob = 5
6840+
6841+
pass = "streets_entry_8"
6842+
6843+
structure =
6844+
{
6845+
"11..","1111"
6846+
"11..","1111"
6847+
"11..","1111"
6848+
"11..","1111"
68346849
}
68356850
}
68366851

0 commit comments

Comments
 (0)