Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

admicos

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by admicos

  1. reqpack allows you to package all your requirements (require() calls) into a single file

    NOTE

    I made this in about an hour out of a random idea i had, so this might not be very reliable, YMMV.

    Also, since OC uses require() calls for its own APIs, you might want to add them to the ignore list in the config as trying to require them crashes the program in my tests.


    USAGE

    reqpack <filename>


    CONFIGURATION

    Create the configuration file using reqpack --extract-conf. All options should be pretty self explanatory


    LIMITATIONS

    • Dynamic requires (calling require with anything but a single string) need use_require_if_not_found and cannot be packed
    • Probably more i can't remember right now


    DOWNLOAD

    wget (latest): https://gitlab.com/a.../v3/reqpack.lua

     

  2. Please note that this API is still incomplete, I still have to implement the following:

    • Filesystem API
    • More events

    If you saw any bugs or wanted to suggest something, both the GitHub issues and the reply section is an OK place.

    GitHub Repo: https://github.com/Admicos/coolkit
    API Documentation: https://admicos.github.io/coolkit/
    Downloads:

    • pastebin get KsuCzk10 coolkit.lua (If you remove the last line and minify the code, you can embed it into your programs)
    • oppm install coolkit
  3. aclass is a lightweight and easy class system. Yes this is the third time i wrote that line. Anyways:

     

    How to make a class:

    Since i'm not that great at documentation, you might want to check the example afterwards.

    Also, this relies on some Lua formatting tricks to stay readable-ish, so expect some weird syntax

    To make a class, you use the class function as demonstrated here:

    class "classname" { "optional parent class";
        variable = "hello";
    
        constructor = function(self, hello) --# Constructor is optional
            self:parentConstructor() --# Runs the parent classes constructor.
    
            self.hello = hello or "world" --# Example variable change.
        end;
      
        func = function(self)
            print(self.variable)
        end;
    }

     

    To use the class in your program, you use the new function as demonstrated here:

    local myClass = new "classname"("constructor", "ar", "gs", 1234) --# While the constructor args are optional, the paranthesis are required
    print(myClass.variable)
    myClass:func()

     

    Examples:

    One example can be found here

     

    Downloads:

    Available though oppm as aclass

    Direct Link: https://raw.githubusercontent.com/OpenPrograms/admicos-Programs/master/aclass/aclass.lua

  4. A syntax highlighting editor might be useful for editing code where you can't use external editors (servers, for example)

     

    I tried doing it and it went... ok?

    So, first i tried porting CC's edit over, and that didn't work for some reason.

    Then i tried porting the syntax highlighting of CC's edit to OC's edit, and that went buggy (but still works-y)

     

    If you want to finish my efforts on adding syntax highlighting to the OC edit, you can get my buggy code here.

     

    But if there already is a syntax highlighting editor for OC, would be appriciated if you gave a link to it.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.