mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 01:30:38 +01:00
Updated maptools mod : not running yet
This commit is contained in:
parent
2bb2628beb
commit
36897537a5
@ -26,8 +26,4 @@ local function setting(settingtype, name, default)
|
||||
end
|
||||
|
||||
-- Show Map Tools stuff in creative inventory (1 or 0):
|
||||
<<<<<<< HEAD
|
||||
setting("integer", "hide_from_creative_inventory", 0)
|
||||
=======
|
||||
setting("integer", "hide_from_creative_inventory", 1)
|
||||
>>>>>>> Maptool's update
|
||||
setting("integer", "hide_from_creative_inventory", 0)
|
@ -360,7 +360,7 @@ minetest.register_node("maptools:diamondblock", {
|
||||
description = S("Unbreakable Diamond Block"),
|
||||
range = 12,
|
||||
stack_max = 10000,
|
||||
tiles = {"default_steel_block.png"},
|
||||
tiles = {"default_diamond_block.png"},
|
||||
drop = "",
|
||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
|
@ -1,102 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
--[[
|
||||
=====================================================================
|
||||
** Map Tools **
|
||||
By Calinou.
|
||||
|
||||
Copyright (c) 2012-2015 Calinou and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
=====================================================================
|
||||
--]]
|
||||
|
||||
maptools = {}
|
||||
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
maptools.intllib = S
|
||||
|
||||
local modpath = minetest.get_modpath("maptools")
|
||||
|
||||
dofile(modpath .. "/config.lua")
|
||||
dofile(modpath .. "/aliases.lua")
|
||||
dofile(modpath .. "/craftitems.lua")
|
||||
dofile(modpath .. "/default_nodes.lua")
|
||||
dofile(modpath .. "/nodes.lua")
|
||||
dofile(modpath .. "/tools.lua")
|
||||
|
||||
--[[
|
||||
Map Tools by Calinou
|
||||
Licensed under the zlib license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
||||
--]]
|
||||
|
||||
-- Redefine cloud so that the admin pickaxe can mine it.
|
||||
|
||||
minetest.register_node(":default:cloud", {
|
||||
description = S("Cloud"),
|
||||
tiles = {"default_cloud.png"},
|
||||
drop = "",
|
||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "maptools:infinitefuel",
|
||||
burntime = 1000000000,
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craftitem("maptools:copper_coin", {
|
||||
description = S("Copper Coin"),
|
||||
inventory_image = "maptools_copper_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:silver_coin", {
|
||||
description = S("Silver Coin"),
|
||||
inventory_image = "maptools_silver_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:gold_coin", {
|
||||
description = S("Gold Coin"),
|
||||
inventory_image = "maptools_gold_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:infinitefuel", {
|
||||
description = S("Infinite Fuel"),
|
||||
inventory_image = "maptools_infinitefuel.png",
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
||||
and minetest.get_node(pos).name ~= "air" then
|
||||
minetest.log("action", puncher:get_player_name() .. " digs " .. minetest.get_node(pos).name .. " at " .. minetest.pos_to_string(pos) .. " using an Admin Pickaxe.")
|
||||
minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||
nodeupdate(pos) -- Run node update actions like falling nodes.
|
||||
end
|
||||
end)
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
minetest.log("action", S("[maptools] loaded."))
|
||||
end
|
||||
=======
|
||||
--[[
|
||||
=====================================================================
|
||||
** Map Tools **
|
||||
@ -126,7 +27,71 @@ dofile(modpath .. "/default_nodes.lua")
|
||||
dofile(modpath .. "/nodes.lua")
|
||||
dofile(modpath .. "/tools.lua")
|
||||
|
||||
--[[
|
||||
Map Tools by Calinou
|
||||
Licensed under the zlib license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
||||
--]]
|
||||
|
||||
-- Redefine cloud so that the admin pickaxe can mine it.
|
||||
|
||||
minetest.register_node(":default:cloud", {
|
||||
description = S("Cloud"),
|
||||
tiles = {"default_cloud.png"},
|
||||
drop = "",
|
||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative},
|
||||
sounds = default.node_sound_defaults(),
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "maptools:infinitefuel",
|
||||
burntime = 1000000000,
|
||||
})
|
||||
|
||||
-- Items
|
||||
|
||||
minetest.register_craftitem("maptools:copper_coin", {
|
||||
description = S("Copper Coin"),
|
||||
inventory_image = "maptools_copper_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:silver_coin", {
|
||||
description = S("Silver Coin"),
|
||||
inventory_image = "maptools_silver_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:gold_coin", {
|
||||
description = S("Gold Coin"),
|
||||
inventory_image = "maptools_gold_coin.png",
|
||||
wield_scale = {x = 0.5, y = 0.5, z = 0.25},
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("maptools:infinitefuel", {
|
||||
description = S("Infinite Fuel"),
|
||||
inventory_image = "maptools_infinitefuel.png",
|
||||
stack_max = 10000,
|
||||
groups = {not_in_creative_inventory = maptools.creative},
|
||||
})
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
||||
and minetest.get_node(pos).name ~= "air" then
|
||||
minetest.log("action", puncher:get_player_name() .. " digs " .. minetest.get_node(pos).name .. " at " .. minetest.pos_to_string(pos) .. " using an Admin Pickaxe.")
|
||||
minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||
nodeupdate(pos) -- Run node update actions like falling nodes.
|
||||
end
|
||||
end)
|
||||
|
||||
if minetest.setting_getbool("log_mods") then
|
||||
minetest.log("action", S("[maptools] loaded."))
|
||||
end
|
||||
>>>>>>> Maptool's update
|
||||
|
Loading…
Reference in New Issue
Block a user