예제 #1
0
파일: space.py 프로젝트: pegue/naev
 def __commodity_add(self, wgt=None, event=None):
     commodity = self.__pwidget("comCommodities").get_active_text()
     if commodity != "None" and self.cur_planet != "":
         planet = self.planets[self.cur_planet]
         try:
             planet["general"]["commodities"].append(commodity)
             data.uniq(planet["general"]["commodities"])
         except:
             planet["general"]["commodities"] = [commodity]
         self.__pupdate()
예제 #2
0
파일: space.py 프로젝트: pegue/naev
    def __jump_add(self, wgt=None, event=None):
        if self.space_sel == self.cur_system:  # can't add to self
            return

        if self.space_sel in self.systems.keys() and self.cur_system in self.systems.keys():
            self.systems[self.cur_system]["jumps"].append(self.space_sel)
            self.systems[self.space_sel]["jumps"].append(self.cur_system)
            data.uniq(self.systems[self.cur_system]["jumps"])
            data.uniq(self.systems[self.space_sel]["jumps"])
            self.__supdate()
            self.__space_draw()