diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-22 20:47:34 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-22 20:47:34 -0400 |
commit | f32ae653c6eeeff163b0b052ce85e1c10437fa86 (patch) | |
tree | 03ec648d76eca78c9b970310b367767f9c7e35cb | |
parent | 5f0888483ae21a96fa0dfdd3942f4f6cd524e607 (diff) | |
download | dreambuilder_modpack-f32ae653c6eeeff163b0b052ce85e1c10437fa86.tar dreambuilder_modpack-f32ae653c6eeeff163b0b052ce85e1c10437fa86.tar.gz dreambuilder_modpack-f32ae653c6eeeff163b0b052ce85e1c10437fa86.tar.bz2 dreambuilder_modpack-f32ae653c6eeeff163b0b052ce85e1c10437fa86.tar.xz dreambuilder_modpack-f32ae653c6eeeff163b0b052ce85e1c10437fa86.zip |
updated currency
-rw-r--r-- | currency/depends.txt | 3 | ||||
-rw-r--r-- | currency/shop.lua | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/currency/depends.txt b/currency/depends.txt index 331d858..d3f04d8 100644 --- a/currency/depends.txt +++ b/currency/depends.txt @@ -1 +1,2 @@ -default
\ No newline at end of file +default +pipeworks? diff --git a/currency/shop.lua b/currency/shop.lua index 08bfac7..36765a3 100644 --- a/currency/shop.lua +++ b/currency/shop.lua @@ -90,7 +90,7 @@ minetest.register_node("currency:shop", { "shop_side.png",
"shop_front.png"},
inventory_image = "shop_front.png",
- groups = {choppy=2,oddly_breakable_by_hand=2},
+ groups = {choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer, itemstack)
local owner = placer:get_player_name()
@@ -104,7 +104,23 @@ minetest.register_node("currency:shop", { inv:set_size("stock", 3*2)
inv:set_size("owner_wants", 3*2)
inv:set_size("owner_gives", 3*2)
+ if minetest.get_modpath("pipeworks") then pipeworks.after_place(pos) end
end,
+ after_dig_node = (pipeworks and pipeworks.after_dig),
+ tube = {
+ insert_object = function(pos, node, stack, direction)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return inv:add_item("stock",stack)
+ end,
+ can_insert = function(pos,node,stack,direction)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return inv:room_for_item("stock", stack)
+ end,
+ input_inventory = "customers_gave",
+ connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
+ },
on_rightclick = function(pos, node, clicker, itemstack)
clicker:get_inventory():set_size("customer_gives", 3*2)
clicker:get_inventory():set_size("customer_gets", 3*2)
|