From e8e204dd838afe151137bd55968933c0fe2257e5 Mon Sep 17 00:00:00 2001 From: Zocker1999NET Date: Fri, 20 May 2016 19:46:13 +0200 Subject: [PATCH] Added startup files System recognition for ComputerCraft startup file for ComputerCraft --- mindows/startup.lua | 25 +++++++++++++++++++++++++ startup | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 mindows/startup.lua create mode 100644 startup diff --git a/mindows/startup.lua b/mindows/startup.lua new file mode 100644 index 0000000..4ddfb2a --- /dev/null +++ b/mindows/startup.lua @@ -0,0 +1,25 @@ +--!startup.lua +--!by Zocker1999_NET +-- This file creates a sand-box and runs the mindows core inside. +-- If an error appeers, it will catch the error and print details to the screen. +-- It detectes the system type and pushes this information to the kernel + +local sysType = "" -- cc / oc-nothing / oc-openos + +if type(_HOST) == "string" and _HOST:sub(1,13) == "ComputerCraft" then + sysType = "cc" +end +if sysType = "" then + error("Unable to detect system type") +end + +local coroutine = _ENV.coroutine +if sysType:sub(1,2) == "oc" and coroutine == nil then + +end + +local thread = coroutine.create() + +local function resume(...) + local ok,err = coroutine. +end \ No newline at end of file diff --git a/startup b/startup new file mode 100644 index 0000000..d0565c6 --- /dev/null +++ b/startup @@ -0,0 +1,3 @@ +-- ComputerCraft Startup File +-- For a auto-start experience +shell.run("/mindows/startup.lua") \ No newline at end of file