Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit f576c908f2ad167b28f8a1da801b5e75344899c9
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sun Mar 25 18:26:50 2018 +0200
- implement repeat action in chat
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/script.rpy b/script.rpy
- index 81c9a90..9fb0d5c 100644
- --- a/script.rpy
- +++ b/script.rpy
- @@ -11,6 +11,7 @@ init -2 python:
- import math
- import __builtin__
- import pygame
- + import re
- # import shader
- config.image_cache_size = 12
- @@ -3344,7 +3345,6 @@ label create_outfit(the_outfit):
- label game_loop: ##THIS IS THE IMPORTANT SECTION WHERE YOU DECIDE WHAT ACTIONS YOU TAKE
- #"Now, what would you like to do? You can talk to someone, go somewhere else, perform an action, or reexamine the room."
- python:
- -
- tuple_list = [("Go somewhere else.", "Go somewhere else."), ("Examine the room.", "Examine the room.")]
- act_ct = mc.location.valid_actions()
- if act_ct < 5:
- @@ -3362,6 +3362,7 @@ label game_loop: ##THIS IS THE IMPORTANT SECTION WHERE YOU DECIDE WHAT ACTIONS Y
- tuple_list.append(("Talk to someone.", "Talk to someone."))
- choice = renpy.display_menu(tuple_list,True,"Choice")
- +
- if isinstance(choice, basestring):
- if choice == "Go somewhere else.":
- call screen map_manager
- @@ -3416,64 +3417,36 @@ label change_location(the_place):
- # "You spend some time travelling to [the_place.name]." #TODO: Only show this when there is a significant time use? Otherwise takes up too much time changing between locations.
- return
- -label talk_person(the_person):
- +label talk_person(the_person, repeat_choice = None):
- $the_person.draw_person()
- show screen person_info_ui(the_person)
- hide screen business_ui
- -
- +
- menu:
- "Finish talking.":
- + $ repeat_choice = None
- "Eventually you're done say goodbye to each other."
- + "Repeat" if repeat_choice:
- + # print the repeat choice and then replace characters so it can be called as a label
- + "You [repeat_choice]"
- + $ renpy.call(re.sub(' ', '_', repeat_choice))
- +
- "Chat about something.":
- + $ repeat_choice = None
- menu:
- "Compliment her outfit.":
- - mc.name "Hey [the_person.name], I just wanted to say that you look great today. That style really suits you." #TODO: Add more context aware dialogue.
- - $ slut_difference = int(the_person.sluttiness - the_person.outfit.slut_requirement) #Negative if their outfit is sluttier than what they would normally wear.
- - # Note: The largest effect should occure when the outfit is just barely in line with her sluttiness. Too high or too low and it will have no effect.
- -
- - $ sweet_spot_range = 10
- - if slut_difference < -sweet_spot_range : #Outfit is too slutty, she will never get use to wearing it.
- - $ the_person.draw_person(emotion = "default")
- - the_person.name "Really? It's just so revealing, what do people think of me when they see me? I don't think I'll ever get use to wearing this."
- -
- - elif slut_difference > sweet_spot_range: #Outfit is conservative, no increase.
- - $ the_person.draw_person(emotion = "default")
- - the_person.name "Really? I think it looks too bland, showing a little more skin would be nice."
- -
- - else: #We are within the sweet_spot_range with the outfit.
- - $ slut_difference = math.fabs(slut_difference)
- - if slut_difference > sweet_spot_range:
- - $ slut_difference = sweet_spot_range
- - $ slut_difference = sweet_spot_range - slut_difference #invert the value so we now have 10 - 10 at both extreme ends, 10 - 0 at the middle where it will have the most effect.
- - $ change_amount = the_person.change_slut_modified(mc.charisma + 1 + slut_difference) #Increase their sluttiness if they are suggestable right now.
- - show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- - the_person.name "Glad you think so, I was on the fence, but it's nice to know that somebody likes it!"
- -
- + $ repeat_choice = "compliment her outfit"
- + call compliment_her_outfit from chat_compliment_outfit
- "Flirt with her.":
- - mc.name "Hey [the_person.name], you're looking particularly good today. I wish I got to see a little bit more of that fabulous body."
- - $ change_amount = the_person.change_slut_modified(mc.charisma + 1)
- - show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- - $the_person.call_flirt_response()
- -
- + $ repeat_choice = "flirt with her"
- + call flirt_with_her from chat_flirt
- "Compliment her recent work." if mc.business.get_employee_workstation(the_person):
- - mc.name "[the_person.name], I wanted to tell you that you've been doing a great job lately. Keep it up, you're one of hte most important players in this whole operation."
- - $ change_amount = mc.charisma + 1
- - $ change_amount_obedience = the_person.change_obedience_modified(-change_amount)
- - $ the_person.change_happiness(change_amount)
- - $ the_person.draw_person(emotion = "happy")
- - show screen float_up_screen(["+[change_amount] Happiness","[change_amount_obedience] Obedience"],["float_text_yellow","float_text_grey"])
- - the_person.name "Thanks [mc.name], it means a lot to hear that from you. I'll just keep doing what I'm doing I guess."
- -
- + $ repeat_choice = "compliment her recent work"
- + call compliment_her_recent_work from chat_compliment_work
- "Insult her recent work." if mc.business.get_employee_workstation(the_person):
- - mc.name "[the_person.name], I have to say I've been disappointed in your work for a little while now. Try to shape up, or we'll have to have a more offical talk about it."
- - $ change_amount = mc.charisma*2 + 1
- - $ change_amount_happiness = 5-mc.charisma
- - $ change_amount= the_person.change_obedience_modified(change_amount)
- - $ the_person.change_happiness(-change_amount_happiness)
- - $ the_person.draw_person(emotion = "sad")
- - show screen float_up_screen(["-[change_amount_happiness] Happiness","+[change_amount] Obedience"],["float_text_yellow","float_text_grey"])
- - the_person.name "Oh... I didn't know there was an issue. I'll try follow your instructions closer then."
- -
- + $ repeat_choice = "insult her recent work"
- + call insult_her_recent_work from chat_insult
- +
- "Offer a cash bonus." if mc.business.get_employee_workstation(the_person):
- mc.name "So [the_person.name], you've been putting in a lot of good work at the lab lately and I wanted to make sure you were rewarded properly for that."
- "You pull out your wallet and start to pull out a few bills."
- @@ -3488,8 +3461,8 @@ label talk_person(the_person):
- show screen float_up_screen(["-[change_amount] Happiness"],["float_text_yellow"])
- $the_person.change_happiness(-change_amount)
- "[the_person.name] looks visibly disapointed."
- - the_person.name "Right, of course."
- -
- + the_person.name "Right, of course."
- +
- "Give her a days wages. -$[the_person.salary]" if mc.money >= the_person.salary:
- mc.name "Here you go, treat yourself to something nice tonight."
- $ the_person.draw_person(emotion = "happy")
- @@ -3497,9 +3470,8 @@ label talk_person(the_person):
- show screen float_up_screen(["+[change_amount] Happiness"],["float_text_yellow"])
- $ the_person.change_happiness(change_amount)
- "[the_person.name] takes the bills from you and smiles."
- - the_person.name "Thank you sir."
- -
- -
- + the_person.name "Thank you sir."
- +
- "Give her a weeks wages. -$[weeks_wages]" if mc.money >= weeks_wages:
- mc.name "Here you go, don't spend it all in once place."
- $ the_person.draw_person(emotion = "happy")
- @@ -3510,7 +3482,7 @@ label talk_person(the_person):
- show screen float_up_screen(["+[change_amount] Happiness","+[change_amount] Obedience"],["float_text_yellow","float_text_grey"])
- "[the_person.name] takes the bills, then smiles broadly at you."
- the_person.name "That's very generous of you sir, thank you."
- -
- +
- "Give her a months wages. -$[months_wages]" if mc.money >= months_wages:
- mc.name "Here, you're a key part of the team and you deserved to be rewarded as such."
- $ the_person.draw_person(emotion = "happy")
- @@ -3531,7 +3503,7 @@ label talk_person(the_person):
- $ the_person.review_outfit()
- else:
- the_person.name "Wow... this is amazing sir. I'll do everything I can for you and the company!"
- -
- +
- "Give her a permanent 10%% Raise ($[raise_amount]/day)":
- mc.name "[the_person.name], it's criminal that I pay you as little as I do. I'm going to mark you down for a 10%% raise, effective by the end of today."
- $ change_amount = 5+mc.charisma
- @@ -3541,11 +3513,11 @@ label talk_person(the_person):
- show screen float_up_screen(["+$[raise_amount]/day Salary","+[change_amount] Happiness","+[change_amount_obedience] Obedience"],["float_text_green","float_text_yellow","float_text_grey"])
- $ the_person.salary += raise_amount
- the_person.name "Thank you sir, that's very generous of you!"
- -
- -
- - call talk_person(the_person) from _call_talk_person_4
- -
- +
- + call talk_person(the_person) from _call_talk_person_4
- +
- "Modify her wardrobe." if the_person.obedience >= 120:
- + $ repeat_choice = None
- menu:
- "Add an outfit.":
- mc.name "[the_person.name], I've got something I'd like you to wear for me." ## Do we want a completely silent protag? Speaks only through menu input maybe?
- @@ -3592,10 +3564,10 @@ label talk_person(the_person):
- $ the_person.draw_person()
- show screen main_ui
- the_person.name "Is this better?"
- -
- call talk_person(the_person) from _call_talk_person_1
- "Move her to a new division." if not mc.business.get_employee_title(the_person) == "None":
- + $ repeat_choice = None
- the_person.name "Where would you like me then?"
- $ mc.business.remove_employee(the_person)
- @@ -3631,6 +3603,7 @@ label talk_person(the_person):
- the_person.name "I'll get started right away!"
- "Fire them!" if not mc.business.get_employee_title(the_person) == "None":
- + $ repeat_choice = None
- "You tell [the_person.name] to collect their things and leave the building."
- $ mc.business.remove_employee(the_person) #TODO: check if we should actually be physically removing the person from the location without putting them somewhere else (person leak?)
- if rd_division.has_person(the_person):
- @@ -3643,26 +3616,90 @@ label talk_person(the_person):
- $ m_division.remove_person(the_person)
- "Take a closer look at [the_person.name].":
- + $ repeat_choice = None
- call examine_person(the_person) from _call_examine_person
- call talk_person(the_person) from _call_talk_person_2
- "Give her a dose of serum." if mc.inventory.get_any_serum_count() > 0 and mandatory_serum_testing_policy.is_owned():
- - $renpy.scene("Active")
- - call give_serum(the_person) from _call_give_serum
- - call talk_person(the_person) from _call_talk_person_3
- + $ repeat_choice = "give her a dose of serum"
- + call give_her_a_dose_of_serum
- "Seduce her.":
- - "You step close to [the_person.name] and hold her hand."
- - $ the_person.call_seduction_response()
- - call fuck_person(the_person) from _call_fuck_person
- - #Now that you've had sex, we calculate the change to her stats and move on.
- - $ change_amount = the_person.change_slut_modified(the_person.arousal) #Change her slut score by her final arousal. This should be _about_ 100 if she climaxed, but you may keep fucking her silly if you can overcome the arousal loss.
- - show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- - $ the_person.reset_arousal()
- - $ the_person.review_outfit()
- + $ repeat_choice = None
- + call seduce_her from chat_seduce
- + if repeat_choice:
- + call talk_person(the_person, repeat_choice) from _call_talk_person_3
- hide screen person_info_ui
- show screen business_ui
- $renpy.scene("Active")
- return
- -
- +
- +label compliment_her_outfit:
- + mc.name "Hey [the_person.name], I just wanted to say that you look great today. That style really suits you." #TODO: Add more context aware dialogue.
- + $ slut_difference = int(the_person.sluttiness - the_person.outfit.slut_requirement) #Negative if their outfit is sluttier than what they would normally wear.
- + # Note: The largest effect should occure when the outfit is just barely in line with her sluttiness. Too high or too low and it will have no effect.
- +
- + $ sweet_spot_range = 10
- + if slut_difference < -sweet_spot_range : #Outfit is too slutty, she will never get use to wearing it.
- + $ the_person.draw_person(emotion = "default")
- + the_person.name "Really? It's just so revealing, what do people think of me when they see me? I don't think I'll ever get use to wearing this."
- +
- + elif slut_difference > sweet_spot_range: #Outfit is conservative, no increase.
- + $ the_person.draw_person(emotion = "default")
- + the_person.name "Really? I think it looks too bland, showing a little more skin would be nice."
- +
- + else: #We are within the sweet_spot_range with the outfit.
- + $ slut_difference = math.fabs(slut_difference)
- + if slut_difference > sweet_spot_range:
- + $ slut_difference = sweet_spot_range
- + $ slut_difference = sweet_spot_range - slut_difference #invert the value so we now have 10 - 10 at both extreme ends, 10 - 0 at the middle where it will have the most effect.
- + $ change_amount = the_person.change_slut_modified(mc.charisma + 1 + slut_difference) #Increase their sluttiness if they are suggestable right now.
- + show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- + the_person.name "Glad you think so, I was on the fence, but it's nice to know that somebody likes it!"
- + return
- +
- +label flirt_with_her:
- + mc.name "Hey [the_person.name], you're looking particularly good today. I wish I got to see a little bit more of that fabulous body."
- + $ change_amount = the_person.change_slut_modified(mc.charisma + 1)
- + show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- + $the_person.call_flirt_response()
- + return
- +
- +label compliment_her_recent_work:
- + mc.name "[the_person.name], I wanted to tell you that you've been doing a great job lately. Keep it up, you're one of hte most important players in this whole operation."
- + $ change_amount = mc.charisma + 1
- + $ change_amount_obedience = the_person.change_obedience_modified(-change_amount)
- + $ the_person.change_happiness(change_amount)
- + $ the_person.draw_person(emotion = "happy")
- + show screen float_up_screen(["+[change_amount] Happiness","[change_amount_obedience] Obedience"],["float_text_yellow","float_text_grey"])
- + the_person.name "Thanks [mc.name], it means a lot to hear that from you. I'll just keep doing what I'm doing I guess."
- + return
- +
- +label insult_her_recent_work:
- + mc.name "[the_person.name], I have to say I've been disappointed in your work for a little while now. Try to shape up, or we'll have to have a more offical talk about it."
- + $ change_amount = mc.charisma*2 + 1
- + $ change_amount_happiness = 5-mc.charisma
- + $ change_amount= the_person.change_obedience_modified(change_amount)
- + $ the_person.change_happiness(-change_amount_happiness)
- + $ the_person.draw_person(emotion = "sad")
- + show screen float_up_screen(["-[change_amount_happiness] Happiness","+[change_amount] Obedience"],["float_text_yellow","float_text_grey"])
- + the_person.name "Oh... I didn't know there was an issue. I'll try follow your instructions closer then."
- + return
- +
- +label give_her_a_dose_of_serum:
- + $renpy.scene("Active")
- + call give_serum(the_person) from _call_give_serum
- + return
- +
- +label seduce_her:
- + "You step close to [the_person.name] and hold her hand."
- + $ the_person.call_seduction_response()
- + call fuck_person(the_person) from _call_fuck_person
- + #Now that you've had sex, we calculate the change to her stats and move on.
- + $ change_amount = the_person.change_slut_modified(the_person.arousal) #Change her slut score by her final arousal. This should be _about_ 100 if she climaxed, but you may keep fucking her silly if you can overcome the arousal loss.
- + show screen float_up_screen(["+[change_amount] Sluttiness"],["float_text_pink"])
- + $ the_person.reset_arousal()
- + $ the_person.review_outfit()
- + return
- +
- label fuck_person(the_person): #TODO: Add a conditional obedience and sluttiness increase for situations like blackmail or getting drunk
- python:
- tuple_list = []
- @@ -3675,14 +3712,17 @@ label fuck_person(the_person): #TODO: Add a conditional obedience and sluttiness
- if not position_choice == "Leave":
- python:
- - renpy.say("","Where do you do it?")
- -
- tuple_list = []
- for object in mc.location.objects:
- if object.has_trait(position_choice.requires_location):
- - tuple_list.append([object.name,object])
- + tuple_list.append((object.name,object))
- + if len(tuple_list) > 1:
- + renpy.say("","Where do you do it?")
- + object_choice = renpy.display_menu(tuple_list,True,"Choice")
- + else:
- + renpy.say("", "You decide to do it on the %s."%tuple_list[0][0])
- + object_choice = tuple_list[0][1]
- - object_choice = renpy.display_menu(tuple_list,True,"Choice")
- call sex_description(the_person, position_choice, object_choice, 0) from _call_sex_description
- return
- commit 27ccd9114466c64321b997e3ed3a8a02f6a262d7
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sun Mar 25 18:25:57 2018 +0200
- In case of a single option don't show the menu, do it already.
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/screens.rpy b/screens.rpy
- index 1baebed..bad1cf7 100644
- --- a/screens.rpy
- +++ b/screens.rpy
- @@ -213,20 +213,27 @@ style input:
- screen choice(items):
- style_prefix "choice"
- + if (len(items) > 1):
- - #We want to have 2 vboxes, seperated so that they are staggered as they go down.
- - vbox:
- - xalign 0.34
- - for i in items[0::2]:
- - textbutton i.caption action i.action
- -
- - vbox:
- - xalign 0.67
- - if len(items)%2 == 0:
- - null height 125 #Add an empty list element to keep the alignment correct if there are an even number of elements in both lists.
- - for j in items[1::2]:
- - textbutton j.caption action j.action
- + #We want to have 2 vboxes, seperated so that they are staggered as they go down.
- + vbox:
- + xalign 0.34
- + for i in items[0::2]:
- + textbutton i.caption action i.action
- +
- + vbox:
- + xalign 0.67
- + if len(items)%2 == 0:
- + null height 125 #Add an empty list element to keep the alignment correct if there are an even number of elements in both lists.
- + for j in items[1::2]:
- + textbutton j.caption action j.action
- + else:
- + window:
- + id "window"
- + text "You decide to %s"%items[0].caption id "what"
- + for k in config.keymap['dismiss']:
- + key k action items[0].action
- ## When this is true, menu captions will be spoken by the narrator. When false,
- ## menu captions will be displayed as empty buttons.
- @@ -253,6 +260,9 @@ style choice_button_text is default:
- ysize 500
- yalign 0.5
- +style choice_window is say_window
- +style choice_text is say_dialogue
- +
- ## Quick Menu screen ###########################################################
- ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement