code:
init 16 python:
    def movie_date_invite_requirement():
        if time_of_day == 3:
            if day%7 == 1 and not mc.business.event_triggers_dict.get("movie_date_scheduled", False): #movie tuesday
                if get_movie_date_person():
                    return True
        return False

    def fuck_date_invite_requirement():
        if time_of_day == 3:
            if day%7 == 3 and not mc.business.event_triggers_dict.get("fuck_date_scheduled", False): #her place thursday
                if get_fuck_date_person():
                    return True
        return False

    def dinner_date_invite_requirement():
        if time_of_day == 3:
            if day%7 == 4 and not mc.business.event_triggers_dict.get("dinner_date_scheduled", False): #dinner friday
                if get_dinner_date_person():
                    return True
        return False

    def shopping_date_invite_requirement():
        if time_of_day == 3:
            if get_shopping_date_person():
                return True
        return False

    def get_movie_date_person():
        temp_list = []
        for person in known_people_in_the_game():
            if person.energy > 60 and person.is_available:
                    if person.love > 40 and person.love < 70:
                        if person.relationship == "Single" or person.has_role(girlfriend_role) or person.has_role(affair_role):
                            temp_list.append(person)
        return get_random_from_list(temp_list)

    def get_fuck_date_person():
        temp_list = []
        for person in known_people_in_the_game():
            if person.energy > 60 and person.is_available:
                    if person.has_role(girlfriend_role) or person.has_role(affair_role):
                        if person.effective_sluttiness() < 60:
                            temp_list.append(person)
        return get_random_from_list(temp_list)

    def get_dinner_date_person():
        temp_list = []
        for person in known_people_in_the_game():
            if person.energy > 60 and person.is_available:
                    if person.love > 50 and person.love < 80:
                        if person.relationship == "Single" or person.has_role(girlfriend_role) or person.has_role(affair_role):
                            temp_list.append(person)
        return get_random_from_list(temp_list)

    def get_shopping_date_person():
        temp_list = []
        for person in known_people_in_the_game():
            if person.energy > 60:
                if person.is_available:
                    if person.has_role(girlfriend_role) or person.has_role(affair_role):
                        temp_list.append(person)
        return get_random_from_list(temp_list)

    movie_date_invite = ActionMod("Movie Date Invite", movie_date_invite_requirement, "movie_date_invite_label",
        menu_tooltip = "Someone invites you out to see a movie they like.", category = "Mall", is_crisis = True, is_morning_crisis = False, priority = 5)
    fuck_date_invite = ActionMod("Fuck Date Invite", fuck_date_invite_requirement, "fuck_date_invite_label",
        menu_tooltip = "Someone invites you over to their place to fuck them.", category = "Mall", is_crisis = True, is_morning_crisis = False, priority = 5)
    dinner_date_invite = ActionMod("Dinner Date Invite", dinner_date_invite_requirement, "dinner_date_invite_label",
        menu_tooltip = "Someone asks if you'd like to go to dinner.", category = "Mall", is_crisis = True, is_morning_crisis = False, priority = 5)
    shopping_date_invite = ActionMod("Shopping Date Invite", shopping_date_invite_requirement, "shopping_date_invite_label",
        menu_tooltip = "Someone invites you to go shopping with them.", category = "Mall", is_crisis = True, is_morning_crisis = False, priority = 5)

