def select_date(self): """This is a special case, because do_date() will either return a message to be shown, \ or return an instance of datechoose. """ result = self.gurl.do_date() if isinstance(result, str): self.update_conversation(result) elif isinstance(result, DateChoose): msg = "Wow, I sure will be excited to go to the {} when that feature \ is implemented!".format(result.loc_name) self.update_conversation(msg) import kitchen date_scene = DateScene(self.gurl, bg_img=datingsim.locs[result.curr_tile.loc_key].bg_img) kitchen.push_scene(date_scene) self.done = True else: raise Error("Invalid result {} from gurl.do_date()!".format(result))
def initiate_meet(): """Choose three random gurls and run main_loop on InitiateMeet instance. \ then use <instance>.choice value to start up a MeetScene instance. \ After calling main_loop on MeetScene instance, either return to \ location or return to WorldMap depending on whether a date was \ initiated. """ gurls = [Kanaya(), Isadora()] bg_surf = pygame.display.get_surface() instance = InitiateMeet(gurls, bg_surf) instance.main_loop() if instance.choice == None: return False else: import kitchen kitchen.push_scene(MeetScene(instance.choice)) return Location.STATUS_NEXT_SCENE
def on_click(): import kitchen kitchen.push_scene(loc) return True