예제 #1
0
def open_front_door(item_id, entity):
    if not status.front_door_open:
        a.Actions.say(['$lines/4'])(item_id, entity)
    else:
        s = a.Scripts.walk(item_id)
        s.add_action(actions.CallFunc(f=a.openDoor(item_id, 'open')))
        example.play(s)
예제 #2
0
파일: shared.py 프로젝트: fabr1z10/glib3
 def f(item_id, entity):
     s = Scripts.walk(item_id)
     s.add_action(
         actions.CallFunc(
             f=Callbacks.set_pos(vars.current_player, room, pos, dir)))
     s.add_action(actions.ChangeRoom(room=room))
     example.play(s)
예제 #3
0
파일: basement.py 프로젝트: fabr1z10/glib3
def close_fuse_box(item_id, entity):
    s = a.Scripts.walk(item_id)
    s.add_action(actions.CallFunc(f=a.openDoor(item_id, 'closed')))
    s.add_action(actions.CallFunc(f=activateBreakers(True)))
    example.play(s)
예제 #4
0
파일: basement.py 프로젝트: fabr1z10/glib3
def turnoff_basement_light_switch(item_id, entity):
    s = a.Scripts.walk(item_id)
    s.add_action(actions.CallFunc(f=a.toggle_light('basement_light_on', False)))
    example.play(s)
예제 #5
0
def push_doormat(item_id, entity):
    s = a.Scripts.walk(item_id)
    if example.get(item_id).anim == 'open':
        s.add_action(actions.CallFunc(f=setMat('closed')))
    example.play(s)
예제 #6
0
def close_front_door(item_id, entity):
    s = a.Scripts.walk(item_id)
    s.add_action(actions.CallFunc(f=openDoor(item_id, 'closed')))
    example.play(s)
예제 #7
0
def use_key_front_door(item_id, entity):
    s = a.Scripts.walk(entity)
    s.add_action(actions.CallFunc(f=a.openDoor(entity, 'open')))
    status.front_door_open = True
    example.play(s)
예제 #8
0
파일: living.py 프로젝트: fabr1z10/glib3
def open_radio(item_id, entity):
    s = a.Scripts.walk(item_id)
    s.add_action(actions.CallFunc(f=a.openDoor(item_id, 'open')))
    #s.add_action(actions.CallFunc(f=activateBreakers(True)))
    example.play(s)
예제 #9
0
파일: outside.py 프로젝트: fabr1z10/glib3
def push_gargoyle_right(item_id, entity):
    s = a.Scripts.walk(item_id)
    s.add_action(actions.CallFunc(f=a.openDoor('door_entry_basement', 'open')))
    example.play(s)
예제 #10
0
파일: shared.py 프로젝트: fabr1z10/glib3
 def f(item_id, entity):
     s = Scripts.walk(item_id)
     s.add_action(actions.CallFunc(f=openDoor(item_id, 'open')))
     example.play(s)
예제 #11
0
파일: shared.py 프로젝트: fabr1z10/glib3
 def f(item_id, entity):
     s = Scripts.walk(item_id)
     aaa = vars.items[item_id]['anim']
     s.add_action(
         actions.CallFunc(f=Callbacks.set_door(entity.id, aaa, value)))
     return s
예제 #12
0
파일: shared.py 프로젝트: fabr1z10/glib3
 def pickup_no_remove(id, entity_id):
     s = ScriptFactory.walk(id)
     # when you pickup something
     s.add_action(actions.CallFunc(f=cf_pickup_no_remove(id, entity_id)))
     return s
예제 #13
0
파일: shared.py 프로젝트: fabr1z10/glib3
 def pickup(id, entity_id):
     s = Scripts.walk(id)
     # when you pickup something
     s.add_action(actions.CallFunc(f=Callbacks.pickup(id, entity_id)))
     return s
예제 #14
0
파일: func.py 프로젝트: fabr1z10/glib3
 def f(x, y, z):
     line = l.line
     dialogue = vars.dialogues[l.dialogue_id]
     set_text = dialogue['text_set']
     if 'activate' in line:
         for node in line['activate']:
             dialogue['lines'][node]['active'] = True
     if 'deactivate' in line:
         for node in line['deactivate']:
             dialogue['lines'][node]['active'] = False
     persist = line.get('persist', False)
     if not persist:
         line['active'] = False
     if 'scr' in line:
         s = script.Script()
         s.add_action(scumm.actions.HideDialogue())
         for a in line['scr']:
             id = a[0]
             after = a[1]
             if id == 0:
                 after = None
             if isinstance(after, int):
                 after = [after]
             action = a[2]
             if action == 'say':
                 ts1 = [str(y) for y in a[4:]]
                 s.add_action(scumm.actions.Say(
                     tag=a[3],
                     font='monkey',
                     lines=[
                         monkey.engine.read(x if x[0] == '$' else set_text +
                                            '/' + x) for x in ts1
                     ]),
                              id=id,
                              after=after)
             elif action == 'sayn':
                 ts1 = [str(y) for y in a[4:]]
                 s.add_action(scumm.actions.Say(
                     animate=False,
                     tag=a[3],
                     font='monkey',
                     lines=[
                         monkey.engine.read(x if x[0] == '$' else set_text +
                                            '/' + x) for x in ts1
                     ]),
                              id=id,
                              after=after)
             elif action == 'set':
                 s.add_action(actions.SetVariable(a[3], a[4]))
             elif action == 'set_dialogue_root':
                 s.add_action(scumm.actions.SetDialogueRoot(a[3], a[4]))
         if 'next' in line:
             s.add_action(
                 scumm.actions.StartDialogue(l.dialogue_id, line['next']))
         else:
             # check if dialogue has a on_exit script
             if 'on_exit' in dialogue:
                 s.add_action(
                     actions.CallFunc(
                         f=getattr(scripts.actions, dialogue['on_exit'])))
             else:
                 s.add_action(scumm.actions.ExitDialogue())
         example.play(s)