label movie_date_invite_label():
    $ scene_manager = Scene()
    $ the_person = get_movie_date_person()
    $ the_person.apply_outfit(the_person.decide_on_outfit(sluttiness_modifier = 0.1))
    $ is_text = False
    if mc.is_at_work:
        if the_person.is_employee and the_person.is_at_office or the_person.location == mc.location:
            "As you are packing up to head home for the day you are approached by [the_person.title]."
        else:
            "As you are packing up to head home for the day you get a text from [the_person.title]."
            $ is_text = True
    elif mc.is_home:
        if the_person in people_in_mc_home():
            "As you are walking down the hallway in your house you are approached by [the_person.title]."
        else:
            "As you are walking down the hallway in your house you get a text from [the_person.title]."
            $ is_text = True
    else:
        if the_person.location == mc.location:
            "As you are wandering around you are approached by [the_person.title]."
        else:
            "As you are wandering around you get a text from [the_person.title]."
            $ is_text = True
    if is_text:
        $ mc.start_text_convo(the_person)
    the_person "Hey [the_person.mc_title]! I was going to head out to watch a movie tonight."
    the_person "Do you want to go with me?"
    menu:
        "Go to the movie\n{color=#ff0000}{size=18}Costs: $50{/size}{/color}":
            pass
        "Decline the date":
            mc.name "Sorry I can't tonight. I've got other plans."
            the_person "Oh, okay. Have fun!"
            mc.name "Thanks, you too!"
            if is_text:
                $ mc.end_text_convo()
            return
    mc.name "Yeah, that sounds great. What time is the showing?"
    the_person "There is one in about a half hour if that works for you."
    if is_text:
        mc.name "Sounds good, I'll meet you there."
        the_person "Great! See you soon."
        $ mc.end_text_convo()
        "A little while later you meet her outside the theatre."
        $ mc.change_location(downtown)
        $ scene_manager.add_actor(the_person)
        the_person "Hey, good to see you!"
        the_person "I'm ready to go in, do you mind if I pick the movie?"
    else:
        mc.name "Sounds good, are you ready to go now?"
        the_person "Yeah, just let me grab my purse."
        "A short trip later you arrive at the theatre together."
        $ mc.change_location(downtown)
        $ scene_manager.update_actor(the_person)
        the_person "Do you mind if I pick the movie?"
    $ renpy.show("Theatre", what = bg_manager.background("Theatre_Background"), layer = "master")
    mc.name "Anything is great while I'm with you. Go ahead and pick whatever you want."
    if the_person.personality.personality_type_prefix == wild_personality.personality_type_prefix or the_person.personality.default_prefix == wild_personality.personality_type_prefix: #If it's a wild or wild derived personality type
        $ the_choice = get_random_from_list(["The Revengers", "Raiders of the Found Ark", "Die Difficult", "Mission: Improbable", "Wonderful Woman", "John Wicked: Part 3", "The Destructonator", "Waterman"])
        the_person "I've wanted to see [the_choice] for a while."
    elif the_person.personality.personality_type_prefix == reserved_personality.personality_type_prefix or the_person.personality.default_prefix == reserved_personality.personality_type_prefix:
        $ the_choice = get_random_from_list(["Olympic", "Britannic","The Workbook", "East Side Tale", "Pottery Poltergeist"])
        the_person "I thought [the_choice] would be a good fit for us."
    elif the_person.personality.personality_type_prefix == introvert_personality.personality_type_prefix or the_person.personality.default_prefix == introvert_personality.personality_type_prefix:
        $ the_choice = get_random_from_list(["that one in French", "that one in Italian", "that one in Russian", "that one in Japanese", "that one in Mandarin", "that one that's silent"])
        the_person "I haven't heard much about it, but I think we should watch [the_choice]. It should be a really unique one."
    else: #relaxed and anything else
        $ the_choice = get_random_from_list(["Spooky Movie", "Aaron Powers", "Dumber and Dumberest-er", "Ghostblasters", "Shaun of the Undead"])
        the_person "I thought we'd both enjoy [the_choice]."
    $ del the_choice
    mc.name "That sounds great, I'll go grab us some tickets."
    "You walk up to the ticket booth and get tickets for yourself and [the_person.possessive_title]."
    $ mc.business.change_funds(-50)
    "Tickets in hand, you rejoin [the_person.title] and set off to find your theatre."
    menu:
        "Stop at the concession stand\n{color=#ff0000}{size=18}Costs: $20{/size}{/color}" if mc.business.has_funds(20):
            mc.name "Do you want some popcorn or anything like that?"
            the_person "Oh, yeah that would be great. Do you mind waiting in line?"
            mc.name "Not at all, you run ahead and I'll go get us some snacks."
            $ scene_manager.hide_actor(the_person)
            $ mc.business.change_funds(-20)
            "You give [the_person.possessive_title] her ticket and split up. At the concession stand you get a pair of drinks and some popcorn to share."
            menu:
                "Put a dose of serum in her drink" if mc.inventory.total_serum_count > 0:
                    call give_serum(the_person) from _call_give_serum_invite
                "Put a dose of serum in her drink\n{color=#ff0000}{size=18}Requires: Serum{/size}{/color} (disabled)" if mc.inventory.total_serum_count == 0:
                    pass
                "Leave her drink alone":
                    pass
            "Snacks in hand you return to [the_person.title]. She takes a sip from her drink as you settle into your seat beside her."
        "Stop at the concession stand\n{color=#ff0000}{size=18}Requires: $20{/size}{/color} (disabled)" if not mc.business.has_funds(20):
            pass
        "Just go to the movie":
            "You find your theatre, pick your seats, and settle down next to each other for the movie."
    $ scene_manager.update_actor(the_person, position = "sitting", lighting = [0.5,0.5,0.5])
    "You chat for a few minutes until the theatre lights dim and the movie begins."
    "Halfway through the movie it's clear that [the_person.title] is having a great time. She's leaning forward in her seat, eyes fixed firmly on the screen."
    $ mc.change_locked_clarity(10)
    "As the movie approaches its climax she reaches her hand down and finds yours to hold."
    "When it's finished you leave the theatre together, still holding hands."
    $ scene_manager.update_actor(the_person)
    mc.name "So, did you like the movie?"
    the_person "It was amazing! Let's watch something like that next time."
    $ the_person.change_love(10, max_amount = 80)
    the_person "There will be a next time, right?"
    mc.name "I'd love for there to be."
    $ the_person.change_happiness(10)
    if the_person.home in [bedroom, lily_bedroom, hall, mom_bedroom, kitchen, harem_mansion]:
        $ mc.change_locked_clarity(5)
        "She leans towards you and gives you a quick kiss."
        the_person "Let's head home then."
    else:
        if renpy.random.randint(0,100) < the_person.sluttiness + the_person.love + (mc.charisma * 10):
            $ mc.change_locked_clarity(5)
            "She leans towards you and gives you a quick kiss."
            $ the_person.call_dialogue("date_seduction")
            menu:
                "Go to [the_person.title]'s place":
                    $ mc.change_location(downtown)
                    mc.name "That sounds like a great idea. Let's get a cab."
                    if not the_person.has_role(aunt_role) and not the_person.has_role(cousin_role):
                        if not the_person.home in mc.known_home_locations:
                            $ mc.known_home_locations.append(the_person.home) #You know where she lives and can visit her.
                    "You flag a taxi and get in with [the_person.possessive_title]."
                    "After a short ride you pull up in front her house. She leads you to the front door and invites you inside."
                    $ the_person.add_situational_slut("Romanced",15,"What a wonderful date!")
                    call date_take_home_her_place(the_person, date_type = "movie") from _call_date_take_home_her_place_invite
                    $ the_person.clear_situational_slut("Romanced")

                "Call it a night":
                    mc.name "I'd like to call it an early night today, but maybe I'll take you up on the offer some other time."
                    "Her taxi arrives. You give her a goodbye kiss and head home yourself."
        else:
            "She leans towards you and gives you a quick kiss on the cheek before saying goodbye."
    $ scene_manager.clear_scene()
    $ mc.change_location(bedroom)
    return "Advance Time"

label fuck_date_invite_label():
    $ the_person = get_fuck_date_person()
    if the_person.has_role(affair_role):
        $ so_title = SO_relationship_to_title(the_person.relationship)
    $ is_text = False
    if mc.is_at_work:
        if the_person.is_employee and the_person.is_at_office or the_person.location == mc.location:
            "As you are packing up to head home for the day you are approached by [the_person.title]."
        else:
            "As you are packing up to head home for the day you get a text from [the_person.title]."
            $ is_text = True
    elif mc.is_home:
        if the_person in people_in_mc_home():
            "As you are walking down the hallway in your house you are approached by [the_person.title]."
        else:
            "As you are walking down the hallway in your house you get a text from [the_person.title]."
            $ is_text = True
    else:
        if the_person.location == mc.location:
            "As you are wandering around you are approached by [the_person.title]."
        else:
            "As you are wandering around you get a text from [the_person.title]."
            $ is_text = True
    if is_text:
        $ mc.start_text_convo(the_person)
    the_person "Hey [the_person.mc_title]! I was feeling a bit lonely and thought maybe you could keep me company tonight."
    menu:
        "Keep her company":
            pass
        "Decline the date":
            mc.name "Sorry I can't tonight. I've got other plans."
            the_person "Oh, okay. Have fun!"
            mc.name "Thanks, you too!"
            if is_text:
                $ mc.end_text_convo()
            return
    if is_text:
        if the_person.home in [bedroom, lily_bedroom, hall, mom_bedroom, kitchen, harem_mansion]:
            if mc.is_home:
                mc.name "Absolutely, I'm just down the hall. Be there soon."
            else:
                mc.name "Absolutely, I should be home soon."
            the_person "I'll be waiting for you."
        else:
            if the_person.home not in mc.known_home_locations:
                mc.name "Absolutely, I just need the address."
                "She quickly responds with the details and you pull up your map app."
            else:
                mc.name "Absolutely, I'll be there soon."
    else:
        if the_person.home in [bedroom, lily_bedroom, hall, mom_bedroom, kitchen, harem_mansion]:
            if mc.is_home:
                mc.name "Absolutely!"
            else:
                mc.name "Absolutely, let's head home."
        else:
            if the_person.home not in mc.known_home_locations:
                mc.name "Absolutely, just point me in the right direction."
                "She guides you to her house quickly and efficiently."
            else:
                mc.name "Absolutely, let's go."
    $ mc.change_location(the_person.home)
    if is_text:
        "You make your way to [the_person.possessive_title]'s house. You text her to let you know you're here."
        mc.name "I'm here. Are you ready?"
        the_person "Come on in, the door is unlocked."
        $ mc.end_text_convo()
        "You go inside. The only light in the house comes from a room with its door ajar. When you swing it open you see [the_person.title] waiting."
    $ the_person.add_situational_slut("Date", 20, "There's no reason to hold back, he's here to fuck me!")
    if the_person.has_role(girlfriend_role):
        call girlfriend_fuck_date_event(the_person) from _call_girlfriend_fuck_date_event_invite
    else:
        call fuck_date_event(the_person) from _call_fuck_date_event_invite
    $ the_person.clear_situational_slut("Date")
    return "Advance Time"

