Remove give_initial_stuff mod

master
vlapsley 2017-08-18 10:26:52 +10:00
parent 7b72ddf933
commit 49330acfa3
4 changed files with 0 additions and 79 deletions

View File

@ -1,8 +0,0 @@
Minetest Game mod: give_initial_stuff
=====================================
See license.txt for license information.
Authors of source code
----------------------
Perttu Ahola (celeron55) <celeron55@gmail.com> (MIT)
Various Minetest developers and contributors (MIT)

View File

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

View File

@ -1,44 +0,0 @@
local stuff_string = minetest.setting_get("initial_stuff") or
"default:pick_steel,default:axe_steel,default:shovel_steel," ..
"default:torch 99,default:cobble 99"
give_initial_stuff = {
items = {}
}
function give_initial_stuff.give(player)
minetest.log("action",
"Giving initial stuff to player " .. player:get_player_name())
local inv = player:get_inventory()
for _, stack in ipairs(give_initial_stuff.items) do
inv:add_item("main", stack)
end
end
function give_initial_stuff.add(stack)
give_initial_stuff.items[#give_initial_stuff.items + 1] = ItemStack(stack)
end
function give_initial_stuff.clear()
give_initial_stuff.items = {}
end
function give_initial_stuff.add_from_csv(str)
local items = str:split(",")
for _, itemname in ipairs(items) do
give_initial_stuff.add(itemname)
end
end
function give_initial_stuff.set_list(list)
give_initial_stuff.items = list
end
function give_initial_stuff.get_list()
return give_initial_stuff.items
end
give_initial_stuff.add_from_csv(stuff_string)
if minetest.setting_getbool("give_initial_stuff") then
minetest.register_on_newplayer(give_initial_stuff.give)
end

View File

@ -1,25 +0,0 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
Copyright (C) 2012-2016 Various Minetest developers and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT