#pragma once
#include "GroupTacticalAction.h"
#include "../../../../PerceptualState/Locations/Static/AutoPopulated/BaseLocation.h"

class Collect : public virtual GroupTacticalAction
{
public:
  Collect(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, BaseLocation* baseLocation)
    : GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
    , m_baseLocation(baseLocation)
  {
  }

public:
  BaseLocation* getMiningLocation() const
  {
    return m_baseLocation;
  }

protected:
  BaseLocation* const m_baseLocation;
};

class CollectMinerals : public virtual Collect
{
public:
  CollectMinerals(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, BaseLocation* baseLocation)
    : Collect(parent, priority, initialGroup, baseLocation)
    , GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
  {
  }

protected:
  virtual void _output(std::ostream& out) const
  {
    Collect::_output(out);
    out << "Collect-Minerals(" << getGroup()->getName() << ", " << *m_baseLocation << ")";
  }
};

class CollectGas : public virtual Collect
{
public:
  CollectGas(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, BaseLocation* baseLocation)
    : Collect(parent, priority, initialGroup, baseLocation)
    , GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
  {
  }

protected:
  virtual void _output(std::ostream& out) const
  {
    Collect::_output(out);
    out << "CollectGas(" << getGroup()->getName() << ", " << *m_baseLocation << ")";
  }
};