label dinner_date_invite_label():
    $ scene_manager = Scene()
    $ the_person = get_dinner_date_person()
    $ is_text = False
    if mc.is_at_work:
        if the_person.is_employee and the_person.is_at_office or the_person.location == mc.location:
            "As you are packing up to head home for the day you are approached by [the_person.title]."
        else:
            "As you are packing up to head home for the day you get a text from [the_person.title]."
            $ is_text = True
    elif mc.is_home:
        if the_person in people_in_mc_home():
            "As you are walking down the hallway in your house you are approached by [the_person.title]."
        else:
            "As you are walking down the hallway in your house you get a text from [the_person.title]."
            $ is_text = True
    else:
        if the_person.location == mc.location:
            "As you are wandering around you are approached by [the_person.title]."
        else:
            "As you are wandering around you get a text from [the_person.title]."
            $ is_text = True
    if is_text:
        $ mc.start_text_convo(the_person)
    the_person "Hey [the_person.mc_title]! I don't feel like cooking so I was about to go grab dinner."
    the_person "Do you want to go with me?"
    menu:
        "Go on the date\n{color=#ff0000}{size=18}Costs: $100{/size}{/color}":
            pass
        "Decline the date":
            mc.name "Sorry I can't tonight. I've got other plans."
            the_person "Oh, okay. Have fun!"
            mc.name "Thanks, you too!"
            if is_text:
                $ mc.end_text_convo()
            return
    mc.name "Yeah, that sounds great. Where do you want to go?"
    the_person "There is nice place in town where we can get food and something to drink."
    if is_text:
        the_person "Let me send you the address."
        mc.name "Sounds good, I'll meet you there."
        the_person "Great! See you soon."
        $ mc.end_text_convo()
        "You get yourself looking as presentable as possible and head downtown."
    else:
        mc.name "Sounds good, are you ready to go now?"
        the_person "Yeah, just let me grab my purse."
    $ mc.change_location(downtown)
    $ scene_manager.add_actor(the_person, emotion = "happy")
    $ mc.business.change_funds(-100)
    $ the_person.change_love(5)
    $ the_person.change_happiness(5)
    $ renpy.show("restaurant", what = bg_manager.background("Restaurant_Background"), layer = "master")
    $ scene_manager.update_actor(the_person, emotion = "happy", position = "sitting")
    if the_person.has_role(sister_role) or the_person.has_role(mother_role):
        if the_person.sluttiness >= 20:
            "You and [the_person.possessive_title] get to the restaurant and order your meals. She chats and flirts with you freely, as if forgetting you were related."
        else:
            "You and [the_person.possessive_title] get to the restaurant and order your meals."
            "She chats and laughs with you the whole night, but never seems to consider this more than a friendly family dinner."
    else:
        "You and [the_person.possessive_title] get to the restaurant and order your meals. You chat, flirt, and have a wonderful evening."
    if renpy.random.randint(0,100) < 40: #Chance to give her some serum.
        "After dinner you decide to order dessert. [the_person.title] asks for a piece of cheesecake, then stands up from the table."
        the_person "I'm going to go find the little girls' room. I'll be back in a moment."
        $ scene_manager.hide_actor(the_person)
        "She heads off, leaving you alone at the table with her half-finished glass of wine."
        menu:
            "Add a dose of serum to her drink" if mc.inventory.total_serum_count>0:
                call give_serum(the_person) from _call_give_serum_21_invite
                if _return:
                    "You pour a dose of serum into her wine and give it a quick swirl, then sit back and relax."
                    "[the_person.possessive_title!c] returns just as your dessert arrives."
                else:
                    "You sit back and relax, content to just enjoy the evening. [the_person.possessive_title!c] returns just as your dessert arrives."
            "Add a dose of serum to her drink\n{color=#ff0000}{size=18}Requires: Serum{/size}{/color} (disabled)" if mc.inventory.total_serum_count == 0:
                pass
            "Leave her drink alone":
                "You sit back and relax, content to just enjoy the evening. [the_person.possessive_title!c] returns just as your dessert arrives."
        $ scene_manager.show_actor(the_person, position = "sitting")
        the_person "Ah, perfect timing!"
        "She sips her wine, then takes an eager bite of her cheesecake. She closes her eyes and moans dramatically."
        the_person "Mmm, so good!"
    $ the_person.change_love(mc.charisma)
    $ the_person.change_happiness(mc.charisma)
    $ scene_manager.update_actor(the_person)
    if the_person.home in [bedroom, lily_bedroom, hall, mom_bedroom, kitchen, harem_mansion]:
        "At the end of the night you pay the bill and leave with [the_person.title]. The two of you travel home together."
        if renpy.random.randint(0,100) < the_person.sluttiness + the_person.love + (mc.charisma * 10): #She invites you back to her place.
            $ the_person.call_dialogue("date_seduction")
            menu:
                "Go to [the_person.title]'s room":
                    mc.name "I think I would. Lead the way."
                    $ mc.change_location(the_person.home)
                    "[the_person.possessive_title!c] leads you into her room and closes the door behind you."
                    $ the_person.add_situational_slut("Romanced",25,"What a wonderful date!")
                    call fuck_person(the_person, private = True) from _call_fuck_person_16_invite
                    $ the_person.call_dialogue("sex_review", the_report = _return)
                    $ the_person.clear_situational_slut("Romanced")
                    "When you and [the_person.possessive_title] are finished you slip back to your own bedroom just down the hall."
                "Call it a night":
                    mc.name "I think we should just call it a night now. I've got to get up early tomorrow."
                    "She lets go of your hand and looks away."
                    the_person "Right, of course. I wasn't saying we should... I was just... Goodnight [the_person.mc_title]."
                    "She hurries off to her room."
        else:
            the_person "I had a great night [the_person.mc_title]. We should get out of the house and spend time together more often."
            mc.name "I think so too. Goodnight [the_person.title]."
    else:
        "At the end of the night you pay the bill and leave with [the_person.title]. You wait with her while she calls for a taxi."
        if renpy.random.randint(0,100) < the_person.sluttiness + the_person.love + (mc.charisma * 10): #She invites you back to her place.
            $ the_person.call_dialogue("date_seduction") #She invites you back to her place to "spend some more time together". She's been seduced.
            menu:
                "Go to [the_person.title]'s place":
                    $ mc.change_location(downtown)
                    mc.name "That sounds like a great idea."
                    if not the_person.has_role(aunt_role) and not the_person.has_role(cousin_role):
                        if not the_person.home in mc.known_home_locations:
                            $ mc.known_home_locations.append(the_person.home) #You know where she lives and can visit her.
                    "You join [the_person.possessive_title] when her taxi arrives."
                    "After a short ride you pull up in front of her house. She leads you to the front door and invites you inside."
                    $ the_person.add_situational_slut("Romanced",25,"What a wonderful date!")
                    call date_take_home_her_place(the_person, date_type = "dinner") from _call_date_take_home_her_place_1_invite
                    $ the_person.clear_situational_slut("Romanced")
                "Call it a night":
                    mc.name "I'd like to call it an early night today, but maybe I'll take you up on the offer some other time."
                    "Her taxi arrives. You give her a goodbye kiss and head home yourself."
        else: #She says goodnight to you here.
            the_person "I had a great night [the_person.mc_title], you're a lot of fun to be around. We should do this again."
            mc.name "It would be my pleasure."
            "[the_person.title]'s taxi arrives and she gives you a kiss goodbye. You watch her drive away, then head home yourself."
    $ scene_manager.clear_scene()
    $ mc.change_location(bedroom)
    return "Advance Time"

label shopping_date_invite_label():
    $ the_person = get_shopping_date_person()
    $ is_text = False
    if mc.is_at_work:
        if the_person.is_employee and the_person.is_at_office or the_person.location == mc.location:
            "As you are packing up to head home for the day you are approached by [the_person.title]."
        else:
            "As you are packing up to head home for the day you get a text from [the_person.title]."
            $ is_text = True
    elif mc.is_home:
        if the_person in people_in_mc_home():
            "As you are walking down the hallway in your house you are approached by [the_person.title]."
        else:
            "As you are walking down the hallway in your house you get a text from [the_person.title]."
            $ is_text = True
    else:
        if the_person.location == mc.location:
            "As you are wandering around you are approached by [the_person.title]."
        else:
            "As you are wandering around you get a text from [the_person.title]."
            $ is_text = True
    if is_text:
        $ mc.start_text_convo(the_person)
    the_person "I was going to head to the mall, but it's always more fun shopping with a friend."
    the_person "Wanna come with me?"
    menu:
        "Go shopping":
            mc.name "Sure, that sounds like fun."
            if not is_text:
                "[the_person.possessive_title!c] smiles and nods in agreement."
            $ the_person.change_happiness(5)
        "Not right now":
            mc.name "Sorry [the_person.title], I'm busy right now actually."
            the_person "Aww, alright. I've got to get going, see ya later!"
            if not is_text:
                "[the_person.possessive_title!c] hurries past you leaves."
            else:
                $ mc.end_text_convo()
            return
    if is_text:
        "You arrange a meeting place at the mall and then head downtown to spend some time with [the_person.possessive_title]."
        $ mc.end_text_convo()
    else:
        "You and [the_person.possessive_title] head downtown, to the largest shopping mall around."
    call shopping_date_intro(the_person, skip_intro = True) from _call_shopping_date_intro_invite
    return


code:
init -1 python:
    def home_missing_bra_requirement():      #Use this section to set up when this crisis or action can be fired.
        if home_missing_bra_get_people():
            return True
        return False

    def home_missing_bra_get_people():
        temp_list = []
        if mc.is_home:
            for person in [x for x in people_in_mc_home()]:
                if person.event_triggers_dict.get("stolen_bras",0) > 0:
                    count = person.event_triggers_dict.get("stolen_bras",0)
                    if get_person_bra_list(person):
                        while count:
                            temp_list.append(person)
                            count -= 1
        if temp_list:
            return get_random_from_list(temp_list)
        else:
            return get_random_from_list(people_in_mc_home())
        return None

    def bra_to_person(person):
        if person.event_triggers_dict.get("stolen_bras",0) > 0:
            person.event_triggers_dict["stolen_bras"] -= 1
        return

    def get_person_bra_list(person): #Returns a list of tuples. First item is the common display name "PERSON's ITEM", the second is the item reference itself #TODO: Add unit tests
        return_list = []
        if not person.identifier in mc.stolen_underwear:
            mc.stolen_underwear[person.identifier] = []
        if len(mc.stolen_underwear[person.identifier]) > 0:
            for item in mc.stolen_underwear[person.identifier]:
                if item in bra_list:
                    return_list.append([person.title + "'s " + clothing_formatted_title(item), item]) #TODO: Write the display code for this so it can show the little set of bra or bra with the correct colour/pattern. #TODO: might need an "empty" body type.
        if return_list:
            return_list.append(["Nothing", "Nothing"])
            return return_list
        return None

init 3 python:
    home_missing_bra_action = ActionMod("Missing Bra", home_missing_bra_requirement, "home_missing_bra_label",  #Using ActionMod automatically adds this event to the crisis list
        menu_tooltip = "A family member is looking for their bra.", category = "Home", is_crisis = True, is_morning_crisis = True, priority = 10)

