Beispiel #1
0
    terms = [ p for p in props if 1536 < p[1]['guid'] < 1600 ] 

    for (gid, prop) in terms:
        pos = data.getTileLocation(gid)
        if len(pos) > 1:
            msg = "control gid: {} is used in more than one locaton"
            raise Exception, msg.format(gid)

        x, y, z = toWorld(data, pos.pop())
        body = area._parent.getChildByGUID(int(prop['guid']))
        area.add(body, (0, y, z-16))
        area.setOrientation(body, "south")


    #haccckk
    for lift in [ i for i in area.getChildren() if isinstance(i, Lift) ]:
        body = lift.parent.getBody(lift)
        body.bbox = body.bbox.move(0,0,1)

    pushback = ['Desk', 'Callbutton', 'Terminal']

    for i in [ i for i in area.getChildren() if i.name in pushback ]:
        body = lift.parent.getBody(i)
        body.bbox = body.bbox.move(-16,0,0)

    # handle the exits
    # here only the exits and positions are saved
    # another class will have to finalize the exits by adding a ref to
    # guid of the other area
    #exits = [ p for p in props if p[1].get('group', None) == 'door' ]
    #for gid, prop in exits: