From 9781d89b82888576002ef6c947bfd0c6b9a3fe52 Mon Sep 17 00:00:00 2001 From: MoNTE48 Date: Wed, 26 Jun 2019 20:23:16 +0200 Subject: [PATCH] Minor game bugfix and cleanup --- .../files/bluestone/mesecons_wires/init.lua | 2 +- games/default/files/colored/README.txt | 3 +- games/default/files/default/README.txt | 4 +- games/default/files/default/crafting.lua | 31 ++-- games/default/files/default/functions.lua | 6 +- games/default/files/default/furnace.lua | 13 -- games/default/files/default/license.txt | 132 ++++++++++++++++++ games/default/files/default/nodes.lua | 11 +- games/default/files/doors/init.lua | 8 +- games/default/files/dye/init.lua | 30 ++-- games/default/files/experience/override.lua | 2 +- games/default/files/farming/depends.txt | 1 - games/default/files/farming/nodes.lua | 11 -- games/default/files/fire/init.lua | 4 +- games/default/files/inventory/init.lua | 15 -- .../textures/mobs_cobweb.png | Bin .../textures/mobs_rotten_flesh.png | Bin .../files/player/playereffects/init.lua | 6 +- games/default/files/sfinv/api.lua | 15 ++ 19 files changed, 214 insertions(+), 80 deletions(-) create mode 100644 games/default/files/default/license.txt rename games/default/files/{mobs_monster => mobs_redo}/textures/mobs_cobweb.png (100%) rename games/default/files/{mobs_monster => mobs_redo}/textures/mobs_rotten_flesh.png (100%) diff --git a/games/default/files/bluestone/mesecons_wires/init.lua b/games/default/files/bluestone/mesecons_wires/init.lua index 7bbf01589..3732b7435 100644 --- a/games/default/files/bluestone/mesecons_wires/init.lua +++ b/games/default/files/bluestone/mesecons_wires/init.lua @@ -202,7 +202,7 @@ local function register_wires() end mesecon.register_node(":mesecons:wire_"..nodeid, { - description = "Mesecon", + description = "Bluestone", drawtype = "nodebox", inventory_image = "bluestone_dust.png", wield_image = "bluestone_dust.png", diff --git a/games/default/files/colored/README.txt b/games/default/files/colored/README.txt index 8b7529d39..76139d727 100644 --- a/games/default/files/colored/README.txt +++ b/games/default/files/colored/README.txt @@ -1,4 +1,5 @@ -MultiCraft Game mod: Colored Blocks +MultiCraft Game mod: colored +============================ Include Colored Glass, Hardened Clay diff --git a/games/default/files/default/README.txt b/games/default/files/default/README.txt index a535df8f4..55a22c1d1 100644 --- a/games/default/files/default/README.txt +++ b/games/default/files/default/README.txt @@ -1,5 +1,5 @@ -multicraft 0.4 mod: default -========================== +MultiCraft Game: default +======================== License of source code: ----------------------- diff --git a/games/default/files/default/crafting.lua b/games/default/files/default/crafting.lua index a456c21ae..988042f96 100644 --- a/games/default/files/default/crafting.lua +++ b/games/default/files/default/crafting.lua @@ -120,6 +120,13 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:diamond 9', + recipe = { + {'default:diamondblock'}, + } +}) + minetest.register_craft({ output = 'default:pick_diamond', recipe = { @@ -291,6 +298,22 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:coalblock', + recipe = { + {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'}, + {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'}, + {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'}, + } +}) + +minetest.register_craft({ + output = 'default:coal_lump 9', + recipe = { + {'default:coalblock'}, + } +}) + minetest.register_craft({ output = 'default:haybale', recipe = { @@ -516,14 +539,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = 'default:quartz_chiseled 2', - recipe = { - {'stairs:slab_quartzblock'}, - {'stairs:slab_quartzblock'}, - } -}) - minetest.register_craft({ output = 'default:quartz_pillar 2', recipe = { diff --git a/games/default/files/default/functions.lua b/games/default/files/default/functions.lua index 2d2b386c8..11d40bb9b 100644 --- a/games/default/files/default/functions.lua +++ b/games/default/files/default/functions.lua @@ -564,8 +564,12 @@ function default.snow_shoot_snowball(itemstack, player, pointed_thing) end minetest.item_throw("default:snowball_entity", player, 19, -3, snowball_impact) + local playerpos = player:get_pos() + if not minetest.is_valid_pos(playerpos) then + return + end minetest.sound_play("throwing_sound", { - pos = pos, + pos = playerpos, gain = 1.0, max_hear_distance = 5, }) diff --git a/games/default/files/default/furnace.lua b/games/default/files/default/furnace.lua index 4f6fa0d66..ed8f91f82 100644 --- a/games/default/files/default/furnace.lua +++ b/games/default/files/default/furnace.lua @@ -35,19 +35,6 @@ function default.get_furnace_inactive_formspec() "list[detached:split;main;8,3.14;1,1;]" end -local split_inv = minetest.create_detached_inventory("split", { - allow_move = function(_, _, _, _, _, count, _) - return count - end, - allow_put = function(_, _, _, stack, _) - return stack:get_count() / 2 - end, - allow_take = function(_, _, _, stack, _) - return stack:get_count() - end, -}) -split_inv:set_size("main", 1) - -- -- Node callback functions that are the same for active and inactive furnace -- diff --git a/games/default/files/default/license.txt b/games/default/files/default/license.txt new file mode 100644 index 000000000..f9a10a58d --- /dev/null +++ b/games/default/files/default/license.txt @@ -0,0 +1,132 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 3.0 +Copyright (C) 2011-2018 celeron55, Perttu Ahola +Copyright (C) 2011-2018 Various Minetest developers and contributors + +This program 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 3.0 of the License, or (at your option) any later version. + +This program 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: +http://www.gnu.org/licenses/lgpl-3.0.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2010-2018: + + celeron55, Perttu Ahola + Cisoun + G4JC + VanessaE + RealBadAngel + Calinou + MirceaKitsune + Jordach + PilzAdam + jojoa1997 + InfinityProject + Splizard + Zeg9 + paramat + BlockMen + sofar + Neuromancer + Gambit + asl97 + KevDoy + Mito551 + GreenXenith + kaeza + kilbith + tobyplowy + CloudyProton + TumeniNodes + Mossmanikin + random-geek + Extex101 + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) + +Copyright (C) 2009 cmusounddesign +Copyright (C) 2010 Tomlija +Copyright (C) 2010 lsprice +Copyright (C) 2014 sonictechtonic +Copyright (C) 2015 yadronoff +Copyright (C) 2007 HerbertBoland +Copyright (C) 2006 AGFX + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication + +Iwan Gabovitch +Ottomaani138 +Ogrebane +blukotek +Sevin7 +Yoyodaman234 +Ryding + +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/games/default/files/default/nodes.lua b/games/default/files/default/nodes.lua index 3ed66d68a..a4d3c4d09 100644 --- a/games/default/files/default/nodes.lua +++ b/games/default/files/default/nodes.lua @@ -154,8 +154,7 @@ minetest.register_node("default:dirt_with_dry_grass", { minetest.register_node("default:dirt_with_snow", { description = "Dirt with Snow", tiles = {"default_snow.png", "default_dirt.png", - {name = "default_snow_side.png", - tileable_vertical = false}}, + "default_snow_side.png"}, groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1}, drop = 'default:dirt', sounds = default.node_sound_dirt_defaults({ @@ -746,6 +745,14 @@ minetest.register_node("default:stone_with_coal", { sounds = default.node_sound_stone_defaults(), }) +minetest.register_node("default:coalblock", { + description = "Coal Block", + tiles = {"default_coal_block.png"}, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + minetest.register_node("default:stone_with_iron", { description = "Iron Ore", tiles = {"default_stone.png^default_mineral_iron.png"}, diff --git a/games/default/files/doors/init.lua b/games/default/files/doors/init.lua index d0257ead1..754c2ee55 100644 --- a/games/default/files/doors/init.lua +++ b/games/default/files/doors/init.lua @@ -440,9 +440,9 @@ doors.register("door_steel", { } }) --- Aliaces +-- Aliases -local doors_aliaces = { +local doors_aliases = { {"acacia_b_1", "door_wood_a"}, {"acacia_b_2", "door_wood_b"}, {"acacia_t_1", "hidden"}, @@ -469,8 +469,8 @@ local doors_aliaces = { {"steel_t_2", "hidden"}, } -for i = 1, #doors_aliaces do - local old, new = unpack(doors_aliaces[i]) +for i = 1, #doors_aliases do + local old, new = unpack(doors_aliases[i]) minetest.register_alias("doors:door_" .. old, "doors:" .. new) end diff --git a/games/default/files/dye/init.lua b/games/default/files/dye/init.lua index dd03e5d67..c02453d99 100644 --- a/games/default/files/dye/init.lua +++ b/games/default/files/dye/init.lua @@ -3,21 +3,21 @@ dye = {} -- Make dye names and descriptions available globally dye.dyes = { - {"white", "White"}, - {"grey", "Grey"}, - {"dark_grey", "Dark grey"}, - {"black", "Black"}, - {"violet", "Violet"}, - {"blue", "Blue"}, - {"cyan", "Cyan"}, - {"dark_green", "Dark green"}, - {"green", "Green"}, - {"yellow", "Yellow"}, - {"brown", "Brown"}, - {"orange", "Orange"}, - {"red", "Red"}, - {"magenta", "Magenta"}, - {"pink", "Pink"}, + {"black", "Black"}, + {"blue", "Blue"}, + {"brown", "Brown"}, + {"cyan", "Cyan"}, + {"dark_green", "Dark Green"}, + {"dark_grey", "Dark Grey"}, + {"green", "Green"}, + {"grey", "Grey"}, + {"magenta", "Magenta"}, + {"orange", "Orange"}, + {"pink", "Pink"}, + {"red", "Red"}, + {"violet", "Violet"}, + {"white", "White"}, + {"yellow", "Yellow"}, } -- Define items diff --git a/games/default/files/experience/override.lua b/games/default/files/experience/override.lua index d45b678ec..63fa8558e 100644 --- a/games/default/files/experience/override.lua +++ b/games/default/files/experience/override.lua @@ -3,5 +3,5 @@ minetest.override_item("default:stone_with_coal", { }) minetest.override_item("default:wood", { - groups = {dig_immediate = 3, xp_min = 4, xp_max = 6}, + groups = {dig_immediate = 3, xp_min = 4, xp_max = 6, flammable = 2, wood = 1}, }) diff --git a/games/default/files/farming/depends.txt b/games/default/files/farming/depends.txt index 301d97199..470ec30b9 100644 --- a/games/default/files/farming/depends.txt +++ b/games/default/files/farming/depends.txt @@ -1,3 +1,2 @@ default wool -stairs diff --git a/games/default/files/farming/nodes.lua b/games/default/files/farming/nodes.lua index 286c5e959..569efeebe 100644 --- a/games/default/files/farming/nodes.lua +++ b/games/default/files/farming/nodes.lua @@ -106,17 +106,6 @@ minetest.register_node("farming:straw", { sounds = default.node_sound_leaves_defaults(), }) ---[[stairs.register_stair_and_slab( - "straw", - "farming:straw", - {snappy = 3, flammable = 4}, - {"farming_straw.png"}, - "Straw Stair", - "Straw Slab", - default.node_sound_leaves_defaults(), - true -)]] - minetest.register_abm({ label = "Farming soil", nodenames = {"group:field"}, diff --git a/games/default/files/fire/init.lua b/games/default/files/fire/init.lua index f3d904d5d..26bbbee61 100644 --- a/games/default/files/fire/init.lua +++ b/games/default/files/fire/init.lua @@ -166,7 +166,7 @@ minetest.register_craft({ -- Override coalblock to enable permanent flame above -- Coalblock is non-flammable to avoid unwanted basic_flame nodes ---[[minetest.override_item("default:coalblock", { +minetest.override_item("default:coalblock", { after_destruct = function(pos, oldnode) pos.y = pos.y + 1 if minetest.get_node(pos).name == "fire:permanent_flame" then @@ -179,7 +179,7 @@ minetest.register_craft({ minetest.set_node(flame_pos, {name = "fire:permanent_flame"}) end end, -})]]-- +}) -- diff --git a/games/default/files/inventory/init.lua b/games/default/files/inventory/init.lua index c1551fe46..31c65f31f 100644 --- a/games/default/files/inventory/init.lua +++ b/games/default/files/inventory/init.lua @@ -40,27 +40,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) -local split_inv = minetest.create_detached_inventory("split", { - allow_move = function(_, _, _, _, _, count, _) - return count - end, - allow_put = function(_, _, _, stack, _) - return stack:get_count() / 2 - end, - allow_take = function(_, _, _, stack, _) - return stack:get_count() - end, -}) - minetest.register_on_joinplayer(function(player) if not minetest.settings:get_bool("creative_mode") then local inv = player:get_inventory() if inv then inv:set_size("main", 9*4) end - if split_inv then - split_inv:set_size("main", 1) - end set_inventory(player) end end) diff --git a/games/default/files/mobs_monster/textures/mobs_cobweb.png b/games/default/files/mobs_redo/textures/mobs_cobweb.png similarity index 100% rename from games/default/files/mobs_monster/textures/mobs_cobweb.png rename to games/default/files/mobs_redo/textures/mobs_cobweb.png diff --git a/games/default/files/mobs_monster/textures/mobs_rotten_flesh.png b/games/default/files/mobs_redo/textures/mobs_rotten_flesh.png similarity index 100% rename from games/default/files/mobs_monster/textures/mobs_rotten_flesh.png rename to games/default/files/mobs_redo/textures/mobs_rotten_flesh.png diff --git a/games/default/files/player/playereffects/init.lua b/games/default/files/player/playereffects/init.lua index acb95cf7e..24965794e 100644 --- a/games/default/files/player/playereffects/init.lua +++ b/games/default/files/player/playereffects/init.lua @@ -58,10 +58,10 @@ do if(string ~= nil) then local savetable = minetest.deserialize(string) playereffects.inactive_effects = savetable.inactive_effects - minetest.debug("[playereffects] playereffects successfully read.") - minetest.debug("[playereffects] inactive_effects = "..dump(playereffects.inactive_effects)) + -- minetest.debug("[playereffects] playereffects successfully read.") + -- minetest.debug("[playereffects] inactive_effects = "..dump(playereffects.inactive_effects)) playereffects.last_effect_id = savetable.last_effect_id - minetest.debug("[playereffects] last_effect_id = "..dump(playereffects.last_effect_id)) + -- minetest.debug("[playereffects] last_effect_id = "..dump(playereffects.last_effect_id)) end end diff --git a/games/default/files/sfinv/api.lua b/games/default/files/sfinv/api.lua index 14020228d..5f4db4e69 100644 --- a/games/default/files/sfinv/api.lua +++ b/games/default/files/sfinv/api.lua @@ -145,10 +145,25 @@ function sfinv.set_page(player, pagename) sfinv.set_player_inventory_formspec(player, context) end +split_inv = minetest.create_detached_inventory("split", { + allow_move = function(_, _, _, _, _, count, _) + return count + end, + allow_put = function(_, _, _, stack, _) + return stack:get_count() / 2 + end, + allow_take = function(_, _, _, stack, _) + return stack:get_count() + end, +}) + minetest.register_on_joinplayer(function(player) if sfinv.enabled then sfinv.set_player_inventory_formspec(player) end + if split_inv then + split_inv:set_size("main", 1) + end end) minetest.register_on_leaveplayer(function(player)