mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-09-26 06:10:37 +02:00
address the DIR_DELIM issue
This commit is contained in:
parent
619b977bb3
commit
87734f7ff0
|
@ -16,9 +16,6 @@ read_globals = {
|
||||||
"vector", "ItemStack",
|
"vector", "ItemStack",
|
||||||
"dump", "VoxelArea",
|
"dump", "VoxelArea",
|
||||||
|
|
||||||
-- system
|
|
||||||
"DIR_DELIM",
|
|
||||||
|
|
||||||
-- deps
|
-- deps
|
||||||
"default", "screwdriver",
|
"default", "screwdriver",
|
||||||
"digiline", "doors"
|
"digiline", "doors"
|
||||||
|
|
|
@ -11,4 +11,4 @@ local old_forceloaded_blocks = mesecon.file2table("mesecon_forceloaded")
|
||||||
for hash, _ in pairs(old_forceloaded_blocks) do
|
for hash, _ in pairs(old_forceloaded_blocks) do
|
||||||
minetest.forceload_free_block(unhash_blockpos(hash))
|
minetest.forceload_free_block(unhash_blockpos(hash))
|
||||||
end
|
end
|
||||||
os.remove(minetest.get_worldpath()..DIR_DELIM.."mesecon_forceloaded")
|
os.remove(minetest.get_worldpath().."/mesecon_forceloaded")
|
||||||
|
|
|
@ -248,7 +248,7 @@ end
|
||||||
-- File writing / reading utilities
|
-- File writing / reading utilities
|
||||||
local wpath = minetest.get_worldpath()
|
local wpath = minetest.get_worldpath()
|
||||||
function mesecon.file2table(filename)
|
function mesecon.file2table(filename)
|
||||||
local f = io.open(wpath..DIR_DELIM..filename, "r")
|
local f = io.open(wpath.."/"..filename, "r")
|
||||||
if f == nil then return {} end
|
if f == nil then return {} end
|
||||||
local t = f:read("*all")
|
local t = f:read("*all")
|
||||||
f:close()
|
f:close()
|
||||||
|
@ -257,7 +257,7 @@ function mesecon.file2table(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mesecon.table2file(filename, table)
|
function mesecon.table2file(filename, table)
|
||||||
local f = io.open(wpath..DIR_DELIM..filename, "w")
|
local f = io.open(wpath.."/"..filename, "w")
|
||||||
f:write(minetest.serialize(table))
|
f:write(minetest.serialize(table))
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
||||||
|
|
|
@ -500,4 +500,4 @@ minetest.register_craft({
|
||||||
|
|
||||||
|
|
||||||
-- load legacy code
|
-- load legacy code
|
||||||
dofile(minetest.get_modpath("mesecons_pistons")..DIR_DELIM.."legacy.lua")
|
dofile(minetest.get_modpath("mesecons_pistons").."/legacy.lua")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user