+ elif isinstance (npc, npcs.Mayor):
+ # interact with the Mayor
+ self.interact_npc_mayor (npc)
+
+ # interact with the mayor
+ def interact_npc_mayor (self, npc):
+ resp_id = None
+
+ if gamestate.flag["mission_charity_money"] is True:
+ npc.currentdialog = 2
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+ elif gamestate.flag["mission_charity_informed_mayor"] is True:
+ npc.currentdialog = 1
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+ else:
+ npc.currentdialog = 0
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+
+
+ # deal with the respnses
+ if resp_id == "missioncharityaccepted":
+ gamestate.flag["mission_charity_money"] = True
+ # response ID is none
+ elif resp_id is None:
+ self.status_message = "You cannot initiate a conversation with %s" % npc.charname