added useless code
This commit is contained in:
parent
4ef7036048
commit
91c2adf54c
63
sparkmachine/lua/quarry.lua
Normal file
63
sparkmachine/lua/quarry.lua
Normal file
@ -0,0 +1,63 @@
|
||||
local MOD_NAME = minetest.get_current_modname()
|
||||
local ENERGYCOST {
|
||||
static_struts = 20,
|
||||
dynamic_struct = 24,
|
||||
hardness_mod = 1
|
||||
}
|
||||
|
||||
local function on_construct(pos, player)
|
||||
player:get_meta():set_string(MOD_NAME .. ":quarry_pos" , pos)
|
||||
|
||||
end
|
||||
|
||||
local function marker_construct(pos, player)
|
||||
local quarry_pos = player:get_meta():get_string(MOD_NAME .. ":quarry_pos", pos)
|
||||
local quarry = minetest.get_node_at(quarry_pos)
|
||||
quarry:get_definition()._sparktech_lamp_construct(pos, quarry_pos, player)
|
||||
end
|
||||
|
||||
local function on_marker_placed(pos, quarry_pos, player)
|
||||
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node( MOD_NAME .. "lq_quarry_marker", {
|
||||
descritption = "quarry marker",
|
||||
|
||||
on_construct = marker_construct,
|
||||
})
|
||||
|
||||
minetest.register_node( MOD_NAME .. "static_strut", {
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node( NAME .. ":lv_quarry", {
|
||||
description = "Electric Quarry",
|
||||
|
||||
tiles = {
|
||||
"quarry.png",
|
||||
"quarry.png",
|
||||
"quarry.png",
|
||||
"quarry.png",
|
||||
"backplate.png",
|
||||
"quarry_frontplate.png"
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
|
||||
groups = {
|
||||
sparktech_techy = 1,
|
||||
sparktech_struty = 1,
|
||||
sparktech_energy_type = 4,
|
||||
sparktech_net_trigger = 1,
|
||||
sparktech_energy_max = 3000,
|
||||
spark_energy_timer = 2
|
||||
},
|
||||
|
||||
on_timer = mytime, -- add a mytimer function
|
||||
|
||||
on_construct = on_construct,
|
||||
_sparktech_lamp_construct = on_marker_placed,
|
||||
|
||||
allow_metadata_inventory_put = function() return false end,
|
||||
allow_metadata_inventory_take = function(_, _, _, stack) return stack:get_count() end, -- Might want to improve this
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user