Comment 4 for bug 1834151

Revision history for this message
GunChleoc (gunchleoc) wrote :

The function that triggers this - it's the NEVER_HERE(); line.

void CmdSetWarePriority::execute(Game& game) {
 MapObject* mo = game.objects().get_object(serial_);
 if (upcast(ConstructionSite, cs, mo)) {
  if (upcast(ProductionsiteSettings, s, cs->get_settings())) {
   for (auto& pair : s->ware_queues) {
    if (pair.first == index_) {
     pair.second.priority = priority_;
     return;
    }
   }
   NEVER_HERE();
  }
 } else if (upcast(Building, psite, mo)) {
  if (psite->owner().player_number() == sender()) {
   psite->set_priority(type_, index_, priority_);
  }
 }
}