Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 15.05 KB | None | 0 0
  1. commit f1d5b581366666906bc0c146fca152f99313bf46
  2. Author: picobyte <PiC.o0.o.BytE@gmail.com>
  3. Date:   Sun Mar 25 01:30:39 2018 +0100
  4.  
  5.     improve location/action interface
  6.    
  7.     Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
  8.  
  9. diff --git a/script.rpy b/script.rpy
  10. index c4ed0ec..e9b996b 100644
  11. --- a/script.rpy
  12. +++ b/script.rpy
  13. @@ -3342,33 +3342,69 @@ label create_outfit(the_outfit):
  14.      return
  15.      
  16.  label game_loop: ##THIS IS THE IMPORTANT SECTION WHERE YOU DECIDE WHAT ACTIONS YOU TAKE
  17. -    "Now, what would you like to do? You can talk to someone, go somewhere else, perform an action, or reexamine the room."
  18. -    menu:
  19. -        "Talk to someone." if (len(mc.location.people) > 0):
  20. -            python:
  21. -                tuple_list = []
  22. -                for people in mc.location.people:
  23. -                    tuple_list.append([people.name + " " + people.last_name[0] + ".",people])
  24. -                person_choice = renpy.display_menu(tuple_list,True,"Choice")
  25. -                renpy.say("","You approach " + person_choice.name + " and chat for a little bit.")
  26. -                person_choice.call_greeting()
  27. -            call talk_person(person_choice) from _call_talk_person
  28. -            
  29. -        "Go somewhere else." if (len(mc.location.connections) > 0):
  30. +    #"Now, what would you like to do? You can talk to someone, go somewhere else, perform an action, or reexamine the room."
  31. +    python:
  32. +
  33. +        tuple_list = [("Go somewhere else.", "Go somewhere else."), ("Examine the room.", "Examine the room.")]
  34. +        act_ct = mc.location.valid_actions()
  35. +        if act_ct < 5:
  36. +            for act in mc.location.actions:
  37. +                if act.check_requirement():
  38. +                    tuple_list.append((act.name,act))
  39. +        else:
  40. +            tuple_list.append(("Do something.", "Do something."))
  41. +
  42. +        pers_ct = len(mc.location.people)
  43. +        if pers_ct < 5:
  44. +            for people in mc.location.people:
  45. +                tuple_list.append(("Talk to " + people.name + " " + people.last_name[0] + ".",people))
  46. +        else:
  47. +            tuple_list.append(("Talk to someone.", "Talk to someone."))
  48. +
  49. +        choice = renpy.display_menu(tuple_list,True,"Choice")
  50. +    if isinstance(choice, basestring):
  51. +        if choice == "Go somewhere else.":
  52.              call screen map_manager
  53.              call change_location(_return) from _call_change_location #_return is the location returned from the map manager.
  54. -            
  55. -        "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.
  56. -            python:
  57. -                tuple_list = []
  58. -                for act in mc.location.actions:
  59. -                    if act.check_requirement():
  60. -                        tuple_list.append([act.name,act])
  61. -                act_choice = renpy.display_menu(tuple_list,True,"Choice")
  62. -                act_choice.call_action()
  63. -            
  64. -        "Examine the room.":
  65. +
  66. +        elif choice == "Examine the room.":
  67.              call examine_room(mc.location) from _call_examine_room_1
  68. +
  69. +        elif choice == "Do something.":
  70. +            python:
  71. +                i = 0
  72. +                while not isinstance(choice, Action) and choice != "Back":
  73. +                    tuple_list = [(act.name,act) for act in mc.location.actions[i:i+7]]
  74. +                    if act_ct > i+12:
  75. +                        tuple_list.append(("Something else", "Something else"))
  76. +                    elif act_ct == i+12:
  77. +                        act = mc.location.actions[i+12]
  78. +                        tuple_list.append((act.name,act))
  79. +                    tuple_list.append(("Back", "Back"))
  80. +                    choice = renpy.display_menu(tuple_list,True, "Choice")
  81. +                    i += 11
  82. +
  83. +        elif choice == "Talk to someone.":
  84. +            python:
  85. +                i = 0
  86. +                while not isinstance(choice, Person) and choice != "Back":
  87. +                    tuple_list = [(p.name + " " + p.last_name[0] + ".", p) for p in mc.location.people[i:i+7]]
  88. +                    if pers_ct > i+8:
  89. +                        tuple_list.append(("Someone else", "Someone else"))
  90. +                    elif pers_ct == i+8:
  91. +                        people = mc.location.people[i+8]
  92. +                        tuple_list.append((people.name + " " + people.last_name[0] + ".",people))
  93. +                    tuple_list.append(("Back", "Back"))
  94. +                    choice = renpy.display_menu(tuple_list,True, "Choice")
  95. +                    i += 7
  96. +        python:
  97. +            if isinstance(choice, Person):
  98. +                renpy.say("","You approach " + choice.name + " and chat for a little bit.")
  99. +                choice.call_greeting()
  100. +
  101. +            elif isinstance(choice, Action):
  102. +                choice.call_action()
  103. +
  104.      jump game_loop
  105.      
  106.  
  107.  
  108. commit 19fc623f967c68af4b8282a03f015f883393ed5c
  109. Author: picobyte <PiC.o0.o.BytE@gmail.com>
  110. Date:   Sun Mar 25 01:30:01 2018 +0100
  111.  
  112.     improve examine room descriptions
  113.    
  114.     Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
  115.  
  116. diff --git a/script.rpy b/script.rpy
  117. index f7c4077..c4ed0ec 100644
  118. --- a/script.rpy
  119. +++ b/script.rpy
  120. @@ -3789,61 +3789,38 @@ label strip_menu(the_person):
  121.      
  122.  label examine_room(the_room):
  123.      python:
  124. -        renpy.say("","You are at [the_room.name].") #Where are we right now?
  125. -        
  126. +        desc = "You are at the [the_room.name]. "
  127. +
  128.          people_here = the_room.people #Format the names of people in the room with you so it looks nice.
  129. -        if len(people_here) == 0:
  130. -            room_names = "There's nobody else in the room with you."
  131. -        elif len(people_here) == 1:
  132. -            room_names = "The only other person in the room with you is "
  133. -            room_names += people_here[0].name
  134. -            room_names += "."
  135. -        elif len(people_here) == 2:
  136. -            room_names = "Inside the room you see "
  137. -            room_names += people_here[0].name
  138. -            room_names += " and "
  139. -            room_names += people_here[1].name
  140. -            room_names += "."
  141. -        elif len(people_here) >2 and len(people_here) < 6:
  142. -            room_names = "Inside the room you see "
  143. -            for person in people_here[0:len(people_here)-2]:
  144. -                room_names += person.name
  145. -                room_names += ", "
  146. -            last_person = people_here[len(people_here)-1].name
  147. -            room_names += "and "
  148. -            room_names += last_person
  149. -            room_names += " among other people."
  150. -        else:
  151. -            room_names = "The room is filled with people."
  152. -            
  153. -        renpy.say("",room_names) ##This is the actual print statement!!
  154. -        
  155. +        pers_ct = len(people_here)
  156. +        if pers_ct == 1:
  157. +            desc += people_here[0].name + " is here. "
  158. +        elif pers_ct > 0:
  159. +            if pers_ct < 6:
  160. +                desc = "You see "
  161. +                if pers_ct > 2:
  162. +                    for person in people_here[0:pers_ct-3]:
  163. +                        desc += person.name
  164. +                        desc += ", "
  165. +                desc += people_here[pers_ct-2].name + "and " + people_here[pers_ct-1].name + " here. "
  166. +            else:
  167. +                desc += "It is filled with people here. "
  168. +
  169.          connections_here = the_room.connections # Now we format the output for the connections so that it is readable.
  170. -        if len(connections_here) == 0:
  171. -            connect_names = "There are no exits from here. You're trapped!" #Shouldn't ever happen, hopefully."
  172. -        elif len(connections_here) == 1:
  173. -            connect_names = "From here your only option is to head to "
  174. -            connect_names += connections_here[0].name
  175. -            connect_names += "."
  176. -        elif len(connections_here) == 2:
  177. -            connect_names = "From here you can head to either "
  178. -            connect_names += connections_here[0].name
  179. -            connect_names += " or "
  180. -            connect_names += connections_here[1].name
  181. -            connect_names += "."
  182. +        conn_ct = len(connections_here)
  183. +        if conn_ct == 0:
  184. +            desc += "There are no exits from here. You're trapped! " #Shouldn't ever happen, hopefully."
  185.          else:
  186. -            connect_names = "From here you can go to "
  187. -            for place in connections_here[0:len(connections_here)-1]:
  188. -                connect_names += place.name
  189. -                connect_names += ", "
  190. -            last_place = connections_here[len(connections_here)-1].name
  191. -            connect_names += "and "
  192. -            connect_names += last_place
  193. -            connect_names += "."
  194. -        renpy.say("",connect_names) ##This is the actual print statement!!
  195. -        
  196. -    "That's all there is to see nearby."
  197. -        
  198. +            desc += "From here you can head to "
  199. +            if conn_ct == 2:
  200. +                desc += "either the " + connections_here[0].name + " or "
  201. +            elif conn_ct > 2:
  202. +                for place in connections_here[0:conn_ct-2]:
  203. +                    desc += "the " + place.name + ", the "
  204. +                desc += connections_here[conn_ct-2].name + " or "
  205. +            desc += "the " + connections_here[conn_ct-1].name +". "
  206. +        #desc += "That's all there is to see nearby." # don't state the obvious
  207. +        renpy.say("",desc) ##This is the actual print statement!!
  208.      return
  209.      
  210.  label examine_person(the_person):
  211.  
  212. commit dfa4b20ac0c4c28b460d2b1a6acb7631c92c8651
  213. Author: picobyte <PiC.o0.o.BytE@gmail.com>
  214. Date:   Sun Mar 25 01:29:26 2018 +0100
  215.  
  216.     text changes
  217.    
  218.     Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
  219.  
  220. diff --git a/script.rpy b/script.rpy
  221. index e7cfab8..f7c4077 100644
  222. --- a/script.rpy
  223. +++ b/script.rpy
  224. @@ -3216,11 +3216,11 @@ label start:
  225.      $ return_arrays = _return #These are the stat, skill, and sex arrays returned from the character creator.
  226.      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.
  227.              
  228. -    "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."
  229. +    "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."
  230.      "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."
  231. -    "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."
  232. +    "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."
  233.      "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."
  234. -    "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."
  235. +    "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."
  236.      "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!"
  237.      ## For now, this ensures reloadin the game doesn't reset any of the variables.
  238.      $ renpy.show
  239.  
  240. commit 2829a08694b75aec12d20af7ea077a01ddacdf93
  241. Author: picobyte <PiC.o0.o.BytE@gmail.com>
  242. Date:   Sat Mar 24 16:01:40 2018 +0100
  243.  
  244.     developer tools
  245.    
  246.     Signed-off-by: picobyte <PiC.o0.o.BytE@gmail.com>
  247.  
  248. diff --git a/options.rpy b/options.rpy
  249. index d47e249..20bbb5d 100644
  250. --- a/options.rpy
  251. +++ b/options.rpy
  252. @@ -25,6 +25,7 @@ define gui.show_name = False
  253.  
  254.  define config.version = "v0.3.1"
  255.  
  256. +define config.developer = 1
  257.  
  258.  ## Text that is placed on the game's about screen. To insert a blank line
  259.  ## between paragraphs, write \n\n.
  260. diff --git a/screens.rpy b/screens.rpy
  261. index 172e74a..1baebed 100644
  262. --- a/screens.rpy
  263. +++ b/screens.rpy
  264. @@ -279,6 +279,21 @@ screen quick_menu():
  265.          textbutton _("Q.Save") action QuickSave()
  266.          textbutton _("Q.Load") action QuickLoad()
  267.          textbutton _("Prefs") action ShowMenu('preferences')
  268. +        if config.developer:
  269. +            textbutton _("Edit") action Function(screen_link(renpy.get_filename_line()))
  270. +            $ screen_link(renpy.get_filename_line())
  271. +
  272. +            key "shift_alt_K_s" action QuickSave()
  273. +            key "shift_alt_K_l" action QuickLoad()
  274. +            key "shift_alt_K_e" action QuickLoad()
  275. +            key "shift_alt_K_q" action Quit(confirm=False)
  276. +            key "shift_alt_K_y" action Function(copy_cursor_pos)
  277. +            key "shift_alt_K_d" action Function(renpy.error, "Triggered by shift alt+d")
  278. +    if config.developer:
  279. +        hbox:
  280. +            xalign 1.0
  281. +            yalign 1.0
  282. +            add DynamicDisplayable(cursor_pos)
  283.  
  284.  
  285.  ## This code ensures that the quick_menu screen is displayed in-game, whenever
  286. diff --git a/script.rpy b/script.rpy
  287. index 20c95fb..e7cfab8 100644
  288. --- a/script.rpy
  289. +++ b/script.rpy
  290. @@ -4,11 +4,13 @@
  291.  #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.
  292.  #Otherwise, it uses the default standing images. Right now, this should have changed absolutely nothing about the way the game works.
  293.  
  294. +
  295.  init -2 python:
  296.      
  297.      import copy
  298.      import math
  299.      import __builtin__
  300. +    import pygame
  301.  #    import shader
  302.      
  303.      config.image_cache_size = 12    
  304. @@ -17,7 +19,20 @@ init -2 python:
  305.      config.context_clear_layers.append("Active")
  306.      
  307.      preferences.gl_tearing = True ## Prevents juttery animation with text while using advanced shaders to display images
  308. -    
  309. +    pygame.scrap.init()
  310. +
  311. +    def screen_link(r):
  312. +        def clicked():
  313. +            renpy.exports.launch_editor([r[0]], r[1], transient=1)
  314. +
  315. +        return clicked
  316. +
  317. +    def cursor_pos(st, at):
  318. +        return Text("{color=#222}{size=-8}(%d, %d){/size}{/color}"%renpy.get_mouse_pos()), .1
  319. +
  320. +    def copy_cursor_pos():
  321. +        pygame.scrap.put(pygame.SCRAP_TEXT, "%d, %d"%renpy.get_mouse_pos())
  322. +
  323.      class Business(renpy.store.object):
  324.          # main jobs to start with:
  325.          # 1) buying raw supplies.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement