Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add support for sticky blocks for pistons and a a sample sticky block
- Loading branch information
Showing
5 changed files
with
103 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mesecons | ||
mesecons_mvps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- Sticky blocks can be used together with pistons or movestones to push / pull | ||
-- structures that are "glued" together using sticky blocks | ||
|
||
-- All sides sticky block | ||
minetest.register_node("mesecons_stickyblocks:sticky_block_all", { | ||
description = "All-sides sticky block", | ||
tiles = {"default_grass_footsteps.png"}, | ||
groups = {dig_immediate=2}, | ||
mvps_sticky = function (pos, node) | ||
local connected = {} | ||
for _, r in ipairs(mesecon.rules.alldirs) do | ||
table.insert(connected, vector.add(pos, r)) | ||
end | ||
return connected | ||
end | ||
}) |