Skip to content

Commit

Permalink
2.2.0 - Challenges
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattlesquat committed Jan 29, 2021
1 parent 48d8794 commit 4160b45
Show file tree
Hide file tree
Showing 24 changed files with 403 additions and 38 deletions.
48 changes: 37 additions & 11 deletions DeathRun/DeathRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public static void Patch()
{
new Ingredient(TechType.TitaniumIngot, 1),
new Ingredient(TechType.Magnetite, 2),
new Ingredient(TechType.AluminumOxide, 2),
new Ingredient(TechType.Aerogel, 3),
new Ingredient(TechType.EnameledGlass, 1)
}
});
Expand All @@ -428,7 +428,7 @@ public static void Patch()
{
new Ingredient(TechType.VehicleHullModule1, 1),
new Ingredient(TechType.PlasteelIngot, 1),
new Ingredient(TechType.Aerogel, 3),
new Ingredient(TechType.Nickel, 3),
new Ingredient(TechType.EnameledGlass, 1)
}
});
Expand Down Expand Up @@ -470,9 +470,8 @@ public static void Patch()
new Ingredient(TechType.Aerogel, 2),
new Ingredient(TechType.EnameledGlass, 2),
new Ingredient(TechType.Diamond, 2),
new Ingredient(TechType.Lead, 2),
new Ingredient(TechType.Sulphur, 3),
new Ingredient(TechType.Nickel, 1),
new Ingredient(TechType.Nickel, 3),
new Ingredient(TechType.Lubricant, 3)
};
}
Expand All @@ -484,8 +483,8 @@ public static void Patch()
new Ingredient(TechType.Aerogel, 2),
new Ingredient(TechType.EnameledGlass, 1),
new Ingredient(TechType.Diamond, 2),
new Ingredient(TechType.Lead, 4),
new Ingredient(TechType.Sulphur, 2),
new Ingredient(TechType.Nickel, 2),
new Ingredient(TechType.Lubricant, 2)
};
}
Expand All @@ -510,6 +509,7 @@ public static void Patch()
{
new Ingredient(TechType.PlasteelIngot, 1),
new Ingredient(TechType.Nickel, 3),
new Ingredient(TechType.Sulphur, 3),
new Ingredient(TechType.Kyanite, 1)
}
});
Expand Down Expand Up @@ -538,9 +538,9 @@ public static void Patch()
new Ingredient(TechType.EnameledGlass, 3),
new Ingredient(TechType.Lubricant, 4),
new Ingredient(TechType.AdvancedWiringKit, 1),
new Ingredient(TechType.Lead, 3),
new Ingredient(TechType.UraniniteCrystal, 3),
new Ingredient(TechType.Nickel, 1),
new Ingredient(TechType.Sulphur, 3),
new Ingredient(TechType.Nickel, 3),
};
}
else if (Config.HARD_VEHICLES.Equals(DeathRun.config.vehicleCosts))
Expand All @@ -553,7 +553,7 @@ public static void Patch()
new Ingredient(TechType.AdvancedWiringKit, 1),
new Ingredient(TechType.Lead, 4),
new Ingredient(TechType.UraniniteCrystal, 2),
new Ingredient(TechType.Sulphur, 1)
new Ingredient(TechType.Nickel, 2)
};
}
if (ingredients != null)
Expand Down Expand Up @@ -590,7 +590,7 @@ public static void Patch()
{
new Ingredient(TechType.CyclopsHullModule1, 1),
new Ingredient(TechType.PlasteelIngot, 1),
new Ingredient(TechType.Nickel, 3),
new Ingredient(TechType.Sulphur, 3),
new Ingredient(TechType.Kyanite, 1),
}
});
Expand All @@ -602,6 +602,7 @@ public static void Patch()
Ingredients = new List<Ingredient>
{
new Ingredient(TechType.CyclopsHullModule2, 1),
new Ingredient(TechType.Sulphur, 3),
new Ingredient(TechType.Nickel, 3),
new Ingredient(TechType.Kyanite, 5),
}
Expand All @@ -613,6 +614,7 @@ public static void Patch()

if (Config.DEATHRUN.Equals(DeathRun.config.builderCosts))
{
// Habitat Builder
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 2),
Expand All @@ -627,10 +629,11 @@ public static void Patch()
}
techChanges.Add(TechType.Builder, new TechData { craftAmount = 1, Ingredients = ingredients });

