fix lots of bugs

This commit is contained in:
theFox6 2020-06-17 09:30:47 +02:00
parent 5b2a830a6e
commit a47336ae3e
No known key found for this signature in database
GPG Key ID: C884FE8D3BCE128A
6 changed files with 17 additions and 14 deletions

@ -24,6 +24,8 @@ end
-- Load API
dofile(modpath.."/api.lua")
-- Machine Registration
dofile(modpath.."/register.lua")
-------------------
----- MODULES -----
@ -72,8 +74,6 @@ function microexpansion.require_module(name)
end
end
microexpansion.require_module("power")
for name,enabled in pairs(settings) do
if enabled ~= false then
microexpansion.load_module(name)

@ -1,5 +1,5 @@
shared = true
network = true
power = true
power = false
storage = true
ores = true

@ -9,6 +9,5 @@ me.power = {}
-- Load Resources
dofile(path.."/network.lua") -- Network Management
dofile(path.."/register.lua") -- Machine Registration
--dofile(path.."/ctrl.lua") -- Controller/wires
dofile(path.."/gen.lua") -- Generators

@ -17,6 +17,8 @@ local function load_drives()
end
end
]]
else
netdrives = {}
end
end

@ -171,7 +171,7 @@ microexpansion.register_node("term", {
local net,cp = me.get_connected_network(pos)
if net then
if cp then
minetest.log("none","network and ctrl_pos")
minetest.log("info","network and ctrl_pos")
else
minetest.log("warning","network but no ctrl_pos")
end

@ -1,4 +1,4 @@
-- power/register.lua
-- register.lua
--[[ Machine Registration API ]]
@ -29,7 +29,7 @@ function me.register_machine(itemstring, def)
end
-- Trace Network
power.trace(pos)
--power.trace(pos)
-- Set demand
if def.demand then
@ -37,9 +37,11 @@ function me.register_machine(itemstring, def)
end
if type(def.machine) == "table" then
if power then
power.add_machine(pos, def.machine)
end
end
end
-- Set on_destruct
local def_destruct = def.on_destruct
def.on_destruct = function(pos, player)
@ -55,7 +57,7 @@ function me.register_machine(itemstring, def)
-- Remove item from network
me.network_remove(pos)
-- Retrace Network
power.trace(pos)
--power.trace(pos)
end
end
-- Set connects_to