Posted 01 February 2014 - 06:30 PM
Hey Community
Today i'll show you my Stargate Control System
BTW: Its not finished yet
Screens:
startup
Required Files:
* sg.lua
* sg_screens.lua
* sg_hooks.lua
* sg_mod.lua
* bios.lua
Mirror:
* Github: Github (Master)
Additional SG-Mods:
* /mods/sg_monitor.lua
Required Mods:
* Minecraft
* OpenPeripheral's Snapshot 42 (44 and 45 DOESNT WORK!)
* ComputerCraft 1.57 / 1.58
* SGCraft 0.7.3 (should work with LanteaCraft, but not tested!)
(You can use my own Build which including all snapshot-45 fixes and SGCraft fixes)
* OpenPeripheral's Snapshot 1-BySeaLife Build [1]
(Not uploaded to Pastebin until its completly finished)
Changelog:
Custom Installer:
You can Modificate the System completly with sg_mod.lua.
in sg_mod.lua you'll find instructions to do edits
Have Fun
Documentation of Modding:
You've panic with using a file like "bios.lua"?
Here are some ideas, how to rename the file, so that you dont need to have panic anymore…
Thank you …
Today i'll show you my Stargate Control System
BTW: Its not finished yet
Screens:
Spoiler
startup
Spoiler
shell.run("bios.lua")
shell.run("sg.lua", "YouSGAddress")
Required Files:
* sg.lua
* sg_screens.lua
* sg_hooks.lua
* sg_mod.lua
* bios.lua
Mirror:
* Github: Github (Master)
Additional SG-Mods:
* /mods/sg_monitor.lua
Required Mods:
* Minecraft
* OpenPeripheral's Snapshot 42 (44 and 45 DOESNT WORK!)
* ComputerCraft 1.57 / 1.58
* SGCraft 0.7.3 (should work with LanteaCraft, but not tested!)
(You can use my own Build which including all snapshot-45 fixes and SGCraft fixes)
* OpenPeripheral's Snapshot 1-BySeaLife Build [1]
(Not uploaded to Pastebin until its completly finished)
Changelog:
Spoiler
Version 1.4:
Added Screen: Home (SG-Overview)
Rewritten: sg_mod.lua (Now can add external mods for "Multimods")
Update: Documentation of Modding
Added Mod: Monitor-Dialer Mod
Version 1.3:
Added sg_hooks.lua
Added Screen: List (SG-Dialer)
Added Screen: Config (SG-Configuration)
Version 1.2:
Added sg_mod.lua
Version 1.1:
Added sg_screens.lua
Version 1.0:
Initial Release
Custom Installer:
Spoiler
local url = "http://sealife.top-web.info/cc/sg/"
local f = {}
f[1] = http.get( url .. "sg.lua")
f[2] = http.get( url .. "sg_hooks.lua")
f[3] = http.get( url .. "sg_screens.lua")
f[4] = http.get( url .. "sg_mod.lua")
f[5] = http.get( url .. "bios.lua")
local c = {}
c[1] = f[1].readAll()
c[2] = f[2].readAll()
c[3] = f[3].readAll()
c[4] = f[4].readAll()
c[5] = f[5].readAll()
f[1].close()
f[2].close()
f[3].close()
f[4].close()
f[5].close()
local s = {}
s[1] = fs.open("sg.lua", "w")
s[2] = fs.open("sg_hooks.lua", "w")
s[3] = fs.open("sg_screens.lua", "w")
s[4] = fs.open("sg_mod.lua", "w")
s[5] = fs.open("bios.lua", "w")
s[1].write(c[1])
s[2].write(c[2])
s[3].write(c[3])
s[4].write(c[4])
s[5].write(c[5])
s[1].close()
s[2].close()
s[3].close()
s[4].close()
s[5].close()
-- Startup File
local f = fs.open("startup", "w")
f.writeLine('shell.run("bios.lua")')
f.writeLine('shell.run("sg.lua")')
f.close()
os.reboot()
You can Modificate the System completly with sg_mod.lua.
in sg_mod.lua you'll find instructions to do edits
Have Fun
Documentation of Modding:
Spoiler
--[[
Add a Menu Point:
-- SGControl.Menu[ @Arg1 ] = { name=@Arg2, funct=@Arg3 }
--@Arg1: Index (Number)
--@Arg2: MenuName (String)
--@Arg3: Menu Function (Function)
Add a Config:
-- SGConfig[ @Arg1 ] = { Name=@Arg2, State=@Arg3}
--@Arg1: Index (Number)
--@Arg2: ConfigName (String)
--@Arg3: ConfigState (Boolean)
Add a Screen Type:
-- StargateScreen.Modes[ @Arg1 ] = @Arg2
--@Arg1: ScreenMode (String)
--@Arg2: Screen Function / Content (Function)
Add a System-Hook:
-- SGControl.Hooks[ @Arg1 ] = @Arg2
--@Arg1: Index (Number)
--@Arg2: Hook-Function (Function)
You can edit all Menu-Names:
-- SGControl.Menu[ @Arg1 ].name = @Arg2
--@Arg1: MenuItem [1-4 for Default Items] (Number)
--@Arg2: Menu Name (String)
You can add new Stargates on Startup
-- SGControl.addStargate( @Arg1, @Arg2 )
--@Arg1: Stargate Address (String)
--@Arg2: Stargate Displayname (String)
You can remove Stargates on Startup
-- SGControl.removeSG( @Arg1 )
--@Arg1: Stargate Address (String)
You can add your own LOG Entry
-- SGControl.addLog( @Arg1, @Arg2 )
--@Arg1: Log-File (String)
--@Arg2: Log-Entrie (String)
You can add an External Mod with:
-- SGControl.addExternalMod( @Arg1 )
--@Arg1: File Path (String)
]]--
You've panic with using a file like "bios.lua"?
Here are some ideas, how to rename the file, so that you dont need to have panic anymore…
mv bios.lua sg_api.lua
mv bios.lua shell32.lua
mv bios.lua hello.lua
mv bios.lua nope.lua
mv bios.lua trololololololol.lua
So, it doesnt matter, which filename you'r using for the "bios.lua", just execute the file, before executing sg.luaThank you …
Edited on 02 February 2014 - 11:36 AM