2021-11-15 23:50:48 +01:00
|
|
|
local set_fs = i3.set_fs
|
2022-10-02 14:38:49 +02:00
|
|
|
IMPORT("play_sound", "create_inventory")
|
2021-11-14 21:39:48 +01:00
|
|
|
|
|
|
|
local trash = create_inventory("i3_trash", {
|
|
|
|
allow_put = function(_, _, _, stack)
|
|
|
|
return stack:get_count()
|
|
|
|
end,
|
|
|
|
|
|
|
|
on_put = function(inv, listname, _, _, player)
|
|
|
|
inv:set_list(listname, {})
|
|
|
|
|
|
|
|
local name = player:get_player_name()
|
2022-08-28 15:34:37 +02:00
|
|
|
local data = i3.data[name]
|
|
|
|
data.armor_allow = nil
|
|
|
|
|
2021-11-14 21:39:48 +01:00
|
|
|
play_sound(name, "i3_trash", 1.0)
|
|
|
|
|
|
|
|
if not core.is_creative_enabled(name) then
|
2021-11-15 23:50:48 +01:00
|
|
|
set_fs(player)
|
2021-11-14 21:39:48 +01:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
trash:set_size("main", 1)
|