This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MCGamer20000's profile picture

[WIP] DevKit - Ultimate API Kit!

Started by MCGamer20000, 14 June 2013 - 02:50 AM
MCGamer20000 #1
Posted 14 June 2013 - 04:50 AM
I am working on the code now… I'm trying to compress code a bit and get permission from the original API makers before publishing it. I'm also trying to find good APIs to add. And, I have to implement the codes into my own code. The permissions list is below.
Waiting for Response
    Permission GivenThis spoiler contains proof that I got permission to use the above APIs:
    SpoilerBasicUtils v1.5 (Sent via PM)
    Spoiler
    superaxander, on 14 June 2013 - 04:22 AM said:
    Yes you may. Go ahead.
    KaoS' Programs and utilities
    Spoiler
    Of course. No credit is required but it is appreciated
    Wiiplay123 #2
    Posted 17 June 2013 - 02:54 PM
    http://pastebin.com/QYUgyuUZ
    You can use this code! It has it's own sound format for Immibis's Peripherals Speakers!
    And a menu function!
    MCGamer20000 #3
    Posted 24 June 2013 - 02:14 AM
    http://pastebin.com/QYUgyuUZ
    You can use this code! It has it's own sound format for Immibis's Peripherals Speakers!
    And a menu function!
    Nice! I'll try to add it in now. Do you have a forum post for it so I can give full credit?

    http://pastebin.com/QYUgyuUZ
    You can use this code! It has it's own sound format for Immibis's Peripherals Speakers!
    And a menu function!
    Nice! I'll try to add it in now. Do you have a forum post for it so I can give full credit?
    I just checked the code and there's something that concerns me…
    Spoiler
    
    function playSound(...)
    local args = {...}
    --Pitch, Length
    side2 = nil
    if (#args == 1) then
    local sides = rs.getSides()
    for i = 1, #sides do
    if (peripheral.getType(sides[i]) == "speaker") then
    side2 = sides[i]
    break
    end
    end
    else
    side2 = args[2]
    end
    if (side2 ~= nil) then
    local speaker = peripheral.wrap(side2)
    local sound2 = args[1]
    sound2 = split(sound2,":")
    speaker.shutdown()
    for i = 1, #sound2, 2 do
    speaker.start(1,tonumber(sound2[i]))
    sleep(tonumber(sound2[i + 1]))
    end
    speaker.shutdown()
    return true
    else
    return false
    end
    end
    
    How does the side go into the params if length is the 2nd param?

    I'll make the first param optionally the side.

    Actually, sorry but I won't include it.
    Lyqyd #4
    Posted 24 June 2013 - 11:41 PM
    There's an edit button for a reason. Please use it instead of posting when only making minor additions and nobody else has posted.
    nothign #5
    Posted 25 June 2013 - 12:11 AM
    Could you explain what exactly this does?
    Zudo #6
    Posted 25 June 2013 - 03:06 AM
    Could you explain what exactly this does?

    I think it is meant to be several APIs in one.
    bjornir90 #7
    Posted 27 June 2013 - 06:26 AM
    You may use my gui api (it's in my signature) :)/> But please tell me if you want to make any modifications ;)/>
    MCGamer20000 #8
    Posted 02 July 2013 - 11:45 AM
    Could you explain what exactly this does?

    I think it is meant to be several APIs in one.
    Exactly.
    You may use my gui api (it's in my signature) :)/>/>/>/> But please tell me if you want to make any modifications ;)/>/>/>/>
    Okay.
    EDIT: Sorry. I can't add the GUI API right now. "It's not just you! http://pastebin.com looks down from here."
    EDIT 2: Wow. It comes back as soon as I sent that edit. I'll add it in now.
    EDIT 3: Sorry about all the edits. Just saying that the only edits I will make is either bug fixes and/or making it compatible with the rest of the code but I will shorten some variables in the code to make the entire DevKit code smaller.