label home_missing_bra_label():
    $ scene_manager = Scene()
    $ the_person = home_missing_bra_get_people()
    if not the_person:
        return
    if the_person.sluttiness >= 70:
        $ the_person.apply_outfit(Outfit("Nude"))
    elif the_person.sluttiness >= 60:
        $ apply_towel_outfit(the_person)
    elif the_person.sluttiness >= 40:
        $ the_person.apply_outfit(the_person.wardrobe.get_random_appropriate_underwear(the_person.sluttiness, guarantee_output = True))
    else:
        if the_person.has_job(sister_student_job):
            $ the_person.apply_outfit(limited_university_wardrobe.decide_on_outfit(the_person))
        elif the_person == mom and the_person.event_triggers_dict.get("mom_work_promotion_outfit", None):
            $ temp_string = the_person.event_triggers_dict.get("mom_work_promotion_outfit", None)
            $ outfit =  mom_business_wardrobe.get_outfit_with_name(temp_string)
            $ the_person.apply_outfit(outfit)
        elif the_person.is_employee:
            $ the_person.wear_uniform()
        else:
            $ the_person.apply_outfit(the_person.wardrobe.get_random_appropriate_outfit(the_person.sluttiness, guarantee_output = True))
    if the_person.sluttiness >= 30 and the_person.sluttiness < 60:
        $ the_person.outfit.strip_to_tits()
    $ test_outfit = the_person.outfit.get_copy()
    if the_person.wearing_bra:
        $ test_outfit.remove_clothing(the_person.outfit.get_bra())
    "As you are getting ready for the day you hear a knock on your door."
    if the_person.opinion.not_wearing_underwear<= 0:
        $ scene_manager.add_actor(the_person, visible = False)
        $ scene_manager.apply_outfit(the_person, test_outfit)
        $ scene_manager.show_actor(the_person, position = "stand3", emotion = "sad")
        "[the_person.title] hesitantly comes in with a frown on her face."
    else:
        $ scene_manager.add_actor(the_person, visible = False)
        $ scene_manager.apply_outfit(the_person, test_outfit)
        $ scene_manager.show_actor(the_person, position = "stand3", emotion = "happy")
        "[the_person.title] comes in smiling, clearly having a good day already."
    mc.name "Hey, [the_person.title], how are you doing today?"
    the_person "I can't seem to find some of my laundry and I wondered if it maybe ended up getting mixed into yours."
    mc.name "I'm not sure, what were you looking for?"
    the_person "I couldn't seem to find the bra I was going to wear with my outfit today."
    $ the_person.update_outfit_taboos()
    $ mc.change_locked_clarity(10)
    if the_person.opinion.not_wearing_underwear<= 0:
        the_person "I really don't feel comfortable leaving the house without it."
    else:
        the_person "Although leaving the house without it wouldn't be so bad."
        $ mc.change_locked_clarity(5)
    mc.name "Let me check."
    $ item = "Nothing"
    if get_person_bra_list(the_person):
        $ item = menu(get_person_bra_list(the_person))
    else:
        "You can't imagine that you have what she is looking for, but you decide to humour her."
    if item != "Nothing":
        $ title = clothing_formatted_title(item)
        "You pull the [title] from where it was carefully concealed in your laundry basket and hand it over to [the_person.title]."
        if the_person.tits_visible:
            "She threads her arms through the holes and starts to work it onto her breasts."
            $ mc.change_locked_clarity(10)
            $ scene_manager.update_actor(the_person, position = "back_peek", emotion = "happy")
            "Then she spins around and takes a step back towards you."
            the_person "Since I'm here anyway, would you mind closing the clasp for me?"
            $ mc.change_locked_clarity(10)
            mc.name "Of course."
            $ test_outfit.add_upper(item)
            $ scene_manager.hide_actor(the_person)
            $ scene_manager.apply_outfit(the_person, test_outfit)
            $ scene_manager.update_actor(the_person, position = "back_peek", emotion = "happy")
            "You quickly close it, brushing your fingers along her smooth back as you do so."
            the_person "Thanks, [the_person.mc_title], I don't know what I would do without you."
            mc.name "No problem, I'll try and keep a better eye on what laundry I'm putting away."
        elif the_person.outfit.get_upper_top_layer == towel:
            $ test_outfit.add_lower(get_random_from_list(underwear_list(the_person, the_bra = False, the_panties = True)[1]).get_copy())
            $ test_outfit.remove_clothing(towel)
            $ scene_manager.hide_actor(the_person)
            $ scene_manager.apply_outfit(the_person, test_outfit)
            $ scene_manager.update_actor(the_person, position = "stand", emotion = "happy")
            "Holding the [the_item.display_name] in one hand she uses the other to drop her towel so that she can put it on immediately."
            $ mc.change_locked_clarity(10)
            the_person "Thanks, [the_person.mc_title], I don't know what I would do without you."
            $ test_outfit.add_upper(item)
            $ scene_manager.hide_actor(the_person)
            $ scene_manager.apply_outfit(the_person, test_outfit)
            $ scene_manager.update_actor(the_person, position = "stand", emotion = "happy")
            mc.name "No problem, I'll try and keep a better eye on what laundry I'm putting away."
        else: #she can't put it on without getting undressed
            "She takes the bra and quickly stuffs it into her pocket, shifting a bit uncomfortably now that you know she isn't wearing any bra."
            $ mc.change_locked_clarity(5)
            the_person "Thanks, [the_person.mc_title], I don't know what I would do without you."
            mc.name "No problem, I'll try and keep a better eye on what laundry I'm putting away."
        $ scene_manager.update_actor(the_person, position = "walking_away", emotion = "happy")
        "She spins to walk away and finish getting dressed."
        $ return_underwear(item)
        $ bra_to_person(the_person)
    else:
        "You make a show of digging around in your laundry basket before turning around empty-handed."
        mc.name "Sorry, [the_person.title] it doesn't look like it is here."
        if the_person == lily:
            the_person "Alright, I guess I'll go see if mom has seen it."
        elif the_person == mom:
            the_person "Thanks anyway [the_person.mc_title], I'll go check with [lily.fname]."
        elif the_person == cousin:
            the_person"God dammit, I'm going to kill your sister."
        else:
            the_person "Okay, I guess I'll have to rethink my outfit for today."
        if the_person.is_employee:
            $ the_person.wear_uniform()
        if the_person.primary_job.planned_uniform:
            if the_person.primary_job.planned_uniform.get_bra():
                $ the_person.primary_job.planned_uniform.remove_clothing(the_person.primary_job.planned_uniform.get_bra())
        elif the_person.planned_outfit:
            if the_person.planned_outfit.get_bra():
                $ the_person.planned_outfit.remove_clothing(the_person.planned_outfit.get_bra())
    $ scene_manager.clear_scene()
    return

license: unknown


code:
init -1 python:
    def home_missing_panties_requirement():      #Use this section to set up when this crisis or action can be fired.
        if home_missing_panties_get_people():
            return True
        return False

    def home_missing_panties_get_people():
        temp_list = []
        if mc.is_home:
            for person in [x for x in people_in_mc_home()]:
                if person.event_triggers_dict.get("stolen_panties",0) > 0:
                    count = person.event_triggers_dict.get("stolen_panties",0)
                    if get_person_panties_list(person):
                        while count:
                            temp_list.append(person)
                            count -= 1
        if temp_list:
            return get_random_from_list(temp_list)
        else:
            return get_random_from_list(people_in_mc_home())
        return None

    def panties_to_person(person):
        if person.event_triggers_dict.get("stolen_panties",0) > 0:
            person.event_triggers_dict["stolen_panties"] -= 1
        return

    def get_person_panties_list(person): #Returns a list of tuples. First item is the common display name "PERSON's ITEM", the second is the item reference itself #TODO: Add unit tests
        return_list = []
        if not person.identifier in mc.stolen_underwear:
            mc.stolen_underwear[person.identifier] = []
        if len(mc.stolen_underwear[person.identifier]) > 0:
            for item in mc.stolen_underwear[person.identifier]:
                if item in panties_list:
                    return_list.append([person.title + "'s " + clothing_formatted_title(item), item]) #TODO: Write the display code for this so it can show the little set of panties or bra with the correct colour/pattern. #TODO: might need an "empty" body type.
        if return_list:
            return_list.append(["Nothing", "Nothing"])
            return return_list
        return None

