Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit f1d5b581366666906bc0c146fca152f99313bf46
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sun Mar 25 01:30:39 2018 +0100
- improve location/action interface
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/script.rpy b/script.rpy
- index c4ed0ec..e9b996b 100644
- --- a/script.rpy
- +++ b/script.rpy
- @@ -3342,33 +3342,69 @@ label create_outfit(the_outfit):
- return
- 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."
- - menu:
- - "Talk to someone." if (len(mc.location.people) > 0):
- - python:
- - tuple_list = []
- - for people in mc.location.people:
- - tuple_list.append([people.name + " " + people.last_name[0] + ".",people])
- - person_choice = renpy.display_menu(tuple_list,True,"Choice")
- - renpy.say("","You approach " + person_choice.name + " and chat for a little bit.")
- - person_choice.call_greeting()
- - call talk_person(person_choice) from _call_talk_person
- -
- - "Go somewhere else." if (len(mc.location.connections) > 0):
- + #"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:
- + for act in mc.location.actions:
- + if act.check_requirement():
- + tuple_list.append((act.name,act))
- + else:
- + tuple_list.append(("Do something.", "Do something."))
- +
- + pers_ct = len(mc.location.people)
- + if pers_ct < 5:
- + for people in mc.location.people:
- + tuple_list.append(("Talk to " + people.name + " " + people.last_name[0] + ".",people))
- + else:
- + 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
- call change_location(_return) from _call_change_location #_return is the location returned from the map manager.
- -
- - "Do something." if (mc.location.valid_actions() > 0): ##If mc.locations.valid_actions returns 1 or higher, something goes very wrong with the loop. The first menu is not shown, even when the actual body is commented out.
- - python:
- - tuple_list = []
- - for act in mc.location.actions:
- - if act.check_requirement():
- - tuple_list.append([act.name,act])
- - act_choice = renpy.display_menu(tuple_list,True,"Choice")
- - act_choice.call_action()
- -
- - "Examine the room.":
- +
- + elif choice == "Examine the room.":
- call examine_room(mc.location) from _call_examine_room_1
- +
- + elif choice == "Do something.":
- + python:
- + i = 0
- + while not isinstance(choice, Action) and choice != "Back":
- + tuple_list = [(act.name,act) for act in mc.location.actions[i:i+7]]
- + if act_ct > i+12:
- + tuple_list.append(("Something else", "Something else"))
- + elif act_ct == i+12:
- + act = mc.location.actions[i+12]
- + tuple_list.append((act.name,act))
- + tuple_list.append(("Back", "Back"))
- + choice = renpy.display_menu(tuple_list,True, "Choice")
- + i += 11
- +
- + elif choice == "Talk to someone.":
- + python:
- + i = 0
- + while not isinstance(choice, Person) and choice != "Back":
- + tuple_list = [(p.name + " " + p.last_name[0] + ".", p) for p in mc.location.people[i:i+7]]
- + if pers_ct > i+8:
- + tuple_list.append(("Someone else", "Someone else"))
- + elif pers_ct == i+8:
- + people = mc.location.people[i+8]
- + tuple_list.append((people.name + " " + people.last_name[0] + ".",people))
- + tuple_list.append(("Back", "Back"))
- + choice = renpy.display_menu(tuple_list,True, "Choice")
- + i += 7
- + python:
- + if isinstance(choice, Person):
- + renpy.say("","You approach " + choice.name + " and chat for a little bit.")
- + choice.call_greeting()
- +
- + elif isinstance(choice, Action):
- + choice.call_action()
- +
- jump game_loop
- commit 19fc623f967c68af4b8282a03f015f883393ed5c
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sun Mar 25 01:30:01 2018 +0100
- improve examine room descriptions
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/script.rpy b/script.rpy
- index f7c4077..c4ed0ec 100644
- --- a/script.rpy
- +++ b/script.rpy
- @@ -3789,61 +3789,38 @@ label strip_menu(the_person):
- label examine_room(the_room):
- python:
- - renpy.say("","You are at [the_room.name].") #Where are we right now?
- -
- + desc = "You are at the [the_room.name]. "
- +
- people_here = the_room.people #Format the names of people in the room with you so it looks nice.
- - if len(people_here) == 0:
- - room_names = "There's nobody else in the room with you."
- - elif len(people_here) == 1:
- - room_names = "The only other person in the room with you is "
- - room_names += people_here[0].name
- - room_names += "."
- - elif len(people_here) == 2:
- - room_names = "Inside the room you see "
- - room_names += people_here[0].name
- - room_names += " and "
- - room_names += people_here[1].name
- - room_names += "."
- - elif len(people_here) >2 and len(people_here) < 6:
- - room_names = "Inside the room you see "
- - for person in people_here[0:len(people_here)-2]:
- - room_names += person.name
- - room_names += ", "
- - last_person = people_here[len(people_here)-1].name
- - room_names += "and "
- - room_names += last_person
- - room_names += " among other people."
- - else:
- - room_names = "The room is filled with people."
- -
- - renpy.say("",room_names) ##This is the actual print statement!!
- -
- + pers_ct = len(people_here)
- + if pers_ct == 1:
- + desc += people_here[0].name + " is here. "
- + elif pers_ct > 0:
- + if pers_ct < 6:
- + desc = "You see "
- + if pers_ct > 2:
- + for person in people_here[0:pers_ct-3]:
- + desc += person.name
- + desc += ", "
- + desc += people_here[pers_ct-2].name + "and " + people_here[pers_ct-1].name + " here. "
- + else:
- + desc += "It is filled with people here. "
- +
- connections_here = the_room.connections # Now we format the output for the connections so that it is readable.
- - if len(connections_here) == 0:
- - connect_names = "There are no exits from here. You're trapped!" #Shouldn't ever happen, hopefully."
- - elif len(connections_here) == 1:
- - connect_names = "From here your only option is to head to "
- - connect_names += connections_here[0].name
- - connect_names += "."
- - elif len(connections_here) == 2:
- - connect_names = "From here you can head to either "
- - connect_names += connections_here[0].name
- - connect_names += " or "
- - connect_names += connections_here[1].name
- - connect_names += "."
- + conn_ct = len(connections_here)
- + if conn_ct == 0:
- + desc += "There are no exits from here. You're trapped! " #Shouldn't ever happen, hopefully."
- else:
- - connect_names = "From here you can go to "
- - for place in connections_here[0:len(connections_here)-1]:
- - connect_names += place.name
- - connect_names += ", "
- - last_place = connections_here[len(connections_here)-1].name
- - connect_names += "and "
- - connect_names += last_place
- - connect_names += "."
- - renpy.say("",connect_names) ##This is the actual print statement!!
- -
- - "That's all there is to see nearby."
- -
- + desc += "From here you can head to "
- + if conn_ct == 2:
- + desc += "either the " + connections_here[0].name + " or "
- + elif conn_ct > 2:
- + for place in connections_here[0:conn_ct-2]:
- + desc += "the " + place.name + ", the "
- + desc += connections_here[conn_ct-2].name + " or "
- + desc += "the " + connections_here[conn_ct-1].name +". "
- + #desc += "That's all there is to see nearby." # don't state the obvious
- + renpy.say("",desc) ##This is the actual print statement!!
- return
- label examine_person(the_person):
- commit dfa4b20ac0c4c28b460d2b1a6acb7631c92c8651
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sun Mar 25 01:29:26 2018 +0100
- text changes
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/script.rpy b/script.rpy
- index e7cfab8..f7c4077 100644
- --- a/script.rpy
- +++ b/script.rpy
- @@ -3216,11 +3216,11 @@ label start:
- $ return_arrays = _return #These are the stat, skill, and sex arrays returned from the character creator.
- call create_test_variables(store.name,store.b_name,return_arrays[0],return_arrays[1],return_arrays[2]) from _call_create_test_variables ##Moving some of this to an init block (init 1 specifically) would let this play better with updates in the future.
- - "You have recently graduated from university, having completed your degree in chemical engineering. You've moved away from home, closer to the industrial district of the city to be close to any potential engineering jobs."
- + "You have recently graduated from university, after completing your degree in chemical engineering. You've moved away from home, closer to the industrial district of the city to be close to any potential engineering jobs."
- "While the job search didn't turn up any paying positions, it did lead you to a bank posting for an old pharmaceutical lab. The bank must have needed money quick, because they were practically giving it away."
- - "Without any time to consider the consequences you bought up the lab. It came stocked with all of the standard equipment you would expect, and after a few days of cleaning you're ready to get to work."
- + "Without any time to consider the consequences you bought the lab. It came stocked with all of the standard equipment you would expect, and after a few days of cleaning you're ready to get to work."
- "A lab is nothing without it's product though, and you have just the thing in mind. You still remember the basics for the mind altering serum you produced in university."
- - "With a little work in your new research and development lab you think you could recreate the formula completely, or even improve on it. Hiring on some help would improve your research and production speeds."
- + "With a little work in your new research and development lab you think you could recreate the formula completely, or even improve on it. Hiring some help would improve your research and production speeds."
- "You yawn and stretch as you greet the dawn early in the morning. Today feels like the start of a brand new chapter in your life!"
- ## For now, this ensures reloadin the game doesn't reset any of the variables.
- $ renpy.show
- commit 2829a08694b75aec12d20af7ea077a01ddacdf93
- Author: picobyte <PiC.o0.o.BytE@gmail.com>
- Date: Sat Mar 24 16:01:40 2018 +0100
- developer tools
- Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
- diff --git a/options.rpy b/options.rpy
- index d47e249..20bbb5d 100644
- --- a/options.rpy
- +++ b/options.rpy
- @@ -25,6 +25,7 @@ define gui.show_name = False
- define config.version = "v0.3.1"
- +define config.developer = 1
- ## Text that is placed on the game's about screen. To insert a blank line
- ## between paragraphs, write \n\n.
- diff --git a/screens.rpy b/screens.rpy
- index 172e74a..1baebed 100644
- --- a/screens.rpy
- +++ b/screens.rpy
- @@ -279,6 +279,21 @@ screen quick_menu():
- textbutton _("Q.Save") action QuickSave()
- textbutton _("Q.Load") action QuickLoad()
- textbutton _("Prefs") action ShowMenu('preferences')
- + if config.developer:
- + textbutton _("Edit") action Function(screen_link(renpy.get_filename_line()))
- + $ screen_link(renpy.get_filename_line())
- +
- + key "shift_alt_K_s" action QuickSave()
- + key "shift_alt_K_l" action QuickLoad()
- + key "shift_alt_K_e" action QuickLoad()
- + key "shift_alt_K_q" action Quit(confirm=False)
- + key "shift_alt_K_y" action Function(copy_cursor_pos)
- + key "shift_alt_K_d" action Function(renpy.error, "Triggered by shift alt+d")
- + if config.developer:
- + hbox:
- + xalign 1.0
- + yalign 1.0
- + add DynamicDisplayable(cursor_pos)
- ## This code ensures that the quick_menu screen is displayed in-game, whenever
- diff --git a/script.rpy b/script.rpy
- index 20c95fb..e7cfab8 100644
- --- a/script.rpy
- +++ b/script.rpy
- @@ -4,11 +4,13 @@
- #Each position has a "position_tag". When you start having sex with someone the draw_person code will check it's dictionaryto see if it has a position_tag entry. If yes, it uses that set.
- #Otherwise, it uses the default standing images. Right now, this should have changed absolutely nothing about the way the game works.
- +
- init -2 python:
- import copy
- import math
- import __builtin__
- + import pygame
- # import shader
- config.image_cache_size = 12
- @@ -17,7 +19,20 @@ init -2 python:
- config.context_clear_layers.append("Active")
- preferences.gl_tearing = True ## Prevents juttery animation with text while using advanced shaders to display images
- -
- + pygame.scrap.init()
- +
- + def screen_link(r):
- + def clicked():
- + renpy.exports.launch_editor([r[0]], r[1], transient=1)
- +
- + return clicked
- +
- + def cursor_pos(st, at):
- + return Text("{color=#222}{size=-8}(%d, %d){/size}{/color}"%renpy.get_mouse_pos()), .1
- +
- + def copy_cursor_pos():
- + pygame.scrap.put(pygame.SCRAP_TEXT, "%d, %d"%renpy.get_mouse_pos())
- +
- class Business(renpy.store.object):
- # main jobs to start with:
- # 1) buying raw supplies.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement