6 Commits

Author SHA1 Message Date
DS
cac8cddc66 make the wifi chest pipeworkable (#16)
* Make the wifi chest pipeworkable

* fix mod crashing without pipeworks
2020-10-25 11:24:03 +00:00
DS
f7cfee874a change wifi tiles back (#15) 2020-10-24 19:47:43 +01:00
058b3a0d4b Revert "Mod rewrite and new models (#21)"
This reverts commit 74b3c5a25d.
2020-10-22 21:47:59 +01:00
426a13089c Revert "Removed lost HTML tag"
This reverts commit 1d59b74c89.
2020-10-22 21:47:46 +01:00
1d59b74c89 Removed lost HTML tag 2020-10-08 10:20:47 +01:00
74b3c5a25d Mod rewrite and new models (#21)
* Aliases moved to utils folder

* Method to generate two different formspec layouts, big and small

* Log Actions moved to separate module

* Added method to generate a chest definition

* Rewritten models

* Add Fridge model

* Add Toolbox models

* "Mod loaded" message; Updated localization template

* Add Italian localization

* Fridge now has both normal and big (2 blocks) models

* Fixed mixed indentation

* Rewritten README; improved IT and FR (thanks to @louisroyer) localizations.
2020-10-08 10:17:51 +01:00
6 changed files with 46 additions and 2 deletions

View File

@ -1,3 +1,4 @@
name = more_chests
description = Adds several chests that behave differently, and can be used to donate items, share items, hide chests, make secret chests, and more.
depends = default
optional_depends = pipeworks

Binary file not shown.

Before

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

After

Width:  |  Height:  |  Size: 239 B

View File

@ -1,12 +1,55 @@
-- Load support for translation.
local S = minetest.get_translator("more_chests")
local pipeworks_enabled = minetest.global_exists("pipeworks")
minetest.register_node("more_chests:wifi", {
description = S("Wifi Chest"),
tiles = {"wifi_top.png", "wifi_top.png", "wifi_side.png",
"wifi_side.png", "wifi_side.png", "wifi_front.png"},
"wifi_side.png", "wifi_side.png",
{name="wifi_front_animated.png", animation={type="vertical_frames",
aspect_w=16, aspect_h=16, length=2.0}}},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice = 1, tubedevice_receiver = 1},
-- Pipeworks
tube = pipeworks_enabled and {
insert_object = function(pos, node, stack, direction, owner)
if not owner then
return stack
end
local player = minetest.get_player_by_name(owner)
if not player then
return stack
end
local inv = player:get_inventory()
return inv:add_item("more_chests:wifi", stack)
end,
can_insert = function(pos, node, stack, direction, owner)
if not owner then
return false
end
local player = minetest.get_player_by_name(owner)
if not player then
return false
end
local inv = player:get_inventory()
return inv:room_for_item("more_chests:wifi", stack)
end,
input_inventory = "more_chests:wifi",
return_input_invref = function(pos, node, direction, player_name)
if not player_name then
return false
end
local player = minetest.get_player_by_name(player_name)
if not player then
return false
end
return player:get_inventory()
end,
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
} or nil,
after_place_node = pipeworks_enabled and pipeworks.after_place or nil,
after_dig_node = pipeworks_enabled and pipeworks.after_dig or nil,
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)