init
This commit is contained in:
commit
980b4a8d2b
17
classic_tech/bigbrother.lua
Normal file
17
classic_tech/bigbrother.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local pl_detector = peripheral.find "playerDetector"
|
||||
local mon = peripheral.find "monitor"
|
||||
|
||||
if mon == nil or pl_detector == nil then
|
||||
error "not all peripherals present! need monitor and player detector"
|
||||
end
|
||||
|
||||
while true do
|
||||
local players = pl_detector.getOnlinePlayers()
|
||||
for i, p in ipairs(players) do
|
||||
local pos = pl_detector.getPlayerPos(p)
|
||||
mon.setCursorPos(1, i)
|
||||
mon.write(p .. " @ X: " .. pos.x .. " Y: " .. pos.y .. " Z: " .. pos.z)
|
||||
end
|
||||
|
||||
sleep(2)
|
||||
end
|
3
format.sh
Executable file
3
format.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# requires the stylua formatter to be installed
|
||||
stylua $(find -name '*.lua')
|
2
stylua.toml
Normal file
2
stylua.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
indent_type = "Spaces"
|
||||
no_call_parentheses = true
|
Loading…
Reference in a new issue