reformat node file structure

This commit is contained in:
unknown 2022-02-20 22:36:46 -05:00
parent 1f28124569
commit fc7c0ff095
7 changed files with 13 additions and 15 deletions

View File

@ -14,12 +14,12 @@ computers.os = {
license = "MIT",
}
dofile(computers.modpath .. "/old_stuff/init.lua")
dofile(computers.modpath .. "/api.lua")
dofile(computers.modpath .. "/networks.lua")
dofile(computers.modpath .. "/formspec.lua")
dofile(computers.modpath .. "/commands.lua")
dofile(computers.modpath .. "/gui.lua")
dofile(computers.modpath .. "/nodes/init.lua")
dofile(computers.modpath .. "/demo.lua")
dofile(computers.modpath .. "/tetris.lua")

10
computers/nodes/init.lua Normal file
View File

@ -0,0 +1,10 @@
local path = computers.modpath .. "/nodes"
dofile(path .. "/node_api.lua")
dofile(path .. "/nodes.lua")
dofile(path .. "/tetris.lua")
dofile(path .. "/aliases.lua")
if minetest.get_modpath("default") and minetest.get_modpath("basic_materials") then
dofile(path .. "/recipes.lua")
end

View File

@ -1,5 +1,3 @@
--computers = {}
computers.register = function (name, def)
if (name:sub(1, 1) == ":") then name = name:sub(2) end
local modname, basename = name:match("^([^:]+):(.*)")
@ -89,12 +87,4 @@ computers.pixelnodebox = function (size, boxes)
type = "fixed",
fixed = fixed
}
end
local MODPATH = minetest.get_modpath("computers") .. "/old_stuff"
dofile(MODPATH.."/computers.lua")
dofile(MODPATH.."/aliases.lua")
if minetest.get_modpath("default") and minetest.get_modpath("basic_materials") then
dofile(MODPATH.."/recipes.lua")
end

View File

@ -1,5 +1,3 @@
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
minetest.register_craft({
output = "computers:shefriendSOO",
recipe = {