#####################################################################
#                INTERACT TRIS
#####################################################################
label assign_repair_task():
    play sound "audio/notify.wav"
    tri "\"I have run a diagnostic on the ship.\""
    $ ID = random.choice([x for x in GAME.questSys.questDB.keys() if GAME.questSys.questDB[x][0] == 'Maintenance Task'])
    $ choreHint = GAME.questSys.questDB[ID][1]
    tri "\"[choreHint].\""
    $ renpy.say (tri, vary("\"<I suggest you fix the issue.|Take care of the issue.|Get that issue fixed.|Carry out the repairs.|See to it.>\""))
    $ tris.status.append(ID)
    call quest_updater() from _call_quest_updater_132
    return()

label interact_tris(interaction, item = False, tags=[]):

    if tris.attr["MOD"] < 20:
        "T'Ris is not in the mood to talk to you."
        return()

    if [x for x in GAME.questSys.activeQuests if x.description == "Maintenance Task"]:
        tri "\"You have a maintenance task to do.\""
        return()

    if GAME.mc.getTally("Repair Jobs") == 0 and GAME.questSys.isDone('QID_INTRO_FINDMODULE') and GAME.day >= 2:
        if not GAME.mc.hasDone("intro_repair"):
            queue sound "audio/notify.wav"
            tri "\"This ship is in need of repairs.\""
            mc "\"Repairs?\""
            tri "\"A kind of activity that might suit your talents.\""
            tri "\"I can analyze the ship and report my findings to you, if so ordered.\""
            tri "\"It is your duty as a Captain to see to that.\""
            mc "\"Understood.\""
            queue sound "audio/notify.wav"
            call large_notify("DAILY TASKS", "From tomorrow, you can issue orders to T'Ris regarding various tasks around the ship.\n\nHint: Assign T'Ris a diagnostics task in the morning and address any issues your ship status displays below the system readiness list.", ["Continue"], "08_items/ico ITMSpanner.png") from _call_large_notify_42
            return()

    #####################################################################
    #                USE ITEM ON
    #####################################################################
    if interaction == "use":

        if item.ID == "ITMFlyboy01":
            $ renpy.say (tri, vary("\"<I have seen nude women before...|That woman's space suit is ludicrous...|A publication of questionable value...>\""))
            return()

        elif item.ID == "ITMClothingKit":
            mc "\"How about you spice up your clothing a bit?\""
            if tris.hasItem("ITMClothingKit"):
                tri "\"I still need to use up the Clothing Kit I have.\""
                mc "\"Ah, right...\""
            # ===== CR-0815 START
            elif not any([tris.wears(x) for x in tris.progOutfits]):
                tri "\"Registered uniforms cannot be modified as per Regulations.\""
                mc "\"I forgot.\""
            # ===== CR-0815 END
            elif tris.counters.get(tris.getProgOutfit().ID) < 3: # CR-0816

                tri "\"My Valkoran Uniform is appropriate as it is...\""
                mc "\"Right.\""
                queue sound "audio/notify.wav" 
                mc "{i}\"T'Ris isn't ready for her next outfit adjustment it seems...\"{/i}"
                mc "{i}\"Maybe in a day or two...\"{/i}"

            # ===== CR-0816 START
            elif tris.getProgOutfit("max") != tris.getProgOutfit():
                tri "\"Oddly, I feel inclined to do so...\""
                if tris.getProgOutfit('next').ID == "ITMOutfitValkoraP1":
                    mc "\"Might I suggest showing some legs...?\""
                    tri "\"My legs are aesthetically appealing...\""
                elif tris.getProgOutfit('next').ID == "ITMOutfitValkoraP2":
                    mc "\"Might I suggest a tasteful cut out on the chest part...?\""
                    tri "\"My breasts {i}are{/i} well shaped.\""
                    mc "\"There is no harm in showing more of them...\""
                    tri "\"Very well.\""
                elif tris.getProgOutfit('next').ID == "ITMOutfitValkoraP3":
                    mc "\"Why not take it to the next level and bare what you have?\""
                    tri "\"Valkoran with a daring touch...\""
                tri "\"Hand me the adjustment toolkit.\"" 
                mc "\"Excellent, here you go!\""
                $ GAME.mc.passItem("ITMClothingKit", tris)
                $ tris.hasDoneToday("ITMClothingKit")
                queue sound "audio/equip.wav"
            else:
                tri "\"I do not see any need for that.\""
                mc "\"Fine.\""
                queue sound "audio/notify.wav"
                mc "{i}\"Hmmm..., T'Ris isn't ready for that yet...\"{/i}" 
            # ===== CR-0816 END

        elif item.kind in ["drink"]:
            show screen displayPresentActors(GAME.getLoc().ID) 
            mc "\"You care about a refreshing drink?\""

            # ===== CR-0757 START
            if GAME.getLoc().ID != "LOCMessRoom":
                tri "\"I suggest we limit consumption of such beverages to the Mess Room...\"" 
                return()

            # dress up for the occasion 
            if GAME.getStarSys().ID == "SSIDArellarti":
                $ tris.putOn("ITMUniformKrell")
            else: # Free Uniform
                $ tris.putOn("ITMOutfitValkora")

            
            if tris.hasDoneToday("drink"): 
                tri "\"I have consumed an alcoholic beverage today already.\""
            # ===== CR-0757 END    
           
            else:
                tri "\"Very well...\""

                $ GAME.mc.inventory.remove(item)
                queue sound "audio/potion.wav"

                if item.ID == "ITMDrinkStarburst69":
                    tri "\"A concoction of questionable taste.\"" with fade
                    tri "\"Its sweetness most certainly impacts concentration...\""

                elif item.ID == "ITMDrinkAstropolitan":
                    tri "\"This mixture is not entirely objectionable...\"" with fade
                    tri "\"It has an odd effect on me...\""
                    call attr_mod(tris, "STS", -25, 50, 100, True) from _call_attr_mod_71
                    queue sound "audio/notify.wav"
                    mc "{i}\"Interesting...\"{/i}"
                    $ tris.hasDoneToday(item.ID)
                    if GAME.questSys.isActive('QID_TRIS_SEXTRAIN2'):
                        mc "{i}\"T'Ris seems more relaxed than usual...\"{/i}"
                        mc "{i}\"Maybe I'll visit her in her quarters later...\"{/i}"

                elif item.ID == "ITMDrinkPangalactics":
                    tri "\"This drinks smells peculiar...\"" with fade
                    tri "\"I suspect it contains mind altering substances...\""

                elif item.ID == "ITMDrinkDrengarianIceTea":
                    tri "\"I would stay away from that drink if I were you...\"" with fade
                    tri "\"It is said only Drengarians can handle its effects...\""
                    tri "\"And of course Valkorans...\""

            hide screen displayPresentActors
            return()

        elif item.ID == "ITMPlugKrell" and tris.hasItem("ITMPlugKrell"):
            tri "\"I already have my plug.\""

        elif item.ID == "ITMOutfitPony":
            tri "\"What a curious costume.\""

        elif item.ID == "ITMPlugKrell" and "intro_plug" in tris.done:
            mc "\"Here is the Krell Pet Plug you required.\""
            tri "\"Very well.\""
            tri "\"I will keep for later... use.\""
            queue sound "audio/equip.wav"
            $ GAME.mc.passItem("ITMPlugKrell", tris)

        elif item.ID == "ITMPlugKrell" and "voucher_talk" and tris.getTally("Basic Pet Class"):
            tri "\"A Krell Pet Plug.\""
            tri "\"I am familiar with this item.\""

        # ==== CR-0257 START
        elif item.ID == "ITMVoucherPet1" and not GAME.questSys.isActive("QID_TRIS_PET_VOUCHER"):
            tri "\"What a curious item.\""
        # ==== CR-0257 END

        elif item.ID == "ITMPlugKrell":
            tri "\"What a curious device.\""

        # ==== CR-0527 START        
        elif item.ID in ["ITMVoucherPet1", "ITMVoucherPet2", "ITMVoucherPet3"] and tris.getAttr("EXH") < 12:
            mc "\"T'Ris, how about gaining some experience as a Krell Pet?\""
            tri "\"I have posed as your Pet already for our mission...\""
            mc "\"Let's take it one step further and train you like a real Krell Pet...\""
            tri "\"I do not feel this is... appropriate.\""
            queue sound "audio/notify.wav"
            mc "{i}\"Hmmm..., maybe if T'Ris exhibition skill would be higher?\"{/i}"
            return()
        # ===== CR-0527 END

         #####################################################################
         #              PET & VOUCHERS
         ##################################################################### 


        elif item.ID == "ITMVoucherPet1":

            if not tris.hasDone("voucher_talk"):  
                tri "\"What is that?\""
                mc "\"It is a voucher.\""
                tri "\"For what?\""
                mc "\"Doing business in Krell Space, knowledge of local customs is important...\""
                tri "\"And?\""
                mc "\"I have secured access to an important, ahem... Training Class for you.\""
                tri "\"A Training Class?\""
                mc "\"I want to send you to a Krell Pet Training Facility...\""
                tri "\"This sounds rather objectionable.\""

            # reject conditions
            if tris.getAttr("SUB") < 2:
                if not tris.hasDone("rejected_voucher1"):
                    mc "\"Why don't have a go at Pet Class anyway?\""
                    tri "\"I do not think so.\""
                    tri "\"I suggest you focus on our Mission.\""
                    queue sound "audio/notify.wav"
                    mc "{i}\"T'Ris is not ready for Pet Class yet...\"{/i}"
                    mc "{i}\"I should raise her submission somehow...\"{/i}"
                    mc "{i}\"Maybe I can do that by disciplining...\"{/i}"
                else:
                    tri "\"I have told you that I have no need of this.\""
                    queue sound "audio/notify.wav"
                    mc "{i}\"T'Ris is not submissive enough yet...\"{/i}"
                return()
            
            if  tris.hasItem("ITMVoucherPet1"):
                tri "\"I still have one of those vouchers.\""
                mc "\"Ah, right.\""
                mc "\"I forgot.\""
                return()
            
            if tris.getAttr("SUB") >= 5: # CR-0363
                tri "\"I can learn nothing more in Basic Pet Class.\""
                return()

            if not tris.hasDone("accepted_voucher1"):
                tri "\"I have posed as your Pet already for our mission...\""
                mc "\"Let's take it one step further and train you like a real Krell Pet...\""
                tri "\"This is a highly irregular request.\""
                tri "\"What is the purpose of training me like a 'Real Pet'?\""
                mc "\"Once trained you'll be able to react more naturally...\""
                mc "\"It would be a novel intercultural experience...\""
                tri "\"It would indeed.\""
                mc "\"How often will you have a chance to interact with a Race like the Krell?\""
                tri "\"Very well, I will comply.\""
                tri "\"For the purpose of intercultural studies.\""
                mc "\"Of course.\""
                queue sound "audio/notify.wav"
                $ GAME.mc.passItem("ITMVoucherPet1", tris)
                call hour_passes() from _call_hour_passes_59
                call sandbox_interior_navigate_to("LOCHallway1") from _call_sandbox_interior_navigate_to_38
                call quest_updater() from _call_quest_updater_133
                return()

            # accept / repoeat
            tri "\"Another training voucher?\""
            mc "\"I suggest you hold on to it.\""
            tri "\"If I must.\""
            $ GAME.mc.passItem(item.ID, tris)
            queue sound "audio/reading.wav"
            return()

        elif item.ID in ["ITMVoucherPet2", "ITMVoucherPet3"]:
            mc "\"How about some Advanced Class?\""
            mc "\"I could secure this Voucher...\""
            tri "\"I am quite capable of playing a Basic Pet Role where required.\""
            tri "\"Advanced Pet Class is not required for our Mission.\""
            return()

        elif item.ID == "ITMFlyboy02":
            $ renpy.say (tri, vary("\"<I have seen nude women before...|That woman has a striking similarity to Nimhe...|A publication of questionable value...>\""))
            return() 
            
        elif item.ID == "ITMDildoGreen":
            if tris.hasItem(item.ID):
                tri "\"I have such a device already.\""
                tri "\"It is adequate for my purposes.\""
            elif GAME.questSys.inProgress("QID_TRIS_DILDO"):
                mc "\"Considering your... ahem, difficulties.\"" 
                mc "\"This item might be of help....\""
                tri "\"Indeed.\"" 
                queue sound "audio/equip.wav"
                tri "\"I will take that.\""  
                $ GAME.mc.passItem(item.ID, tris) 
                tri "\"I will require several days to practice.\"" 
                tri "\"I will let you know once I am ready.\""
                tri "\"It should not require more than two or three days.\""
                mc "\"Right.\"" 
                tri "\"I suggest you continue with your duties on the ship now.\""
                call quest_updater() from _call_quest_updater_134
            else:
                tri "\"An interesting device...\"" 
                mc "\"It is used to...\"" 
                tri "\"I can infer the use from its design.\""
                mc "\"Do you want it?\""
                tri "\"I have no need for that item.\""
            return()

        elif item.ID == "ITMCandle":
            if "gift_candle" in tris.doneToday:
                tri "\"I still have such a candle.\""
            else:
                tri "\"A meditation candle.\""
                queue sound "audio/equip.wav"
                tri "\"How convenient.\""
                call attr_mod(tris, "MOD", 50, 100,100) from _call_attr_mod_72
                $ GAME.mc.passItem(item.ID, tris)
                $ tris.hasDoneToday("gift_candle")
            return()

        elif item.kind == "liquor":
            tri "\"Liquor impairs mental abilities.\""
            tri "\"It is illogical to consume it.\""

        elif item.ID == "ITMMapSectorOne":
            tri "\"The Sector Map!\""
            tri "\"Excellent.\""
            play sound "audio/equip.wav"
            tri "\"I'll take that.\""
            tri "\"Tomorrow I should have the results of my analysis.\""
            $ tris.hasDoneToday("researching map")
            $ GAME.mc.passItem("ITMMapSectorOne", tris)
            call attr_mod(tris, "APP",1,5,100, True) from _call_attr_mod_73
            $ GAME.mc.exp += 200

            call quest_updater() from _call_quest_updater_135
            return()

        elif item.ID in ["ITMUniformRacy", "ITMUniformRevealing"]:
            if GAME.getLoc().ID !=  "LOCNav": # CR-0771
                tri "\"This is hardly the fitting place for that.\"" # CR-0771
                tri "\"Visit me later in my quarters and bring that uniform.\""
                return()  
            if item.ID == "ITMUniformRacy":        
                call cutscene("uniform_tryout_racy") from _call_cutscene_42
            else:
                if tris.attr["EXH"] < 3:
                    tri "\"This uniform seems inappropriate.\""
                    tri "\"Keep it.\""
                    mc "\"Ahem, ... fine.\""
                else:
                    call cutscene("uniform_tryout_revealing") from _call_cutscene_43
            call sandbox_interior_prepare_scene() from _call_sandbox_interior_prepare_scene_12

        elif item.ID == "ITMUniformKrell" and GAME.questSys.inProgress('QID_SERAPHINE_UNIFORM') and GAME.mc.hasItem("ITMUniformKrell", 4):
            if GAME.getLoc().ID == "LOCNav":
                call cutscene("uniform_krell_tris") from _call_cutscene_44
                call quest_updater() from _call_quest_updater_136
                return()
            else:
                tri "\"Bring them to my quarters later.\""
                return()

        elif item.ID == "ITMUniformKrell" and GAME.questSys.inProgress('QID_SERAPHINE_UNIFORM'):
            tri "\"You need to procure four uniforms.\""
            tri "\"All crew members are obliged to wear them.\""
            mc "\"Ah, right...\""
            mc "\"I'll get more then\""

        elif item.ID == "ITMUniformKrell" and tris.hasItem("ITMUniformKrell"):
            tri "\"I have a Krell Uniform already.\""

        else:
            $ renpy.say (mc, "\"I don't think the {} can be used in that fashion...\"".format(item.getName(["noArt", "col", "cap"])))
            

    #####################################################################
    #                DIRECT INTERACT
    #####################################################################
    elif interaction == "interact":

        $ mCondOptions = [
            "Stats/s", "True",
            "Chat/c", "True",
            "Favour/f", "GAME.getLoc().ID =='LOCNav' and (GAME.questSys.inProgress('QID_TRIS_FAVOUR') or 'favours_agree' in tris.done)",
            "Public Favour/f", "tris.attr['EXH']>=6 and GAME.ship.isDocked() and GAME.hour < 18", # CR-0528, CR-0527
            "Uniform Inspection/u", "GAME.getLoc().ID =='LOCBridge' and tris.uniform != 'UID1_Free'",
            "Uniform Inspection/u", "GAME.getLoc().ID =='LOCNav' and tris.uniform == 'UID4_Krell'",
            "Pod Restock Levels/p", "GAME.getLoc().ID =='LOCBridge'",
            "Done/x", "True"
        ]

        # Compile options

        while True:
            call screen menu_interactive_scr(" ", mCondOptions, [])
            play sound "audio/click.wav"
            if _return == "Done":
                return()

            #####################################################################
            #                STATS
            #####################################################################

            elif _return == "Stats":
                call show_stats(tris) from _call_show_stats_4
                
            #####################################################################
            #                POD RESTOCKING LEVELS"
            #####################################################################
            
            elif _return == "Pod Restock Levels":
                mc "\"So about our pods supply levels...\""
                tri "\"Yes?\""
                $ skip_podmenu = False
                while skip_podmenu == False:
                  menu:
                    "T'ris, from now on, when you are restocking our pod supply, ideally I'd like to have at least the following amounts on hand, as supply and available cargo space allows for of course...\""
                    "[bio_restock] Bio Pods (change)":
                        $ bio_restock = int(renpy.input("Maximum Bio Pod Restock level:", "5", allow="0123456789", length=2))
                    "[energy_restock] Energy Pods (change)":
                        $ energy_restock = int(renpy.input("Maximum Energy Pod Restock level:", "5", allow="0123456789", length=2))
                    "[nano_restock] Nano Pods (change)":
                        $ nano_restock = int(renpy.input("Maximum Nano Pod Restock level:", "5", allow="0123456789", length=2))
                    "Accept current restock levels":
                        $ skip_podmenu = True
                return ()

                        

            #####################################################################
            #                FAVOUR
            #####################################################################

            elif _return == "Favour":
                if not GAME.mc.hasDone("intro_favour"):
                    mc "\"We need to talk.\""
                    tri "\"What is it?\""
                    mc "\"I'd like to ask you for, ahem... a favour.\""
                    tri "\"Do you need help in aligning the quantum coils?\""
                    mc "\"No.\""
                    tri "\"Then you need support in calibrating the engine controls?\""
                    mc "\"No.\""
                    mc "\"Something more, ahem, ... interpersonal.\""
                    tri "\"Explain.\""
                    mc "\"Well, you are the only female crewmember on the ship...\""
                    tri "\"And?\""
                    mc "\"I've been doing all this work around the ship lately...\""
                    tri "\"So I have noticed.\""
                    mc "\"A reward would be in order...\""
                    tri "\"A reward?\""
                    mc "\"We could try getting to know each other better...\""
                    tri "\"You mean sexual gratification?\""
                    mc "\"Ahem, ...I wouldn't have put it that directly...\""
                    mc "\"But now that you mention it...\""
                    tri "\"So it is sexual gratification you desire?\""
                    mc "\"Well, maybe...\""
                    tri "\"That is inappropriate.\""
                    tri "\"I suggest you control your urges with meditation.\""
                    tri "\"A practiced method on Valkor.\""
                    mc "\"Ah, thanks for the hint...\""
                    mc "{i}\"That Valkor must be a real fun place to be...\"{/i}"
                    mc "\"I better leave now...\""
                    tri "\"Agreed.\""
                    $ GAME.setLocID("LOCHallway1")
                    call hour_passes() from _call_hour_passes_60
                    call sandbox_interior_prepare_scene() from _call_sandbox_interior_prepare_scene_13
                    play sound "audio/notify.wav"
                    mc "\"{i}That didn't go as planned...{/i}\""
                    mc "\"{i}I need another approach...{/i}\""
                    mc "\"{i}Maybe in the meantime I can find some 'visual aid' for relaxation...{/i}\""
                    mc "\"{i}I should have a look around my cabin again...{/i}\""
                    call quest_updater() from _call_quest_updater_137
                    return()

                elif "favours_agree" in tris.done:
                    if "repair_complaint" in tris.doneToday:
                        tri "\"You better focus on the ship's condition rather than on frivolous pursuits.\""
                        tri "\"See to it.\""
                        $ GAME.setLocID("LOCHallway1")
                        call sandbox_interior_navigate_to("LOCHallway1") from _call_sandbox_interior_navigate_to_39
                        scene intermission with fade
                        call sandbox_interior_prepare_scene() from _call_sandbox_interior_prepare_scene_14                        
                        queue sound "audio/notify.wav"
                        mc "{i}\"First duty, then pleasure...\"{/i}"
                        mc "{i}\"Typically Valkoran...\"{/i}"
                        mc "{i}\"Maybe I should look after the repairs...\"{/i}"
                        mc "{i}\"I don't want to blow up mid-travel...\"{/i}"
                        return()
                    if GAME.questSys.inProgress('QID_TRIS_DILDOPRACTICE'):
                        queue sound "audio/notify.wav"
                        tri "\"I have no time for that.\""
                        tri "\"I have scheduled training with that implement you provided me with.\""
                        mc "\"Ahem,...right.\""
                        mc "\"Carry on then.\""
                        call hour_passes() from _call_hour_passes_61
                        call sandbox_interior_navigate_to("LOCHallway1") from _call_sandbox_interior_navigate_to_40
                        return()
                    if tris.hasDoneToday("favour"):
                        tri "\"We have talked about that today already.\""
                        tri "\"Focus on something else.\""
                        return()
                    if tris.attr["STS"] >= 70:
                        tri "\"I feel too stressed for that today.\""
                        tri "\"I rather meditate.\""                       
                        return()
                    if tris.attr["MOD"] <= 20:
                        tri "\"I am not in the mood for that today.\""
                        tri "\"I rather meditate.\""                       
                        return()

                    if "favours_agree" in tris.doneToday:
                        tri "\"Already?\""   
                    tri "\"What favour do you require?\""

                    $ sceneLoop = True
                    $ mOptions = [

                        "Night Visit/n", "GAME.questSys.isActive('QID_TRIS_SEXTRAIN3A')",
                        "Sex/s", "GAME.questSys.isActive('QID_TRIS_SEX')",
                        "Blowjob/b", "GAME.questSys.isActive('QID_TRIS_ASKBJ')",
                        "Handjob/h", "True",
                        "Exit/x", "True"]

                    while sceneLoop:
                        call screen menu_interactive_scr("", mOptions, [])
                        if _return == "Exit":
                            mc "\"Some other time.\""
                            tri "\"As you wish.\""
                            return()
                        
                        elif _return == "Handjob":
                            if tris.fp < 1:
                                tri "\"You have been negligent in your ship duties.\""
                                tri "\"Ask me again, once your efforts are adequate.\""
                                return()
                            mc "\"How about a, ahem... handjob.\""
                            call cutscene_tris("tris_handjob") from _call_cutscene_tris
                            return()
                        
                        elif _return == "Blowjob":
                            if tris.fp < 2:
                                tri "\"You have been negligent in your ship duties.\""
                                tri "\"Ask me again, once your efforts are adequate.\""
                                return()
                            elif not GAME.questSys.isActive("QID_TRIS_BJ"):
                                mc "\"How about a, ahem... blowjob.\""
                                if not tris.hasDone("intro_blowjob"):
                                    mc "\"It is when I use your mouth to...\""
                                    tri "\"I understand the concept.\""
                                    tri "\"You want to copulate using my mouth...\""
                                    mc "\"That is one way to put it...\""
                                tri "\"Manual stimulation is perfectly adequate for your needs.\""
                                tri "\"It is not necessary for me to provide oral sex in addition.\""
                                $ tris.doneToday.remove("favour")
                                $ tris.hasDone("bj_refused")
                                return()
                            else:
                                tri "\"Very well.\""
                                tri "\"You may use my mouth for copulation.\""
                                call cutscene_tris("tris_blowjob") from _call_cutscene_tris_1
                            return()
                        
                        elif _return == "Sex":
                            if not GAME.mc.hasDone("sex_talk_tris"):
                                mc "\"After all our other, ahem... exercises, how about real sex?\""
                                tri "\"You mean copulation?\""
                                mc "\"Ahem..., yes.\""
                                tri "\"Oral stimulation is the most efficient way to achieve climax in males.\"" 
                                tri "\"This is supported by a large body of statistical evidence.\""
                                mc "\"I can't reasonably deny that argument, but...\""
                                tri "\"Copulation has long been abandoned on Valkora.\""
                                tri "\"We do not rely on such primitive procreation methods.\""
                                mc "\"But still, ...\""
                                tri "\"Our brains have evolved to a point where copulation is not considered gratifying...\""
                                mc "\"I see...\""
                                mc "\"Wouldn't it be an interesting experience to re-learn it anyway?\""
                                tri "\"The act itself is undeniably simple to perform...\""
                                tri "\"However, I do not see any benefits in this pursuit.\""
                                tri "\"Your request is denied.\""
                                tri "\"I suggest you reflect on what I have told you.\""
                                call sandbox_interior_navigate_to("LOCHallway1") from _call_sandbox_interior_navigate_to_41
                                call hour_passes() from _call_hour_passes_62
                                call quest_updater() from _call_quest_updater_138
                                return()

                            # ===== CR-0530 START
                            if not GAME.questSys.isActive('QID_TRIS_AUTOASSIST'):
                                mc "\"How about sex tonight?\""
                                tri "\"Your request is denied.\""
                                tri "\"I suggest you reflect on what I have told you.\""
                                mc "{i}\"I need to get help from someone...\"{/i}"
                                mc "{i}\"Maybe Nimhe...\"{/i}"
                                return()
                                
                            # ==== CR-0530 END
                            if GAME.questSys.isDone('QID_TRIS_SEXTRAIN_PEEK') and not GAME.questSys.isDone('QID_TRIS_SEXTRAIN2'):
                                mc "\"How about sex?\""
                                tri "\"The Autotrainer calibration I performed was... interesting.\""
                                tri "\"I might consider a practical test.\""
                                tri "\"At some later time.\""
                                mc "\"Let's come back to that later then....\""
                                return()

                            elif GAME.questSys.isActive('QID_TRIS_SEXTRAIN3') and "ITMDrinkAstropolitan" in tris.doneToday:
                                if tris.fp < 5:
                                    tri "\"I suggest you perform your duties onboard the ship adequately first.\""
                                    return()

                                tri "\"Oddly, I feel inclined to try it today...\""                                
                                tri "\"For study purposes...\""
                                mc "\"Of course.\""
                                tri "\"Let us proceed then.\""
                                hide screen displayPresentActors
                                call cutscene_tris("sex_doggy") from _call_cutscene_tris_2
                                $ tris.fp -= 5
                                return()
                            else:
                                mc "\"How about sex?\""
                                mc "\"Have you changed your mind?\""
                                tri "\"I will not grant that request.\""
                                tri "\"You know my reasons.\""

                        elif _return == "Night Visit":
                            if tris.fp < 5:
                                queue sound "audio/notify.wav"
                                mc "\"I need your assistance in some matter...\""
                                tri "\"I suggest you manage the ship status properly first.\""
                                queue sound "audio/notify.wav"
                                mc "{i}\"I've been a bit negligent with my favour points of late it seems...\"{/i}"
                                return()
                            elif not tris.hasDone("night_visit_intro"):
                                queue sound "audio/notify.wav"
                                mc "\"I need your assistance in some matter...\""
                                tri "\"What is it?\""
                                mc "\"Dr. Moira has suggested that you administer a special relaxation program... \""
                                tri "\"I assume it is essential for our mission...?\""
                                mc "\"Yes, definitely so.\""
                                tri "\"Your lack of solo meditation skills is a continuing issue...\""
                                mc "\"Sadly so...\""
                                tri "\"Should I bring meditation equipment?\""  
                                mc "\"That is not necessary...\""
                                tri "\"I see...\""
                                tri "\"I shall talk to Dr. Moira regarding the most effective 'procedure'...\""
                                mc "\"Excellent!\""
                            else:
                                mc "\"I need your 'assistance' again tonight...\""
                                tri "\"Understood.\""
                            tri "\"I will visit you at the end of the day.\""
                            mc "\"Great!\""
                            $ tris.hasDoneToday("favour")
                            $ tris.fp -= 5
                            $ tris.hasDoneToday("night_visit")
                            return()

                else:
                    tri "\"I am not interested.\""

            #####################################################################
            #				PUBLIC FAVOUR		
            #####################################################################
            elif _return == "Public Favour":
                # data prep & intro
                if not tris.hasDone("public_favour_talk"):
                    mc "\"I'd like to ask you for a favour.\""
                    mc "\"In public.\""
                    tri "\"I see.\""
                    mc "\"You remember, we've talked about it...\""
                    mc "\"The uniform walks...\""
                    tri "\"Very well.\""

                if "public_favour" in tris.doneToday:
                    tri "\"I already did a favour in public for you today...\""
                    return()

                # ===== CR-0528 START
                if GAME.repQueue:
                    tri "\"I suggest you see to it that the Ship is in good order first.\""   
                    return()
                # ==== CR-0528 END     

                tri "\"What favour do you want me to perform?\""
                $ loopPubFav = True
                $ optionsPubFav = [
                    "Nude Walk/n", "GAME.ship.isDocked('LIDStationIltari') and False",

                    "Krell Pet Walk/w", "GAME.ship.isDocked() and GAME.getSpaceLoc().ID in ['LIDStationIltari', 'LIDPirate', 'LIDStationArellarti'] and tris.getTally('Basic Pet Class') > 0", # CR-0781

                    "Revealing Walk/w", "GAME.ship.isDocked('LIDStationIltari') and GAME.questSys.isDone('QID_UNIFORM_REVEALING_REG')",
                    "Racy Walk/w", "GAME.ship.isDocked('LIDStationIltari') and GAME.questSys.isDone('QID_UNIFORM_RACY_REG')",
                    "Uniform Walk/w", "GAME.ship.isDocked('LIDStationIltari') and 'favours_agree' in tris.done",
                    "Exit/x", "True"]

                # ====== CR-0556 START
                if len([x for x in optionsPubFav[1::2] if eval(x)]) <= 1:
                    mc "I can't think of a suitable favour now..."
                    tri "\"I suggest you refrain from idle banter then...\""
                    return()
                # ====== CR 0556 END
                
                # interaction loop
                while loopPubFav:
                    call screen menu_interactive_scr(" ", optionsPubFav, [])
                    play sound "audio/click.wav"
                    if _return == "Exit":
                        tri "\"I suggest you make up your mind.\"" 
                        return()      
                    elif _return == "Nude Walk":
                        if not tris.isNaked():
                            mc "\"Why don't you remove your uniform and take a walk around the Station?\"" 
                        else:
                            mc "\"Why don't you take a walk around the Station?\"" 
                        tri "\"I do not think so.\""

                    # ===== CR-0550 START
                    elif _return == "Uniform Walk":
                        mc "\"Why don't you take a walk around the station?\""
                        if not tris.wears("ITMOutfitValkora"):
                            tri "\"Fine.\""
                            tri "\"I'll enjoy wearing my regular uniform for a change.\""
                        else:
                            tri "\"Very well.\""
                        $ tris.putOn("ITMOutfitValkora")
                        hide screen displayPresentActors
                        call cutscene_tris("tris_public_walk_valkoran") from _call_cutscene_tris_3
                        return()
                    # ===== CR-0550 END

                    elif _return == "Racy Walk":
                        if not tris.wears("ITMUniformRacy"):
                            mc "\"Put on your Racy Uniform and join me for a walk outside.\""
                        else:
                            mc "\"Let's take a walk around the station.\""
                        if tris.attr["EXH"] < 7:
                            tri "\"I do not see the need for that wearing this uniform.\""
                        # ===== CR-0528 START
                        elif tris.fp < 1:
                            tri "\"I suggest you adequately perform your ship duties first.\""  
                            return()
                        # ==== CR-0528 END                          
                
                        else:
                            tri "\"Very well.\""
                            hide screen displayPresentActors
                            call cutscene_tris("tris_public_walk_racy") from _call_cutscene_tris_4
                            $ tris.fp = max(0, tris.fp-1)
                            return()

                    elif _return == "Revealing Walk": 
                        if not tris.wears("ITMUniformRevealing"):
                            mc "\"Put on your Revealing Uniform and join me for a walk outside.\""
                        else:
                            mc "\"Let's take a walk around the station.\""
                        if tris.attr["EXH"] < 10:
                            tri "\"I do not see the need for that wearing this uniform.\""
                        elif tris.fp < 2 or GAME.repQueue:
                            tri "\"I suggest you adequately perform your ship duties first.\"" 
                        else:
                            hide screen displayPresentActors
                            tri "\"Very well.\""
                            call cutscene_tris("tris_public_walk_revealing") from _call_cutscene_tris_5
                            $ tris.fp = max(0, tris.fp-2)
                            return()

                    elif _return == "Krell Pet Walk":
                        # ===== CR-0781 START
                        if not tris.wears("ITMUniformKrell"):
                            mc "\"Go put on your Krell Uniform.\""
                            mc "\"We'll take a walk on the Station.\""
                        else: 
                            mc "\"Let's take a walk on the Station outside.\""
                        
                        if GAME.getSpaceLoc().ID in ["LIDStationIltari"]:
                            queue sound "audio/notify.wav"
                            tri "\"Krell Pet Uniforms are illegal to wear in public on Iltari Station.\"" 
                            mc "\"Right, I forgot...\""
                            return()
                        if not GAME.questSys.isDone('QID_TRIS_PET_CLASS'):
                            tri "\"I have not completed my Pet Class yet.\""
                            return()     

                        # if not tris.wears("ITMUniformKrell"):
                        #    mc "\"Go put on your Krell Pet Uniform.\""
                        # ===== CR-0781 END

                        elif tris.fp < 5 or GAME.repQueue:
                            tri "\"I suggest you adequately perform your ship duties first.\"" 

                        elif not tris.hasItem("ITMPlugKrell"):
                            if not tris.hasDone("intro_plug"):
                                tri "\"I require a Krell Pet Plug for that activity.\""
                                mc "\"A Krell Pet Plug?\""
                                tri "\"All Krell Pets need to wear one in public.\""
                                mc "\"I see...\""
                            else:
                                tri "\"You have not procured the required Pet Plug yet.\""     
                        elif GAME.getSpaceLoc().ID in ["LIDPirate"]:
                            tri "\"Very well.\""
                            tri "\"I am familiar with this activity from Pet Class...\""
                            tri "\"Meet me in the Cargo Bay in ten minutes.\""
                            hide screen displayPresentActors
                            scene intermission with fade
                            "Ten minutes later..."
                            call cutscene_tris("tris_public_walk_krell_pirate") from _call_cutscene_tris_6
                            $ tris.fp = max(0, tris.fp-3)
                            $ tris.hasDoneToday("public_favour")
                            return()

                        elif GAME.getSpaceLoc().ID in ["LIDStationArellarti"]:
                            tri "\"Very well.\""
                            tri "\"I am familiar with the appropriate Pet public behaviour protocols in Krell Space...\""
                            tri "\"It will be a good practice.\""
                            hide screen displayPresentActors
                            call cutscene_tris("tris_public_walk_krell_arellarti") from _call_cutscene_tris_7 # CR-0528
                            $ tris.hasDoneToday("public_favour")
                            return()

                        
                return()

            #####################################################################
            #               UNIFORM INSPECTION
            #####################################################################

            elif _return == "Uniform Inspection":
                if GAME.getStarSys().race == "Krell" and GAME.getLoc().ID == "LOCNav":
                    call cutscene("uniform_inspection_tris_krell") from _call_cutscene_45
                    return()
                else:
                    mc "\"Get ready for uniform inspection.\""
                    tri "\"I am perfectly capable of wearing my uniform correctly.\""
                    tri "\"Focus on your tasks.\""



            #####################################################################
            #                IDLETALK
            #####################################################################

            elif _return == "Chat":

                #####################################################################
                #                CHAT INTERCEPTS
                #####################################################################

                if GAME.questSys.inProgress("QID_TRIS_SURPRISE") and GAME.getLoc().ID == "LOCNav":
                    mc "\"That issue in my cabin the other day...\""
                    tri "\"A shortcoming of your species...\""
                    tri "\"Humans are well known to be prone to distraction.\""
                    tri "\"Especially males.\""
                    tri "\"This might adversely impact our mission.\""
                    tri "\"An unacceptable situation.\""
                    tri "\"I am willing to assist you with stress relief.\""
                    mc "\"Assist...?\""
                    tri "\"As long as you perform adequately on this ship.\""
                    tri "\"...you may ask me for the favours you mentioned.\""
                    tri "\"Within reason.\""
                    mc "\"Ahem, ...thank you.\""
                    tri "\"That is all.\""
                    $ tris.hasDone("favours_agree")
                    $ tris.hasDoneToday("favours_agree")
                    return()

                if tris.wears("ITMUniformRevealing") and "revealing_talk_tris" not in nimhe.done and GAME.getLoc().ID == "LOCBridge":
                    queue sound "audio/notify.wav"
                    mc "\"I have to commend you on how you carry yourself.\""
                    mc "\"What an excellent way to wear this uniform.\""
                    tri "\"It is not a particularly challenging feat.\""
                    mc "\"Regardless, I think we need to show Nimhe this great example.\""
                    tri "\"If you must.\""
                    mc "\"Definitely.\""
                    queue sound "audio/beep.wav"
                    mc "\"Nimhe, report to the Bridge.\""
                    "Nimhe" "\"On my way...\""
                    "A short while later..."
                    nim "\"What's up?\"" with fade
                    mc "\"I wanted to show you the new uniform.\""
                    nim "\"Looks pervy.\""
                    tri "\"This is unproductive behaviour.\""
                    tri "\"I suggest you familiarize yourself with this uniform, Cadet.\""
                    hide screen displayPresentActors
                    hide screen header
                    scene expression("06_cutscenes/cutscene_bridge_encounter_revealing.png") with fade 
                    window hide  
                    pause  
                    nim "\"Nice.\""
                    nim "\"You look like you'd be off to work in the Entertainment District...\""
                    nim "\"Too hairy, though...\""
                    tri "\"My pubic hair conforms to Valkoran Fleet Regulations.\""
                    tri "\"Senior Officer Appendix 247-B.\""
                    tri "\"Only Cadets and Junior Officers are required to be shaved.\""
                    nim "\"Still...\""
                    tri "\"Enough idle talk.\""
                    show screen header()
                    scene room_bridge_smart with fade 
                    show screen displayPresentActors("LOCBridge")

                    tri "\"I suggest you return to your duties now.\""
                    tri "\"A uniform of the same design will be provided to you.\""
                    nim "\"Fine.\""
                    nim "\"Not sure I'll wear it though.\""
                    "Nimhe leaves the bridge and you resume your tasks..."
                    $ nimhe.hasDone("revealing_talk_tris")
                    $ GAME.galleryAdd(36)
                    call quest_updater() from _call_quest_updater_139
                    return()

                if GAME.questSys.inProgress('QID_UNIFORM_WALK_TALK') and GAME.ship.isDocked("LIDStationIltari"):
                    call cutscene_tris("uniform_walk_talk") from _call_cutscene_tris_8 # CR-0527
                    return()

                if GAME.questSys.inProgress('QID_UNIFORM_REVEALING_REG') and GAME.ship.isDocked("LIDStationIltari"):
                    call cutscene_tris("uniform_register_revealing") from _call_cutscene_tris_9 # CR-0527
                    return()

                if GAME.questSys.inProgress("QID_UNIFORM_RACY_REG"):
                    call cutscene_tris("uniform_register_racy") from _call_cutscene_tris_10 # CR-0527
                    return()

                if GAME.questSys.inProgress("QID_TRIS_AUTOASSIST") and GAME.getLoc().ID == "LOCNav":
                    mc "\"T'Ris, Nimhe needs your assistance with some Autotrainer modifications.\""
                    tri "\"I am familiar with that device.\""
                    tri "\"What is the nature of these modifications?\""
                    mc "\"Expanding its functionality...\""
                    mc "\"It might also help with your physical responses...\""
                    tri "\"Explain.\""
                    mc "\"You mentioned Valkorans do not find, ahem... procreation gratifying.\""
                    mc "\"Assisting with the Autotrainer adjustments might change that...\""
                    tri "\"I doubt it.\""
                    tri "\"That device is rather crude.\""
                    mc "\"Well, why don't you talk with Nimhe and check it out.\""
                    tri "\"Very well.\""
                    $ tris.hasDone("autoassist_talk")
                    call hour_passes() from _call_hour_passes_63
                    call sandbox_interior_navigate_to("LOCHallway1") from _call_sandbox_interior_navigate_to_42
                    return()

                if GAME.questSys.inProgress("QID_SERAPHINE_KICKOFF") and GAME.getLoc().ID == "LOCBridge" and "gate_talk" not in tris.done:
                    queue sound "audio/notify.wav"
                    mc "\"Vee came to me with important information.\""
                    tri "\"I am aware of that.\""
                    tri "\"She transmitted navigational data to me.\""
                    mc "\"Excellent.\""
                    mc "\"We need to get to a system named 'Arellarti' it seems...\""
                    tri "\"It is accessible via Hypergate.\""
                    tri "\"I suggest we make our way there and inquire on how to use the Gate.\""
                    mc "\"Excellent.\""
                    mc "\"Make it so.\""
                    $ tris.hasDone("gate_talk")
                    return()

                if GAME.questSys.inProgress("QID_SERAPHINE_CLASS_TRIS") and "class_talk" not in tris.done:
                    queue sound "audio/notify.wav"
                    tri "\"Did you make any progress regarding the Hyperjump License?\""
                    mc "\"Yes.\""
                    mc "\"I have enrolled you into a Hyperjump Navigation Course.\""
                    tri "\"Explain.\""
                    mc "\"They take their Jumpgates very seriously here.\""
                    mc "\"Once you have completed mandatory training, we will receive our License.\""
                    tri "\"An unavoidable exercise, it seems.\""
                    mc "\"There are three classes for you to attend.\""
                    tri "\"I am already well versed in Interspatial Navigation Theory.\""
                    tri "\"I doubt that course will be particularly challenging.\""
                    tri "\"Just let me know in the morning if you want me to attend a course.\""
                    queue sound "audio/notify.wav"
                    call simple_notify("JOB UNLOCKED", "Hyperspace Nav Class", ["Continue"], "05_gui/ico Ship.png") from _call_simple_notify_58
                    $ tris.jobs.append("JOB_Nav")
                    $ tris.hasDone("class_talk") # CR-0387
                    mc "\"Excellent.\""
                    return()

                if GAME.questSys.inProgress('QID_SERAPHINE_ARELLARTI_PET') and GAME.ship.status == "docked" and GAME.getSpaceLoc().ID == "LIDStationArellarti" and GAME.hour < 21: # CR-0449
                    call cutscene_tris("tris_pet_owner") from _call_cutscene_tris_11
                    return()

                #####################################################################
                #                NORMAL CHAT
                #####################################################################


                $ chat = [

                    [["tr"],"any", "DIABridge001", {}, "GAME.getLoc().ID=='LOCBridge' and vee.isHere()", [],
                    [ "tr", "<Is V's presence on the Bridge necessary?>",
                    "v", "Observing operational procedures will further my understanding of your species.", 
                    "tr", "Hrmpff..."]
                    ],

                    [["tr"],"any", "DIAGeneric001", {}, "True", [],
                    [ "tr", "<There might be a neutrino storm today...|The engines sound odd today...|Our hull plating is badly worn...|Engine alignment is satisfacory...>",
                    "mc", "<Indeed.|You don't say.|Really?|Interesting...|Is that so?>"]
                    ],

                    [["tr"],"daily", "DIALore001", {}, "True", [],
                    [ "tr", "<The Valkoran Hegemony encompasses 48 Star Systems|We have been observing your race for several decades now...|Our fastest ships can travel more than 7 lightyears in a single day...|The Valkoran average lifespan is several times that of Humans...|Valkorans are known for their analytical skills...|Emotions are unproductive and best suppressed by meditation...|The Valkoran fleet encompasses several thousand ships...|We once sent a probe to the Galactic Center...>",
                    "mc", "<Really?|Interesting...|Is that so?|I see...>"]
                    ],

                    [["tr"],"daily", "DIALore002", {}, "GAME.questSys.isDone('QID_MAIN_GETMAP')", [],
                    [   "tr", "<This Galaxy contains 41.2 billion stars.|Triangulum has more super heavy elements compared the Milky Way|There is an H II core at the center of this Galaxy...|A stream of hydrogen gas links this Galaxy with Andromeda...|There have been visitors from NGC-538 in our Milky Way in the distant past...|Neutrino storms are a danger for safe Space Travel...|Netrounium Plating is effective but dangerous if mishandled...|I am looking forward to report on this mission to the Valkoran Command.|There are many facts to be discovered about this Galaxy.>",
                    "mc", "<Really?|Interesting...|Is that so?|I see...>"]
                    ],

                    [["tr"],"any", "DIAVita001", {}, "tris.attr['SLU'] >= 3", [],
                    [   "tr", "<I once was auctioned off as a slave in an undercover operation...>",
                        "mc", "<Really?>",
                        "tr", "A fat arms merchant bought me...",
                        "mc", "What happened next?",
                        "tr", "I uncovered his suppliers...",
                        "tr", "Then I convinced him to take a space walk...",
                        "tr", "Without his suit...",
                        "mc", "Oh..."]
                    ],

                    [["tr"],"daily", "DIAVita002", {}, "tris.attr['EXH'] >= 6", [],
                    [   "tr", "<At the Valkoran Academy I once posed for development of a new Spacesuit.>",
                        "mc", "Really?",
                        "tr", "I had to stand naked on a pedestal and was scanned from all angles...",
                        "mc", "Was the development a success?",
                        "tr", "Very much so.",
                        "tr", "In the development phase many high ranking officials visited...",
                        "mc", "<I wonder why...|I see...|I can imagine that...>"]
                    ],

                    [["tr"],"daily", "DIAVita003", {}, "tris.attr['EXH'] >= 9", [],
                    [   "tr", "<Did you know that Valkoran swimming competitions are conducted in the nude?>",
                        "mc", "Why?",
                        "tr", "To eliminate all influence from hi-tech swimsuits...",
                        "mc", "That makes sense.",
                        "mc", "An athlete could optimize her time by shaving to reduce drag.",
                        "tr", "That much is obvious.", "tr", "It was widely practiced.",
                        "mc", "<I'd love to attend such a competition...|I could get a fan of such a sport...>",
                        "tr", "Indubitably so...| That does not surprise me..."]
                    ],


                    [["tr"],"daily", "DIAVita004", {}, "tris.attr['EXH'] >= 9", [], # CR-0690
                    [ "tr", "<Did you know that Valkoran Cadets are made to serve naked as disciplinary measure?>",
                    "mc", "<That sounds quite effective...|An interesting approach...|Certainly helps to prevent infractions I imagine...>",
                    "tr", "Correct."]
                    ],

                    [["tr"],"daily", "DIAUniform002", {}, "tris.wears('ITMUniformRacy')", [], # CR-0690
                    [ "tr", "<This uniform is not very practical...>",
                    "tr", "<It does not stay in place as it should...>",
                    "mc", "I see..."]
                    ],

                    [["tr"],"daily", "DIAUniform003", {}, "tris.wears('ITMUniformRevealing')", [], # CR-0690
                    [ "tr", "<This uniform does not provide much protection...>",
                    "mc", "<Fortunately the ambient temperature is tightly controlled here...|There is little need for that onboard...>",
                    "tr", "Hrmppfff..."]
                    ],


                    [["tr"],"daily", "DIAUniform004", {}, "tris.wears('ITMOutfitValkoraP3')", [], # CR-0690
                    [ "tr", "<For some odd reason I am beginning to like this uniform...>",
                    "mc", "It appears to be quite practical.",
                    "tr", "How so?",
                    "mc", "<It does not take up much space when, ahem... travelling...>",
                    "tr", "<That is a specious argument...|That is irrelevant...>"]
                    ]
                    


                ]

                call npc_talk(tris, chat) from _call_npc_talk_15


    #####################################################################
    #                   MISSION REPORT OFFBOARD
    #####################################################################
    elif interaction == "mission_report":
        #####################################################################
        #					NAV CLASS		
        #####################################################################
        if "nav_class" in tags:
            queue sound "audio/notify.wav"
            call large_notify("AWAY MISSION RETURN - T'RIS", "T'Ris rejoins you after having completed the Hyperspace Navigation class she was assigned to.\n\nShe will be available for on board tasks again.", ["Continue"], "05_gui/ico Ship.png") from _call_large_notify_43
            $ tris.clearLocOverride() 
            $ tris.tallyUp("Nav Classes",1)  
            queue sound "audio/notify.wav"
            tri "\"Reporting back from Navigation Class.\""     
            mc "\"How was it?\""
            tri "\"The information was easy to follow.\""#
            # nav class complete
            if tris.getTally("Nav Classes") >= 3:
                tri "\"I have completed my Navigation Classes.\""
                tri "\"Hyperjump permission has been added to your Multipass.\""
                queue sound "audio/notify.wav"
                call simple_notify("LICENSE ACQUIRED", "Hyperjump Travel", ["Continue"], "08_items/ico ITMMultipass.png") from _call_simple_notify_59
                mc "\"Excellent, let's head to the Gate as soon as possible.\""
                tri "\"There is one important issue.\""
                mc "\"What is it?\""
                tri "\"The Krell require special attire for all crew personnel while in Krell Space.\""
                tri "\"I have been advised that is somewhat... unusual.\""
                mc "\"Unusual?\""
                tri "\"I do not have further details.\""
                tri "\"I suggest you procure the required attire.\""
                mc "\"I don't remember having seen anything of that kind on board...\""
                queue sound "audio/drone_beep.wav"
                bb2 "\"Shady can probably help you.\""
                bb2 "\"She supplies all kind of wares to ships passing through.\""
                bb2 "\"Including to merchant vessels trading in Krell Space.\""
                mc "\"Fine, I'll talk to her.\""
                tri "\"Come back once you have acquired a set of appropriate uniforms.\""
                mc "\"How many do I need?\""
                tri "\"Ship owners enjoy special privileges.\""
                tri "\"The Krell do not want to impede trade unnecessarily...\""
                mc "\"That is a sensible policy...\""
                tri "\"A set of four uniforms should therefore suffice.\""
                mc "\"I'll get to it.\""
                tri "\"If you'll excuse me now.\""
                tri "\"I have to get back to my duties.\""
                $ tris.setJob("JOB_Idle")
                $ tris.jobs.remove("JOB_Nav")