init 3 python:
    home_missing_panties_action = ActionMod("Missing Panties", home_missing_panties_requirement, "home_missing_panties_label",  #Using ActionMod automatically adds this event to the crisis list
        menu_tooltip = "A family member is looking for their panties.", category = "Home", is_crisis = True, is_morning_crisis = True, priority = 10)   #Categories include Home, Business, Fetish

label home_missing_panties_label():
    $ scene_manager = Scene()
    $ the_person = home_missing_panties_get_people()
    if not the_person:
        return
    if the_person.sluttiness >= 80:
        $ the_person.apply_outfit(Outfit("Nude"))
    elif the_person.sluttiness >= 70:
        $ apply_towel_outfit(the_person)
    elif the_person.sluttiness >= 50:
        $ the_person.apply_outfit(the_person.wardrobe.get_random_appropriate_underwear(the_person.sluttiness, guarantee_output = True))
    else:
        if the_person.has_job(sister_student_job):
            $ the_person.apply_outfit(limited_university_wardrobe.decide_on_outfit(the_person))
        elif the_person == mom and the_person.event_triggers_dict.get("mom_work_promotion_outfit", None):
            $ temp_string = the_person.event_triggers_dict.get("mom_work_promotion_outfit", None)
            $ outfit =  mom_business_wardrobe.get_outfit_with_name(temp_string)
            $ the_person.apply_outfit(outfit)
        elif the_person.is_employee:
            $ the_person.wear_uniform()
        else:
            $ the_person.apply_outfit(the_person.wardrobe.get_random_appropriate_outfit(the_person.sluttiness, guarantee_output = True))
    if the_person.sluttiness >= 50 and the_person.sluttiness < 70:
        $ the_person.outfit.strip_to_vagina()
    $ test_outfit = the_person.outfit.get_copy()
    if the_person.wearing_panties:
        $ test_outfit.remove_clothing(the_person.outfit.get_panties())
    "As you are getting ready for the day you hear a knock on your door."
    if the_person.opinion.not_wearing_underwear<= 0:
        $ scene_manager.add_actor(the_person, visible = False)
        $ scene_manager.apply_outfit(the_person, test_outfit)
        $ scene_manager.show_actor(the_person, position = "stand3", emotion = "sad")
        "[the_person.title] hesitantly comes in with a frown on her face."
    else:
        $ scene_manager.add_actor(the_person, visible = False)
        $ scene_manager.apply_outfit(the_person, test_outfit)
        $ scene_manager.show_actor(the_person, position = "stand3", emotion = "happy")
        "[the_person.title] comes in smiling, clearly having a good day already."
    mc.name "Hey, [the_person.title], how are you doing today?"
    the_person "I can't seem to find some of my laundry and I wondered if it maybe ended up getting mixed into yours."
    mc.name "I'm not sure, what were you looking for?"
    the_person "I couldn't seem to find the panties I wanted to wear with my outfit today."
    $ mc.change_locked_clarity(10)
    if the_person.opinion.not_wearing_underwear<= 0:
        the_person "I really don't feel comfortable leaving the house without them."
    else:
        the_person "Although leaving the house without them wouldn't be so bad."
        $ mc.change_locked_clarity(10)
    mc.name "Let me check."
    $ item = "Nothing"
    if get_person_panties_list(the_person):
        $ item = menu(get_person_panties_list(the_person))
    else:
        "You can't imagine that you have what she is looking for, but you decide to humour her."
    if item != "Nothing":
        $ title = clothing_formatted_title(item)
        "You pull the [title] from where they were carefully concealed in your laundry basket and hand them over to [the_person.title]."
        if the_person.vagina_visible or the_person.outfit.get_upper_top_layer == towel:
            "She bends down and steps into them, shimmying as she works them up her legs."
            $ mc.change_locked_clarity(10)
            while not the_person.vagina_visible:
                python:
                    for the_clothing in [x for x in the_person.outfit.get_lower_ordered() if not (x.underwear or x.half_off)]:
                        renpy.say(None, "This causes her " + clothing_formatted_title(the_clothing) + " to ride high up her waist.")
                        scene_manager.draw_animated_removal(the_person, the_clothing, half_off_instead = True)
            $ test_outfit.add_lower(item)
            $ scene_manager.hide_actor(the_person)
            $ scene_manager.apply_outfit(the_person, test_outfit)
            $ scene_manager.update_actor(the_person, position = "stand4", emotion = "happy")
            the_person "Thanks, [the_person.mc_title], I don't know what I would do without you."
            mc.name "No problem, I'll try and keep a better eye on what laundry I'm putting away."
            $ the_person.outfit.restore_all_clothing()
            $ scene_manager.update_actor(the_person, position = "walking_away", emotion = "happy")
            "She spins to walk away and finish getting dressed, pulling slightly at the [item.display_name] to get them settled properly."
        else: #she can't put them on without getting undressed
            "She takes them and quickly stuffs them into her pocket, shifting a bit uncomfortably now that you know she isn't wearing any panties."
            $ mc.change_locked_clarity(5)
            the_person "Thanks, [the_person.mc_title], I don't know what I would do without you."
            mc.name "No problem, I'll try and keep a better eye on what laundry I'm putting away."
            $ scene_manager.update_actor(the_person, position = "walking_away", emotion = "happy")
            "She spins to walk away and finish getting dressed."
        $ return_underwear(item)
        $ panties_to_person(the_person)
    else:
        "You make a show of digging around in your laundry basket before turning around empty-handed."
        mc.name "Sorry, [the_person.title] it doesn't look like they are here."
        if the_person == lily:
            the_person "Alright, I guess I'll go see if mom has seen them."
        elif the_person == mom:
            the_person "Thanks anyway [the_person.mc_title], I'll go check with [lily.fname]."
        elif the_person == cousin:
            the_person"God dammit, I'm going to kill your sister."
        else:
            the_person "Okay, I guess I'll have to rethink my outfit for today."
        if the_person.is_employee:
            $ the_person.wear_uniform()
        if the_person.primary_job.planned_uniform:
            if the_person.primary_job.planned_uniform.get_panties():
                $ the_person.primary_job.planned_uniform.remove_clothing(the_person.primary_job.planned_uniform.get_panties())
        elif the_person.planned_outfit:
            if the_person.planned_outfit.get_panties():
                $ the_person.planned_outfit.remove_clothing(the_person.planned_outfit.get_panties())
    $ scene_manager.clear_scene()
    return


code:
init -1 python:
    def serum_test_crisis_requirement():
        if mc.business.is_open_for_business and mc.is_at_work:
            if mandatory_paid_serum_testing_policy.is_active:
                return not get_random_from_list([x for x in mc.business.employee_list if len(x.serum_effects) > 0]) is None
        return False

init 3 python:
    serum_test_action = ActionMod("Serum Test", serum_test_crisis_requirement, "serum_test_crisis_label",
        menu_tooltip = "An employee wants to discuss some serum side effects with you.", category = "Business Crisis", is_crisis = True, priority = 10)

label serum_test_crisis_label():
    $ scene_manager = Scene()
    $ the_person = get_random_from_list([x for x in mc.business.employee_list if len(x.serum_effects) > 0])
    $ the_serum = get_random_from_list(the_person.serum_effects)
    $ scene_manager.add_actor(the_person, emotion = "sad")
    "As you are working one of your employees comes up to you looking like she is having a problem."
    the_person "Hey, [the_person.mc_title] I was hoping that I could talk to you in private."
    mc.name "Sure, [the_person.title] let's go to my office."
    $ mc.change_location(ceo_office)
    "Once there you sit down at your desk and gesture for her to sit as well."
    $ scene_manager.update_actor(the_person, position = "sitting", emotion = "sad")
    the_person "Thanks, for taking some time for me."
    mc.name "Of course, [the_person.title]. What can I do for you?"
    the_person "I don't want to worry the other girls, but I think that there is something wrong with one of our serums."
    mc.name "What do you mean?"
    if daily_serum_dosage_policy.is_active:
        the_person "I know testing our product is an important part of the job, but today's dose is making me feel a bit off."
        if the_person in mc.business.research_team:
            $ the_serum = mc.business.r_serum
        elif the_person in mc.business.market_team:
            $ the_serum = mc.business.m_serum
        elif the_person in mc.business.production_team:
            $ the_serum = mc.business.p_serum
        elif the_person in mc.business.supply_team:
            $ the_serum = mc.business.s_serum
        elif the_person in mc.business.hr_team:
            $ the_serum = mc.business.h_serum
        if not the_serum:
            $ the_serum = get_random_from_list(the_person.serum_effects)
    elif mandatory_unpaid_serum_testing_policy.is_active:
        the_person "I know you asked me to test a serum, and I trust you, but something is making me feel a bit odd."
    elif mandatory_paid_serum_testing_policy.is_active:
        the_person "I've loved the extra income we can earn testing serums, but something has been making me feel weird today."
    mc.name "Well, it isn't good that you are having side effects, but that is one of the reasons these tests are so important."
    if the_person == mc.business.head_researcher:
        mc.name "I'm sure you'll stay on top of it, but why don't you tell me about the problem so I can track it as well."
    elif the_person in mc.business.research_team:
        if len(mc.business.research_team) > 1:
            mc.name "Can you describe the problem so I can let the rest of our research team know what to look for?"
        else:
            mc.name "Can you describe the problem so I can keep an eye out for it?"
    else:
        if len(mc.business.research_team) > 1:
            mc.name "Can you describe the problem so I can let our research team know what to look for?"
        else:
            mc.name "Can you describe the problem so I can keep an eye out for it?"
    the_person "Absolutely, I want to help avoid this problem in the future."
    if the_serum.has_trait(depressant_side_effect) or the_serum.has_trait(anxiety_provoking): # -happiness high_con_drugs climax_enhancer
        the_person "As soon as I took this dose I felt really depressed."
        if the_person.current_job.job_happiness_score > 0:
            the_person "I usually love coming to work, but right now all I can think about is how sad I am."
        else:
            the_person "Work isn't my favourite thing, but usually I can get through it. Today it just seems impossible."
    elif the_serum.has_trait(libido_suppressant): # -sluttiness large_obedience_enhancer
        if not the_person.judge_outfit(the_person.outfit):
            the_person "This morning when I got dressed I thought this outfit would look great, but now it feels very revealing."
        else:
            the_person "It's hard to pin down, but I've just been feeling really numb today, like nothing is interesting to me."
    elif the_serum.has_trait(performance_inhibitor): # -stats sedatives_trait
        the_person "Ever since I took my dose today I've felt like I was struggling to work. My focus is all over and I can't seem to do even routine tasks."
    elif the_serum.has_trait(mood_swings): # random happiness
        the_person "I've felt really moody today. One moment I'm up and the next I'm down. It feels so strong and chaotic. It is making it hard to trust myself."
    elif the_serum.has_trait(sedative) or the_serum.has_trait(slow_release_sedative): # -energy simple_aphrodesiac
        the_person "I'm really tired, I got a full night's sleep but I keep catching myself yawning for no reason."
    elif the_serum.has_trait(uncontrollable_arousal_side_effect): # +sluttiness
        the_person "I've been feeling hot and bothered all day."
        if the_person.sluttiness > 80:
            the_person "I keep fantasizing about you walking up and taking me right here in the middle of the office."
        if the_person.sluttiness > 60:
            the_person "I keep thinking about you, and how much I'd like to find somewhere private to fool around."
        elif the_person.sluttiness > 40:
            the_person "I keep thinking that I should find somewhere private to play with myself."
        elif the_person.sluttiness > 20:
            the_person "I keep thinking I need to calm down but it is so hard to ignore."
        else:
            the_person "I'm sorry, I'm too embarrassed to elaborate."
    elif the_serum.has_trait(tryptamine_side_effect): # +obey
        if get_existing_rival_count(town_relationships, the_person) > 0:
            $ the_rival = get_random_from_list(get_existing_rivals(town_relationships, the_person))
            the_person "Usually I don't really get along with [the_rival.fname], but earlier when she asked me to do something I did it without a second of hesitation."
        else:
            the_person "I've been unusually agreeable today, earlier I kept letting people cut in front of me at the bathroom, even though I really had to go."
    elif the_serum.has_trait(oxytocin_side_effect) and the_person.love < 40: # +love if <40
        the_person "I've never had a problem with you, but today I keep thinking we should get closer."
        the_person "I caught myself doodling hearts with our names in them like a little school girl."
    elif the_serum.has_trait(caffeine_trait): # -obey aphrodisiac mood_enhancer
        the_person "I'm really disagreeable, every time someone asks me something I snap at them."
    else:
        the_person "I'm not sure. Something is off but I can't figure out what."
    the_person "What do you think I should do?"
    menu:
        "Stay at work":
            mc.name "We knew there would be some side effects, it is best to just push through them."
            mc.name "I'm going to need you to stay at work, just make notes throughout the day about what is happening and how long it lasts."
            the_person "If you think that is best, I'll be sure to drop off my notes with the research department at the end of the day."
            $ the_person.change_happiness(-5)
            $ the_person.change_obedience(5)
            $ the_person.apply_serum_study()
            $ the_person.apply_serum_study(add_to_log = False) # I want extra progress but no spam
            $ the_person.apply_serum_study(add_to_log = False)
            mc.name "Thank you, I know you can get through this."
            "With the crisis somewhat resolved you get back to work, and trust [the_person.title] to do the same."
        "Go home":
            mc.name "That sounds serious, if you think you need to you could go home for the day."
            the_person "Really, I don't want to let you and the company down."
            mc.name "Of course, your well-being is important, we can make it the rest of the day without you."
            $ scene_manager.update_actor(the_person, position = "sitting", emotion = "happy")
            $ the_person.change_happiness(5)
            the_person "Thank you so much, but there is one other problem."
            mc.name "What's that?"
            the_person "I'm a little worried about going home alone, what if it gets worse?"
            if not the_person.is_single and not the_person.is_girlfriend:
                $ so_title = SO_relationship_to_title(the_person.relationship)
                the_person "My [so_title] will be at work all day and I'll be all alone."
            mc.name "I could go with you if you want."
            the_person "Are you sure, I know you have work to do also."
            mc.name "Part of my job is studying these side effects, this would give me a chance to focus on yours and try to find a way to prevent them in the future."
            the_person "Okay, I'll meet you outside."
            $ scene_manager.update_actor(the_person, position = "walking_away")
            "She turns and starts to head for the lobby."
            $ scene_manager.hide_actor(the_person)
            "You gather up your things and head down to the parking lot where [the_person.title] is waiting."
            $ mc.change_location(downtown)
            $ scene_manager.show_actor(the_person)
            if the_person.home in mc.known_home_locations:
                "Once you are in the car she starts to give you directions before you interrupt her."
                mc.name "Don't worry, [the_person.title] I already know where you live."
                the_person "Oh, right, sorry I am so frazzled I forgot."
            else:
                "Once you are in the car you get it started and realise you don't know where to go."
                mc.name "I just need to know where we're going."
                the_person "Oh, right, I forgot we've never talked about my home."
                if the_person.relationship == "Single" or the_person.kids == 0:
                    $ ran_num = renpy.random.randint(4, 8)
                    $ opinion = get_random_from_list(["Peach Trees", "Nakatomi Plaza", "La Fortuna", "Villa Bonita", "St. Germaine"])
                    the_person "I have a nice little place in the [opinion] apartment block on the [ran_num]th floor."
                else:
                    $ opinion = get_random_from_list(["Lyon Estates just south of Hill Valley", "Bristol Avenue in Brentwood", "Carnarvon Park in Newbury", "Quimby Street in Cullen"])
                    the_person "We have a beautiful home at the [opinion]."
                $ the_person.learn_home()
            "After a short drive you get to [the_person.title]'s home and help her up to the door."
            $ mc.change_location(the_person.home)
            $ scene_manager.update_actor(the_person, position = "sitting")
            "Once she is settled in on the couch you head towards the kitchen."
            mc.name "Let me get you something to drink, what would you like."
            if renpy.random.randint(0,1) == 1:
                the_person "A glass of water would be great."
            else:
                the_person "I could really use a glass of wine, if you think that would be okay."
            mc.name "Of course, let me grab it."
            $ mc.change_location(kitchen)
            "Alone in the kitchen you have a chance to double down and add another serum to [the_person.title]'s drink."
            call give_serum(the_person) from _call_give_serum_side_effect
            "With that done it is time to figure out what you want to do alone with [the_person.possessive_title]."
            $ mc.change_location(the_person.home)
            $ scene_manager.update_actor(the_person, position = "sitting")
            menu:
                "Distract her from the side effects":
                    "Deciding that it would be best to just talk to her you launch into some small talk."
                    call small_talk_person(the_person, apply_energy_cost = False, is_phone = False) from _call_small_talk_person_side_effect
                    call small_talk_person(the_person, apply_energy_cost = False, is_phone = False) from _call_small_talk_person_side_effect2
                    "It works out pretty well and you have the opportunity to learn more about [the_person.title] and the side effects she is suffering at the same time."
                "Focus on the problem":
                    "The side effects in your serums have been a real problem so you take the opportunity to really drill into what is going on with the serum currently affecting [the_person.title]."
                    "You start out with a fairly basic round of questions and are able to learn a bit more about what is going on."
                    $ the_person.apply_serum_study()
                    $ the_person.change_stats(happiness = -2)
                    "She isn't trilled, but she tolerates the questioning fairly well."
                    menu:
                        "Continue":
                            "Seeing how effective it is you decide to pursue some more detailed and direct questions."
                            $ the_person.apply_serum_study(add_to_log = False)
                            $ the_person.apply_serum_study()
                            $ the_person.change_stats(happiness = -5)
                            "Unfortunately it seems like she is starting to feel like she is being grilled."
                            menu:
                                "Keep pushing":
                                    "This is the reason you are here. She will get over the frustration and discomfort just like she will get over the side effects."
                                    $ the_person.apply_serum_study(add_to_log = False)
                                    $ the_person.apply_serum_study(add_to_log = False)
                                    $ the_person.apply_serum_study()
                                    $ the_person.change_stats(happiness = -10)
                                    "She is clearly upset now. You might irreparably damage your relationship if you persist."
                                    menu:
                                        "Dig deeper":
                                            "Throwing caution to the wind you really start to demand answers."
                                            $ the_person.apply_serum_study(add_to_log = False)
                                            $ the_person.apply_serum_study(add_to_log = False)
                                            $ the_person.apply_serum_study(add_to_log = False)
                                            $ the_person.apply_serum_study()
                                            $ the_person.change_stats(happiness = -20)
                                            "She answers what questions she can, and you feel like you really got some valuable insight from the process."
                                            "Unfortunately it is also pretty clear that she did not enjoy the way you treated her."
                                        "Relent":
                                            "Sensing that it is possible to go too far you stop of the day, although it seems like the damage has already been done."
                                "Back off":
                                    "You back off and shift focus. Wrapping up with some more gentle conversation."
                                    $ the_person.change_stats(happiness = 2)
                                    "She breathes a sign of relief, although your early actions left their mark."
                        "Stop":
                            "You wrap up with some more gentle and casual conversation to put her at ease."
                            $ the_person.change_stats(happiness = 5)
                            "She seems to appreciate it, even if you didn't make as much progress as you could have."
                "Take advantage of the alone time" if the_person.love > 40 or the_person.is_willing(standing_grope):
                    "The serum research is important, but there are some other things that spring to mind when you consider what you want to do while alone with [the_person.fname]."
                    if the_person.love > 40:
                        call flirt_person(the_person) from _call_flirt_person_side_effect
                    elif the_person.is_willing(standing_grope):
                        call grope_person(the_person)
                    $ the_person.apply_serum_study()
            $ day_part = time_of_day_string(time_of_day)
            "All told it has been a productive [day_part], so you head back to the office to record what notes you can."
            $ mc.change_location(ceo_office)
            $ del day_part
    $ scene_manager.clear_scene()
    $ the_person.apply_serum_study()
    return