Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newly constructed warehouse inventory popup #524

Open
tlongstretch opened this issue Feb 25, 2023 · 0 comments
Open

newly constructed warehouse inventory popup #524

tlongstretch opened this issue Feb 25, 2023 · 0 comments

Comments

@tlongstretch
Copy link

When a new warehouse is constructed, it makes sense that it should not show inventory and not be able to change serf/resource in/out state until the building is active (a serf has occupied it). Freeserf checks for active state, but this is the wrong check as the building never becomes 'active'. Instead, suggest using building->has_serf as it has already passed the is_done check.

inside Viewport::handle_special_click

    } else if (building->get_type() == Building::TypeStock) {
          if (!building->is_active()) return 0;

I suggest changing to this, even if isn't true to the original game

    } else if (building->get_type() == Building::TypeStock) {
          if (building->has_serf()){
            // building has holder (Serf::TypeTransporterInventory)
            interface->open_popup(PopupBox::TypeCastleRes);
          }else{
            // holder has not yet arrived, don't draw full detailed inventory
            interface->open_popup(PopupBox::TypeBldStock);
          }

this produces the following popup if a new stock is special-clicked before its sef has arrived
Screenshot from 2023-02-24 23-00-18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant