Remove 'inventory_plus' mod to use 'sfinv'

master
AntumDeluge 2017-08-07 14:51:34 -07:00
parent bc0bd91e19
commit 0fc63321a9
7 changed files with 0 additions and 277 deletions

View File

@ -49,7 +49,6 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [intllib][] ([Unlicense][lic.unlicense]) -- version: [7b818cb Git][ver.intllib] *2017-07-10*
* inventory/
* [bags][] ([BSD 3-Clause][lic.bags]) -- version: [8a02b4d Git][ver.bags] *2017-08-07*
* [inventory_plus][] ([BSD 3-Clause][lic.inventory_plus]) -- version: [fd71e3d Git][ver.inventory_plus] *2016-05-13*
* [sfinv_buttons][] ([MIT][lic.mit]) -- version [1.0.0 (4f3b075 Git)][ver.sfinv_buttons] *2017-03-19*
* lighting/
* [glow][] ([GPL][lic.gpl2.0]) -- version: [c611ae0 Git][ver.glow] *2017-07-18*
@ -250,7 +249,6 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[intllib]: https://forum.minetest.net/viewtopic.php?t=4929
[invisibility]: https://forum.minetest.net/viewtopic.php?t=14846
[invisible]: https://forum.minetest.net/viewtopic.php?t=14399
[inventory_plus]: https://forum.minetest.net/viewtopic.php?t=3100
[jukebox]: https://forum.minetest.net/viewtopic.php?t=13505
[jumping]: https://forum.minetest.net/viewtopic.php?t=2957
[lightning]: https://forum.minetest.net/viewtopic.php?t=13886
@ -355,7 +353,6 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[lic.hill_nodebox]: mods/world/hill_nodebox/LICENSE
[lic.homedecor]: mods/modpacks/homedecor/LICENSE
[lic.hovercraft]: mods/transport/hovercraft/LICENSE.txt
[lic.inventory_plus]: mods/inventory/inventory_plus/LICENSE
[lic.invisibility]: mods/player/visuals/invisibility/license.txt
[lic.invisible]: mods/admin/invisible/readme.txt
[lic.jukebox]: mods/furniture/jukebox/README.txt
@ -463,7 +460,6 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.hudmap]: https://github.com/stujones11/hudmap/tree/09d40f3
[ver.ilights]: https://github.com/minetest-mods/ilights/tree/fa085fd
[ver.intllib]: https://github.com/minetest-mods/intllib/tree/7b818cb
[ver.inventory_plus]: https://github.com/cornernote/minetest-inventory_plus/tree/fd71e3d
[ver.invisibility]: https://github.com/tenplus1/invisibility/tree/bf4156b
[ver.jukebox]: https://github.com/minetest-mods/jukebox/tree/e6a507f
[ver.lightning]: https://github.com/minetest-mods/lightning/tree/39bd36c

View File

@ -1,32 +0,0 @@
Copyright (c) 2013, Brett O'Donnell http://cornernote.github.io
All rights reserved.
_____ _____ _____ _____ _____ _____
| |___| __ | | |___| __ | | |___|_ _|___
| --| . | -| | | | -_| -| | | | . | | | | -_|
|_____|___|__|__|_|___|___|__|__|_|___|___| |_| |___|
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of the organization nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,44 +0,0 @@
# Inventory Plus for Minetest
[![home](https://img.shields.io/badge/inventory_plus-home-blue.svg?style=flat-square)](http://cornernote.github.io/minetest-inventory_plus/)
[![download](https://img.shields.io/github/tag/cornernote/minetest-inventory_plus.svg?style=flat-square&label=release)](https://github.com/cornernote/minetest-inventory_plus/archive/master.zip)
[![git](https://img.shields.io/badge/git-project-green.svg?style=flat-square)](https://github.com/cornernote/minetest-inventory_plus)
[![forum](https://img.shields.io/badge/minetest-mod-green.svg?style=flat-square)](http://forum.minetest.net/viewtopic.php?t=6204)
[![bower](https://img.shields.io/badge/bower-mod-green.svg?style=flat-square)](https://minetest-bower.herokuapp.com/mods/inventory_plus)
## Description
Allows additional formspec buttons to be added to the player inventory.
## Features
- Allows additional formspec buttons to be added to the player inventory screen.
- These are processed by your own mod, they can show other formspec screens, or perform in game functionality.
- Adds support for refill/trash to Creative Inventory.
## Project Resources
* [Home](http://cornernote.github.io/minetest-inventory_plus/)
* [Download](https://github.com/cornernote/minetest-inventory_plus/archive/master.zip)
* [Project](https://github.com/cornernote/minetest-inventory_plus)
* [Forum](http://forum.minetest.net/viewtopic.php?t=6204)
* [Bower](https://minetest-bower.herokuapp.com/mods/inventory_plus)
## Support
- Does this README need improvement? Go ahead and [suggest a change](https://github.com/cornernote/minetest-inventory_plus/edit/master/README.md).
- Found a bug, or need help using this project? Check the [open issues](https://github.com/cornernote/minetest-inventory_plus/issues) or [create an issue](https://github.com/cornernote/minetest-inventory_plus/issues/new).
## About
This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching [Earthlings](http://earthlings.com/), a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.
## License
[BSD-3-Clause](https://raw.github.com/cornernote/minetest-inventory_plus/master/LICENSE), Copyright © 2013-2014 [Brett O'Donnell](http://cornernote.github.io/)

View File

@ -1,17 +0,0 @@
{
"name": "inventory_plus",
"description": "Allows additional formspec buttons to be added to the player inventory screen.",
"keywords": [
"inventory",
"player",
"formspec"
],
"homepage": "http://cornernote.github.io/minetest-inventory_plus/",
"forum": "http://forum.minetest.net/viewtopic.php?t=6204",
"screenshots": [
"http://cornernote.github.io/minetest-inventory_plus/img/screenshot.png"
],
"authors": [
"cornernote"
]
}

View File

@ -1,2 +0,0 @@
default
creative

View File

@ -1,178 +0,0 @@
--[[
Inventory Plus for Minetest
Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com>
Source Code: https://github.com/cornernote/minetest-inventory_plus
License: BSD-3-Clause https://raw.github.com/cornernote/minetest-inventory_plus/master/LICENSE
Edited by TenPlus1 (23rd March 2016)
]]--
-- expose api
inventory_plus = {}
-- define buttons
inventory_plus.buttons = {}
-- default inventory page
inventory_plus.default = minetest.settings:get("inventory_default") or "craft"
-- register_button
inventory_plus.register_button = function(player, name, label)
local player_name = player:get_player_name()
if inventory_plus.buttons[player_name] == nil then
inventory_plus.buttons[player_name] = {}
end
inventory_plus.buttons[player_name][name] = label
end
-- set_inventory_formspec
inventory_plus.set_inventory_formspec = function(player, formspec)
-- error checking
if not formspec then
return
end
if minetest.settings:get_bool("creative_mode") then
-- if creative mode is on then wait a bit
minetest.after(0.01,function()
player:set_inventory_formspec(formspec)
end)
else
player:set_inventory_formspec(formspec)
end
end
-- create detached inventory for trashcan
local trashInv = minetest.create_detached_inventory(
"trash", {
on_put = function(inv, toList, toIndex, stack, player)
inv:set_stack(toList, toIndex, ItemStack(nil))
end
})
trashInv:set_size("main", 1)
-- get_formspec
inventory_plus.get_formspec = function(player, page)
if not player then
return
end
-- default inventory page
local formspec = "size[8,7.5]"
.. default.gui_bg
.. default.gui_bg_img
.. default.gui_slots
.. "list[current_player;main;0,3.5;8,4;]"
-- craft page
if page == "craft" then
local inv = player:get_inventory() or nil
if not inv then
print ("NO INVENTORY FOUND")
return
end
formspec = formspec
.. "button[0,1;2,0.5;main;Back]"
.. "list[current_player;craftpreview;7,1;1,1;]"
.. "list[current_player;craft;3,0;3,3;]"
.. "listring[current_name;craft]"
.. "listring[current_player;main]"
-- trash icon
.. "list[detached:trash;main;1,2;1,1;]"
.. "image[1.1,2.1;0.8,0.8;creative_trash_icon.png]"
end
-- creative page
if page == "creative" then
return player:get_inventory_formspec()
.. "button[5.4,4.2;2.65,0.3;main;Back]"
end
-- main page
if page == "main" then
-- buttons
local x, y = 0, 1
for k, v in pairs(inventory_plus.buttons[player:get_player_name()]) do
formspec = formspec .. "button[" .. x .. ","
.. y .. ";2,0.5;" .. k .. ";" .. v .. "]"
x = x + 2
if x == 8 then
x = 0
y = y + 1
end
end
end
return formspec
end
-- register_on_joinplayer
minetest.register_on_joinplayer(function(player)
inventory_plus.register_button(player,"craft", "Craft")
if minetest.settings:get_bool("creative_mode") then
inventory_plus.register_button(player, "creative_prev", "Creative")
end
minetest.after(1, function()
inventory_plus.set_inventory_formspec(player,
inventory_plus.get_formspec(player, inventory_plus.default))
end)
end)
-- register_on_player_receive_fields
minetest.register_on_player_receive_fields(function(player, formname, fields)
-- main
if fields.main then
inventory_plus.set_inventory_formspec(player,
inventory_plus.get_formspec(player, "main"))
return
end
-- craft
if fields.craft then
inventory_plus.set_inventory_formspec(player,
inventory_plus.get_formspec(player, "craft"))
return
end
-- creative
if fields.creative_prev
or fields.creative_next then
minetest.after(0.1, function()
inventory_plus.set_inventory_formspec(player,
inventory_plus.get_formspec(player, "creative"))
end)
return
end
end)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB