Giter Club home page Giter Club logo

allium-cc's People

Contributors

darienac avatar hugeblank avatar roger109z avatar wiredbrother avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

allium-cc's Issues

set/getPersistence register improperly when used by a thread

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.

Light version of Allium?

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.

Module Structure Discussion

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:

  1. Mutually Recursive Methods behave differently from the linear dependency system that is typical of Lua/package/require.
  2. The current form of MR-Modules requires (pun intended) that one or both plugins emit their modules before they start requiring other modules. This could technically be a non-point since you could just supply an empty table, and then fill it in after the necessary requires.

Player position thread

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.

  1. 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.

  2. 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.

  3. 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

color.lua limitations

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.

Information standard formatting

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:
image

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
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.