mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-06-26 07:02:55 +00:00
Use the "cc" module namespace instead of "craftos"
This is what we actually discussed in the issue, and I failed to remember.
This commit is contained in:
parent
a2880b12ca
commit
93310850d2
@ -6,7 +6,7 @@
|
|||||||
local expect
|
local expect
|
||||||
|
|
||||||
do
|
do
|
||||||
local h = fs.open("rom/modules/main/craftos/expect.lua", "r")
|
local h = fs.open("rom/modules/main/cc/expect.lua", "r")
|
||||||
local f, err = loadstring(h.readAll(), "@expect.lua")
|
local f, err = loadstring(h.readAll(), "@expect.lua")
|
||||||
h.close()
|
h.close()
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
-- Colors
|
-- Colors
|
||||||
white = 1
|
white = 1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
CHANNEL_GPS = 65534
|
CHANNEL_GPS = 65534
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local sPath = "/rom/help"
|
local sPath = "/rom/help"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
-- Definition for the IO API
|
-- Definition for the IO API
|
||||||
|
|
||||||
local expect, typeOf = dofile("rom/modules/main/craftos/expect.lua").expect, _G.type
|
local expect, typeOf = dofile("rom/modules/main/cc/expect.lua").expect, _G.type
|
||||||
|
|
||||||
--- If we return nil then close the file, as we've reached the end.
|
--- If we return nil then close the file, as we've reached the end.
|
||||||
-- We use this weird wrapper function as we wish to preserve the varargs
|
-- We use this weird wrapper function as we wish to preserve the varargs
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
-- Minecraft key code bindings
|
-- Minecraft key code bindings
|
||||||
-- See http://www.minecraftwiki.net/wiki/Key_codes for more info
|
-- See http://www.minecraftwiki.net/wiki/Key_codes for more info
|
||||||
|
|
||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local tKeys = {
|
local tKeys = {
|
||||||
nil, "one", "two", "three", "four", -- 1
|
nil, "one", "two", "three", "four", -- 1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local function drawPixelInternal( xPos, yPos )
|
local function drawPixelInternal( xPos, yPos )
|
||||||
term.setCursorPos( xPos, yPos )
|
term.setCursorPos( xPos, yPos )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local native = peripheral
|
local native = peripheral
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
CHANNEL_BROADCAST = 65535
|
CHANNEL_BROADCAST = 65535
|
||||||
CHANNEL_REPEAT = 65533
|
CHANNEL_REPEAT = 65533
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local tSettings = {}
|
local tSettings = {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local native = (term.native and term.native()) or term
|
local native = (term.native and term.native()) or term
|
||||||
local redirectTarget = native
|
local redirectTarget = native
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
function slowWrite( sText, nRate )
|
function slowWrite( sText, nRate )
|
||||||
expect(2, nRate, "number", "nil")
|
expect(2, nRate, "number", "nil")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local tHex = {
|
local tHex = {
|
||||||
[ colors.white ] = "0",
|
[ colors.white ] = "0",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
-- Setup process switching
|
-- Setup process switching
|
||||||
local parentTerm = term.current()
|
local parentTerm = term.current()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local expect = dofile("rom/modules/main/craftos/expect.lua").expect
|
local expect = dofile("rom/modules/main/cc/expect.lua").expect
|
||||||
|
|
||||||
local multishell = multishell
|
local multishell = multishell
|
||||||
local parentShell = shell
|
local parentShell = shell
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
describe("craftos.expect", function()
|
describe("cc.expect", function()
|
||||||
local e = require("craftos.expect")
|
local e = require("cc.expect")
|
||||||
|
|
||||||
it("checks a single type", function()
|
it("checks a single type", function()
|
||||||
expect(e.expect(1, "test", "string")):eq(true)
|
expect(e.expect(1, "test", "string")):eq(true)
|
Loading…
x
Reference in New Issue
Block a user