Quantum-Engineering/BlockSelector.cs

402 lines
17 KiB
C#
Raw Normal View History

2020-09-03 03:09:26 -04:00
public class BlockSelector
{
private PlayerController playerController;
2020-09-03 03:09:26 -04:00
public BlockSelector(PlayerController playerController)
2020-09-03 03:09:26 -04:00
{
this.playerController = playerController;
2020-09-03 03:09:26 -04:00
}
// Changes the currently selected building block.
public void NextBlock()
2020-09-03 03:09:26 -04:00
{
if (playerController.buildType.Equals("Glass Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Brick";
playerController.previousBuildType = "Glass Block";
playerController.nextBuildType = "Iron Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Brick"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Iron Block";
playerController.previousBuildType = "Brick";
playerController.nextBuildType = "Iron Ramp";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Iron Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Iron Ramp";
playerController.previousBuildType = "Iron Block";
playerController.nextBuildType = "Steel Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Iron Ramp"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Steel Block";
playerController.previousBuildType = "Iron Ramp";
playerController.nextBuildType = "Steel Ramp";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Steel Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Steel Ramp";
playerController.previousBuildType = "Steel Block";
playerController.nextBuildType = "Quantum Hatchway";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Steel Ramp"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Quantum Hatchway";
playerController.previousBuildType = "Steel Ramp";
playerController.nextBuildType = "Storage Container";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Quantum Hatchway"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Storage Container";
playerController.previousBuildType = "Quantum Hatchway";
playerController.nextBuildType = "Storage Computer";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Storage Container"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Storage Computer";
playerController.previousBuildType = "Storage Container";
playerController.nextBuildType = "Electric Light";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Storage Computer"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Electric Light";
playerController.previousBuildType = "Storage Computer";
playerController.nextBuildType = "Auger";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Electric Light"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Auger";
playerController.previousBuildType = "Electric Light";
playerController.nextBuildType = "Extruder";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Auger"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Extruder";
playerController.previousBuildType = "Auger";
playerController.nextBuildType = "Press";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Extruder"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Press";
playerController.previousBuildType = "Extruder";
playerController.nextBuildType = "Smelter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Press"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Smelter";
playerController.previousBuildType = "Press";
playerController.nextBuildType = "Universal Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Smelter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Universal Conduit";
playerController.previousBuildType = "Smelter";
playerController.nextBuildType = "Retriever";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Universal Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Retriever";
playerController.previousBuildType = "Universal Conduit";
playerController.nextBuildType = "Rail Cart Hub";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Retriever"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Rail Cart Hub";
playerController.previousBuildType = "Retriever";
playerController.nextBuildType = "Rail Cart";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Rail Cart Hub"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Rail Cart";
playerController.previousBuildType = "Rail Cart Hub";
playerController.nextBuildType = "Universal Extractor";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Rail Cart"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Universal Extractor";
playerController.previousBuildType = "Rail Cart";
playerController.nextBuildType = "Solar Panel";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Universal Extractor"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Solar Panel";
playerController.previousBuildType = "Universal Extractor";
playerController.nextBuildType = "Generator";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Solar Panel"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Generator";
playerController.previousBuildType = "Solar Panel";
playerController.nextBuildType = "Nuclear Reactor";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Generator"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Nuclear Reactor";
playerController.previousBuildType = "Generator";
playerController.nextBuildType = "Reactor Turbine";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Nuclear Reactor"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Reactor Turbine";
playerController.previousBuildType = "Nuclear Reactor";
playerController.nextBuildType = "Power Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Reactor Turbine"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Power Conduit";
playerController.previousBuildType = "Reactor Turbine";
playerController.nextBuildType = "Heat Exchanger";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Power Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Heat Exchanger";
playerController.previousBuildType = "Power Conduit";
playerController.nextBuildType = "Alloy Smelter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Heat Exchanger"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Alloy Smelter";
playerController.previousBuildType = "Heat Exchanger";
playerController.nextBuildType = "Gear Cutter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Alloy Smelter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Gear Cutter";
playerController.previousBuildType = "Alloy Smelter";
playerController.nextBuildType = "Auto Crafter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Gear Cutter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Auto Crafter";
playerController.previousBuildType = "Gear Cutter";
playerController.nextBuildType = "Dark Matter Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Auto Crafter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Dark Matter Conduit";
playerController.previousBuildType = "Auto Crafter";
playerController.nextBuildType = "Dark Matter Collector";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Dark Matter Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Dark Matter Collector";
playerController.previousBuildType = "Dark Matter Conduit";
playerController.nextBuildType = "Turret";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Dark Matter Collector"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Turret";
playerController.previousBuildType = "Dark Matter Collector";
playerController.nextBuildType = "Glass Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Turret"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Glass Block";
playerController.previousBuildType = "Turret";
playerController.nextBuildType = "Iron Block";
2020-09-03 03:09:26 -04:00
}
playerController.displayingBuildItem = true;
playerController.buildItemDisplayTimer = 0;
playerController.destroyTimer = 0;
playerController.buildTimer = 0;
playerController.PlayButtonSound();
2020-09-03 03:09:26 -04:00
}
// Changes the currently selected building block.
public void PreviousBlock()
2020-09-03 03:09:26 -04:00
{
if (playerController.buildType.Equals("Turret"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Dark Matter Collector";
playerController.previousBuildType = "Dark Matter Conduit";
playerController.nextBuildType = "Turret";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Dark Matter Collector"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Dark Matter Conduit";
playerController.previousBuildType = "Auto Crafter";
playerController.nextBuildType = "Dark Matter Collector";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Dark Matter Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Auto Crafter";
playerController.previousBuildType = "Gear Cutter";
playerController.nextBuildType = "Dark Matter Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Auto Crafter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Gear Cutter";
playerController.previousBuildType = "Alloy Smelter";
playerController.nextBuildType = "Auto Crafter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Gear Cutter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Alloy Smelter";
playerController.previousBuildType = "Heat Exchanger";
playerController.nextBuildType = "Gear Cutter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Alloy Smelter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Heat Exchanger";
playerController.previousBuildType = "Power Conduit";
playerController.nextBuildType = "Alloy Smelter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Heat Exchanger"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Power Conduit";
playerController.previousBuildType = "Reactor Turbine";
playerController.nextBuildType = "Heat Exchanger";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Power Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Reactor Turbine";
playerController.previousBuildType = "Nuclear Reactor";
playerController.nextBuildType = "Power Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Reactor Turbine"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Nuclear Reactor";
playerController.previousBuildType = "Generator";
playerController.nextBuildType = "Reactor Turbine";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Nuclear Reactor"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Generator";
playerController.previousBuildType = "Solar Panel";
playerController.nextBuildType = "Nuclear Reactor";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Generator"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Solar Panel";
playerController.previousBuildType = "Universal Extractor";
playerController.nextBuildType = "Generator";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Solar Panel"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Universal Extractor";
playerController.previousBuildType = "Rail Cart";
playerController.nextBuildType = "Solar Panel";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Universal Extractor"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Rail Cart";
playerController.previousBuildType = "Rail Cart Hub";
playerController.nextBuildType = "Universal Extractor";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Rail Cart"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Rail Cart Hub";
playerController.previousBuildType = "Retriever";
playerController.nextBuildType = "Rail Cart";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Rail Cart Hub"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Retriever";
playerController.previousBuildType = "Universal Conduit";
playerController.nextBuildType = "Rail Cart Hub";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Retriever"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Universal Conduit";
playerController.previousBuildType = "Smelter";
playerController.nextBuildType = "Retriever";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Universal Conduit"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Smelter";
playerController.previousBuildType = "Press";
playerController.nextBuildType = "Universal Conduit";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Smelter"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Press";
playerController.previousBuildType = "Extruder";
playerController.nextBuildType = "Smelter";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Press"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Extruder";
playerController.previousBuildType = "Auger";
playerController.nextBuildType = "Press";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Extruder"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Auger";
playerController.previousBuildType = "Electric Light";
playerController.nextBuildType = "Extruder";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Auger"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Electric Light";
playerController.previousBuildType = "Storage Computer";
playerController.nextBuildType = "Auger";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Electric Light"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Storage Computer";
playerController.previousBuildType = "Storage Container";
playerController.nextBuildType = "Electric Light";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Storage Computer"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Storage Container";
playerController.previousBuildType = "Quantum Hatchway";
playerController.nextBuildType = "Storage Computer";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Storage Container"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Quantum Hatchway";
playerController.previousBuildType = "Steel Ramp";
playerController.nextBuildType = "Storage Container";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Quantum Hatchway"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Steel Ramp";
playerController.previousBuildType = "Steel Block";
playerController.nextBuildType = "Quantum Hatchway";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Steel Ramp"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Steel Block";
playerController.previousBuildType = "Iron Ramp";
playerController.nextBuildType = "Steel Ramp";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Steel Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Iron Ramp";
playerController.previousBuildType = "Iron Block";
playerController.nextBuildType = "Steel Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Iron Ramp"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Iron Block";
playerController.previousBuildType = "Brick";
playerController.nextBuildType = "Iron Ramp";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Iron Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Brick";
playerController.previousBuildType = "Glass Block";
playerController.nextBuildType = "Iron Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Brick"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Glass Block";
playerController.previousBuildType = "Turret";
playerController.nextBuildType = "Iron Block";
2020-09-03 03:09:26 -04:00
}
else if (playerController.buildType.Equals("Glass Block"))
2020-09-03 03:09:26 -04:00
{
playerController.buildType = "Turret";
playerController.previousBuildType = "Dark Matter Collector";
playerController.nextBuildType = "Glass Block";
2020-09-03 03:09:26 -04:00
}
playerController.displayingBuildItem = true;
playerController.buildItemDisplayTimer = 0;
playerController.destroyTimer = 0;
playerController.buildTimer = 0;
playerController.PlayButtonSound();
2020-09-03 03:09:26 -04:00
}
}