1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 15:30:30 +01:00

Updated mesecons

This commit is contained in:
LeMagnesium 2015-05-15 13:20:53 +02:00
parent ecffdd20c8
commit 68b0ff7906
7 changed files with 11 additions and 21 deletions

View File

@ -30,7 +30,7 @@ minetest.register_node("mesecons:mesecon_on", {
}, },
groups = {dig_immediate=3, not_in_creaive_inventory=1, mesecon=1}, groups = {dig_immediate=3, not_in_creaive_inventory=1, mesecon=1},
drop = "mesecons:mesecon_off 1", drop = "mesecons:mesecon_off 1",
light_source = LIGHT_MAX-11, light_source = default.LIGHT_MAX-11,
mesecons = {conductor={ mesecons = {conductor={
state = mesecon.state.on, state = mesecon.state.on,
offstate = "mesecons:mesecon_off" offstate = "mesecons:mesecon_off"

View File

@ -67,7 +67,7 @@ minetest.register_node("mesecons_button:button_on", {
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_wallmounted = true, legacy_wallmounted = true,
walkable = false, walkable = false,
light_source = LIGHT_MAX-7, light_source = default.LIGHT_MAX-7,
sunlight_propagates = true, sunlight_propagates = true,
selection_box = { selection_box = {
type = "fixed", type = "fixed",

View File

@ -56,22 +56,12 @@ meseconify_door("doors:door_obsidian_glass")
local function trapdoor_switch(pos, node) local function trapdoor_switch(pos, node)
local state = minetest.get_meta(pos):get_int("state") local state = minetest.get_meta(pos):get_int("state")
if node.name:split(":")[2] == "trapdoor" or node.name:split(":")[2] == "trapdoor_open" then if state == 1 then
if state == 1 then minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10})
minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) minetest.set_node(pos, {name="doors:trapdoor", param2 = node.param2})
minetest.set_node(pos, {name="doors:trapdoor", param2 = node.param2})
else
minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
minetest.set_node(pos, {name="doors:trapdoor_open", param2 = node.param2})
end
else else
if state == 1 then minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) minetest.set_node(pos, {name="doors:trapdoor_open", param2 = node.param2})
minetest.set_node(pos, {name="doors:trapdoor_cherry", param2 = node.param2})
else
minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
minetest.set_node(pos, {name="doors:trapdoor_cherry_open", param2 = node.param2})
end
end end
minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1) minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1)

View File

@ -17,7 +17,7 @@ minetest.register_node("mesecons_lamp:lamp_on", {
legacy_wallmounted = true, legacy_wallmounted = true,
sunlight_propagates = true, sunlight_propagates = true,
walkable = true, walkable = true,
light_source = LIGHT_MAX, light_source = default.LIGHT_MAX,
node_box = mesecon_lamp_box, node_box = mesecon_lamp_box,
selection_box = mesecon_lamp_box, selection_box = mesecon_lamp_box,
groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1}, groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1},

View File

@ -31,7 +31,7 @@ function mesecon.lightstone_add(name, base_item, texture_off, texture_on)
tiles = {texture_on}, tiles = {texture_on},
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2}, groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2},
drop = "mesecons_lightstone:lightstone_" .. name .. "_off", drop = "mesecons_lightstone:lightstone_" .. name .. "_off",
light_source = LIGHT_MAX-2, light_source = default.LIGHT_MAX-2,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
mesecons = {effector = { mesecons = {effector = {
rules = lightstone_rules, rules = lightstone_rules,

View File

@ -9,7 +9,7 @@ minetest.register_node("mesecons_powerplant:power_plant", {
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3, mesecon = 2}, groups = {dig_immediate=3, mesecon = 2},
light_source = LIGHT_MAX-9, light_source = default.LIGHT_MAX-9,
description="Power Plant", description="Power Plant",
selection_box = { selection_box = {
type = "fixed", type = "fixed",

View File

@ -76,7 +76,7 @@ minetest.register_node("mesecons_torch:mesecon_torch_on", {
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
selection_box = torch_selectionbox, selection_box = torch_selectionbox,
groups = {dig_immediate=3}, groups = {dig_immediate=3},
light_source = LIGHT_MAX-5, light_source = default.LIGHT_MAX-5,
description="Mesecon Torch", description="Mesecon Torch",
mesecons = {receptor = { mesecons = {receptor = {
state = mesecon.state.on, state = mesecon.state.on,