@@ 998-1017 (lines=20) @@ | ||
995 | planet = client.get(self.planetID, noUpdate = 1) |
|
996 | self.techInfoDlg.display(planet.slots[self.plInfoData][Const.STRUCT_IDX_TECHID]) |
|
997 | ||
998 | def onMoveTaskFirstLast(self, widget, action, data): |
|
999 | try: |
|
1000 | self.win.setStatus(_('Executing MOVE TASK command...')) |
|
1001 | planet = client.get(self.planetID, noUpdate = 1) |
|
1002 | ||
1003 | if widget.data == -1: |
|
1004 | rel = -1 * self.plInfoData |
|
1005 | pos = 0 |
|
1006 | else: |
|
1007 | rel = len(planet.prodQueue) - self.plInfoData - 1 |
|
1008 | pos = len(planet.prodQueue) - 1 |
|
1009 | ||
1010 | planet.prodQueue = client.cmdProxy.moveConstrItem(self.planetID, self.plInfoData, rel) |
|
1011 | self.plInfoData = self.plInfoDataSelected = pos |
|
1012 | self.showPlanet() |
|
1013 | self.win.vPQueue.selectItem(self.win.vPQueue.items[self.plInfoData]) |
|
1014 | self.win.setStatus(_('Command has been executed.')) |
|
1015 | except ige.GameException, e: |
|
1016 | self.win.setStatus(e.args[0]) |
|
1017 | return |
|
1018 | ||
1019 | def onMoveTask(self, widget, action, data): |
|
1020 | try: |
|
@@ 942-960 (lines=19) @@ | ||
939 | self.win.setStatus(e.args[0]) |
|
940 | return |
|
941 | ||
942 | def onMoveStructFirstLast(self, widget, action, data): |
|
943 | try: |
|
944 | self.win.setStatus(_('Executing MOVE STRUCTURE command...')) |
|
945 | planet = client.get(self.planetID, noUpdate = 1) |
|
946 | if widget.data == -1: |
|
947 | rel = -1 * self.plInfoData |
|
948 | pos = 0 |
|
949 | else: |
|
950 | rel = len(planet.slots) - self.plInfoData - 1 |
|
951 | pos = len(planet.slots) - 1 |
|
952 | ||
953 | planet.slots = client.cmdProxy.moveStruct(self.planetID, self.plInfoData, rel) |
|
954 | self.plInfoData = self.plInfoDataSelected = pos |
|
955 | self.showPlanet() |
|
956 | self.win.vPSlots.selectItem(self.win.vPSlots.items[self.plInfoData]) |
|
957 | self.win.setStatus(_('Command has been executed.')) |
|
958 | except ige.GameException, e: |
|
959 | self.win.setStatus(e.args[0]) |
|
960 | return |
|
961 | ||
962 | def onSwitchStructOnOff(self, widget, action, data): |
|
963 | try: |