//adds cash from contract to your cash reserve
 public void cashContract(ContractBase contract)
 {
     if(!contract.repeatable) contract.accepted = true;
     //float cashInflux = contract.finalPerf * contract.diff;
     float cashInflux = 0;
     if (contract.getCachedPerformance() > 1)
         cashInflux = contract.rewardMoney;
     cashInflux *= cashInflowMultiplier;
     hellBucks += cashInflux;
     reputation += contract.getCachedPerformance();
 }
 public void GenerateContracts()
 {
     System.Random rnd = new System.Random((int)System.DateTime.Now.Ticks);
     for(int x = 0; x < 5; x++)
     {
         int difficulty = (int)Mathf.Min(5,Mathf.Max(reputation / 20 + rnd.Next(-1, 1), 1));
         open_contracts[x] = new ContractBase(difficulty);
     }
 }
 private void cacheContract(ContractBase contract)
 {
     //called after assignDemon
       if(!contract.repeatable) contract.accepted = true;
     cachedContracts.Add (contract);
 }
 //methods
 void Start()
 {
     /*Recipes.instance = new Recipes ();
     Recipes.instance.RecipeStart ();*/
     reputation = 30;
     open_contracts = new ContractBase[6];
     for(int i = 0; i < open_contracts.Length; i++) {
         open_contracts[i] = new ContractBase (1F);
     }
     HeldIngredients = new Dictionary<string, int>();
     foreach (KeyValuePair<string, Ingredients> pair in Recipes.instance.name_ingredient)
     {
         HeldIngredients.Add(pair.Key, 0);
     }
     open_contracts[5] = new GatherQuest();
     GenerateContracts();
     instance = this;
     roundManager = GetComponent<RoundManager>();
 }
 //click quest, set it to active if not repeating, go to demon screen
 public void goToDemonAssignment(int contractIndex)
 {
     //call when you click a contract
     demonScreen.SetActive (true);
     requestScreen.SetActive (false);
     currentUnassignedContract = open_contracts[contractIndex];
     topRightField.text = open_contracts [contractIndex].contractName;
     Debug.Log (open_contracts[contractIndex].contractName);
 }