Date: 2017/11/15 13:56:47 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Platforms:
type: task
debug: true
script:
- define setup <server.flag[votedmap]||s@PlatformYaml.list_keys[setups].get[1]>
- foreach <s@PlatformYaml.list_keys[setups.<def[setup]>.platforms]>:
- define filepath setups.<def[setup]>.platforms.<def[value]>
- run s@PlatformsSetup d:<s@PlatformYaml.yaml_key[<def[filepath]>.delay]>|<s@PlatformYaml.list_keys[<def[filepath]>.path].size>|<def[filepath]> instantly
PlatformsSetup:
type: task
debug: true
speed: 0
script:
- define locations li@
- define schematics li@
- define paste li@
- repeat <def[2]>:
- define locations <def[locations].include[<s@PlatformYaml.yaml_key[<def[3]>.path.<def[value]>.location].as_location>]>
- define schematics <def[schematics].include[<s@PlatformYaml.yaml_key[<def[3]>.path.<def[value]>.schematic]>]>
- define paste <def[paste].include[<s@PlatformYaml.yaml_key[<def[3]>.path.<def[value]>.paste]>]>
- if <s@PlatformYaml.yaml_key[<def[3]>.reverse]> == true {
- define locations <def[locations].include[<def[locations].reverse.remove[first].remove[last]>]>
- define schematics <def[schematics].include[<def[schematics].reverse.remove[first].remove[last]>]>
- define paste <def[paste].include[<def[paste].reverse.remove[first].remove[last]>]>
- define size <def[locations].size>
}
else {
- define size <def[2]>
}
- run s@PlatformsLoop d:<def[locations]>|<def[schematics]>|<def[paste]>|<def[size]>|<def[1]>
PlatformsLoop:
type: task
debug: true
speed: 0
script:
- choose <def[3].remove[air].is_empty>:
- case true:
- while true:
- repeat <def[4]>:
- modifyblock <def[1].get[<def[value]>]> <def[2].get[<def[value]>]>
- wait <def[5]>
- modifyblock <def[1].get[<def[value]>]> air
- case false:
- while true:
- repeat <def[4]>:
- modifyblock <def[1].get[<def[value]>]> <def[2].get[<def[value]>]>
- wait <def[5]>
- modifyblock <def[1].get[<def[value]>]> <def[3].get[<def[value]>]>