diff --git a/bonemeal_mod/init.lua b/bonemeal_mod/init.lua index 4321c58..7d8467a 100644 --- a/bonemeal_mod/init.lua +++ b/bonemeal_mod/init.lua @@ -1,65 +1,63 @@ -- twi_mods/bonemeal_mod/init.lua -- Modify bonemeal mod --[[ The MIT License (MIT) Copyright (c) 2016 TenPlus1 Copyright (c) 2024 1F616EMO 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. ]] -- 1. Remove shaped recipies and replace them with shapeless one --- 1a. Mulch from one tree and 8 leaves minetest.clear_craft({ - output = "bonemeal:mulch 4", recipe = { { "group:tree", "group:leaves", "group:leaves" }, { "group:leaves", "group:leaves", "group:leaves" }, { "group:leaves", "group:leaves", "group:leaves" } } }) minetest.register_craft({ type = "shapeless", output = "bonemeal:mulch 4", recipe = { "group:tree", "group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves" } }) --- 1b. Fertiliser from both type of bonemeal minetest.clear_craft({ - output = "bonemeal:fertiliser 2", recipe = { { "bonemeal:bonemeal", "bonemeal:mulch" } } }) minetest.register_craft({ type = "shapeless", output = "bonemeal:fertiliser 2", recipe = { "bonemeal:bonemeal", "bonemeal:mulch" }, }) -- 2. Add craft recipe for bonemeal minetest.register_craft({ type = "shapeless", output = "bonemeal:bonemeal 2", recipe = { "group:bone" } }) diff --git a/cmd_alias/mod.conf b/cmd_alias/mod.conf index cf460f9..391f2dd 100644 --- a/cmd_alias/mod.conf +++ b/cmd_alias/mod.conf @@ -1,2 +1,2 @@ name = cmd_alias -optional_depends = doc, snippets \ No newline at end of file +optional_depends = doc, snippets, szutil_offlinepos \ No newline at end of file diff --git a/crash_workaround/init.lua b/crash_workaround/init.lua index 07c8f71..1723036 100644 --- a/crash_workaround/init.lua +++ b/crash_workaround/init.lua @@ -1,52 +1,52 @@ -- twi_mods/crash_workaround/init.lua -- Avoid the cause of segfault --[[ Copyright © 2024 1F616EMO 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. ]] -- Autocrafter psudo-item -- For unknwon reason this is identical to flux's, but trust me, I wrote this without his -- https://discord.com/channels/369122544273588224/369123275877384192/1193075939903553669 -local ndef = minetest.registered_nodes["pipeworks:autocrafter"] +local ndef = minetest.registered_nodes["pipeworks:autocrafter"] local old_allow_metadata_inventory_put = ndef.allow_metadata_inventory_put local old_allow_metadata_inventory_take = ndef.allow_metadata_inventory_take local old_allow_metadata_inventory_move = ndef.allow_metadata_inventory_move minetest.override_item("pipeworks:autocrafter", { allow_metadata_inventory_put = function(pos, listname, index, stack, player) if listname == "output" then return 0 end return old_allow_metadata_inventory_put(pos, listname, index, stack, player) end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) if listname == "output" then return 0 end return old_allow_metadata_inventory_take(pos, listname, index, stack, player) end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) if from_list == "output" or to_list == "output" then return 0 end return old_allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) end, }) -minetest.log("action", "[crash_workaround] Autocrafter workaround loaded") \ No newline at end of file +minetest.log("action", "[crash_workaround] Autocrafter workaround loaded") diff --git a/farming_mod/init.lua b/farming_mod/init.lua index 94a6083..a8cabed 100644 --- a/farming_mod/init.lua +++ b/farming_mod/init.lua @@ -1,36 +1,36 @@ -- twi_mods/farming_mod/init.lua -- Handle framing redo changes --[[ The MIT License (MIT) Copyright (c) 2016 TenPlus1 Copyright (c) 2024 1F616EMO 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. ]] if farming.mod ~= "redo" then error("[twi_mods/farming_mod] Only works with Farming Redo") end -- Tomato red dye minetest.register_craft({ - output = farming.recipe_items.dye_red, - recipe = {{"group:food_tomato"}} -}) \ No newline at end of file + output = farming.recipe_items.dye_red, + recipe = { { "group:food_tomato" } } +}) diff --git a/initial_stuff/init.lua b/initial_stuff/init.lua index abdd6a3..4384bde 100644 --- a/initial_stuff/init.lua +++ b/initial_stuff/init.lua @@ -1,44 +1,44 @@ -- twi_mods/initial_stuff/init.lua -- Give initial stuffs to new players --[[ Copyright © 2024 1F616EMO 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. ]] local stuffs_list = { "default:pick_steel", "default:shovel_steel", "default:axe_steel", "default:sword_steel", "default:torch 99", "animalia:beef_cooked 50" } minetest.register_on_newplayer(function(player) minetest.after(0, function() local name = player:get_player_name() local inv = player:get_inventory() for _, item in ipairs(stuffs_list) do inv:add_item("main", ItemStack(item)) end unified_money.add_balance_safe(name, 30) end) -end) \ No newline at end of file +end) diff --git a/moreblocks_mod/init.lua b/moreblocks_mod/init.lua index a32c702..27f63fa 100644 --- a/moreblocks_mod/init.lua +++ b/moreblocks_mod/init.lua @@ -1,47 +1,46 @@ -- twi_mods/moreblocks_mod/init.lua -- Moreblocks modifications --[[ This code is licensed under the zlib license; see ./LICENSE.md for more information. ]] -- Adopt the linuxforks way of crafting stone tiles minetest.clear_craft({ - output = "moreblocks:stone_tile 9", recipe = { - {"default:cobble", "default:cobble", "default:cobble"}, - {"default:cobble", "default:stone", "default:cobble"}, - {"default:cobble", "default:cobble", "default:cobble"}, + { "default:cobble", "default:cobble", "default:cobble" }, + { "default:cobble", "default:stone", "default:cobble" }, + { "default:cobble", "default:cobble", "default:cobble" }, } }) minetest.register_craft({ output = "moreblocks:stone_tile 4", recipe = { - {"default:cobble", "default:cobble"}, - {"default:cobble", "default:cobble"}, + { "default:cobble", "default:cobble" }, + { "default:cobble", "default:cobble" }, } }) minetest.register_craft({ output = "moreblocks:stone_tile 36", recipe = { - {"moreblocks:cobble_compressed", "moreblocks:cobble_compressed"}, - {"moreblocks:cobble_compressed", "moreblocks:cobble_compressed"}, + { "moreblocks:cobble_compressed", "moreblocks:cobble_compressed" }, + { "moreblocks:cobble_compressed", "moreblocks:cobble_compressed" }, } }) -- Allow compressed cobbles to be smelt into stone/grind into gravel minetest.register_craft({ type = "cooking", output = "default:stone 9", recipe = "moreblocks:cobble_compressed", - cooktime = 3 * 8, + cooktime = 3 * 8, }) technic.register_grinder_recipe({ input = { "moreblocks:cobble_compressed" }, time = 3 * 8, output = "default:gravel 9" -}) \ No newline at end of file +}) diff --git a/static_spawn/init.lua b/static_spawn/init.lua index 7a18359..8e0716a 100644 --- a/static_spawn/init.lua +++ b/static_spawn/init.lua @@ -1,69 +1,69 @@ -- twi_mods/static_spawn/init.lua --[[ Copyright (C) 2014-2021 AndrejIT, spfar, mightyjoe781 Copyright (C) 2024 1F616EMO This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ]] S = minetest.get_translator("spawn") minetest.register_chatcommand("spawn", { description = S("Teleport to spawnpoint"), privs = { home = true }, func = function(name) local player = minetest.get_player_by_name(name) if not player then return false, S("Player object not found.") end local spawn_pos = minetest.setting_get_pos("static_spawnpoint") if not spawn_pos then return false, S("Spawn point not set. Consult moderators to set a proper static spawnpoint.") end player:set_pos(spawn_pos) return true, S("Teleported to Spawn!") end }) minetest.register_chatcommand("setspawn", { description = S("Override the static spawnpoint"), privs = { server = true }, param = "[]", func = function(name, param) if param == "" then local player = minetest.get_player_by_name(name) if not player then return false, S("Player object not found.") end param = minetest.pos_to_string(player:get_pos(), 0) else local pos = core.string_to_pos(param) if not pos then return false, S("Invalid position given.") end param = minetest.pos_to_string(pos) end - + minetest.settings:set("static_spawnpoint", param) return true, S("Static spawnpoint set to @1.", param) end -}) \ No newline at end of file +})