New effector system, effectors have to be registered with mesecon:register_effector(onstate, offstate, rules, function get_rules) rules and function get_rules are optional. You don't have to specify both onstate and offstate (required for e.g. removestone)

This commit is contained in:
Jeija
2012-08-13 20:17:45 +02:00
parent 24c50571f7
commit 00ce2540c2
14 changed files with 206 additions and 163 deletions

View File

@ -8,7 +8,7 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_on", {
tile_images = {texture_on},
inventory_image = minetest.inventorycube(texture_on),
groups = {cracky=2,not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon = 2},
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2},
drop = "node mesecons_lightstone:lightstone_" .. name .. "_off 1",
light_source = LIGHT_MAX-2,
description=name.." Lightstone",
@ -33,6 +33,7 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
{'','group:mesecon_conductor_craftable',''},
}
})
mesecon:register_effector("mesecons_lightstone:lightstone_" .. name .. "_on", "mesecons_lightstone:lightstone_" .. name .. "_off")
end