#pragma once
#include "Layer3Process.h"
#include "../../../../PerceptualState/Resources/ResourceManager.h"

//
// Input: gas/mineral ratio
//

class ManageResourcesProcess : public Layer3Process
{
public:
  ManageResourcesProcess(const Process* parent)
    : Layer3Process(parent, Scheduler::SCHEDULING_MEDIUM_PRIORITY, 12, 0)
    , m_targetResourcesAcquisitionPercentage(1., 0.)
  {
  }

  virtual void run();

  void updateResourcesAcquisitionPercentage(ResourcesAcquisitionPercentage targetResourcesAcquisitionPercentage);

  /////////
  // GUI //
  /////////
  ResourcesAcquisitionPercentage getTargetResourcesAcquisitionPercentage() const
  {
    return m_targetResourcesAcquisitionPercentage;
  }

protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Manage resources";
  }

  virtual void onStart();

  ResourcesAcquisitionPercentage m_targetResourcesAcquisitionPercentage;
};
