Skip to content

mc-cc-scripts/script-manager

Repository files navigation

Script Manager

SCM is a script manager for Minecrafts ComputerCraft mod.

We are using CC: Tweaked and in some cases some additional peripherals, which we ideally mention in the repositories of the scripts that use them.

SCM is used so you don't have to worry too much about your libraries. You can focus on writing your program and if it uses external libraries, they will be installed automatically. Furthermore, if you want to keep your scripts up-to-date, SCM saves the source of the programs you've installed and lets you update them by just typing scm update <name>.

Documentation | MIT License

Quickstart

Installation

Download SCM with the following command:

pastebin run 1kKZ8zTS

Configuration

There are various configurations you can change. If you want to use your own repository, you can easily change it in the configuration.

Commands

You can find a complete list of all commands here.

Download a program

You can either download a program from GitHub with

scm add testProgram

or from Pastebin with

scm add testProgram@7ByR3NYn

Build scripts

Program

To add libraries to your programs, you will have to require SCM first.

local scm = require("./scm")

Then you can load your libraries as follows:

scm:load("testLibrary")

If a library is missing, SCM will try to install it.

Libraries

Furthermore, SCM can also check nested sub-libraries within the loaded library. To do that, you will have to add a comment before requiring the library. This has the advantage of the libraries still being usable without SCM, as a comment does not interfer with the logic of the script.

--@requires subLibrary
require("./libs/subLibrary")

Pastebin

You can also use libraries hosted on Pastebin. Just attach the Pastebin code at the end of the name, separated by an @.

--@requires subLibrary@z4VRj21Y
require("./libs/subLibrary")