message: Update SeedSmelter to use the re-declaration of production as StorableResources
diff: @@ -15,22 +15,20 @@ public:
  maxAge(150);
  turnsToBuild(6);
  requiresCHAP(false);
  -
  - oreStorage().capacity(StorageCapacity);
  }
  - void input(ResourcePool& _resourcePool) override
  + void input(StorableResources& resources) override
  {
  if (!operational()) { return; }
  - if (oreStorage().atCapacity()) { return; }
  + if (oreStorage() >= StorableResources{ StorageCapacity }) { return; }
  - oreStorage().pushResources(_resourcePool);
  + oreStorage() = oreStorage() + resources;
  }
  protected:
  // Simply to help in understanding what the internal resource pools are being used for.
  - ResourcePool& oreStorage() { return production(); }
  + StorableResources& oreStorage() { return production(); }
  protected:
  @@ -55,29 +53,15 @@ protected:
  int resource_units = constants::MINIMUM_RESOURCES_REQUIRE_FOR_SMELTING;
  StorableResources converted;
  + StorableResources& ore = oreStorage();
  - if (oreStorage().commonMetalsOre() >= resource_units)
  - {
  - converted.resources[0] = resource_units / 2;
  - oreStorage().commonMetalsOre(oreStorage().commonMetalsOre() - resource_units);
  - }
  -
  - if (oreStorage().commonMineralsOre() >= resource_units)
  + for (size_t i = 0; i < ore.resources.size(); ++i)
  {
  - converted.resources[1] = resource_units / 2;
  - oreStorage().commonMineralsOre(oreStorage().commonMineralsOre() - resource_units);
  - }
  -
  - if (oreStorage().rareMetalsOre() >= resource_units)
  + if (ore.resources[i] >= resource_units)
  {
  - converted.resources[2] = resource_units / 3;
  - oreStorage().rareMetalsOre(oreStorage().rareMetalsOre() - resource_units);
  + converted.resources[i] = resource_units / 2;
  + ore.resources[i] = ore.resources[i] - resource_units;
  }
  -
  - if (oreStorage().rareMineralsOre() >= resource_units)
  - {
  - converted.resources[4] = resource_units / 3;
  - oreStorage().rareMineralsOre(oreStorage().rareMineralsOre() - resource_units);
  }
  auto total = storage() + converted;
  @@ -86,7 +70,7 @@ protected:
  if (overflow > StorableResources{ 0 })
  {
  - // add overflow back into production queue
  + ore = ore + overflow;
  idle(IdleReason::IDLE_INTERNAL_STORAGE_FULL);
  }
  }
  