hugeblank / allium-cc Goto Github PK
View Code? Open in Web Editor NEWMinecraft plugin loader for ComputerCraft
Home Page: https://hugeblank.github.io/allium-cc-wiki/
License: MIT License
Minecraft plugin loader for ComputerCraft
Home Page: https://hugeblank.github.io/allium-cc-wiki/
License: MIT License
Basically when using setPersistence in a thread, it creates the name of the persistence node wherever the origin string says it to be. So on startup, if no commands are applied, the persistence is set where persistence[""] = data. This isn't that big of a problem when running one plugin, because the origin will either be blank ("") or the plugin name. However essential information can easily be lost, and how the plugin is found is not very optimized.
As of right now I am trying to think of ways to fix the issue so that the plugin can immediately be found. I don't know of any way to exactly figure out how to detect if a thread is calling a function, but if it can then I could work from there.
Basically this suggestion is to make chat recorder peripheral optionnal so Allium could be used with Computercraft without any ad-ons and still offers some functionality though more limited than with chat recorder.
I don't know how that would work plugin side, maybe a boolean value to tell Allium if the plugin requires chat recorder or not. It could also be made Allium side when loading a plugin, if it requires a chat recorder peripheral it skips the loading of the plugin.
In concrete this would work as an API for command computers to modify how the game behave without the chat functionalities.
In b843071 I implemented the fully functional module system. In it's current form it's mutually recursive, meaning that the modules can call on each other without almost any conflict. This obviously has its ups and downs, and I want to discuss them here.
Here's my input:
package
/require
.Basically what I want is a thread where players positions are constantly updated in real time. Currently this isn’t possible due to the latency of getting a players position using an armor stand, and the max event queue, and a potential other issue.
Latency: It would take 2 ticks in order to get the players position: one to teleport each armor stand to the user, and then another to query the armor stands position for each player. No way around that afaik.
Max event queue: this one I think has a config option tied to it so it may be a non-problem, but the most events that can be queued by any computer is 255. If you have a server with 100+ players events are going to become a problem and nothing really can be done about it.
Potential other issue: How fast do chunks get unloaded on player death/exit? If they get unloaded before Allium recognizes this, the armor stand will get unloaded before it can get killed. Leaving excess entities around is never good as most players know, so if I can prevent that I will.
I proposed to squid that a creative chat module should be made for plethora so that the ability to make such a position thread is possible. If you have the chance I suggest you thumbs up the issue so he’s aware of how many people actually would like to see this implemented: SquidDev-CC/plethora#178
I don't really want to tamper with @roger109z's already fine code (albeit it's a bit dated), but there's a limitation that I'm unhappy with and sooner or later I need to face it. Currently when placing a closed parenthesis in places where action text is in closes the text early. I want to see if I can prevent that.
So, in aaa9c41 I updated the information standard format to be as follows:
For a command with a usage of "!help [plugin id | command tag | page number] [page number]":
local helpInfo = {
generic = "Demo help command",
plugin = {
optional = true,
generic = "Plugin ID",
page = {
optional = true,
generic = "Page number"
}
},
command = {
optional = true,
generic = "Command tag, Ex: (!allium:help)",
page = {
optional = true,
generic = "Page number"
}
},
page = {
optional = true,
generic = "Page number"
}
}
Where:
generic
is the information of the parameter
optional
is a parameter that is completely optional (An example of this is a page number, see above.)
noclick
is a parameter that is required, but not specifically the name of the parameter. (An example of this is when the parameter is a username. You can't just plonk a username in.)
By default parameters can be clicked on to automatically load them into the chat input, thus the need for the optional
and noclick
tags.
Here is a demo of the table in action:
There is a lot of repetition going on here, and I'm wondering if anyone could propose a better method to write this information, preferably one where a usage string could be derived.
(And yes I know the example could be simplified like this):
local page = {
optional = true,
generic = "Page number"
}
local helpInfo = {
generic = "Demo help command",
plugin = {
optional = true,
generic = "Plugin ID",
page = page
},
command = {
optional = true,
generic = "Command tag, Ex: (!allium:help)",
page = page
},
page = page
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.