// Stasis Rifle
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 1),
new Ingredient(TechType.Magnetite, 2),
new Ingredient(TechType.Magnetite, 4),
new Ingredient(TechType.UraniniteCrystal, 2),
new Ingredient(TechType.Benzene, 1),
};
Expand All @@ -640,6 +643,7 @@ public static void Patch()
}
techChanges.Add(TechType.StasisRifle, new TechData { craftAmount = 1, Ingredients = ingredients });

// Propulsion Cannon
ingredients = new List<Ingredient>
{
new Ingredient(TechType.WiringKit, 1),
Expand All @@ -652,6 +656,16 @@ public static void Patch()
}
techChanges.Add(TechType.PropulsionCannon, new TechData { craftAmount = 1, Ingredients = ingredients });

// Repulsion Cannon
ingredients = new List<Ingredient>
{
new Ingredient(TechType.PropulsionCannon, 1),
new Ingredient(TechType.ComputerChip, 1),
new Ingredient(TechType.Magnetite, 4),
};
techChanges.Add(TechType.RepulsionCannon, new TechData { craftAmount = 1, Ingredients = ingredients });

// First Aid Cabinet
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 1),
Expand All @@ -663,6 +677,7 @@ public static void Patch()
}
else if (Config.HARD.Equals(DeathRun.config.builderCosts))
{
// Habitat Builder
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 2),
Expand All @@ -676,6 +691,7 @@ public static void Patch()
}
techChanges.Add(TechType.Builder, new TechData { craftAmount = 1, Ingredients = ingredients });

// Stasis Rifle
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 1),
Expand All @@ -688,6 +704,7 @@ public static void Patch()
}
techChanges.Add(TechType.StasisRifle, new TechData { craftAmount = 1, Ingredients = ingredients });

// Propulsion Cannon
ingredients = new List<Ingredient>
{
new Ingredient(TechType.WiringKit, 1),
Expand All @@ -700,6 +717,16 @@ public static void Patch()
}
techChanges.Add(TechType.PropulsionCannon, new TechData { craftAmount = 1, Ingredients = ingredients });

// Repulsion Cannon
ingredients = new List<Ingredient>
{
new Ingredient(TechType.PropulsionCannon, 1),
new Ingredient(TechType.ComputerChip, 1),
new Ingredient(TechType.Magnetite, 3),
};
techChanges.Add(TechType.RepulsionCannon, new TechData { craftAmount = 1, Ingredients = ingredients });

// First Aid Cabinet
ingredients = new List<Ingredient>
{
new Ingredient(TechType.ComputerChip, 1),
Expand All @@ -708,7 +735,6 @@ public static void Patch()
new Ingredient(TechType.Titanium, 1)
};
techChanges.Add(TechType.MedicalCabinet, new TechData { craftAmount = 1, Ingredients = ingredients });

}

CattleLogger.Message("Scans Required");
Expand Down
3 changes: 3 additions & 0 deletions DeathRun/DeathRun.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@
<Compile Include="NMBehaviours\SpecialtyTanks.cs" />
<Compile Include="NMBehaviours\BendsHUDController.cs" />
<Compile Include="Patchers\AggressionPatcher.cs" />
<Compile Include="Patchers\KnifePatcher.cs" />
<Compile Include="Patchers\CompassPatcher.cs" />
<Compile Include="Patchers\GrowingPlantPatcher.cs" />
<Compile Include="Patchers\FoodPatcher.cs" />
<Compile Include="Patchers\SeaglidePatcher.cs" />
<Compile Include="Patchers\BatteryPatcher.cs" />
<Compile Include="Patchers\CrushDepthPatcher.cs" />
Expand Down
61 changes: 59 additions & 2 deletions DeathRun/DeathRunConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,25 @@ public class Config : ConfigFile
public const string DEATH_VEHICLES_2 = "Death Run (alternate costs)";
public const string HARD_VEHICLES = "Hard (unusual costs)";

public const string RADIATION_WORSE = "Apocalypse (200m)";
public const string RADIATION_DEATHRUN = "Death Run (60m)";
public const string RADIATION_HARD = "Hard (30m)";

public const string FILTER_RADIATION = "Challenge - Not NEAR Aurora";
public const string FILTER_AURORA = "Challenge - Not INSIDE Aurora";
public const string FILTER_ANYWHERE = "Works Anywhere";

public const string FOOD_VEGAN = "Vegan (no fish or nutrient blocks)";
public const string FOOD_VEGETARIAN = "Vegetarian (no fish)";
public const string FOOD_OMNIVORE = "Disabled";

public const string FARMING_VERY_SLOW = "Very Slow (1/6 speed)";
public const string FARMING_SLOW = "Very Slow (1/3 speed)";
public const string FARMING_NORMAL = "Disabled";

public const string NONVIOLENT = "Nonviolent (no knife damage)";
public const string VIOLENT = "Disabled";

public const string EXPLOSION_DEATHRUN = "Death Run (100m)";
public const string EXPLOSION_HARD = "Hard (50m)";

Expand Down Expand Up @@ -86,7 +102,7 @@ public class Config : ConfigFile
[Choice("Surface Air", new string[] { POISONED, IRRADIATED, BREATHABLE }), OnChange(nameof(ChangedChoice))]
public string surfaceAir = POISONED;

[Choice("Radiation", new string[] { RADIATION_DEATHRUN, RADIATION_HARD, NORMAL }), OnChange(nameof(ChangedChoice))]
[Choice("Radiation", new string[] { RADIATION_WORSE, RADIATION_DEATHRUN, RADIATION_HARD, NORMAL }), OnChange(nameof(ChangedChoice))]
public string radiationDepth = RADIATION_DEATHRUN;

[Choice("Nitrogen and the Bends", new string[] { DEATHRUN, HARD, NORMAL }), OnChange(nameof(ChangedChoice))]
Expand Down Expand Up @@ -164,6 +180,18 @@ public class Config : ConfigFile
[Choice("Radiation FX if Immune (Optional)", new string[] { FX_CHERNOBYL, FX_REMINDER, FX_NORMAL }), OnChange(nameof(ChangedChoice))]
public string radiationFX = FX_CHERNOBYL;

[Choice("Filter Pump (Optional)", new string[] { FILTER_RADIATION, FILTER_AURORA, FILTER_ANYWHERE }), OnChange(nameof(ChangedChoice))]
public string filterPumpRules = FILTER_ANYWHERE;

[Choice("Nonviolent Challenge (Optional)", new string[] { NONVIOLENT, VIOLENT }), OnChange(nameof(ChangedChoice))]
public string nonViolent = VIOLENT;

[Choice("Farming Challenge (Optional)", new string[] { FARMING_VERY_SLOW, FARMING_SLOW, FARMING_NORMAL }), OnChange(nameof(ChangedChoice))]
public string farmingChallenge = FARMING_NORMAL;

[Choice("Food Challenge (Optional)", new string[] { FOOD_VEGAN, FOOD_VEGETARIAN, FOOD_OMNIVORE }), OnChange(nameof(ChangedChoice))]
public string foodChallenge = FOOD_OMNIVORE;

[Choice("Food From Island (Optional)", new string[] { ALWAYS, BEFORE_AND_AFTER, AFTER, NEVER })]
public string islandFood = ALWAYS;

Expand Down Expand Up @@ -295,7 +323,7 @@ public int countDeathRunSettings ()
count += 1;
}

if (RADIATION_DEATHRUN.Equals(radiationDepth))
if (RADIATION_DEATHRUN.Equals(radiationDepth) || RADIATION_WORSE.Equals(radiationDepth))
{
count += 2;
} else if (RADIATION_HARD.Equals(radiationDepth))
Expand Down Expand Up @@ -372,6 +400,35 @@ public int countDeathRunBonuses()
bonuses++;
}

if (RADIATION_WORSE.Equals(radiationDepth))
{
bonuses++;
}

if (FILTER_RADIATION.Equals(filterPumpRules))
{
bonuses += 2;
} else if (FILTER_AURORA.Equals(filterPumpRules))
{
bonuses++;
}

if (FOOD_VEGAN.Equals(foodChallenge))
{
bonuses += 1;
} else if (FOOD_VEGETARIAN.Equals(foodChallenge))
{
bonuses += 1;
}

if (FARMING_VERY_SLOW.Equals(farmingChallenge))
{
bonuses += 1;
} else if (FARMING_SLOW.Equals(farmingChallenge))
{
bonuses += 1;
}

