mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-01 07:40:37 +02:00
remove these spaces
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
--Minetest 0.4.7 mod: concrete
|
--Minetest 0.4.7 mod: concrete
|
||||||
--(c) 2013 by RealBadAngel <mk@realbadangel.pl>
|
--(c) 2013 by RealBadAngel <mk@realbadangel.pl>
|
||||||
|
|
||||||
local technic = rawget(_G, "technic") or {}
|
local technic = rawget(_G, "technic") or {}
|
||||||
@ -107,19 +107,19 @@ minetest.register_node(":technic:concrete_post_platform", {
|
|||||||
groups={cracky=1, level=2},
|
groups={cracky=1, level=2},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {box_platform}
|
fixed = {box_platform}
|
||||||
},
|
},
|
||||||
on_place = function (itemstack, placer, pointed_thing)
|
on_place = function (itemstack, placer, pointed_thing)
|
||||||
local node = minetest.get_node(pointed_thing.under)
|
local node = minetest.get_node(pointed_thing.under)
|
||||||
if not technic.concrete_posts[node.name] then
|
if not technic.concrete_posts[node.name] then
|
||||||
return minetest.item_place_node(itemstack, placer, pointed_thing)
|
return minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||||
end
|
end
|
||||||
local links = technic.concrete_posts[node.name]
|
local links = technic.concrete_posts[node.name]
|
||||||
if links[6] ~= 0 then -- The post already has a platform
|
if links[6] ~= 0 then -- The post already has a platform
|
||||||
return minetest.item_place_node(itemstack, placer, pointed_thing)
|
return minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||||
end
|
end
|
||||||
local id = technic.get_post_id({links[1], links[2], links[3], links[4], links[5], 1})
|
local id = technic.get_post_id({links[1], links[2], links[3], links[4], links[5], 1})
|
||||||
minetest.set_node(pointed_thing.under, {name="technic:concrete_post"..id})
|
minetest.set_node(pointed_thing.under, {name="technic:concrete_post"..id})
|
||||||
@ -135,7 +135,7 @@ local function gen_post_nodebox(x1, x2, z1, z2, y, platform)
|
|||||||
local zz = z1 + z2
|
local zz = z1 + z2
|
||||||
if ((xx == 2 and zz == 0) or (xx == 0 and zz == 2)) and y == 0 then
|
if ((xx == 2 and zz == 0) or (xx == 0 and zz == 2)) and y == 0 then
|
||||||
box = {}
|
box = {}
|
||||||
else
|
else
|
||||||
box = {box_center}
|
box = {box_center}
|
||||||
end
|
end
|
||||||
if x1 ~= 0 then
|
if x1 ~= 0 then
|
||||||
@ -235,7 +235,7 @@ for platform = 0, 1 do
|
|||||||
if id ~= 0 then
|
if id ~= 0 then
|
||||||
groups.not_in_creative_inventory = 1
|
groups.not_in_creative_inventory = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local drop = "technic:concrete_post0"
|
local drop = "technic:concrete_post0"
|
||||||
local after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
local after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
technic.update_posts(pos, false)
|
technic.update_posts(pos, false)
|
||||||
@ -255,7 +255,7 @@ for platform = 0, 1 do
|
|||||||
drop = drop,
|
drop = drop,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = gen_post_nodebox(x1, x2, z1, z2, y, platform),
|
fixed = gen_post_nodebox(x1, x2, z1, z2, y, platform),
|
||||||
|
@ -98,7 +98,7 @@ if minetest.get_modpath("moreblocks") then
|
|||||||
minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical")
|
minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical")
|
||||||
minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom")
|
minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom")
|
||||||
minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top")
|
minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top")
|
||||||
end
|
end
|
||||||
|
|
||||||
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
|
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
|
||||||
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
|
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
|
||||||
|
@ -30,10 +30,10 @@ dofile(modpath.."/config.lua")
|
|||||||
-- Helper functions
|
-- Helper functions
|
||||||
dofile(modpath.."/helpers.lua")
|
dofile(modpath.."/helpers.lua")
|
||||||
|
|
||||||
-- Items
|
-- Items
|
||||||
dofile(modpath.."/items.lua")
|
dofile(modpath.."/items.lua")
|
||||||
|
|
||||||
-- Craft recipes for items
|
-- Craft recipes for items
|
||||||
dofile(modpath.."/crafts.lua")
|
dofile(modpath.."/crafts.lua")
|
||||||
|
|
||||||
-- Register functions
|
-- Register functions
|
||||||
|
@ -35,7 +35,7 @@ minetest.register_tool("technic:blue_energy_crystal", {
|
|||||||
fleshy = {times={}, uses=10000, maxlevel=0}
|
fleshy = {times={}, uses=10000, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("technic:green_energy_crystal", {
|
minetest.register_tool("technic:green_energy_crystal", {
|
||||||
description = S("Green Energy Crystal"),
|
description = S("Green Energy Crystal"),
|
||||||
@ -51,7 +51,7 @@ minetest.register_tool("technic:green_energy_crystal", {
|
|||||||
fleshy = {times={}, uses=10000, maxlevel=0}
|
fleshy = {times={}, uses=10000, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("technic:red_energy_crystal", {
|
minetest.register_tool("technic:red_energy_crystal", {
|
||||||
description = S("Red Energy Crystal"),
|
description = S("Red Energy Crystal"),
|
||||||
@ -67,7 +67,7 @@ minetest.register_tool("technic:red_energy_crystal", {
|
|||||||
fleshy = {times={}, uses=10000, maxlevel=0}
|
fleshy = {times={}, uses=10000, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:fine_copper_wire", {
|
minetest.register_craftitem("technic:fine_copper_wire", {
|
||||||
|
@ -198,7 +198,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Which kind of network are we on:
|
-- Which kind of network are we on:
|
||||||
pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
|
pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ minetest.register_abm({
|
|||||||
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
|
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Run all the nodes
|
-- Run all the nodes
|
||||||
local function run_nodes(list)
|
local function run_nodes(list)
|
||||||
for _, pos2 in ipairs(list) do
|
for _, pos2 in ipairs(list) do
|
||||||
@ -226,7 +226,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run_nodes(PR_nodes)
|
run_nodes(PR_nodes)
|
||||||
run_nodes(RE_nodes)
|
run_nodes(RE_nodes)
|
||||||
run_nodes(BA_nodes)
|
run_nodes(BA_nodes)
|
||||||
|
@ -8,7 +8,7 @@ local S = technic.getter
|
|||||||
technic.register_power_tool("technic:flashlight", flashlight_max_charge)
|
technic.register_power_tool("technic:flashlight", flashlight_max_charge)
|
||||||
|
|
||||||
minetest.register_alias("technic:light_off", "air")
|
minetest.register_alias("technic:light_off", "air")
|
||||||
|
|
||||||
minetest.register_tool("technic:flashlight", {
|
minetest.register_tool("technic:flashlight", {
|
||||||
description = S("Flashlight"),
|
description = S("Flashlight"),
|
||||||
inventory_image = "technic_flashlight.png",
|
inventory_image = "technic_flashlight.png",
|
||||||
|
@ -62,7 +62,7 @@ end
|
|||||||
|
|
||||||
local function drill_dig_it1 (player)
|
local function drill_dig_it1 (player)
|
||||||
local dir=player:get_look_dir()
|
local dir=player:get_look_dir()
|
||||||
if math.abs(dir.x)>math.abs(dir.z) then
|
if math.abs(dir.x)>math.abs(dir.z) then
|
||||||
if dir.x>0 then return 0 end
|
if dir.x>0 then return 0 end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@ -152,7 +152,7 @@ local function drill_dig_it(pos, player, mode)
|
|||||||
if mode == 1 then
|
if mode == 1 then
|
||||||
drill_dig_it0(pos, player)
|
drill_dig_it0(pos, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
if mode == 2 then -- 3 deep
|
if mode == 2 then -- 3 deep
|
||||||
dir = drill_dig_it1(player)
|
dir = drill_dig_it1(player)
|
||||||
if dir == 0 then -- x+
|
if dir == 0 then -- x+
|
||||||
@ -184,7 +184,7 @@ local function drill_dig_it(pos, player, mode)
|
|||||||
drill_dig_it0 (pos,player)
|
drill_dig_it0 (pos,player)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if mode==3 then -- 3 wide
|
if mode==3 then -- 3 wide
|
||||||
dir=drill_dig_it1(player)
|
dir=drill_dig_it1(player)
|
||||||
if dir==0 or dir==1 then -- x
|
if dir==0 or dir==1 then -- x
|
||||||
@ -202,7 +202,7 @@ local function drill_dig_it(pos, player, mode)
|
|||||||
drill_dig_it0 (pos,player)
|
drill_dig_it0 (pos,player)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if mode==4 then -- 3 tall, selected in the middle
|
if mode==4 then -- 3 tall, selected in the middle
|
||||||
drill_dig_it0 (pos,player)
|
drill_dig_it0 (pos,player)
|
||||||
pos.y=pos.y-1
|
pos.y=pos.y-1
|
||||||
@ -225,7 +225,7 @@ local function drill_dig_it(pos, player, mode)
|
|||||||
drill_dig_it4(pos,player)
|
drill_dig_it4(pos,player)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.sound_play("mining_drill", {pos = pos, gain = 1.0, max_hear_distance = 10,})
|
minetest.sound_play("mining_drill", {pos = pos, gain = 1.0, max_hear_distance = 10,})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ minetest.register_tool("technic:prospector", {
|
|||||||
"label[0,7.5;Accuracy:]"..
|
"label[0,7.5;Accuracy:]"..
|
||||||
"label[0,8;98%]")
|
"label[0,8;98%]")
|
||||||
return
|
return
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_player_receive_fields(function(user, formname, fields)
|
minetest.register_on_player_receive_fields(function(user, formname, fields)
|
||||||
@ -117,7 +117,7 @@ minetest.register_on_player_receive_fields(function(user, formname, fields)
|
|||||||
user:set_wielded_item(toolstack)
|
user:set_wielded_item(toolstack)
|
||||||
return true
|
return true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "technic:prospector",
|
output = "technic:prospector",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -86,7 +86,7 @@ minetest.register_tool("technic:sonic_screwdriver", {
|
|||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "technic:sonic_screwdriver",
|
output = "technic:sonic_screwdriver",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -8,7 +8,7 @@ minetest.register_node( ":technic:mineral_uranium", {
|
|||||||
groups = {cracky=3, radioactive=1000},
|
groups = {cracky=3, radioactive=1000},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
drop = "technic:uranium_lump",
|
drop = "technic:uranium_lump",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node( ":technic:mineral_chromium", {
|
minetest.register_node( ":technic:mineral_chromium", {
|
||||||
description = S("Chromium Ore"),
|
description = S("Chromium Ore"),
|
||||||
@ -17,7 +17,7 @@ minetest.register_node( ":technic:mineral_chromium", {
|
|||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
drop = "technic:chromium_lump",
|
drop = "technic:chromium_lump",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node( ":technic:mineral_zinc", {
|
minetest.register_node( ":technic:mineral_zinc", {
|
||||||
description = S("Zinc Ore"),
|
description = S("Zinc Ore"),
|
||||||
@ -52,7 +52,7 @@ minetest.register_node( ":technic:granite", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {cracky=1},
|
groups = {cracky=1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node( ":technic:marble", {
|
minetest.register_node( ":technic:marble", {
|
||||||
description = S("Marble"),
|
description = S("Marble"),
|
||||||
@ -60,7 +60,7 @@ minetest.register_node( ":technic:marble", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {cracky=3, marble=1},
|
groups = {cracky=3, marble=1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node( ":technic:marble_bricks", {
|
minetest.register_node( ":technic:marble_bricks", {
|
||||||
description = S("Marble Bricks"),
|
description = S("Marble Bricks"),
|
||||||
@ -68,7 +68,7 @@ minetest.register_node( ":technic:marble_bricks", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":technic:uranium_block", {
|
minetest.register_node(":technic:uranium_block", {
|
||||||
description = S("Uranium Block"),
|
description = S("Uranium Block"),
|
||||||
|
@ -140,7 +140,7 @@ minetest.register_tool("wrench:wrench", {
|
|||||||
lists[listname] = list
|
lists[listname] = list
|
||||||
end
|
end
|
||||||
metadata.lists = lists
|
metadata.lists = lists
|
||||||
|
|
||||||
local metas = {}
|
local metas = {}
|
||||||
for name, meta_type in pairs(def.metas or {}) do
|
for name, meta_type in pairs(def.metas or {}) do
|
||||||
if meta_type == wrench.META_TYPE_INT then
|
if meta_type == wrench.META_TYPE_INT then
|
||||||
@ -152,7 +152,7 @@ minetest.register_tool("wrench:wrench", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
metadata.metas = metas
|
metadata.metas = metas
|
||||||
|
|
||||||
stack:set_metadata(minetest.serialize(metadata))
|
stack:set_metadata(minetest.serialize(metadata))
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
itemstack:add_wear(65535 / 20)
|
itemstack:add_wear(65535 / 20)
|
||||||
|
@ -11,7 +11,7 @@ Syntax:
|
|||||||
store_meta_always = true,
|
store_meta_always = true,
|
||||||
}
|
}
|
||||||
owned - nodes that are protected by owner requirements (Ex. locked chests)
|
owned - nodes that are protected by owner requirements (Ex. locked chests)
|
||||||
store_meta_always - when nodes are broken this ensures metadata and
|
store_meta_always - when nodes are broken this ensures metadata and
|
||||||
inventory is always stored (Ex. active state for machines)
|
inventory is always stored (Ex. active state for machines)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ wrench.META_TYPE_INT = 0
|
|||||||
wrench.META_TYPE_FLOAT = 1
|
wrench.META_TYPE_FLOAT = 1
|
||||||
wrench.META_TYPE_STRING = 2
|
wrench.META_TYPE_STRING = 2
|
||||||
|
|
||||||
local INT, STRING, FLOAT =
|
local INT, STRING, FLOAT =
|
||||||
wrench.META_TYPE_INT,
|
wrench.META_TYPE_INT,
|
||||||
wrench.META_TYPE_STRING,
|
wrench.META_TYPE_STRING,
|
||||||
wrench.META_TYPE_FLOAT
|
wrench.META_TYPE_FLOAT
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local INT, STRING, FLOAT =
|
local INT, STRING, FLOAT =
|
||||||
wrench.META_TYPE_INT,
|
wrench.META_TYPE_INT,
|
||||||
wrench.META_TYPE_STRING,
|
wrench.META_TYPE_STRING,
|
||||||
wrench.META_TYPE_FLOAT
|
wrench.META_TYPE_FLOAT
|
||||||
@ -294,7 +294,7 @@ wrench:register_node("technic:mv_centrifuge_active", {
|
|||||||
|
|
||||||
local chest_mark_colors = {
|
local chest_mark_colors = {
|
||||||
'_black',
|
'_black',
|
||||||
'_blue',
|
'_blue',
|
||||||
'_brown',
|
'_brown',
|
||||||
'_cyan',
|
'_cyan',
|
||||||
'_dark_green',
|
'_dark_green',
|
||||||
|
Reference in New Issue
Block a user