-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodifier.sprak
More file actions
20 lines (19 loc) · 817 Bytes
/
modifier.sprak
File metadata and controls
20 lines (19 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
bool Allow(string target, number level)
# server can be the name of any other computer as long as that computer is coded with server.sprak and isn't used in the thing_with_function() function in the server.sprak, otherwise connections to that computer will be blocked when the functions are used
string server = "Yvonne_ArcadeMachine2"
string pc = Connect(server)
if pc.category_of(target) == "door"
if pc.load(target + "_lock_state") != "unlocked"
pc.unlock(target)
pc.save(target + "_lock_state", "unlocked")
Connect(target).Say(target + " unlocked.")
else
pc.lock(target)
pc.save(target + "_lock_state", "locked")
Connect(target).Say(target + " locked.")
end
end
# Uncomment to copy the name of target to clipboard.
# supply("CopyToClipboard").CopyToClipboard(target)
return true
end