def setInitialInteraction(self, dialogLine, choices, title=None): self.title = title if dialogLine == None: self.interactPane.disable() return con = GetMoMClientDBConnection() try: text, journalEntryID = con.execute( "SELECT text,journal_entry_id FROM dialog_line WHERE id=? LIMIT 1;", (dialogLine, )).fetchone() except: text = None journalEntryID = None if text: self.interactPane.text = "" self.interactPane.enable() self.interactPane.setInteraction(text, choices) else: self.interactPane.disable() if journalEntryID: from journalWnd import JOURNALWND journalTopic, journalEntry = con.execute( "SELECT topic,entry FROM journal_entry WHERE id = %i LIMIT 1;" % journalEntryID).fetchone() JOURNALWND.addEntry(journalTopic, journalEntry, text)
def setInitialInteraction(self, dialogLine, choices, title=None): self.title = title if dialogLine == None: self.interactPane.disable() return con = GetMoMClientDBConnection() try: text,journalEntryID = con.execute("SELECT text,journal_entry_id FROM dialog_line WHERE id=? LIMIT 1;",(dialogLine,)).fetchone() except: text = None journalEntryID = None if text: self.interactPane.text = "" self.interactPane.enable() self.interactPane.setInteraction(text,choices) else: self.interactPane.disable() if journalEntryID: from journalWnd import JOURNALWND journalTopic,journalEntry = con.execute("SELECT topic,entry FROM journal_entry WHERE id = %i LIMIT 1;"%journalEntryID).fetchone() JOURNALWND.addEntry(journalTopic,journalEntry,text)
def remote_set(self,text,choices,journalEntryID=None): self.setInteraction(text,choices) if journalEntryID: from journalWnd import JOURNALWND con = GetMoMClientDBConnection() journalTopic,journalEntry = con.execute("SELECT topic,entry FROM journal_entry WHERE id = %i LIMIT 1;"%journalEntryID).fetchone() JOURNALWND.addEntry(journalTopic,journalEntry,text)
def remote_set(self, text, choices, journalEntryID=None): self.setInteraction(text, choices) if journalEntryID: from journalWnd import JOURNALWND con = GetMoMClientDBConnection() journalTopic, journalEntry = con.execute( "SELECT topic,entry FROM journal_entry WHERE id = %i LIMIT 1;" % journalEntryID).fetchone() JOURNALWND.addEntry(journalTopic, journalEntry, text)