def draw(self):
     #TODO Check who I belong to
     #check who player is
     #check if close to sentry
     #draw
     flag = False
     network = PEG_mainLoop.mainLoop().entityDict['Network']
     #OR nearby a sentry
     #if network.server or pedo_lookup.teamMap[network.color] == self.team:
     if True:
         flag = True
     if flag:
         if self.sides > 1:
             pygame.draw.polygon(
                                 PEG_mainLoop.mainLoop().screen,
                                 self.color,
                                 PEG_draw.getNgon(
                                                  self.sides, 
                                                  BUILDING_DRAW_RADIUS, 
                                                  PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition())),
                                 1
                                 )
         else:
             pygame.draw.circle(
                            PEG_mainLoop.mainLoop().screen,
                            self.color,
                            PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition()).getIntTuple(),
                            5,
                            1
                            )
def pointFunctionExpandingGonNova(pos, radius, sides = 15, arg02 = None, arg03 = None):
    return PEG_draw.getNgon(sides,radius,pos)
 def f(pos,radius,arg01=None,arg02=None,arg03=None):
     return PEG_draw.getNgon(sides,radius,pos)
    def draw(self):     
        #self.drawSelfLines()
#===============================================================================
#        pygame.draw.circle(
#                           PEG_mainLoop.mainLoop().screen,
#                           FL_COLOR_OUTER_RADIUS_CIRCLE,
#                           PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition()).getIntTuple(),
#                           OUTER_RADIUS/2,
#                           1
#                           )
#===============================================================================
        
        #TODO we should make it so we only draw resources if one is on the same team
        if self.resources == 1 or self.sides < 3:
            pygame.draw.circle(
                   PEG_mainLoop.mainLoop().screen,
                   self.color,
                   PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition()).getIntTuple(),
                   3,
                   1
                   )
            
        #TODO this is areally bad fix, come up with a better one.
        try:
            if self.resources > 1:
                print self.resources
                pygame.draw.polygon(
                                    PEG_mainLoop.mainLoop().screen,
                                    (255,255,255),
                                    PEG_draw.getNgon(
                                                     self.resources, 
                                                     PLAYER_RESOURCE_DRAW_RADIUS, 
                                                     PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition())),
                                    1
                                    )
        except: print "drawing at line 658 in PEG_entity screwed up as usual :(((("
            
#===============================================================================
#        pygame.draw.circle(
#                           PEG_mainLoop.mainLoop().screen,
#                           FL_COLOR_INNER_RADIUS_CIRCLE,
#                           PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition()).getIntTuple(),
#                           INNER_RADIUS,
#                           1
#                           )
#===============================================================================
        
        if self.sides == 999:
            if pygame.time.get_ticks() % 3 == 1:
                self.dsides = random.randint(3,10)
        else:
            self.dsides = self.sides
            
        #TODO do exception case when sides == 0 we should draw something else (like a circle)
        #TODO FIX SOME BUG HERE????
        if self.dsides > 1:
            pygame.draw.polygon(
                                PEG_mainLoop.mainLoop().screen,
                                self.color,
                                PEG_draw.getNgon(
                                                 self.dsides, 
                                                 PLAYER_DRAW_RADIUS, 
                                                 PEG_mainLoop.mainLoop().cam.convertCrds(self.pos.getPosition())),
                                1
                                )
        
        if self.controlled:
            self.serialRoutine()