1
0
Fork 0

little stuff

This commit is contained in:
Casey 2024-01-09 19:42:36 +03:00
parent d543f68947
commit 4930ea6645
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
5 changed files with 10 additions and 7 deletions

View File

@ -2,7 +2,11 @@
"repository": "https://git.salushnes.solutions/hkc/cc-stuff/raw/branch/master/augment",
"files": [
{
"path": "startup",
"path": "wsvpn.lua",
"src": "wsvpn.lua"
},
{
"path": "startup.lua",
"src": "startup.lua"
},
{

View File

@ -45,7 +45,7 @@ local function safeset(func, name, old)
if func then
local s, res = pcall(func)
if not s then
print("ERR: " .. name .. " failed: " .. res)
printError("ERR: " .. name .. " failed: " .. res)
else
return res
end
@ -60,10 +60,7 @@ parallel.waitForAll(function()
local ev = { os.pullEvent("exit") }
if ev[1] == "exit" then
_G._running = false
local oldc = term.getTextColor()
term.setTextColor(colors.red)
print("Caught exit event, shutting down...")
term.setTextColor(oldc)
printError("Caught exit event, shutting down...")
break
end
end

View File

@ -1,7 +1,7 @@
return function()
while _G._running do
local ev = { os.pullEvent() }
if ev[1] == "key" and ev[2] == keys.q then
if ev[1] == "key" and ev[2] == keys.f4 then
os.queueEvent("exit")
break
elseif ev[1] == "timer" or ev[1] == "plethora_task" then

View File

@ -21,6 +21,7 @@ return function()
cache[id].cube.setAlpha(0x20)
cache[id].cube.setDepthTested(false)
cache[id].frame.setDepthTested(false)
cache[id].cube.setPosition(entity.x - 0.25, entity.y - 0.25, entity.z - 0.25)
cache[id].frame.setPosition(entity.x, entity.y, entity.z)
cache[id].text.setAlpha(0xFF)

1
augment/wsvpn.lua Symbolic link
View File

@ -0,0 +1 @@
../wsvpn.lua