-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcl.lua
More file actions
29 lines (27 loc) · 655 Bytes
/
Copy pathcl.lua
File metadata and controls
29 lines (27 loc) · 655 Bytes
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
function log(msg)
io.write(msg)
end
local c = require("component")
local cl = c.chunkloader
local state
local newState
state = cl.isActive()
if state then
log("Chunkloader is currently active. Setting to inactive...\n")
cl.setActive(false)
newState = cl.isActive()
if newState then
log(" Failed to set chunkloader to inactive!\n")
else
log(" Successfully set chunkloader to inactive.\n")
end
else
log("Chunkloader is currently inactive. Setting to active...\n")
cl.setActive(true)
newState = cl.isActive()
if newState then
log(" Successfully set chunkloader to active.\n")
else
log(" Failed to set chunkloader to active!\n")
end
end