mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-09-13 01:05:12 -04:00
Restructuring directories
Changing file locations Adding directory structure to imports Renaming update.lua to setup.lua Adding symlinking to setup.lua
This commit is contained in:
parent
1a27861436
commit
2ea5af43ae
@ -1,8 +1,8 @@
|
||||
-- Import section
|
||||
parser = require("parser")
|
||||
inherits = require("inherits")
|
||||
SingleBlock = require("single-block")
|
||||
local mock = require("mock-energy-provider")
|
||||
parser = require("utils.parser")
|
||||
inherits = require("utils.inherits")
|
||||
SingleBlock = require("data.datasource.single-block")
|
||||
local mock = require("data.mock.mock-energy-provider")
|
||||
--
|
||||
|
||||
local EnergyProvider =
|
@ -1,8 +1,8 @@
|
||||
-- Import section
|
||||
parser = require("parser")
|
||||
inherits = require("inherits")
|
||||
SingleBlock = require("single-block")
|
||||
local mock = require("mock-multi-block")
|
||||
parser = require("utils.parser")
|
||||
inherits = require("utils.inherits")
|
||||
SingleBlock = require("data.datasource.single-block")
|
||||
local mock = require("data.mock.mock-multi-block")
|
||||
--
|
||||
|
||||
local Miner =
|
@ -1,8 +1,8 @@
|
||||
-- Import section
|
||||
parser = require("parser")
|
||||
inherits = require("inherits")
|
||||
SingleBlock = require("single-block")
|
||||
local mock = require("mock-multi-block")
|
||||
parser = require("utils.parser")
|
||||
inherits = require("utils.inherits")
|
||||
SingleBlock = require("data.datasource.single-block")
|
||||
local mock = require("data.mock.mock-multi-block")
|
||||
--
|
||||
|
||||
local MultiBlock =
|
@ -1,6 +1,6 @@
|
||||
-- Import section
|
||||
component = require("component")
|
||||
local mock = require("mock-single-block")
|
||||
local mock = require("data.mock.mock-single-block")
|
||||
--
|
||||
|
||||
local SingleBlock = {
|
@ -1,6 +1,6 @@
|
||||
-- Import section
|
||||
MockSingleBlock = require("mock-single-block")
|
||||
inherits = require("inherits")
|
||||
inherits = require("utils.inherits")
|
||||
MockSingleBlock = require("data.mock.mock-single-block")
|
||||
--
|
||||
|
||||
local MockMiner =
|
@ -1,6 +1,6 @@
|
||||
-- Import section
|
||||
inherits = require("inherits")
|
||||
MockSingleBlock = require("mock-single-block")
|
||||
inherits = require("utils.inherits")
|
||||
MockSingleBlock = require("data.mock.mock-single-block")
|
||||
--
|
||||
|
||||
local MockEnergyProvider =
|
@ -1,6 +1,6 @@
|
||||
-- Import section
|
||||
MockSingleBlock = require("mock-single-block")
|
||||
inherits = require("inherits")
|
||||
inherits = require("utils.inherits")
|
||||
MockSingleBlock = require("data.mock.mock-single-block")
|
||||
--
|
||||
|
||||
local MockMultiBlock =
|
@ -1,5 +1,5 @@
|
||||
-- Import section
|
||||
new = require("new")
|
||||
new = require("utils.new")
|
||||
--
|
||||
|
||||
local MockSingleBlock = {
|
@ -1,5 +1,5 @@
|
||||
-- Import section
|
||||
local alarm = require('alarm')
|
||||
local alarm = require('resources.sound.alarm')
|
||||
--
|
||||
|
||||
local function halt(machines)
|
0
Programs/monitor-system/domain/energy/get-consumption-usecase.lua
Executable file
0
Programs/monitor-system/domain/energy/get-consumption-usecase.lua
Executable file
@ -1,6 +1,6 @@
|
||||
-- Import section
|
||||
local getConsumption = require("get-consumption-usecase")
|
||||
local getProduction = require("get-production-usecase")
|
||||
local getConsumption = require("domain.energy.get-consumption-usecase")
|
||||
local getProduction = require("domain.energy.get-production-usecase")
|
||||
--
|
||||
|
||||
local function exec(energyProducers, energyBuffer)
|
0
Programs/monitor-system/domain/energy/get-production-usecase.lua
Executable file
0
Programs/monitor-system/domain/energy/get-production-usecase.lua
Executable file
0
Programs/monitor-system/domain/multiblock/get-status-usecase.lua
Executable file
0
Programs/monitor-system/domain/multiblock/get-status-usecase.lua
Executable file
@ -5,9 +5,9 @@ MultiBlock = require("data.datasource.multi-block")
|
||||
SingleBlock = require("data.datasource.single-block")
|
||||
EnergyProvider = require("data.datasource.energy-provider")
|
||||
|
||||
local cleanroomAddresses = require("cleanroom")
|
||||
local multiBlockAddresses = require("multi-blocks")
|
||||
local energyBufferAddress = require("energy-buffer")
|
||||
local cleanroomAddresses = require("config.addresses.cleanroom")
|
||||
local multiBlockAddresses = require("config.addresses.multi-blocks")
|
||||
local energyBufferAddress = require("config.addresses.energy-buffers")
|
||||
|
||||
local protectCleanroomRecipes = require("domain.cleanroom.protect-recipes-usecase")
|
||||
local getMultiblockStatuses = require("domain.multiblock.get-status-usecase")
|
||||
@ -31,8 +31,9 @@ local energyProducers = {}
|
||||
for i = 0, 100 do
|
||||
print(i)
|
||||
protectCleanroomRecipes(cleanroom, cleanroomMachines)
|
||||
local multiblockStatuses = getMultiblockStatuses(multiblocks)
|
||||
-- local multiblockStatuses = getMultiblockStatuses(multiblocks)
|
||||
local energyStatus = getEnergyStatus(energyProducers, energyBuffer)
|
||||
os.sleep(0)
|
||||
i = i + 1
|
||||
end
|
||||
require('resources.sound.zelda-secret')()
|
@ -1,5 +1,5 @@
|
||||
-- Import section
|
||||
local playTune = require("play-tune")
|
||||
local playTune = require("sound.play-tune")
|
||||
--
|
||||
|
||||
local tune = {
|
@ -1,5 +1,5 @@
|
||||
-- Import section
|
||||
local playTune = require("play-tune")
|
||||
local playTune = require("sound.play-tune")
|
||||
--
|
||||
|
||||
local tune = {
|
@ -1,5 +1,5 @@
|
||||
-- Import section
|
||||
local playTune = require('play-tune')
|
||||
local playTune = require('sound.play-tune')
|
||||
--
|
||||
|
||||
local tune = {
|
21
Programs/setup.lua
Normal file
21
Programs/setup.lua
Normal file
@ -0,0 +1,21 @@
|
||||
-- wget https://raw.githubusercontent.com/gordominossi/InfOS/master/Programs/setup.lua -f
|
||||
local shell = require("shell")
|
||||
|
||||
local tarMan = "https://raw.githubusercontent.com/mpmxyz/ocprograms/master/usr/man/tar.man"
|
||||
local tarBin = "https://raw.githubusercontent.com/mpmxyz/ocprograms/master/home/bin/tar.lua"
|
||||
|
||||
shell.setWorkingDirectory("/usr/man")
|
||||
shell.execute("wget " .. tarMan .. " -f")
|
||||
shell.setWorkingDirectory("/bin")
|
||||
shell.execute("wget " .. tarBin .. " -f")
|
||||
|
||||
local InfOS = "https://github.com/gordominossi/InfOS/releases/download/v0/InfOS.tar"
|
||||
|
||||
shell.setWorkingDirectory("/home")
|
||||
print("Updating InfOS")
|
||||
shell.execute("wget " .. InfOS .. " -f")
|
||||
shell.execute("tar -xf InfOS.tar")
|
||||
|
||||
shell.setWorkingDirectory("/home/InfOS")
|
||||
shell.execute("ln -s Libraries/ ../lib")
|
||||
shell.execute("ln -s Programs/config Programs/monitor-system/config")
|
Loading…
x
Reference in New Issue
Block a user