Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Print to debugger peripheral (on craftos) #89

Open
Commandcracker opened this issue Dec 24, 2022 · 0 comments
Open

Print to debugger peripheral (on craftos) #89

Commandcracker opened this issue Dec 24, 2022 · 0 comments
Labels
client Issues related to YouCube's client feature request New feature or request

Comments

@Commandcracker
Copy link
Owner

Commandcracker commented Dec 24, 2022

Describe the feature.

debugger-peripheral

code snippets:

local debugger = peripheral.find("debugger")
function debug(...)
    if args.verbose then
        print(...)
    end
    if debugger then
        debugger.print(...)
    end
end
if periphemu then
    periphemu.create("right", "debugger")
end

local debugger = peripheral.find("debugger")
function debug_print(...)
    if debugger then
        debugger.print("[" .. os.date("%H:%M:%S") .. "] " .. table.concat({ ... }, " "))
    else
        print(...)
    end
end
if periphemu then
    periphemu.create("top", "speaker")
    -- Fuck the max websocket message police
    config.set("http_max_websocket_message", 2 ^ 30)
    -- create debugger
    if args.verbose then
        periphemu.create("right", "debugger")
    end
end

local debugger = peripheral.find("debugger")
function debug(...)
    if args.verbose then
        libs.youcubeapi.debug_print(...)
    end
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client Issues related to YouCube's client feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant