computing/item_smartphone.lua

53 lines
No EOL
1.3 KiB
Lua

modComputing.getFormSmartphone = function(player)
local formspec = ""
.."formspec_version[6]"
.."size[5.6,10.0,true]"
.."no_prepend[]"
.."bgcolor[#08080844;true]" --Padrão: #080808BB
--.."bgcolor[#636D76FF;false]"
--..default.gui_bg
--..default.gui_bg_img
--..default.gui_slots
.."background[-0.75,-2.00;8.4,15.0;text_smartphone_271x484.png;true]"
.."button_exit[2.0,4.0;2.0,0.5;btnClose;"..core.formspec_escape("Close Button").."]"
return formspec
end
modComputing.show_smartphone = function(player)
local playername = player:get_player_name()
core.show_formspec(playername, "frmSmartphone", modComputing.getFormSmartphone(player))
end
core.register_craftitem("computing:smartphone", {
description = "SMARTPHONE",
inventory_image = "icon_smartphone_128x128.png",
on_use = function(itemstack, player, pointed_thing)
modComputing.show_smartphone(player)
end,
})
core.register_craft({
output = 'computing:smartphone',
recipe = {
{"default:paper" ,"" ,""},
{"" ,"" ,""},
{"" ,"" ,""},
}
})
core.register_alias("smartphone", "computing:smartphone")
--[[
modComputing.add_app("lib_computing:smartphone", {
iconname = "SMARTPHONE",
iconimage = "icon_smartphone.png",
on_iconclick = modComputing.show_smartphone_config,
})
--]]