- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
7 -
Joined
-
Last visited
-
Days Won
3
Posts posted by admicos
-
-
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
-
aclass has updated.
To load aclass, you now do
local new, class = require("aclass")()
and it will return the new and class functions as locals instead of globals.
And printing the class variable will return "class: ClassName" instead of "table: 0xhexcode"
-
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
-
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.
-
luapp is a Lua preprocessor compatible with Computercraft, lua5.1 (cli) and Opencomputers
USAGEluapp <args> <filename>
DOCS
Documentation is very bad so if you have any questions i'm happy to answer here.
DOWNLOADS
oppm: oppm install luapp
raw url: https://raw.githubusercontent.com/Admicos/luapp/master/luapp_build_opcomp
github: Admicos/luapp (where you can get other builds and the "original" source)
-
reqpack: Package all your requirements into a single file without any installers
in Programs
Posted
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
DOWNLOAD
wget (latest): https://gitlab.com/a.../v3/reqpack.lua