technology/structures.lua

407 lines
12 KiB
Lua
Raw Normal View History

new file: aircraft.lua new file: characters new file: depends.txt new file: documentation.txt new file: electric_nodes.lua new file: init.lua new file: models/chasseur.blend new file: models/chasseur.blend1 new file: models/chasseur.blend2 new file: models/chasseur.x new file: models/hunter.x new file: models/patrouilleur-closed.blend1 new file: models/patrouilleur-closed.blend2 new file: models/patrouilleur-opened.blend1 new file: models/patrouilleur.blend new file: models/patrouilleur.blend1 new file: models/patrouilleur.blend2 new file: models/patrouilleur.x new file: models/patrouilleur_close.blend new file: models/patrouilleur_close.x new file: models/patrouilleur_open.blend new file: models/patrouilleur_open.blend1 new file: models/patrouilleur_open.blend2 new file: models/patrouilleur_open.x new file: screen.lua new file: sounds/cps-vflSymP2Q.swf new file: sounds/jackhammer_sound.ogg new file: sounds/metal_footstep.1.ogg new file: sounds/metal_footstep.2.ogg new file: sounds/metal_footstep.3.ogg new file: sounds/metal_footstep.4.ogg new file: structures.lua new file: textures/battery_back.png new file: textures/battery_side.png new file: textures/battery_top.png new file: textures/bronze_ingot.png new file: textures/bronze_lump.png new file: textures/button_item.png new file: textures/edge_side.png new file: textures/electronic_card_item.png new file: textures/floor_bottom.png new file: textures/floor_side.png new file: textures/floor_top.png new file: textures/hydro_generator_front.png new file: textures/jackhammer.png new file: textures/jackhammer_side.png new file: textures/jackhammer_top.png new file: textures/lamp_box.png new file: textures/lamp_box_on.png new file: textures/lamp_small.png new file: textures/lamp_small_ceiling.png new file: textures/lamp_small_floor.png new file: textures/lamp_small_on.png new file: textures/lamp_small_on_ceiling.png new file: textures/lamp_small_on_floor.png new file: textures/lamp_small_only.png new file: textures/patrouilleur.png new file: textures/plastic_item.png new file: textures/resistor_item.png new file: textures/resistor_side.png new file: textures/resistor_top.png new file: textures/screen_flat_back.png new file: textures/screen_flat_bottom.png new file: textures/screen_flat_front_2columns.png new file: textures/screen_flat_front_bigtext.png new file: textures/screen_flat_front_cybertronic.png new file: textures/screen_flat_front_map.png new file: textures/screen_flat_front_off.png new file: textures/screen_flat_front_smalltext.png new file: textures/screen_flat_left.png new file: textures/screen_flat_right.png new file: textures/screen_flat_top.png new file: textures/steel_armature_h_side.png new file: textures/steel_armature_top.png new file: textures/steel_armature_v_side.png new file: textures/steel_wrench.png new file: textures/structure_armature_h_wielded.png new file: textures/structures_concrete.png new file: textures/switch_side.png new file: textures/switch_top_off.png new file: textures/switch_top_on.png new file: textures/technology_ladder.png new file: textures/triangle_left.png new file: textures/triangle_right.png new file: textures/triangle_side.png new file: textures/wire_item.png new file: textures/wire_side.png new file: textures/wire_top.png new file: textures/wire_top_wall.png new file: tools.lua
2014-06-20 13:17:17 +02:00
--[[
including : concrete, steel armature, grid, bridge, support, flat
]]
minetest.register_craft({
output = 'technology:concrete',
type = "shapeless",
recipe = {"group:sand", "default:gravel", "bucket:bucket_water"},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
})
minetest.register_craft({
output = 'technology:armature_h 5',
recipe = {
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
{'', 'moreores:bronze_ingot', ''},
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
}
})
minetest.register_craft({
output = 'technology:armature_v 5',
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = 'technology:armature_v',
recipe = {
{'technology:armature_h'},
}
})
minetest.register_craft({
output = 'technology:armature_h',
recipe = {
{'technology:armature_v'},
}
})
minetest.register_craft({
type = "cooking",
output = 'moreores:bronze_ingot 7',
recipe = 'technology:armature_v',
})
minetest.register_craft({
type = "cooking",
output = 'moreores:bronze_ingot 7',
recipe = 'technology:armature_h',
})
minetest.register_node("technology:concrete", {
description = "Concrete block",
tiles = {"structures_concrete.png"},
is_ground_content = true,
groups = {cracky=3, stone=2},
sounds = default.node_sound_stone_defaults(),
})
local metal_punch = function(pos, puncher)
local table = {
name = "metal_footstep",
gain = 1.0,
max_hear_distance = 200,
loop = false,
pos = pos
}
minetest.sound_play(table.name, table)
end
local metal_footstep = {
footstep = {name="metal_footstep", gain=0.8},
dug = {name="", gain = 0.8},
}
minetest.register_node("technology:armature_h", {
description = "Steel armature horizontal",
inventory_image = "steel_armature_h_side.png",
wield_image = "steel_armature_h_side.png",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.4, -0.2, 0.5, 0.4, 0.2},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}},
tiles = {"steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_h_side.png", "steel_armature_h_side.png"},
walkable = true,
groups = {mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:armature_v", {
description = "Steel armature vertical",
inventory_image = "steel_armature_v_side.png",
wield_image = "steel_armature_v_side.png",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, -0.4, 0.5, 0.5},
{0.4, -0.5, -0.5, 0.5, 0.5, 0.5},
{-0.4, -0.5, -0.2, 0.4, 0.5, 0.2},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}},
tiles = {"steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_v_side.png", "steel_armature_v_side.png"},
walkable = true,
groups = {mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:grid_v", {
description = "Bronze grid vertical",
inventory_image = "bronze_grid_front.png",
wield_image = "bronze_grid_front.png",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
light_source = 3,
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, -0.5, 0.3, 0.5, 0.5, 0.4}
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, 0.3, 0.5, 0.5, 0.4}
}},
tiles = {"bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_front.png", "steel_grid_front.png"},
walkable = true,
groups = {paffy=2},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:grid_h", {
description = "Bronze grid horizontal",
inventory_image = "bronze_grid_front.png",
wield_image = "bronze_grid_front.png",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
light_source = 3,
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5}
}},
selection_box = {type = "fixed", fixed = {
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5}
}},
tiles = {"bronze_grid_side.png", "bronze_grid_front.png", "bronze_grid_side.png", "bronze_grid_front.png", "bronze_grid_side.png", "steel_grid_side.png"},
walkable = true,
groups = {paffy=2},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_craft({
output = 'technology:grid_v 10',
recipe = {
{'', 'moreores:bronze_ingot', ''},
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
{'', 'moreores:bronze_ingot', ''},
}
})
minetest.register_craft({
output = 'technology:grid_v',
recipe = {{'technology:grid_h'}},
})
minetest.register_craft({
output = 'gird:grid_h',
recipe = {{'technology:grid_v'}},
})
minetest.register_craft({
output = 'technology:floor 2',
recipe = {
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
}
})
minetest.register_craft({
output = 'technology:edge 10',
recipe = {
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
}
})
minetest.register_craft({
output = 'technology:edge',
recipe = {
{'technology:edge_angle'},
}
})
minetest.register_craft({
output = 'technology:edge_angle',
recipe = {
{'technology:edge'},
}
})
minetest.register_craft({
output = 'technology:triangle 4',
recipe = {
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
{'', 'moreores:bronze_ingot'},
}
})
minetest.register_node("technology:floor", {
description = "Bridge floor",
inventory_image = "floor_top.png",
wield_image = "floor_top.png",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, 0.4, -0.5, 0.5, 0.42, 0.5},
{-0.3, 0.3, -0.5, -0.2, 0.4, 0.5},
{0.2, 0.3, -0.5, 0.3, 0.4, 0.5},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}},
tiles = {"floor_top.png", "floor_bottom.png", "floor_side.png", "floor_side.png", "floor_side.png", "floor_side.png"},
walkable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:stairs", {
description = "Bridge stairs",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.38, 0},
{-0.5, -0.1, 0, 0.5, 0.02, 0.5},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}},
tiles = {"floor_top.png", "floor_bottom.png", "floor_side.png", "floor_side.png", "floor_side.png", "floor_side.png"},
walkable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:edge", {
description = "Bridge edge",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, 0.2, -0.5, 0.5, 0.3, -0.4},
{-0.3, -0.6, -0.5, -0.2, 0.2, -0.4},
{0.2, -0.6, -0.5, 0.3, 0.2, -0.4},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.3},
}},
tiles = {"edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png"},
walkable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:edge_angle", {
description = "Bridge edge",
stack_max = 20,
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.5, 0.2, -0.5, 0.5, 0.3, -0.4},
{-0.3, -0.6, -0.5, -0.2, 0.2, -0.4},
{0.2, -0.6, -0.5, 0.3, 0.2, -0.4},
{-0.5, 0.2, -0.5, -0.4, 0.3, 0.5},
{-0.5, -0.6, -0.3, -0.4, 0.2, -0.2},
{-0.5, -0.6, 0.2, -0.4, 0.2, 0.3},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.3},
}},
tiles = {"edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png"},
walkable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
drop = "technology:edge",
})
minetest.register_node("technology:triangle", {
description = "Bridge triangle",
inventory_image = "triangle_right.png",
wield_image = "triangle_right.png",
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.01, 0.5, -0.5, 0.01, 1.5, 0.5},
}},
selection_box = {type = "fixed", fixed = {
{-0.01, 0.5, -0.5, 0.01, 1.5, 0.5},
}},
tiles = {"triangle_side.png", "triangle_side.png", "triangle_right.png", "triangle_left.png", "triangle_side.png", "triangle_side.png"},
walkable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:ladder", {
description = "bronze ladder",
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
{-0.3, -0.5, 0.4, -0.2, 0.5, 0.5},
{ 0.3, -0.5, 0.4, 0.2, 0.5, 0.5},
{ -0.2, -0.36, 0.42, 0.2, -0.3, 0.48},
{ -0.2, 0.36, 0.42, 0.2, 0.3, 0.48},
{ -0.2, -0.03, 0.42, 0.2, 0.03, 0.48},
}},
selection_box = {type = "fixed", fixed = {
{-0.3, -0.5, 0.4, 0.3, 0.5, 0.5},
}},
tiles = {"technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png"},
walkable = true,
climbable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})
minetest.register_node("technology:ladder_closed", {
description = "bronze ladder closed",
node_placement_prediction = "",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {type = "fixed", fixed = {
-- barre verticales latérales
{-0.3, -0.5, 0.4, -0.2, 0.5, 0.5},
{ 0.3, -0.5, 0.4, 0.2, 0.5, 0.5},
-- barres horizontales
{ -0.2, -0.36, 0.42, 0.2, -0.3, 0.48},
{ -0.2, 0.36, 0.42, 0.2, 0.3, 0.48},
{ -0.2, -0.03, 0.42, 0.2, 0.03, 0.48},
-- garde-corps lateraux
{-0.45, -0.5, -0.35, -0.4, -0.4, 0.5},
{ 0.4, -0.5, -0.35, 0.45, -0.4, 0.5},
{-0.4, -0.5, -0.3, 0.4, -0.4, -0.35},
-- tige entre garde corps
{-0.05, -0.5, -0.35, 0.05, 0.5, -0.3},
{-0.45, -0.5, -0.1, -0.4, 0.5, -0.15},
{ 0.45, -0.5, -0.1, 0.4, 0.5, -0.15},
}},
selection_box = {type = "fixed", fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}},
tiles = {"technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png"},
walkable = true,
climbable = true,
groups = {paffly=2, mecanic=1},
on_punch = metal_punch,
sounds = metal_footstep,
})