make listring to trash in creative

This commit is contained in:
DS-Minetest 2017-04-21 16:56:03 +02:00
parent fc36b3ff3b
commit 8f17ce8c34
1 changed files with 4 additions and 2 deletions

View File

@ -180,11 +180,13 @@ unified_inventory.register_page("craft", {
formspec = formspec.."background[7,"..(formspecy + 2)..";1,1;ui_single_slot.png]"
formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]"
end
formspec = formspec.."listring[current_name;craft]"
formspec = formspec.."listring[current_player;main]"
formspec = formspec.."listring[current_player;main]"
if unified_inventory.is_creative(player_name) then
formspec = formspec.."listring[detached:trash;main]"
formspec = formspec.."label[0,"..(formspecy + 1.5)..";" .. F("Refill:") .. "]"
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,"..(formspecy +2)..";1,1;]"
else
formspec = formspec.."listring[current_name;craft]"
end
return {formspec=formspec}
end,