1
0
Fork 0

Remove intweak mos for being too obscure

This commit is contained in:
Wuzzy 2017-01-09 18:46:53 +01:00
parent 4875b88b86
commit 89663cc6ac
3 changed files with 0 additions and 49 deletions

View File

@ -1,24 +0,0 @@
Minetest mod "Inventory Tweak"
=======================
version: 1.0
License of source code: WTFPL
-----------------------------
Written 2013 by BlockMen
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
--USING the mod--
------------------
This mod inplements to new functions to the players inventory. The first is the breaking sound of any tool,
that is played when a tool breakes after the specific number of uses.
The second new function is Auto-refill. This function replaces broken tools or emptied stacks with others from your inventory.
You can disable the auto-refill by changing first line of init.lua to "local auto_refill = false"

View File

@ -1 +0,0 @@
default

View File

@ -1,24 +0,0 @@
local auto_refill = false -- set to false if you dont want get refilled your stack automatic
function refill(player, stck_name, index)
local inv = player:get_inventory()
for i,stack in ipairs(inv:get_list("main")) do
if stack:get_name() == stck_name then
inv:set_stack("main", index, stack)
stack:clear()
inv:set_stack("main", i, stack)
minetest.log("action", "intweak-mod: refilled stack of" .. player:get_player_name() )
return
end
end
end
if auto_refill == true then
minetest.register_on_placenode(function(pos, newnode, placer, oldnode)
if not placer then return end
local index = placer:get_wield_index()
local cnt = placer:get_wielded_item():get_count()-1
if cnt == 0 then minetest.after(0.01, refill, placer, newnode.name, index) end
end)
end