if (MURK_DARK.Equals(murkiness))
{
bonuses++;
Expand Down
4 changes: 2 additions & 2 deletions DeathRun/DeathRunUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace DeathRun

public class DeathRunUtils
{
public const string VERSION = "2.1.1";
public const string VERSION = "2.2.0";

public static CenterText[] centerMessages = new CenterText[] {
new CenterText(250f, true),
Expand Down Expand Up @@ -286,7 +286,7 @@ public static void ShowHighScores(bool should)
}

highScoreLabel.setAlign(TextAnchor.MiddleCenter);
highScoreLabel.ShowMessage("Death Run 2.1.1 - Best Scores");
highScoreLabel.ShowMessage("Death Run " + VERSION + " - Best Scores");
highScoreTag.setAlign(TextAnchor.MiddleCenter);

int pick;
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Items/FilterChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class FilterChip : Equipable
public FilterChip() : base(
"FilterChip",
"Integrated Air Filter",
"Makes surface air breathable. Comes with a free Compass.")
"Makes surface air breathable and purges nitrogen from the bloodstream while indoors. Comes with a free Compass.")
{
}

Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Items/PhotosynthesisSmallTank.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DeathRun.Items
class PhotosynthesisSmallTank : O2TanksCore
{
public PhotosynthesisSmallTank()
: base(classID: "photosynthesissmalltank", friendlyName: "Small Photosynthesis Tank", description: "An O2 tank that houses microorganisms that produce oxygen in sunlight.")
: base(classID: "photosynthesissmalltank", friendlyName: "Small Photosynthesis Tank", description: "An air tank housing microorganisms which produce oxygen when exposed to sunlight.")
{
OnFinishedPatching += SetStaticTechType;
}
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Items/PhotosynthesisTank.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DeathRun.Items
class PhotosynthesisTank : O2TanksCore
{
public PhotosynthesisTank()
: base(classID: "photosynthesistank", friendlyName: "Photosynthesis Tank", description: "A lightweight O2 tank that houses microorganisms that produce oxygen in sunlight.")
: base(classID: "photosynthesistank", friendlyName: "Photosynthesis Tank", description: "A lightweight air tank housing microorganisms which produce oxygen when exposed to sunlight.")
{
OnFinishedPatching += SetStaticTechType;
}
Expand Down
2 changes: 1 addition & 1 deletion DeathRun/Items/ReinforcedStillSuit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override TechData GetBlueprintRecipe()
{
new Ingredient(TechType.Stillsuit, 1),
new Ingredient(DummySuitItems.RiverEelScaleID, 2),
new Ingredient(TechType.AramidFibers, 1),
new Ingredient(TechType.AramidFibers, 2),
}
};
}
Expand Down
3 changes: 2 additions & 1 deletion DeathRun/Items/ReinforcedSuitMark2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DeathRun.Items
class ReinforcedSuitMark2 : ReinforcedSuitsCore
{
public ReinforcedSuitMark2()
: base(classID: "reinforcedsuit2", friendlyName: "Reinforced Dive Suit Mark 2", description: "An upgraded dive suit capable of protecting the user at depths up to 1300m and provides protection up to 75C.")
: base(classID: "reinforcedsuit2", friendlyName: "Reinforced Dive Suit Mark 2", description: "An upgraded dive suit capable of protecting the user at depths up to 1300m and providing heat protection up to 75C.")
{
OnFinishedPatching += SetStaticTechType;
}
Expand All @@ -27,6 +27,7 @@ protected override TechData GetBlueprintRecipe()
Ingredients = new List<Ingredient>(3)
{
new Ingredient(TechType.ReinforcedDiveSuit, 1),
new Ingredient(TechType.AramidFibers, 1),
new Ingredient(TechType.AluminumOxide, 2),
new Ingredient(DummySuitItems.RiverEelScaleID, 2),
}
Expand Down
3 changes: 2 additions & 1 deletion DeathRun/Items/ReinforcedSuitMark3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DeathRun.Items
class ReinforcedSuitMark3 : ReinforcedSuitsCore
{
public ReinforcedSuitMark3()
: base(classID: "reinforcedsuit3", friendlyName: "Reinforced Dive Suit Mark 3", description: "An upgraded dive suit capable of protecting the user at all depths and provides protection up to 90C.")
: base(classID: "reinforcedsuit3", friendlyName: "Reinforced Dive Suit Mark 3", description: "An upgraded dive suit capable of protecting the user at all depths and providing heat protection up to 90C.")
{
OnFinishedPatching += SetStaticTechType;
}
Expand All @@ -27,6 +27,7 @@ protected override TechData GetBlueprintRecipe()
Ingredients = new List<Ingredient>(3)
{
new Ingredient(ReinforcedSuit2ID, 1),
new Ingredient(TechType.AramidFibers, 1),
new Ingredient(TechType.Kyanite, 2),
new Ingredient(DummySuitItems.LavaLizardScaleID, 2),
}
Expand Down
Loading

0 comments on commit 4160b45

Please sign in to comment.