Skip to content

Commit b14c343

Browse files
committed
Now randomize secondary exits
1 parent 142c350 commit b14c343

9 files changed

Lines changed: 53 additions & 15 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
33
################################################################################
44

5+
/.vs/LiveSplit.SteamWorldDig.Randomizer/v15
56
/bin
67
/obj
78
/LiveSplit.SteamWorldDig.csproj.user

Components/LiveSplit.SteamWorldDig.Randomizer.Updates.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<updates>
3-
<update version="1.0.0">
3+
<update version="1.1">
4+
<files>
5+
<file path="Components/LiveSplit.SteamWorldDig.Randomizer.dll" status="changed"/>
6+
</files>
7+
<changelog>
8+
<change>
9+
Randomize secondary caves
10+
</change>
11+
</changelog>
12+
</update>
13+
<update version="1.0">
414
<files>
515
<file path="Components/LiveSplit.SteamWorldDig.Randomizer.dll" status="changed"/>
616
</files>
512 Bytes
Binary file not shown.

LocationsCasual.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ public LocationsCasual() {
1313
Type = Location.RandomizeType.Area,
1414
},
1515
new Location
16+
{
17+
Name = "archaea_cave_generator_1",
18+
Grant = "archaea_cave_generator_1", // randomized
19+
Type = Location.RandomizeType.Area,
20+
CanAccess = have => have.Contains("archaea_cave_run") && have.Contains("enable_jump_double"),
21+
},
22+
new Location
1623
{
1724
Name = "archaea_cave_1",
1825
Grant = "archaea_cave_1", // randomized
@@ -85,6 +92,13 @@ public LocationsCasual() {
8592
CanAccess = have => CanDrill(have)
8693
},
8794
new Location
95+
{
96+
Name = "oldworld_cave_generator_1",
97+
Grant = "oldworld_cave_generator_1", // randomized
98+
Type = Location.RandomizeType.Area,
99+
CanAccess = have => have.Contains("oldworld_cave_falldampeners") && have.Contains("enable_jump_double"),
100+
},
101+
new Location
88102
{
89103
Name = "vectron_cave_1",
90104
Grant = "vectron_cave_1", // randomized
@@ -145,9 +159,9 @@ public LocationsCasual() {
145159
},
146160
new Location
147161
{
148-
Name = "archaea_cave_generator_1",
162+
Name = "archaea_generator",
149163
Grant = "archaea_generator",
150-
CanAccess = have => have.Contains("archaea_cave_run") && have.Contains("enable_charge_jump"),
164+
CanAccess = have => have.Contains("archaea_cave_generator_1") && have.Contains("enable_charge_jump"),
151165
CanEscape = have => true
152166
},
153167
new Location
@@ -198,9 +212,9 @@ public LocationsCasual() {
198212
},
199213
new Location
200214
{
201-
Name = "oldworld_cave_generator_1",
215+
Name = "oldworld_generator",
202216
Grant = "oldworld_generator",
203-
CanAccess = have => have.Contains("oldworld_cave_falldampeners") && have.Contains("enable_jump_double"),
217+
CanAccess = have => have.Contains("oldworld_cave_generator_1") && have.Contains("enable_jump_double"),
204218
CanEscape = have => true
205219
},
206220
new Location

LocationsSpeedrunner.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ public LocationsSpeedrunner() {
1313
Type = Location.RandomizeType.Area,
1414
},
1515
new Location
16+
{
17+
Name = "archaea_cave_generator_1",
18+
Grant = "archaea_cave_generator_1", // randomized
19+
Type = Location.RandomizeType.Area,
20+
CanAccess = have => have.Contains("archaea_cave_run"),
21+
},
22+
new Location
1623
{
1724
Name = "archaea_cave_1",
1825
Grant = "archaea_cave_1", // randomized
@@ -85,6 +92,13 @@ public LocationsSpeedrunner() {
8592
CanAccess = have => CanDrill(have)
8693
},
8794
new Location
95+
{
96+
Name = "oldworld_cave_generator_1",
97+
Grant = "oldworld_cave_generator_1", // randomized
98+
Type = Location.RandomizeType.Area,
99+
CanAccess = have => have.Contains("oldworld_cave_falldampeners"),
100+
},
101+
new Location
88102
{
89103
Name = "vectron_cave_1",
90104
Grant = "vectron_cave_1", // randomized
@@ -143,9 +157,9 @@ public LocationsSpeedrunner() {
143157
},
144158
new Location
145159
{
146-
Name = "archaea_cave_generator_1",
160+
Name = "archaea_generator",
147161
Grant = "archaea_generator",
148-
CanAccess = have => have.Contains("archaea_cave_run") && have.Contains("enable_charge_jump"),
162+
CanAccess = have => have.Contains("archaea_cave_generator_1") && have.Contains("enable_charge_jump"),
149163
},
150164
new Location
151165
{
@@ -190,9 +204,9 @@ public LocationsSpeedrunner() {
190204
},
191205
new Location
192206
{
193-
Name = "oldworld_cave_generator_1",
207+
Name = "oldworld_generator",
194208
Grant = "oldworld_generator",
195-
CanAccess = have => have.Contains("oldworld_cave_falldampeners"),
209+
CanAccess = have => have.Contains("oldworld_cave_generator_1"),
196210
},
197211
new Location
198212
{

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
[assembly: AssemblyCulture("")]
1313
[assembly: ComVisible(false)]
1414
[assembly: Guid("15f73bff-4214-4629-b3aa-f9565a7e7633")]
15-
[assembly: AssemblyVersion("1.0.0.0")]
16-
[assembly: AssemblyFileVersion("1.0.0.0")]
15+
[assembly: AssemblyVersion("1.1")]
16+
[assembly: AssemblyFileVersion("1.1")]
1717
[assembly: ComponentFactory(typeof(SteamWorldFactory))]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Randomizer for the game SteamWorld Dig
33

44
## What does the Randomizer do?
5-
It randomizes all upgrades on upgrade podiums and all caves. Caves which are accessed from another cave, like `archaea_cave_generator_1` from `archaea_cave_run`, are not randomized.
5+
It randomizes all upgrades on upgrade podiums and all caves, including the cave's second exits.
66

77
It also ensures that the resulting layout is possible to finish. There are two possible difficulties: `Casual` and `Speedrunner`. In `Casual` difficulty, you won't have to:
88

SteamWorldFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class SteamWorldFactory : IComponentFactory {
99
public ComponentCategory Category { get { return ComponentCategory.Control; } }
1010
public IComponent Create(LiveSplitState state) { return new SteamWorldComponent(); }
1111
public string UpdateName { get { return this.ComponentName; } }
12-
public string UpdateURL { get { return "https://raw.githubusercontent.com/ShootMe/LiveSplit.SteamWorldDig/master/"; } }
12+
public string UpdateURL { get { return "https://raw.githubusercontent.com/clementgallet/LiveSplit.SteamWorldDig.Randomizer/master/"; } }
1313
public string XMLURL { get { return this.UpdateURL + "Components/LiveSplit.SteamWorldDig.Randomizer.Updates.xml"; } }
1414
public Version Version { get { return Assembly.GetExecutingAssembly().GetName().Version; } }
1515
}

SteamWorldMemory.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ public void SaveAllAreaEntries()
121121
}
122122

123123
// Don't randomize the boss room and the generators
124-
if (!key.Contains("boss") && key != "archaea_cave_generator_1" &&
125-
key != "oldworld_cave_generator_1" && key != "oldworld")
124+
if (!key.Contains("boss") && key != "oldworld")
126125
{
127126
areaSegments[key] = segment;
128127
areaPointers[key] = ptr - 0x1C;

0 commit comments

Comments
 (0)