Skip to content

Commit

Permalink
Minor fixes to configs
Browse files Browse the repository at this point in the history
- both update values in the config have been tweaked to true as given by cfg/allium.lson
- removed version checking from stem, it was unnecessary
- re-ordered the execution of some code from the startup file
- Updated the readme to contain valid information, refers users to the wiki.
  • Loading branch information
hugeblank authored May 6, 2019
2 parents ebb67e6 + c1786a3 commit 83e6ad3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 39 deletions.
31 changes: 5 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
# Allium

Allium is a simple lua plugin interface for minecraft.
It uses Computercraft's Command Computer, and Plethora Peripherals' Creative Chat Recorder to function.

The command computer can already do many things, being a programmable command block. Allium takes that power to the next level and expands functionality to allow for plugins to be registered. From there you can add commands that get triggered by players, threads that can do command based things without the need of a command to execute them, and data that can be stored in a persistent file so that things you want to hang onto don't get lost in the event of a crash or restart.

Allium uses **[Raisin](https://github.com/hugeblank/raisin/)**, a next generation thread manager made by me, hugeblank. If you're a prospective Allium plugin developer, you may want to skim the documentation, found on Raisin's [wiki](https://github.com/hugeblank/raisin/wiki/).

Allium also uses a chat text formatting API provided by [roger109z](https://github.com/roger109z/). I (hugeblank) personally haven't touched it (even though it is in my repo) since he's created it as it works flawlessly.

## Install
To install Allium, run this command, it's that simple!

`pastebin run LGwrkjxm`

The installer installs:

- The latest Allium Repo - allium.lua, plugins/allium-stem.lua, colors.lua, readme.md

- The Raisin Repo - raisin/raisin.lua, raisin/readme.md

- My [gget](https://github.com/hugeblank/qs-cc/tree/master/src/gget.lua), a github repository downloader that is necessary to download Allium, and the plugins that can be installed.

- repolist.csh - A _Craftos SHell_ file, where you can gitget various plugins and utilities and keep them up to date.

- startup.lua - startup file that runs the repolist file, then runs Allium. When Allium crashes/exits it will reboot after 3 seconds unless interrupted.

- persistence.ltn - A _Lua Table Notation_ file containing all serialized persistence entries for each plugin.

**Want More?** Check out the [wiki](https://hugeblank.github.io/Allium-wiki/)!
Installation instructions and further information, in a more digestable form can be found on the [wiki](https://hugeblank.github.io/Allium-wiki/).

## Forking this repository
It's worth noting that there are some places you might want to check out after you fork, and before you start testing your code.

There are some places you might want to check out after you fork, and before you start testing your code.

1. The pastebin [installer](https://www.pastebin.com/LGwrkjxm). You are free to make your own installer to your fork with this code, simply change the `repo` string to "[your github username] [the name of your Allium repository] [the branch you want to clone from] [location]".
2. The startup file of your fork. Set debug.cfg to true, and make sure to replace the marked line with your repo, like above.
2. The startup file of your fork. Set the `deps` and `allium` values to true in the `update` section in `/cfg/allium.lson` file, and make sure to replace the marked line with your repo, like above. Additionally, redirect the depman instance and/or listing to your own, if necessary.
6 changes: 3 additions & 3 deletions cfg/allium.lson
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
version = "0.7.0",
version = "0.7.1",
update = {
allium = false,
deps = false,
allium = true,
deps = true,
},
}
5 changes: 2 additions & 3 deletions plugins/allium-stem.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local allium, a_ver = require("allium"), "0.7.0-pr2"
assert(allium.verify(a_ver), "This stem is for Allium version "..a_ver..".")
local stem = allium.register("allium", "0.4.0-pr0", "Allium Stem")
local allium = require("allium")
local stem = allium.register("allium", "0.4.1", "Allium Stem")
local addDetails
do -- Just a block for organization of command parsing stuffs
local function infill(variant, execute)
Expand Down
16 changes: 9 additions & 7 deletions startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ do
config = fill(temp, default)
end

-- Checking user defined updates
if config.update.allium then
if fs.exists("cfg/repolist.csh") then -- Checking for a repolist shell executable
-- Update all plugins and programs on the repolist
Expand All @@ -51,29 +52,30 @@ if config.update.allium then
end
end
end
-- Clearing the screen
term.setBackgroundColor(colors.black)
term.setTextColor(colors.white)
term.clear()
term.setCursorPos(1, 1)

-- Filling Dependencies
if config.update.deps then
-- Allium DepMan Instance: https://pastebin.com/nRgBd3b6
print("Updating Dependencies...")
local ot, didrun = term.redirect(window.create(term.current(), 1, 1, 1, 1, false)), false
local didrun = false
parallel.waitForAll(function()
didrun = shell.run("pastebin run nRgBd3b6 upgrade https://pastebin.com/raw/fisfxn76 /cfg/deps.lson /lib "..config.version)
end,
function()
multishell.setTitle(multishell.getCurrent(), "depman")
end)
term.redirect(ot)
if not didrun then
printError("Could not update dependencies")
return
end
end

-- Clearing the screen
term.setBackgroundColor(colors.black)
term.setTextColor(colors.white)
term.clear()
term.setCursorPos(1, 1)

-- Running Allium
shell.run("allium.lua "..config.version)

Expand Down

0 comments on commit 83e6ad3

Please sign in to comment.