123456789101112131415161718192021 |
- minetest.register_node('mail:mailbox', {
- description = 'Mail Box',
- drawtype = 'mesh',
- mesh = 'mail_mailbox.obj',
- tiles = {'mail_mailbox_uv.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- sunlight_propagates = true,
- groups = {breakable=1},
- on_rightclick = function(pos, node, clicker)
- local name = clicker:get_player_name()
- local player_attributes = clicker:get_meta()
- local mode = player_attributes:get_string('mode')
- if mode ~= 'traitor' and mode ~= 'player' then
- mail.show_inbox(name)
- else
- minetest.chat_send_player(name, 'You can\'t check your mail now.')
- end
- end
- })
|