Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define e = Character('Эйлин', color="#c8ffc8")
- init python:
- class MyAction:
- def __init__(self, name):
- self.name = name
- self.available = True
- def refresh(self):
- self.available = True
- def do(self):
- self.available = False
- actions = [MyAction(s) for s in ["default_action", "action1", "action2", "action3"]]
- def action_x(i, return_label):
- a = actions[i]
- if a.available:
- a.do()
- renpy.call(a.name, return_label)
- renpy.call(actions[0].name, return_label)
- # Игра начинается здесь:
- label start:
- scene bg room
- show eileen happy
- e "Вы создали новую игру Ren'Py."
- menu first:
- "Убирать пункты меню или делать их неактивными?"
- "Убирать":
- call x
- "Делать не активными":
- call y
- menu second:
- "Обновить действия?"
- "Да":
- "Обновим, что уж там"
- python:
- for a in actions:
- a.refresh()
- jump first
- "Нет":
- "Не будем обновлять"
- "Конец"
- return
- label x:
- menu my_menu_x:
- "Действие 1" if actions[1].available:
- $ action_x(1, "my_menu_x")
- "Действие 2" if actions[2].available:
- $ action_x(2, "my_menu_x")
- "Действие 3" if actions[3].available:
- $ action_x(3, "my_menu_x")
- "Довольно":
- "С меня хватит"
- return
- label y:
- menu my_menu_y:
- "Действие 1":
- $ action_x(1, "my_menu_y")
- "Действие 2":
- $ action_x(2, "my_menu_y")
- "Действие 3":
- $ action_x(3, "my_menu_y")
- "Довольно":
- "С меня хватит"
- return
- label default_action(return_label):
- e "Я уже делала это сегодня"
- $ renpy.jump(return_label)
- label action1(return_label):
- e "Действие 1"
- $ renpy.jump(return_label)
- label action2(return_label):
- e "Действие 2"
- $ renpy.jump(return_label)
- label action3(return_label):
- e "Действие 3"
- $ renpy.jump(return_label)
Advertisement
Add Comment
Please, Sign In to add comment