def __requesToCreate(self, uid):
     buildingTypeID = self.getBuildingIDbyUID(uid)
     result = yield self.fortProvider.sendRequest(BuildingCtx(buildingTypeID, self.__buildingDirection, self.__buildingPosition, waitingID='fort/building/add'))
     if result:
         g_fortSoundController.playCreateBuilding()
         building = self.fortCtrl.getFort().getBuilding(buildingTypeID)
         SystemMessages.g_instance.pushI18nMessage(SYSTEM_MESSAGES.FORTIFICATION_BUILDINGPROCESS, buildingName=building.userName, type=SystemMessages.SM_TYPE.Warning)
     self.destroy()
Пример #2
0
 def __requestToDelete(self):
     buildingTypeID = self.getBuildingIDbyUID(self.__buildingID)
     building = self.fortCtrl.getFort().getBuilding(buildingTypeID)
     result = yield self.fortProvider.sendRequest(
         BuildingCtx(buildingTypeID,
                     isAdd=False,
                     waitingID='fort/building/delete'))
     if result:
         g_fortSoundController.playDeleteBuilding()
         SystemMessages.pushI18nMessage(
             SYSTEM_MESSAGES.FORTIFICATION_DEMOUNTBUILDING,
             buildingName=building.userName,
             type=SystemMessages.SM_TYPE.Warning)
     self.destroy()