mods that hopefully work for a TechAge-based pack
This commit is contained in:
1 parent
4e6b08d194
commit
c27db2a537
6234 files changed
+375578
No files matched your search
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2019 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
]]--
|
||||
|
||||
function techage.ironage_swap_node(pos, name)
|
||||
minetest.swap_node(pos, {name = name})
|
||||
local node = minetest.registered_nodes[name]
|
||||
if node.on_construct then
|
||||
node.on_construct(pos)
|
||||
end
|
||||
if node.after_place_node then
|
||||
node.after_place_node(pos)
|
||||
end
|
||||
end
|
||||
|
||||
function techage.ironage_swap_nodes(pos1, pos2, name1, name2)
|
||||
for _,p in ipairs(minetest.find_nodes_in_area(pos1, pos2, name1)) do
|
||||
techage.ironage_swap_node(p, name2)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user