#                scene room_captain_smart with fade # CR-0666
                $ tris.hasDone("navigator_license")
                call quest_updater() from _call_quest_updater_140
            # status report
            elif tris.wears("ITMUniformRevealing") or tris.wears("ITMUniformRacy") :
                tri "\"I wish you had sent me in a more conventional uniform.\""
                tri "\"I was attracting considerable attention.\""
                mc "\"That was invaluable to project the image we want.\""
                tri "\"Your argument, however displeasing, is correct.\""
                mc "\"See?\""
                tri "\"Enough idle talk.\""
                call attr_mod(tris,"STS", 25, 100, 100) from _call_attr_mod_74
                call attr_mod(tris,"MOD", -50, 0, 100) from _call_attr_mod_75
            else:
                mc "\"Excellent\""
                tri "\"I have tasks to attend to now.\""
                call attr_mod(tris,"STS", 5, 100, 100) from _call_attr_mod_76

            return()
        #####################################################################
        #					BASIC PET CLASS		
        #####################################################################
        elif "pet_class" in tags:
            queue sound "audio/notify.wav"
            call large_notify("AWAY MISSION RETURN - T'RIS", "T'Ris rejoins you after having completed a day of Pet Class.\n\nShe will be available for on board tasks again.", ["Continue"], "05_gui/ico Ship.png") from _call_large_notify_44
            $ tris.clearLocOverride()
            $ tris.tallyUp("Basic Pet Class",1) 
            if tris.hasItem("ITMVoucherPet1"):
                queue sound "audio/notify.wav"
                if tris.getTally("Basic Pet Class") < 3: 
                    tri "\"Reporting back from Pet Class.\""     
                    mc "\"How was it?\""
                    tri "\"It was... interesting.\""
                    tri "\"Krell training methods are unusual but efficient...\""
                    mc "\"Can you elaborate?\""
                    tri "\"I'd rather not.\""
                    mc "\"Well, carry on then.\""
                    tri "\"I'll be in my quarters.\""
                    $ tris.attrMax["SUB"] = tris.getTally("Basic Pet Class")+2 # CR-0631
                    call attr_mod(tris, "SUB", 1,4, 100, True) from _call_attr_mod_77
                    queue sound "audio/notify.wav"
                    mc "{i}\"T'Ris training is probably not complete...\"{/i}"
                    mc "{i}\"I better buy another voucher...\"{/i}"
                # pet basic class complete
                elif tris.getTally("Basic Pet Class") == 3:
                    tri "\"I have completed Basic Pet Class.\""
                    mc "\"Excellent!\""
                    $ tris.attrMax["SUB"] = 7 # upgrade 
                    call attr_mod(tris, "SUB", 1,5, 100, True) from _call_attr_mod_78
                    call simple_notify("{} POTENTIAL INCREASE".format(tris.name), "SUB can now reach 7", ["Continue"], "08_items/ico ITMCrop.png") from _call_simple_notify_60
                    call attr_mod(tris, "EXH", 1,13, 100, True) from _call_attr_mod_79 # CR-0527
                    $ GAME.mc.achievements.append("trained pet owner")
                    call achievement_notify(tris, "Trained Pet", "ani_tris_pet") from _call_achievement_notify_9  
                    $ GAME.galleryAdd(68)   
                else:
                    tri "\"I didn't learn anything new.\""
                    mc "\"I see...\""
                    mc "\"I need to look for a more advanced class then.\""
                    tri "\"If it is necessary...\""
                $ tris.remItem("ITMVoucherPet1")
            $ tris.setJob("JOB_Idle")
            # scene room_captain_smart with fade # CR-0467
            call quest_updater() from _call_quest_updater_141
            return()

    return()
