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.
This commit is contained in:
nxet
2020-10-08 11:17:51 +02:00
committed by GitHub
parent 939c7ea73d
commit 74b3c5a25d
37 changed files with 659 additions and 595 deletions

34
models/wifi.lua Normal file
View File

@ -0,0 +1,34 @@
local gen_def = dofile(minetest.get_modpath("more_chests") .. "/utils/base.lua")
local S = minetest.get_translator("more_chests")
local wifi = gen_def({
description = S("Wifi Chest"),
type = "wifi chest",
size = "small",
tiles = {
top = "wifi_top.png",
side = "wifi_side.png",
front = "wifi_front.png"
},
recipe = {
{"group:wood", "default:mese", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
{"group:wood", "group:wood", "group:wood"}
},
allow_metadata_inventory_move = false,
allow_metadata_inventory_put = false,
allow_metadata_inventory_take = false,
})
wifi.can_dig = function(pos, player) return true end
minetest.register_node("more_chests:wifi", wifi)
minetest.register_craft({
output = "more_chests:wifi",
recipe = wifi.recipe,
})
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set_size("more_chests:wifi", 8*4)
end)