Skip to content

Commit bd66709

Browse files
author
Finn
committed
New curtain who dis
1 parent 5e98a82 commit bd66709

12 files changed

+61
-1
lines changed

data/lt/function/main/on_load.mcfunction

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,7 @@ team modify quest.npc.no_collide friendlyFire false
172172
scoreboard objectives add mini_disguises.clock dummy
173173

174174
# Flying Gegy
175-
scoreboard objectives add turtle_tracker dummy
175+
scoreboard objectives add turtle_tracker dummy
176+
## Stage system variables
177+
scoreboard objectives add stage.global dummy
178+
scoreboard objectives add stage.curtain dummy

data/lt/function/main/tick_runner.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,6 @@ function lt:map/generic/launch_pad/on_tick
9999

100100
# Quest System
101101
function lt:quest/main/on_tick
102+
103+
# Stage on_tick
104+
function lt:stage/stage_tick
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tellraw @a "announcement!!"

data/lt/function/stage/action/set_backdrop.mcfunction

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$scoreboard players set state stage.curtain $(action_data)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Takes storage data lt:stage/curtain as input
2+
# E.g. {width:33,length:9,x:1,z:0,current_step:0}
3+
4+
$scoreboard players set evalX stage.curtain $(x)
5+
$scoreboard players set evalZ stage.curtain $(z)
6+
7+
$execute if score evalX stage.curtain matches 1 run fill ~ ~-$(current_step) ~ ~$(width) ~-$(current_step) ~ air replace ltextras:curtain
8+
$execute if score evalZ stage.curtain matches 1 run fill ~ ~-$(current_step) ~ ~ ~-$(current_step) ~$(width) air replace ltextras:curtain
9+
10+
## Update step value
11+
execute store result storage lt:stage/curtain current_step int 1 run scoreboard players remove length stage.curtain 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
execute align xyz run summon marker ~ ~ ~ {Tags:["stage.curtain"]}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Stop curtain logic once it becomes fully open or closed
2+
execute if score length stage.curtain = max_length stage.curtain if score state stage.curtain matches 1 run scoreboard players set state stage.curtain 0
3+
execute if score length stage.curtain matches 0 if score state stage.curtain matches -1 run scoreboard players set state stage.curtain 0
4+
5+
# Run correct break/place function if state is not 0
6+
execute if score state stage.curtain matches 1 run function lt:stage/feature/curtain/place_layer with storage lt:stage/curtain
7+
execute if score state stage.curtain matches -1 run function lt:stage/feature/curtain/break_layer with storage lt:stage/curtain
8+
9+
# Evaluate new length
10+
execute store result score length stage.curtain run data get storage lt:stage/curtain current_step 1
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Takes storage data lt:stage/curtain as input
2+
# E.g. {width:33,length:9,x:1,z:0,current_step:0}
3+
4+
$scoreboard players set evalX stage.curtain $(x)
5+
$scoreboard players set evalZ stage.curtain $(z)
6+
7+
$execute if score evalX stage.curtain matches 1 run fill ~ ~-$(current_step) ~ ~$(width) ~-$(current_step) ~ ltextras:curtain replace air
8+
$execute if score evalZ stage.curtain matches 1 run fill ~ ~-$(current_step) ~ ~ ~-$(current_step) ~$(width) ltextras:curtain replace air
9+
10+
## Update step value
11+
execute store result storage lt:stage/curtain current_step int 1 run scoreboard players add length stage.curtain 1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
scoreboard players set state stage.curtain 0
2+
scoreboard players set length stage.curtain 0
3+
scoreboard players set evalX stage.curtain 0
4+
scoreboard players set evalZ stage.curtain 0
5+
scoreboard players set max_length stage.curtain 9
6+
data merge storage lt:stage/curtain {width:33,length:9,x:1,z:0,current_step:0}

0 commit comments

Comments
 (0)