NuclearPowerPlantFunction:
type: world
events:
on player places i@NuclearStation:
- schematic load name:PowerPlant
- wait 6t
- schematic paste name:PowerPlant <context.location> noair
- narrate "Hi"
- flag server NukePlant:->:<context.location>
- flag server nukeswitch:->:<c.location.add[0,2,-8]>
- foreach <server.flag[nukeplant].as_list> {
- modifyblock <def[value].find.blocks[123].within[50]> m@124 no_physics
}
on player right clicks m@lever:
- - if <server.flag[nukeswitch].contains[<c.location>]> {
+ - if <server.flag[nukeswitch].contains[<c.location>]> && <c.location.switched> {
- foreach <c.location.add[0,-2,8].find.blocks[123].within[50]> {
- modifyblock <def[value]> m@124 no_physics
+ }
+ }
+ - if <server.flag[nukeswitch].contains[<c.location>]> && <c.location.switched> == false {
+ - foreach <c.location.add[0,-2,8].find.blocks[123].within[50]> {
+ - modifyblock <def[value]> m@124
}
}
-