예제 #1
0
파일: scummbar.py 프로젝트: fabr1z10/glib3
def cook():
    def setCookInKitchen():
        var.cook_in_kitchen = True

# if coming from kitchen, cook should be added to the scene!

    cook_pos = [125, 17]
    if engine.previous_room == 'kitchen':
        var.cook_in_kitchen = False
        s = Script()
        # make the cook
        cook = makeCook(cook_pos, 'n')
        s.addAction(actions.AddEntity(cook, 'walkarea'))
        s.addAction(actions.Delay(sec=5))
        s.addAction(act.Walk(tag='cook', pos=var.scummbar_kitchen_door_pos))
        s.addAction(actions.RemoveEntity(tag='cook'))
        s.addAction(actions.CallFunc(f=setCookInKitchen))
        example.play(s)
    else:
        var.cook_in_kitchen = True
        cook = makeCook(var.scummbar_kitchen_door_pos, 'w')
        s = Script()
        s.addAction(action=actions.Delay(sec=10), id=0)
        s.addAction(
            actions.RunScript(s=scr.openDoor(doorId='scummbar.door.kitchen',
                                             var='scummbar_kitchen')()))
        s.addAction(actions.AddEntity(cook, 'walkarea'))
        s.addAction(act.Walk(tag='cook', pos=cook_pos))
        s.addAction(act.Turn(tag='cook', dir='n'))
        s.addAction(actions.Delay(sec=5))
        s.addAction(act.Walk(tag='cook', pos=var.scummbar_kitchen_door_pos))
        s.addAction(actions.RemoveEntity(tag='cook'))
        s.addAction(
            actions.RunScript(s=scr.closeDoor(doorId='scummbar.door.kitchen',
                                              var='scummbar_kitchen')()))
        s.loop = 0
        example.play(s)
예제 #2
0
파일: scummbar_.py 프로젝트: fabr1z10/glib3
# door leading out
State.addItem(
    Item(id='scummbar.door.out',
         pos=(32, 24),
         model='door_scummbar_village',
         text=st['objects']['door'],
         width=38,
         height=47,
         walkto=var.scummbar_door_pos,
         dir='w',
         actions={
             'open':
             ssc.openDoor(doorId='scummbar.door.out', var='village_scummbar'),
             'close':
             ssc.closeDoor(doorId='scummbar.door.out', var='village_scummbar'),
             'walkto':
             ssc.walkDoor(var='village_scummbar',
                          room='village1',
                          pos=var.village1_door_pos,
                          dir='s')
         }))

State.addItem(
    Item(id='scummbar.door.kitchen',
         pos=(591, 9),
         model='door_scummbar_kitchen',
         text=st['objects']['door'],
         width=35,
         height=69,
         walkto=var.scummbar_kitchen_door_pos,
예제 #3
0
         height=15,
         walkto=(188, 61),
         dir='n',
         pos=(184, 64, -1),
         actions={
             'open':
             openFake('village2.fakedoor4', 'village2.fakedoor2', (206, 0),
                      (206, 58), 'w')
         }))

# door to voodoo lady
State.addItem(
    Item(id='village2.door',
         text=st['objects']['door'],
         model='door_village_voodoolady',
         pos=(220, 52),
         width=26,
         height=26,
         walkto=(220, 48),
         dir='e',
         actions={
             'open':
             ssc.openDoor(doorId='village2.door', var='village_voodoolady'),
             'close':
             ssc.closeDoor(doorId='village2.door', var='village_voodoolady'),
             'walkto':
             ssc.walkDoor(var='village_voodoolady',
                          room='voodoolady',
                          pos=var.voodoolady_door_pos,
                          dir='e')
         }))
예제 #4
0
         pos=(259, 27),
         width=20,
         height=23,
         walkto=[269, 15],
         dir='n',
         actions={
             'look': ssc.say(lines=[st['lines'][1], st['lines'][2]]),
         }))

# door to Scumm bar
State.addItem(
    Item(id='village1.door',
         text=st['objects']['door'],
         model='door_village_scummbar',
         pos=(699, 7),
         width=30,
         height=45,
         walkto=var.village1_door_pos,
         dir='n',
         actions={
             'open':
             ssc.openDoor(doorId='village1.door', var='village_scummbar'),
             'close':
             ssc.closeDoor(doorId='village1.door', var='village_scummbar'),
             'walkto':
             ssc.walkDoor(var='village_scummbar',
                          room='scummbar',
                          pos=var.scummbar_door_pos,
                          dir='e')
         }))