~widelands-dev/widelands/notifications_buildingwindows

« back to all changes in this revision

Viewing changes to src/logic/player.cc

  • Committer: GunChleoc
  • Date: 2017-02-27 16:49:55 UTC
  • Revision ID: fios@foramnagaidhlig.net-20170227164955-5y8irz7t2ct6mpdr
Keep window open when construction finished, on start dismantle and on start enhance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
693
693
                        workers = building->get_workers();
694
694
                }
695
695
 
696
 
                Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kDeleted));
 
696
                // Register whether the window was open
 
697
                Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kStartWarp));
697
698
                building->remove(egbase());  //  no fire or stuff
698
699
                //  Hereafter the old building does not exist and building is a dangling
699
700
                //  pointer.
702
703
                           position, player_number_, index_of_new_building, false, former_buildings);
703
704
                else
704
705
                        building = &egbase().warp_dismantlesite(position, player_number_, false, former_buildings);
 
706
 
 
707
                // Open the new building window if needed
 
708
                Notifications::publish(NoteBuilding(building->serial(), NoteBuilding::Action::kFinishWarp));
 
709
 
705
710
                //  Hereafter building points to the new building.
706
711
 
707
712
                // Reassign the workers and soldiers.