1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Upgraded hybrid mesecons

- Upgraded mesecons mod while adding old mesecons_compatibility to provide
  doors' redefinition.

NOTE: Every change in the doors' definition must now be recopied here!
This commit is contained in:
LeMagnesium
2015-04-16 18:25:01 +02:00
parent d1f720e9eb
commit 6705bf008f
53 changed files with 1504 additions and 574 deletions

View File

@ -89,8 +89,8 @@ local piston_on = function(pos, node)
max_hear_distance = 20,
gain = 0.3,
})
mesecon.mvps_process_stack (stack)
mesecon.mvps_move_objects (np, dir, oldstack)
mesecon.mvps_process_stack(stack)
mesecon.mvps_move_objects(np, dir, oldstack)
end
end
@ -100,9 +100,10 @@ local piston_off = function(pos, node)
piston_remove_pusher(pos, node)
if pistonspec.sticky then
local maxpull = mesecon.setting("piston_max_pull", 15)
local dir = piston_get_direction(pistonspec.dir, node)
local pullpos = mesecon.addPosRule(pos, dir)
local stack = mesecon.mvps_pull_single(pullpos, dir)
local pullpos = vector.add(pos, vector.multiply(dir, 2))
local stack = mesecon.mvps_pull_single(pullpos, vector.multiply(dir, -1), maxpull)
mesecon.mvps_process_stack(pos, dir, stack)
end
end
@ -274,7 +275,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
groups = {cracky = 3, not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
drop = "mesecons_pistons:piston_normal_off",
drop = "mesecons_pistons:piston_sticky_off",
after_dig_node = piston_remove_pusher,
node_box = piston_on_box,
selection_box = piston_on_box,