File: double_doors.dsc

package info (click to toggle)
cloc 2.06-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,064 kB
  • sloc: perl: 30,146; cpp: 1,219; python: 623; ansic: 334; asm: 267; makefile: 244; sh: 186; sql: 144; java: 136; ruby: 111; cs: 104; pascal: 52; lisp: 50; haskell: 35; f90: 35; cobol: 35; objc: 25; php: 22; javascript: 15; fortran: 9; ml: 8; xml: 7; tcl: 2
file content (21 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
doubledoors_world:
    type: world
    debug: false
    events:
        # Use monitor to allow the event to be cancelled by any other scripts or plugins
        # But use 'on' to make the door move as immediately as possible
        on player right clicks *_door bukkit_priority:monitor:
        # Iron doors aren't opened on click
        - if <context.location.material.name> == iron_door:
            - stop
        - define face <context.location.block_facing>
        # A door faces outward, rotate the outward face opposite the direction of the hinge to get the other door
        - if <context.location.material.hinge> == left:
            # Note: pi/2 is radian equivalent of 90 degrees.
            - define face <[face].rotate_around_y[-<util.pi.div[2]>]>
        - else:
            - define face <[face].rotate_around_y[<util.pi.div[2]>]>
        - define door2 <context.location.add[<[face]>]>
        # Check that the double door *exists*
        - if <[door2].material.name> == <context.location.material.name>:
            - switch <[door2]>