コード例 #1
0
ファイル: gamemap.py プロジェクト: JohnByrne/pyDF
 def get_selected_items(self):
     selected = []
     for z in xrange(self.zlevels):
         for x in range(int(self.startXTile), int(self.startXTile + self.numXTiles)):
             for y in range(int(self.startYTile), int(self.startYTile + self.numYTiles)):
                 val = self.checkMapContent(x, y, z)
                 if val != None:
                     for item in val:
                         if item.selected == True and item.inqueue == False:
                             selected.append((x, y, z))
     return selected
コード例 #2
0
ファイル: gamemap.py プロジェクト: JohnByrne/pyDF
 def get_selected(self, type):
     # will need to fix this also at some point to adjust for zlevels
     selected = []
     for z in xrange(self.zlevels):
         for x in range(int(self.startXTile), int(self.startXTile + self.numXTiles)):
             for y in range(int(self.startYTile), int(self.startYTile + self.numYTiles)):
                 val = self.checkEMap(x, y, z)
                 if val == 1:
                     continue
                 elif val == type: 
                     selected.append((x, y, z))
     return selected
コード例 #3
0
ファイル: gamemap.py プロジェクト: wty0512/pyDF
 def get_selected_items(self):
     selected = []
     for z in range(self.zlevels):
         for x in range(int(self.startXTile), int(self.startXTile + self.numXTiles)):
             for y in range(
                 int(self.startYTile), int(self.startYTile + self.numYTiles)
             ):
                 val = self.checkMapContent(x, y, z)
                 if val is not None:
                     for item in val:
                         if item.selected and not item.inqueue:
                             selected.append((x, y, z))
     return selected
コード例 #4
0
ファイル: gamemap.py プロジェクト: wty0512/pyDF
 def get_selected(self, type):
     # will need to fix this also at some point to adjust for zlevels
     selected = []
     for z in range(self.zlevels):
         for x in range(int(self.startXTile), int(self.startXTile + self.numXTiles)):
             for y in range(
                 int(self.startYTile), int(self.startYTile + self.numYTiles)
             ):
                 val = self.checkEMap(x, y, z)
                 if val == 1:
                     continue
                 elif val == type:
                     selected.append((x, y, z))
     return selected