//Returns a String containing the output for the potential rewards. private String GetTextFromDrop(Drop drop) { String s = ""; if (drop == null) { return(""); } s = s + drop.Name + " "; return(s); }
public void SetDrop(int num, Drop d) { if (num == 1) { drop1 = d; } else if (num == 2) { drop2 = d; } }
//Set method to assign all values, called from contstructor private void Set(int manp, int ammo, int ration, int part, double timetaken, int numDrops, Drop d1, Drop d2) { Manpower = manp; Ammunition = ammo; Rations = ration; Parts = part; Time = timetaken; NumOfDrops = numDrops; drop1 = d1; drop2 = d2; }
//Mission contructor //Called from Form.cs, sets up all the Logistic objects, no parameters as we dont need them public Mission() { emptyDrop = new Drop("", 0); tDoll = new Drop("T-Doll Contact", 1); equip = new Drop("Equipment Contract", 2); construct = new Drop("Instant Construction", 3); repair = new Drop("Instant Repair", 4); token = new Drop("Token", 5); //White = tdoll, Blue = equipment, Orange = construct, Green = repair, Dot = token emptyMission = new Logistic(0, 0, 0, 0, 0); //Chapter 0 c0e1 = new Logistic(0, 145, 145, 0, 50, 2, construct, repair); c0e2 = new Logistic(550, 0, 0, 350, 180, 1, tDoll); c0e3 = new Logistic(900, 900, 900, 250, 720, 2, equip, repair); c0e4 = new Logistic(0, 1200, 800, 750, 1440, 1, token); //Chapter 1 c1e1 = new Logistic(10, 30, 15, 0, 15); c1e2 = new Logistic(0, 40, 60, 0, 30); c1e3 = new Logistic(30, 0, 30, 10, 60, 1, repair); c1e4 = new Logistic(160, 160, 0, 0, 120, 1, tDoll); //Chapter 2 c2e1 = new Logistic(100, 0, 0, 30, 40); c2e2 = new Logistic(60, 200, 80, 0, 90, 1, repair); c2e3 = new Logistic(10, 10, 10, 230, 240, 2, construct, repair); c2e4 = new Logistic(0, 250, 600, 60, 360, 1, tDoll); //Chapter 3 c3e1 = new Logistic(50, 0, 75, 0, 20); c3e2 = new Logistic(0, 120, 70, 30, 45); c3e3 = new Logistic(0, 300, 0, 0, 90, 2, construct, repair); c3e4 = new Logistic(0, 0, 300, 300, 300, 2, tDoll, equip); //Chapter 4 c4e1 = new Logistic(0, 185, 185, 0, 60, 1, equip); c4e2 = new Logistic(0, 0, 0, 210, 120, 1, construct); c4e3 = new Logistic(800, 550, 0, 0, 360, 2, tDoll, repair); c4e4 = new Logistic(400, 400, 400, 0, 480, 1, construct); //Chapter 5 c5e1 = new Logistic(0, 0, 100, 45, 30); c5e2 = new Logistic(0, 600, 300, 0, 150, 1, repair); c5e3 = new Logistic(800, 400, 400, 0, 240, 1, equip); c5e4 = new Logistic(100, 0, 0, 700, 400, 1, tDoll); //Chapter 6 c6e1 = new Logistic(300, 300, 0, 100, 120); c6e2 = new Logistic(0, 200, 550, 100, 180, 2, construct, equip); c6e3 = new Logistic(0, 0, 200, 500, 300, 1, equip); c6e4 = new Logistic(800, 800, 800, 0, 720, 1, token); //Chapter 7 c7e1 = new Logistic(650, 0, 650, 0, 150); c7e2 = new Logistic(0, 650, 0, 300, 240, 2, construct, repair); c7e3 = new Logistic(900, 600, 600, 0, 330, 1, equip); c7e4 = new Logistic(250, 250, 250, 600, 480, 1, construct); //Chapter 8 c8e1 = new Logistic(150, 150, 150, 0, 60, 1, equip); c8e2 = new Logistic(0, 0, 0, 450, 180, 1, repair); c8e3 = new Logistic(400, 600, 800, 0, 360, 2, construct, repair); c8e4 = new Logistic(1500, 400, 400, 100, 540, 1, tDoll); //Chapter 9 c9e1 = new Logistic(0, 0, 100, 50, 30); c9e2 = new Logistic(180, 0, 180, 100, 90, 1, construct); c9e3 = new Logistic(750, 750, 0, 0, 270, 1, tDoll); c9e4 = new Logistic(500, 900, 900, 0, 420, 1, equip); //Chapter 10 c10e1 = new Logistic(140, 200, 0, 0, 40); c10e2 = new Logistic(0, 240, 180, 0, 100, 2, tDoll, construct); c10e3 = new Logistic(0, 480, 480, 300, 320, 2, construct, repair); c10e4 = new Logistic(660, 660, 660, 360, 600, 1, equip); }
//Constructor with 2 drops public Logistic(int manp, int ammo, int ration, int part, double timetaken, int numDrops, Drop d1, Drop d2) { Set(manp, ammo, ration, part, timetaken, numDrops, d1, d2); }