- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
BrisingrAerowing
-
Content Count
153 -
Joined
-
Last visited
-
Days Won
18
Posts posted by BrisingrAerowing
-
-
A quick way to get the documentation of a function is to use the component.doc method.
Here is a quick (and untested) script to use this function.
local component = require("component") local args = {...} if #args ~= 2 then print("USAGE: getdoc <component address> <method name>") return end print(component.doc(args[1], args[2]))
The script needs the UUID address of the component.
There are other projects on these forums that allow viewing documentation. Take a look around for them.
-
Certainly! Go ahead!
EDIT: I'm going to update it to allow for mounting multiple paths, which is what PhysFS is designed for.
EDIT2: Should be good now.
-
I actually was able to get a PhysFS based server working correctly! It can be obtained from my Programs Repository.
-
What about using Lua-PhysFS as a backend for a server? I may try to write my own server for this using that.
-
Awesome!
Hope the move goes well and nothing gets broken!
-
Love it!
-
-
Well, the error says the syntax is invalid, and it is. If you want to execute the message, then you need to do something like this:
load(message1)()
This loads the code and compiles it, then the empty parenthesis afterwards executes it.
-
OpenKVS is a basic Key-Value store for OpenComputers, based off of the Tincan library.
API:
kvs.set(key, value) -- Sets a key-value pair. Returns the set value kvs.get(key) -- Gets the value for the specified key. Returns that value kvs.delete(key) -- Deletes the specified key-value pair. Returns nil kvs.exists(key) -- Returns true if the specified key exists. kvs.decr(key, amount) -- Decrements the specified numeric key by the specified amount, or 1 if not specified. kvs.incr(key, amount) -- Increments the specified numeric key by the specified amount, or 1 if not specified. kvs.load(file) -- Loads the specified file into the store kvs.save(file) -- Saves the store into the specified file
Download:
wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/openkvs/openkvs.lua /lib/openkvs.lua
-
Since you say the chest is on top of the transposer, you should use sides.top, not sides.south.
-
-
I'll have to get my base set up and a OC computer configured first. I have a lot of work to do on my base still (it is a large underground hidden bunker).
-
How about adding some charts? I would do so myself if I knew how to do GUI programming in OpenComputers.
I may still try and do that as an extension to this library.
-
I didn't even notice that method! :facepalm: Thanks!
-
Is it possible to create and send custom events? I would like to do so in my proximity door daemon so that people can act on allowed or denied entities (like triggering a lockdown and alarm for an intruder).
-
I've build a daemon based on this, allowing the computer/server to also run other things.
Thanks for posting this, though. It is quite cool, and I never would have built mine if this wasn't here.
-
Cool!
-
I'll definitely be using this in my massive underground bunker project (along with a lot of other things).
I still have to get the initial construction done, though. Building twelve floors underground is time consuming, even with WorldEdit.
-
This is quite cool. I used it as an example for how to implement services for my Proximity Door Daemon program. It would have taken much longer otherwise.
-
This program is a service/daemon that automatically opens doors based on input from motion sensors.
Features:
- Any arbitrary number of doors, each with its own configuration
- Events on entity allowed/denied
- Logging of access attempts
- Plugin support
Installation:
wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/gryphonlib/gryphonlib.lua /lib/gryphonlib.lua wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/inifile/inifile.lua /lib/inifile.lua mkdir /etc/proxdoor.d wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoord.lua /etc/rc.d/proxdoord.lua wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoor.cfg /etc/proxdoor.cfg wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoor.d/example.cfg.noload /etc/proxdoor.d/example.config.noload mkdir /lib/proxdoor/plugins wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/plugins/example_plugin.lua /lib/proxdoor/plugins/example_plugin.lua
The last two files are an example door configuration and an example plugin.
Configuration file outline:
Main Configuration File:
[general] config_dir = /etc/proxdoor.d # Door Configuration Directory plugin_dir = /lib/proxdoor/plugins # Plugin directory event_on_entity_denied = true # Fire an event (proxdoor_access) on denying an entity event_on_entity_allowed = true # Fire an event (proxdoor_access) on allowing an entity [logging] log_file_path = /var/log/proxdoord # The directory log files are written to general_log_file_name = general.log # The name of the general log file (Initialization stuff) general_log_enabled = true # Whether the general log is enabled access_log_file_name = access.log # The name of the access log file (access attempts) access_log_enabled = true # Whether the access log is enabled
Door Configuration File:
[general] name = Proxdoor 1 # The name of the door. Used to identity it in events and access logs range = 3 # The range used to detect entities side = top # The side to output the redstone on open_time = 3 # The time (in seconds) the door stays open inverted = false # Whether to initially power the redstone [addresses] motion_sensor = # The address of the motion sensor for this door. Required. redstone = # The address for the redstone IO for this door. Required. [users] user_list = # A space-separated list of entity names is_blacklist = false # Whether the above list is a blacklist allow_all = false # Whether to allow all entities. Overrides the above user configuration.
The configuration files MUST have the extension .cfg, otherwise they won't be loaded.
Changelog:
-
1/11/2017
- Added plugin support
-
Could you add my programs repository? The url is https://github.com/BrisingrAerowing/OC-Programs
I have some new programs I want to share.
-
Looks quite cool. I'm going to download this soon (when I get my base in MC up and running).
-
Hey. Could I get an OpenPrograms Repo set up? My Github username is the same as my username here.
I have a few things I am working on that I want to share.
-
Who/Where do I ask to get an OpenPrograms Repo set up? I would like one to store my LuaFileSystem emulation for OpenOS so people can install it.
MapUtils - Utilities for map makers
in Libraries & API's
Posted
MapUtils is a utility library for Adventure/Puzzle/Parkour/etc map makers that want to use OpenComputers to handle the logic behind the map. It is currently being developed, and is intended to have a large number of methods for easing the burden of map making.
Methods include:
This utility is currently being developed, and is not ready for use yet. I will post a link when I get further along with it.
Also, submit your ideas for methods for this library.