diff --git a/menu/background.png b/menu/background.png index 89c45fc..e026c51 100644 Binary files a/menu/background.png and b/menu/background.png differ diff --git a/menu/header.png b/menu/header.png index c80ed71..ba18c04 100644 Binary files a/menu/header.png and b/menu/header.png differ diff --git a/menu/icon.png b/menu/icon.png index f854b9c..9712e0f 100644 Binary files a/menu/icon.png and b/menu/icon.png differ diff --git a/mods/.luacheckrc b/mods/.luacheckrc index 3dc4347..1fc35ca 100644 --- a/mods/.luacheckrc +++ b/mods/.luacheckrc @@ -6,7 +6,7 @@ globals = { "furn", "minetest", "nodez", - "player_api", + "playerz", "samz", "sfinv", "sound", diff --git a/mods/basetools/textures/basetools_steelpick.png b/mods/basetools/textures/basetools_steelpick.png deleted file mode 100644 index bc02aac..0000000 Binary files a/mods/basetools/textures/basetools_steelpick.png and /dev/null differ diff --git a/mods/basetools/textures/basetools_steelsword.png b/mods/basetools/textures/basetools_steelsword.png deleted file mode 100644 index 9909365..0000000 Binary files a/mods/basetools/textures/basetools_steelsword.png and /dev/null differ diff --git a/mods/bedrock2/COPYING b/mods/bedrock2/COPYING new file mode 100644 index 0000000..5a8e332 --- /dev/null +++ b/mods/bedrock2/COPYING @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/mods/bedrock2/README.md b/mods/bedrock2/README.md new file mode 100644 index 0000000..5309a58 --- /dev/null +++ b/mods/bedrock2/README.md @@ -0,0 +1,11 @@ +# Bedrock [`bedrock2`] + +Version 1.2.2 + +## Description +This mod adds an indestructible bedrock layer at the bottom of the world. + +## Configuration +This mod recognizes the following minetest.conf setting: + +* `bedrock2_y`: Sets the Y coordinate on which the bedrock layer will be created (default: -30912). diff --git a/mods/bedrock2/depends.txt b/mods/bedrock2/depends.txt new file mode 100644 index 0000000..59619ab --- /dev/null +++ b/mods/bedrock2/depends.txt @@ -0,0 +1 @@ +mesecons_mvps? diff --git a/mods/bedrock2/description.txt b/mods/bedrock2/description.txt new file mode 100644 index 0000000..0de789f --- /dev/null +++ b/mods/bedrock2/description.txt @@ -0,0 +1 @@ +Adds an indestructable bedrock layer at the bottom of the world. diff --git a/mods/bedrock2/init.lua b/mods/bedrock2/init.lua new file mode 100644 index 0000000..17f0dfd --- /dev/null +++ b/mods/bedrock2/init.lua @@ -0,0 +1,51 @@ +local S = minetest.get_translator("bedrock2") + +local bedrock = {} + +bedrock.layer = -30912 -- determined as appropriate by experiment +bedrock.node = {name = "bedrock2:bedrock"} + +local settings = Settings(minetest.get_modpath("bedrock2").."/settings.conf") +local depth = tonumber(settings:get("bedrock2_y")) +if depth ~= nil then + bedrock.layer = depth +end + +minetest.register_on_generated(function(minp, maxp) + if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") + local data = vm:get_data() + local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax}) + local c_bedrock = minetest.get_content_id("bedrock2:bedrock") + + for x = minp.x, maxp.x do + for z = minp.z, maxp.z do + local p_pos = area:index(x, bedrock.layer, z) + data[p_pos] = c_bedrock + end + end + + vm:set_data(data) + vm:calc_lighting() + vm:update_liquids() + vm:write_to_map() + end +end) + +minetest.register_node("bedrock2:bedrock", { + description = S("Bedrock"), + _doc_items_longdesc = S("Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer."), + tiles = {"bedrock2_bedrock.png"}, + groups = {immortal=1, not_in_creative_inventory=1, }, + sounds = { footstep = { name = "bedrock2_step", gain = 1 } }, + is_ground_content = false, + on_blast = function() end, + on_destruct = function () end, + can_dig = function() return false end, + diggable = false, + drop = "", +}) + +if minetest.get_modpath("mesecons_mvps") ~= nil then + mesecon.register_mvps_stopper("bedrock2:bedrock") +end diff --git a/mods/bedrock2/locale/bedrock2.de.tr b/mods/bedrock2/locale/bedrock2.de.tr new file mode 100644 index 0000000..e625f37 --- /dev/null +++ b/mods/bedrock2/locale/bedrock2.de.tr @@ -0,0 +1,3 @@ +# textdomain:bedrock2 +Bedrock=Grundgestein +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.=Grundgestein ist sehr hart. Es kann nicht gegraben, verändert, zerstört oder bewegt werden. Es taucht am Boden der Welt in einer flachen Ebene auf. diff --git a/mods/bedrock2/locale/bedrock2.es.tr b/mods/bedrock2/locale/bedrock2.es.tr new file mode 100644 index 0000000..a8ce848 --- /dev/null +++ b/mods/bedrock2/locale/bedrock2.es.tr @@ -0,0 +1,3 @@ +# textdomain:bedrock2 +Bedrock=Lecho de roca +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.=El lecho de roca es un bloque muy duro. No puede ser minado, alterado, destruido o movido por ningún medio. Aparece en el fondo del mundo en una capa plana. diff --git a/mods/bedrock2/locale/template.txt b/mods/bedrock2/locale/template.txt new file mode 100644 index 0000000..555f804 --- /dev/null +++ b/mods/bedrock2/locale/template.txt @@ -0,0 +1,2 @@ +Bedrock +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer. diff --git a/mods/bedrock2/mod.conf b/mods/bedrock2/mod.conf new file mode 100644 index 0000000..2223c7e --- /dev/null +++ b/mods/bedrock2/mod.conf @@ -0,0 +1 @@ +name = bedrock2 diff --git a/mods/bedrock2/screenshot.png b/mods/bedrock2/screenshot.png new file mode 100644 index 0000000..471d13e Binary files /dev/null and b/mods/bedrock2/screenshot.png differ diff --git a/mods/bedrock2/settings.conf b/mods/bedrock2/settings.conf new file mode 100644 index 0000000..0bdafcd --- /dev/null +++ b/mods/bedrock2/settings.conf @@ -0,0 +1,2 @@ +# Sets the height (Y) at which the bedrock layer will be created. +bedrock2_y = -513 diff --git a/mods/bedrock2/sounds/bedrock2_step.1.ogg b/mods/bedrock2/sounds/bedrock2_step.1.ogg new file mode 100644 index 0000000..2a2b900 Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.1.ogg differ diff --git a/mods/bedrock2/sounds/bedrock2_step.2.ogg b/mods/bedrock2/sounds/bedrock2_step.2.ogg new file mode 100644 index 0000000..e507853 Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.2.ogg differ diff --git a/mods/bedrock2/sounds/bedrock2_step.3.ogg b/mods/bedrock2/sounds/bedrock2_step.3.ogg new file mode 100644 index 0000000..1f31e8e Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.3.ogg differ diff --git a/mods/bedrock2/textures/bedrock2_bedrock.png b/mods/bedrock2/textures/bedrock2_bedrock.png new file mode 100644 index 0000000..3e4fd03 Binary files /dev/null and b/mods/bedrock2/textures/bedrock2_bedrock.png differ diff --git a/mods/bedrock2/textures/bedrock2_bedrock.png~ b/mods/bedrock2/textures/bedrock2_bedrock.png~ new file mode 100644 index 0000000..2690e05 Binary files /dev/null and b/mods/bedrock2/textures/bedrock2_bedrock.png~ differ diff --git a/mods/dignodes/init.lua b/mods/dignodes/init.lua deleted file mode 100644 index 8331508..0000000 --- a/mods/dignodes/init.lua +++ /dev/null @@ -1,37 +0,0 @@ -local groups = { - "cracky", "dig_immediate" -} - --- Register dig nodes with 1 digging group, a rating between 1-3 and a level between 0-2 -for g=1, #groups do - local gr = groups[g] - for r=1, 3 do - for l=0, 2 do - if not (gr=="dig_immediate" and (l>0 or r==1)) then - local d - if l > 0 then - d = string.format("Dig Test Node: %s=%d, level=%d", gr, r, l) - else - d = string.format("Dig Test Node: %s=%d", gr, r) - end - local tile = "dignodes_"..gr..".png^dignodes_rating"..r..".png" - if l==1 then - tile = tile .. "^[colorize:#FFFF00:127" - elseif l==2 then - tile = tile .. "^[colorize:#FF0000:127" - end - minetest.register_node("dignodes:"..gr.."_"..r.."_"..l, { - description = d, - tiles = { tile }, - groups = { [gr] = r, level = l }, - }) - end - end - end -end - --- Node without any digging groups -minetest.register_node("dignodes:none", { - description = "Dig Test Node: groupless", - tiles = {"dignodes_none.png"}, -}) diff --git a/mods/dignodes/mod.conf b/mods/dignodes/mod.conf deleted file mode 100644 index 52a80d6..0000000 --- a/mods/dignodes/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = dignodes -description = Nodes with different digging groups diff --git a/mods/dignodes/textures/dignodes_choppy.png b/mods/dignodes/textures/dignodes_choppy.png deleted file mode 100644 index a73fc24..0000000 Binary files a/mods/dignodes/textures/dignodes_choppy.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_cracky.png b/mods/dignodes/textures/dignodes_cracky.png deleted file mode 100644 index eb84e30..0000000 Binary files a/mods/dignodes/textures/dignodes_cracky.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_crumbly.png b/mods/dignodes/textures/dignodes_crumbly.png deleted file mode 100644 index 23f2f7c..0000000 Binary files a/mods/dignodes/textures/dignodes_crumbly.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_dig_immediate.png b/mods/dignodes/textures/dignodes_dig_immediate.png deleted file mode 100644 index a532ad9..0000000 Binary files a/mods/dignodes/textures/dignodes_dig_immediate.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_none.png b/mods/dignodes/textures/dignodes_none.png deleted file mode 100644 index 60f1365..0000000 Binary files a/mods/dignodes/textures/dignodes_none.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_rating1.png b/mods/dignodes/textures/dignodes_rating1.png deleted file mode 100644 index d2fee3a..0000000 Binary files a/mods/dignodes/textures/dignodes_rating1.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_rating2.png b/mods/dignodes/textures/dignodes_rating2.png deleted file mode 100644 index 15329b9..0000000 Binary files a/mods/dignodes/textures/dignodes_rating2.png and /dev/null differ diff --git a/mods/dignodes/textures/dignodes_rating3.png b/mods/dignodes/textures/dignodes_rating3.png deleted file mode 100644 index 37216bf..0000000 Binary files a/mods/dignodes/textures/dignodes_rating3.png and /dev/null differ diff --git a/mods/flowers/api.lua b/mods/flowers/api.lua new file mode 100644 index 0000000..d55d293 --- /dev/null +++ b/mods/flowers/api.lua @@ -0,0 +1,63 @@ +-- Flower registration + +local function register_flower_deco(name, deco) + if not(deco.noise_params) then + deco.noise_params = { + scale = 0.04 + } + end + minetest.register_decoration({ + name = "flowers:"..name, + decoration = "flowers:"..name, + deco_type = "simple", + place_on = deco.place_on, + sidelen = 16, + noise_params = { + offset = -0.02, + scale = deco.noise_params.scale or 0.04, + spread = {x = 200, y = 200, z = 200}, + seed = deco.seed, + octaves = 3, + persist = 0.6 + }, + biomes = deco.biomes, + y_max = deco.height.y_max, + y_min = deco.height.y_min, + }) +end + +function flowers.register_flower(name, def) + -- Common flowers' groups + def.groups.snappy = 3 + def.groups.flower = 1 + def.groups.flora = 1 + def.groups.attached_node = 1 + + local inventory_image = "flowers_" .. name + if def.inv_img then + inventory_image = inventory_image .. "_inv" + end + + minetest.register_node("flowers:" .. name, { + description = def.desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png"}, + inventory_image = inventory_image .. ".png", + wield_image = "flowers_" .. name .. ".png", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + groups = def.groups, + sounds = sound.leaves(), + selection_box = { + type = "fixed", + fixed = def.box + } + }) + + if def.deco then + register_flower_deco(name, def.deco) + end +end diff --git a/mods/flowers/flowers.lua b/mods/flowers/flowers.lua new file mode 100644 index 0000000..6aae32d --- /dev/null +++ b/mods/flowers/flowers.lua @@ -0,0 +1,169 @@ +local S = ... + +flowers.list = { + { + name = "rose_bush", + def = { + desc = S("Rose Bush"), + box = {-2/16, -0.5, -2/16, 2/16, 5/16, 2/16}, + groups = {color_red = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 345, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1}, + noise_params = { + scale = 0.02, + } + } + } + }, + { + name = "rose", + def = { + desc = S("Rose"), + box = {-2/16, -0.5, -2/16, 2/16, 5/16, 2/16}, + groups = {color_red = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 345, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1}, + noise_params = { + scale = 0.03, + } + } + } + }, + { + name = "daisy", + def = { + desc = S("Daisy"), + box = {-2/16, -0.5, -2/16, 2/16, 5/16, 2/16}, + groups = {color_white = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 1528, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "tulip", + def = { + desc = S("Tulip"), + box = {-2/16, -0.5, -2/16, 2/16, 2/16, 2/16}, + groups = {color_yellow = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 7898, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "pansy", + def = { + desc = S("Pansy"), + box = {-2/16, -0.5, -2/16, 2/16, 2/16, 2/16}, + groups = {color_pink = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 734, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "gerbera", + def = { + desc = S("Gerbera Daisy"), + box = {-4/16, -8/16, -4/16, 4/16, -3/16, 4/16}, + groups = {color_orange = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 5770, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "lavender", + def = { + desc = S("Lavender"), + box = {-4/16, -8/16, -4/16, 4/16, -3/16, 4/16}, + groups = {color_violet = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 230, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "dandellion", + def = { + desc = S("Dandellion"), + box = {-4/16, -8/16, -4/16, 4/16, -3/16, 4/16}, + groups = {color_yellow = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 3946, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + }, + { + name = "dahlia", + def = { + desc = S("Dahlia"), + box = {-2/16, -8/16, -2/16, 2/16, 3/16, 2/16}, + groups = {color_red = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 356, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1}, + height = {y_max = 128, y_min = 1}, + noise_params = { + scale = 0.02, + } + } + } + }, + { + name = "zinnia", + def = { + desc = S("Zinnia"), + box = {-4/16, -8/16, -4/16, 4/16, -2/16, 4/16}, + groups = {color_red = 1, flammable = 1}, + inv_img = false, + deco = { + place_on = "nodez:dirt_with_grass", + seed = 993, + biomes = {"forest"}, + height = {y_max = 128, y_min = 1} + } + } + } +} + +for _, item in pairs(flowers.list) do + flowers.register_flower(item.name, item.def) +end + diff --git a/mods/flowers/init.lua b/mods/flowers/init.lua new file mode 100644 index 0000000..3075c85 --- /dev/null +++ b/mods/flowers/init.lua @@ -0,0 +1,8 @@ +flowers = {} + +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) +local S = minetest.get_translator(modname) + +assert(loadfile(modpath .. "/api.lua"))() +assert(loadfile(modpath .. "/flowers.lua"))(S) diff --git a/mods/flowers/locale/flowers.es.tr b/mods/flowers/locale/flowers.es.tr new file mode 100644 index 0000000..cc602e6 --- /dev/null +++ b/mods/flowers/locale/flowers.es.tr @@ -0,0 +1,9 @@ +# textdomain: flowers +Dahlia=Dalia +Daisy=Margarita +Daisy Gerbera=Margarita Gerbera +Lavender=Lavanda +Rose=Rosa +Rose Bush=Rosal +Tulip=Tulipán +Zinnia=Zinnia diff --git a/mods/flowers/mod.conf b/mods/flowers/mod.conf new file mode 100644 index 0000000..0474cb2 --- /dev/null +++ b/mods/flowers/mod.conf @@ -0,0 +1,3 @@ +name = flowers +description = Flowers +depends = diff --git a/mods/flowers/textures/flowers_dahlia.png b/mods/flowers/textures/flowers_dahlia.png new file mode 100644 index 0000000..50af282 Binary files /dev/null and b/mods/flowers/textures/flowers_dahlia.png differ diff --git a/mods/flowers/textures/flowers_dahlia.png~ b/mods/flowers/textures/flowers_dahlia.png~ new file mode 100644 index 0000000..7690320 Binary files /dev/null and b/mods/flowers/textures/flowers_dahlia.png~ differ diff --git a/mods/flowers/textures/flowers_daisy.png b/mods/flowers/textures/flowers_daisy.png new file mode 100644 index 0000000..4e288db Binary files /dev/null and b/mods/flowers/textures/flowers_daisy.png differ diff --git a/mods/flowers/textures/flowers_daisy.png~ b/mods/flowers/textures/flowers_daisy.png~ new file mode 100644 index 0000000..4e288db Binary files /dev/null and b/mods/flowers/textures/flowers_daisy.png~ differ diff --git a/mods/flowers/textures/flowers_dandellion.png b/mods/flowers/textures/flowers_dandellion.png new file mode 100644 index 0000000..f4eaf16 Binary files /dev/null and b/mods/flowers/textures/flowers_dandellion.png differ diff --git a/mods/flowers/textures/flowers_dandellion.png~ b/mods/flowers/textures/flowers_dandellion.png~ new file mode 100644 index 0000000..bdee1c8 Binary files /dev/null and b/mods/flowers/textures/flowers_dandellion.png~ differ diff --git a/mods/flowers/textures/flowers_gerbera.png b/mods/flowers/textures/flowers_gerbera.png new file mode 100644 index 0000000..6c7efd2 Binary files /dev/null and b/mods/flowers/textures/flowers_gerbera.png differ diff --git a/mods/flowers/textures/flowers_gerbera.png~ b/mods/flowers/textures/flowers_gerbera.png~ new file mode 100644 index 0000000..72b2aa6 Binary files /dev/null and b/mods/flowers/textures/flowers_gerbera.png~ differ diff --git a/mods/flowers/textures/flowers_lavender.png b/mods/flowers/textures/flowers_lavender.png new file mode 100644 index 0000000..e0ec8b9 Binary files /dev/null and b/mods/flowers/textures/flowers_lavender.png differ diff --git a/mods/flowers/textures/flowers_lavender.png~ b/mods/flowers/textures/flowers_lavender.png~ new file mode 100644 index 0000000..bcd4238 Binary files /dev/null and b/mods/flowers/textures/flowers_lavender.png~ differ diff --git a/mods/flowers/textures/flowers_pansy.png b/mods/flowers/textures/flowers_pansy.png new file mode 100644 index 0000000..bb25fc4 Binary files /dev/null and b/mods/flowers/textures/flowers_pansy.png differ diff --git a/mods/flowers/textures/flowers_pansy.png~ b/mods/flowers/textures/flowers_pansy.png~ new file mode 100644 index 0000000..71aad38 Binary files /dev/null and b/mods/flowers/textures/flowers_pansy.png~ differ diff --git a/mods/flowers/textures/flowers_pansy_inv.png b/mods/flowers/textures/flowers_pansy_inv.png new file mode 100644 index 0000000..bb25fc4 Binary files /dev/null and b/mods/flowers/textures/flowers_pansy_inv.png differ diff --git a/mods/flowers/textures/flowers_rose.png b/mods/flowers/textures/flowers_rose.png new file mode 100644 index 0000000..bbda761 Binary files /dev/null and b/mods/flowers/textures/flowers_rose.png differ diff --git a/mods/flowers/textures/flowers_rose.png~ b/mods/flowers/textures/flowers_rose.png~ new file mode 100644 index 0000000..b4cd35b Binary files /dev/null and b/mods/flowers/textures/flowers_rose.png~ differ diff --git a/mods/flowers/textures/flowers_rose_bush.png b/mods/flowers/textures/flowers_rose_bush.png new file mode 100644 index 0000000..29ce91e Binary files /dev/null and b/mods/flowers/textures/flowers_rose_bush.png differ diff --git a/mods/flowers/textures/flowers_rose_bush.png~ b/mods/flowers/textures/flowers_rose_bush.png~ new file mode 100644 index 0000000..95baa43 Binary files /dev/null and b/mods/flowers/textures/flowers_rose_bush.png~ differ diff --git a/mods/flowers/textures/flowers_rose_bush_inv.png b/mods/flowers/textures/flowers_rose_bush_inv.png new file mode 100644 index 0000000..6af9300 Binary files /dev/null and b/mods/flowers/textures/flowers_rose_bush_inv.png differ diff --git a/mods/flowers/textures/flowers_tulip.png b/mods/flowers/textures/flowers_tulip.png new file mode 100644 index 0000000..ff327c7 Binary files /dev/null and b/mods/flowers/textures/flowers_tulip.png differ diff --git a/mods/flowers/textures/flowers_zinnia.png b/mods/flowers/textures/flowers_zinnia.png new file mode 100644 index 0000000..e329d04 Binary files /dev/null and b/mods/flowers/textures/flowers_zinnia.png differ diff --git a/mods/flowers/textures/flowers_zinnia.png~ b/mods/flowers/textures/flowers_zinnia.png~ new file mode 100644 index 0000000..36d83db Binary files /dev/null and b/mods/flowers/textures/flowers_zinnia.png~ differ diff --git a/mods/give_initial_stuff/mod.conf b/mods/give_initial_stuff/mod.conf index 1ba49f5..5905f8b 100644 --- a/mods/give_initial_stuff/mod.conf +++ b/mods/give_initial_stuff/mod.conf @@ -1,3 +1,3 @@ name = give_initial_stuff description = Gives items to players on join -depends = basetools, bucket, chest_of_everything, testnodes +depends = tools, bucket, chest_of_everything diff --git a/mods/mapgen/init.lua b/mods/mapgen/init.lua index c00c44c..a877d1d 100644 --- a/mods/mapgen/init.lua +++ b/mods/mapgen/init.lua @@ -1,15 +1,17 @@ local mg_name = minetest.get_mapgen_setting("mg_name") -biomes = {} +mapgen = { + biomes = {} +} if mg_name == "valleys" then - biomes.peaky_mountain_height = 85 + mapgen.biomes.peaky_mountain_height = 85 elseif mg_name == "carphatian" then - biomes.peaky_mountain_height = 65 + mapgen.biomes.peaky_mountain_height = 65 elseif mg_name == "v7" then - biomes.peaky_mountain_height = 45 + mapgen.biomes.peaky_mountain_height = 45 else - biomes.peaky_mountain_height = 55 + mapgen.biomes.peaky_mountain_height = 55 end -- @@ -62,7 +64,7 @@ if minetest.settings:get_bool("devtest_dungeon_stairs", false) then end -- --- Register biomes for biome API +-- Register mapgen.biomes.for biome API -- if mg_name == "v6" or mg_name == "singlenode" then @@ -248,7 +250,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - y_min = biomes.peaky_mountain_height, + y_min = mapgen.biomes.peaky_mountain_height, y_max = 200, place_offset_y = -1, flags = "place_center_x, place_center_z, force_placement", @@ -272,7 +274,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - y_min = biomes.peaky_mountain_height, + y_min = mapgen.biomes.peaky_mountain_height, y_max = 200, place_offset_y = -1, flags = "place_center_x, place_center_z, force_placement", @@ -295,7 +297,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - y_min = biomes.peaky_mountain_height, + y_min = mapgen.biomes.peaky_mountain_height, y_max = 200, place_offset_y = -1, flags = "place_center_x, place_center_z, force_placement", @@ -316,7 +318,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.66 }, - y_min = biomes.peaky_mountain_height, + y_min = mapgen.biomes.peaky_mountain_height, y_max = 200, spawn_by = "nodez:dirt_with_snow", num_spawn_by = 1, @@ -335,5 +337,3 @@ minetest.register_ore({ y_max = -384, y_min = -512, }) - - diff --git a/mods/nodez/sand.lua b/mods/nodez/sand.lua index 1fdffcb..1bcb224 100644 --- a/mods/nodez/sand.lua +++ b/mods/nodez/sand.lua @@ -33,9 +33,9 @@ minetest.register_node("nodez:glass", { paramtype2 = "glasslikeliquidlevel", sunlight_propagates = true, is_ground_content = false, - groups = {cracky= 3, glass= 1, - oddly_breakable_by_hand = 3}, - sounds = sound.glass(), + groups = {cracky= 3, glass= 1}, + oddly_breakable_by_hand = 3, + sounds = sound.glass() }) minetest.register_craft({ diff --git a/mods/nodez/textures/nodez_clay.png b/mods/nodez/textures/nodez_clay.png index 1f482f5..f625208 100644 Binary files a/mods/nodez/textures/nodez_clay.png and b/mods/nodez/textures/nodez_clay.png differ diff --git a/mods/nodez/textures/nodez_clay.png~ b/mods/nodez/textures/nodez_clay.png~ index 1f482f5..024f651 100644 Binary files a/mods/nodez/textures/nodez_clay.png~ and b/mods/nodez/textures/nodez_clay.png~ differ diff --git a/mods/nodez/textures/nodez_silversand.png b/mods/nodez/textures/nodez_silversand.png new file mode 100644 index 0000000..1f482f5 Binary files /dev/null and b/mods/nodez/textures/nodez_silversand.png differ diff --git a/mods/nodez/textures/nodez_stick.png~ b/mods/nodez/textures/nodez_stick.png~ new file mode 100644 index 0000000..c78d8c0 Binary files /dev/null and b/mods/nodez/textures/nodez_stick.png~ differ diff --git a/mods/nodez/textures/nodez_terracota.png b/mods/nodez/textures/nodez_terracota.png new file mode 100644 index 0000000..b409520 Binary files /dev/null and b/mods/nodez/textures/nodez_terracota.png differ diff --git a/mods/nodez/textures/nodez_terracota.png~ b/mods/nodez/textures/nodez_terracota.png~ new file mode 100644 index 0000000..7cbb3ab Binary files /dev/null and b/mods/nodez/textures/nodez_terracota.png~ differ diff --git a/mods/player_api/mod.conf b/mods/player_api/mod.conf deleted file mode 100644 index 198b86d..0000000 --- a/mods/player_api/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = player_api -description = Minetest Game mod: player_api diff --git a/mods/player_api/README.txt b/mods/playerz/README.txt similarity index 96% rename from mods/player_api/README.txt rename to mods/playerz/README.txt index 37afadf..3ee26b8 100644 --- a/mods/player_api/README.txt +++ b/mods/playerz/README.txt @@ -1,4 +1,4 @@ -Minetest Game mod: player_api +Minetest Game mod: playerz ============================= See license.txt for license information. diff --git a/mods/player_api/api.lua b/mods/playerz/api.lua similarity index 81% rename from mods/player_api/api.lua rename to mods/playerz/api.lua index 2af1006..f1196cf 100644 --- a/mods/player_api/api.lua +++ b/mods/playerz/api.lua @@ -2,20 +2,20 @@ -- See README.txt for licensing and other information. -- Load support for MT game translation. -local S = minetest.get_translator("player_api") +local S = minetest.get_translator("playerz") -player_api = {} +playerz = {} -- Player animation blending -- Note: This is currently broken due to a bug in Irrlicht, leave at 0 local animation_blend = 0 -player_api.registered_models = { } +playerz.registered_models = { } -- Local for speed. -local models = player_api.registered_models +local models = playerz.registered_models -function player_api.register_model(name, def) +function playerz.register_model(name, def) models[name] = def end @@ -24,9 +24,9 @@ local player_model = {} local player_textures = {} local player_anim = {} local player_sneak = {} -player_api.player_attached = {} +playerz.player_attached = {} -function player_api.get_animation(player) +function playerz.get_animation(player) local name = player:get_player_name() return { model = player_model[name], @@ -35,7 +35,7 @@ function player_api.get_animation(player) } end -function player_api.set_gender(player, gender) +function playerz.set_gender(player, gender) if not(gender) or gender == "random" then if math.random(2) == 1 then gender = "male" @@ -47,16 +47,16 @@ function player_api.set_gender(player, gender) return gender end -function player_api.get_gender(player) +function playerz.get_gender(player) return player:get_meta():get_string("gender") end -function player_api.get_gender_model(gender) +function playerz.get_gender_model(gender) local model = "character.b3d" return model end -function player_api.set_base_texture(player, gender) +function playerz.set_base_texture(player, gender) local meta = player:get_meta() meta:set_string("base_texture", gender) end @@ -66,7 +66,7 @@ minetest.register_chatcommand("toggle_gender", { func = function(name, param) local player = minetest.get_player_by_name(name) local meta = player:get_meta() - local old_gender = player_api.get_gender(player) + local old_gender = playerz.get_gender(player) if old_gender then local new_gender if old_gender == "male" then @@ -75,11 +75,11 @@ minetest.register_chatcommand("toggle_gender", { new_gender = "male" end meta:set_string("gender", new_gender) - player_api.set_model(player, player_api.get_gender_model(new_gender)) - local gender_model = player_api.get_gender_model(new_gender) - local cloth = player_api.compose_cloth(player) - player_api.registered_models[gender_model].textures[1] = cloth - player_api.set_textures(player, models[gender_model].textures) + playerz.set_model(player, playerz.get_gender_model(new_gender)) + local gender_model = playerz.get_gender_model(new_gender) + local cloth = playerz.compose_cloth(player) + playerz.registered_models[gender_model].textures[1] = cloth + playerz.set_textures(player, models[gender_model].textures) local new_gender_cap = new_gender:gsub("^%l", string.upper) minetest.chat_send_player(name, S("Your gender is changed to").." "..S(new_gender_cap)..".") end @@ -112,7 +112,7 @@ local function move_head(player, on_water) end -- Called when a player's appearance needs to be updated -function player_api.set_model(player, model_name) +function playerz.set_model(player, model_name) local name = player:get_player_name() local model = models[model_name] if model then @@ -128,7 +128,7 @@ function player_api.set_model(player, model_name) stepheight = model.stepheight or 0.6, eye_height = model.eye_height or 1.47, }) - player_api.set_animation(player, "stand") + playerz.set_animation(player, "stand") else player:set_properties({ textures = {"player.png", "player_back.png"}, @@ -142,7 +142,7 @@ function player_api.set_model(player, model_name) player_model[name] = model_name end -function player_api.set_textures(player, textures) +function playerz.set_textures(player, textures) local name = player:get_player_name() local model = models[player_model[name]] local model_textures = model and model.textures or nil @@ -150,7 +150,7 @@ function player_api.set_textures(player, textures) player:set_properties({textures = textures or model_textures}) end -function player_api.set_animation(player, anim_name, speed) +function playerz.set_animation(player, anim_name, speed) local name = player:get_player_name() if player_anim[name] == anim_name then return @@ -170,12 +170,12 @@ minetest.register_on_leaveplayer(function(player) player_anim[name] = nil player_textures[name] = nil player_sneak[name] = nil - player_api.player_attached[name] = nil + playerz.player_attached[name] = nil end) -- Localize for better performance. -local player_set_animation = player_api.set_animation -local player_attached = player_api.player_attached +local player_set_animation = playerz.set_animation +local player_attached = playerz.player_attached -- Prevent knockback for attached players local old_calculate_knockback = minetest.calculate_knockback @@ -318,7 +318,7 @@ minetest.register_globalstep(function(dtime) end end) -function player_api.get_gender_formspec(name) +function playerz.get_gender_formspec(name) local text = S("Select your gender") local formspec = { @@ -333,32 +333,32 @@ function player_api.get_gender_formspec(name) return table.concat(formspec, "") end -function player_api.select_gender(player_name) - minetest.show_formspec(player_name, "player_api:gender", player_api.get_gender_formspec(player_name)) +function playerz.select_gender(player_name) + minetest.show_formspec(player_name, "playerz:gender", playerz.get_gender_formspec(player_name)) end -function player_api.set_texture(player) - local cloth = player_api.compose_cloth(player) - local gender = player_api.get_gender(player) - local gender_model = player_api.get_gender_model(gender) - player_api.registered_models[gender_model].textures[1] = cloth - player_api.set_model(player, gender_model) - player_api.set_textures(player, models[gender_model].textures) +function playerz.set_texture(player) + local cloth = playerz.compose_cloth(player) + local gender = playerz.get_gender(player) + local gender_model = playerz.get_gender_model(gender) + playerz.registered_models[gender_model].textures[1] = cloth + playerz.set_model(player, gender_model) + playerz.set_textures(player, models[gender_model].textures) end -function player_api.get_face(base_texture, scale, escape) +function playerz.get_face(base_texture, scale, escape) if not scale then scale = 1.0 end - local face = player_api.compose_face(base_texture, scale) + local face = playerz.compose_face(base_texture, scale) if escape then face = minetest.formspec_escape(face) end return face end -function player_api.compose_face(base_texture, scale) - return player_api.compose_base_texture(base_texture, { +function playerz.compose_face(base_texture, scale) + return playerz.compose_base_texture(base_texture, { canvas_size = "6x6", scale = scale, skin_texture = "player_face_skin.png", @@ -372,13 +372,13 @@ function player_api.compose_face(base_texture, scale) end --Level functions -function player_api.lvl_up(player) +function playerz.lvl_up(player) local meta = player:get_meta() local level = meta:get_int("level") meta:set_int("level", (level + 1)) end -function player_api.lvl_down(player) +function playerz.lvl_down(player) local meta = player:get_meta() local level = meta:get_int("level") if level == 0 then @@ -387,7 +387,7 @@ function player_api.lvl_down(player) meta:set_int("level", (level - 1)) end -function player_api.set_lvl(player, level) +function playerz.set_lvl(player, level) if level <= 0 then return else @@ -395,12 +395,12 @@ function player_api.set_lvl(player, level) end end -function player_api.reset_lvl(player, level) +function playerz.reset_lvl(player, level) player:get_meta():set_int("level", 0) end minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname ~= "player_api:gender" then + if formname ~= "playerz:gender" then return end local gender @@ -410,11 +410,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) else gender = "female" end - player_api.set_gender(player, gender) + playerz.set_gender(player, gender) else - player_api.set_gender(player, "random") + playerz.set_gender(player, "random") end - player_api.set_base_textures(player) --set the default base_texture - player_api.set_cloths(player) --set the default clothes - player_api.set_texture(player) + playerz.set_base_textures(player) --set the default base_texture + playerz.set_cloths(player) --set the default clothes + playerz.set_texture(player) end) diff --git a/mods/player_api/base_texture.lua b/mods/playerz/base_texture.lua similarity index 79% rename from mods/player_api/base_texture.lua rename to mods/playerz/base_texture.lua index 2bbc37d..9252376 100644 --- a/mods/player_api/base_texture.lua +++ b/mods/playerz/base_texture.lua @@ -1,4 +1,4 @@ -player_api.hair_colors = { +playerz.hair_colors = { black = { color = "#000000", ratio = 175, @@ -23,11 +23,11 @@ player_api.hair_colors = { } local hair_colors_redux = {} -for key, value in pairs(player_api.hair_colors) do +for key, value in pairs(playerz.hair_colors) do hair_colors_redux[#hair_colors_redux+1] = key end -player_api.skin_colors = { +playerz.skin_colors = { normal = nil, light_brown = { color = "#bea080", @@ -44,31 +44,31 @@ player_api.skin_colors = { } local skin_colors_redux = {} -for key, value in pairs(player_api.skin_colors) do +for key, value in pairs(playerz.skin_colors) do skin_colors_redux[#skin_colors_redux+1] = key end -player_api.eye_colors = {"brown", "gray", "green", "blue", "hazel", "violet", "black", "pink"} +playerz.eye_colors = {"brown", "gray", "green", "blue", "hazel", "violet", "black", "pink"} -function player_api.get_base_texture_table(player) +function playerz.get_base_texture_table(player) local meta = player:get_meta() local base_texture_str = meta:get_string("base_texture") if base_texture_str == nil or base_texture_str == "" then - player_api.set_base_textures(player) + playerz.set_base_textures(player) end local base_texture = minetest.deserialize(base_texture_str) return base_texture end -function player_api.set_base_texture(player, base_texture) +function playerz.set_base_texture(player, base_texture) local meta = player:get_meta() meta:set_string("base_texture", minetest.serialize(base_texture)) end -function player_api.create_base_texture(gender) +function playerz.create_base_texture(gender) local base_texture = {} local hair_color = hair_colors_redux[math.random(#hair_colors_redux)] - local eye_color = "player_"..player_api.eye_colors[math.random(#player_api.eye_colors)].."_eye.png" + local eye_color = "player_"..playerz.eye_colors[math.random(#playerz.eye_colors)].."_eye.png" if gender == "male" then base_texture["eyebrowns"] = {texture = nil, color = nil} base_texture["eye"] = eye_color @@ -85,20 +85,20 @@ function player_api.create_base_texture(gender) return base_texture end -function player_api.set_base_textures(player) +function playerz.set_base_textures(player) local meta = player:get_meta() local gender = meta:get_string("gender") - local base_texture = player_api.create_base_texture(gender) - player_api.set_base_texture(player, base_texture) + local base_texture = playerz.create_base_texture(gender) + playerz.set_base_texture(player, base_texture) end local function colorize_texture(base_texture, what, texture) if base_texture[what]["color"] then local value if what == "skin" then - value = player_api.skin_colors[base_texture[what]["color"]] + value = playerz.skin_colors[base_texture[what]["color"]] else --"hair" - value = player_api.hair_colors[base_texture[what]["color"]] + value = playerz.hair_colors[base_texture[what]["color"]] end if value and value.color then return texture .. "\\^\\[colorize\\:\\"..value.color.."\\:"..tostring(value.ratio) @@ -110,7 +110,7 @@ local function colorize_texture(base_texture, what, texture) end end -function player_api.compose_base_texture(base_texture, def) +function playerz.compose_base_texture(base_texture, def) local texture = colorize_texture(base_texture, "skin", "[combine:"..def.canvas_size..":0,0="..def.skin_texture) diff --git a/mods/player_api/cloths.lua b/mods/playerz/cloths.lua similarity index 76% rename from mods/player_api/cloths.lua rename to mods/playerz/cloths.lua index 6f47114..9888aa7 100644 --- a/mods/player_api/cloths.lua +++ b/mods/playerz/cloths.lua @@ -1,6 +1,6 @@ -local S = minetest.get_translator("player_api") +local S = minetest.get_translator("playerz") -function player_api.has_cloths(player) +function playerz.has_cloths(player) local inv = player:get_inventory() if inv:is_empty("cloths") then return false @@ -9,7 +9,7 @@ function player_api.has_cloths(player) end end -function player_api.register_cloth(name, def) +function playerz.register_cloth(name, def) if not(def.inventory_image) then def.wield_image = def.texture end @@ -57,7 +57,7 @@ function player_api.register_cloth(name, def) }) end -player_api.register_cloth("player_api:cloth_female_upper_default", { +playerz.register_cloth("playerz:cloth_female_upper_default", { description = S("Purple Stripe Summer T-shirt"), inventory_image = "cloth_female_upper_default_inv.png", wield_image = "cloth_female_upper_default.png", @@ -67,7 +67,7 @@ player_api.register_cloth("player_api:cloth_female_upper_default", { groups = {cloth = 2}, }) -player_api.register_cloth("player_api:cloth_female_lower_default", { +playerz.register_cloth("playerz:cloth_female_lower_default", { description = S("Fresh Summer Denim Shorts"), inventory_image = "cloth_female_lower_default_inv.png", wield_image = "cloth_female_lower_default_inv.png", @@ -77,7 +77,7 @@ player_api.register_cloth("player_api:cloth_female_lower_default", { groups = {cloth = 3}, }) -player_api.register_cloth("player_api:cloth_unisex_footwear_default", { +playerz.register_cloth("playerz:cloth_unisex_footwear_default", { description = S("Common Black Shoes"), inventory_image = "cloth_unisex_footwear_default_inv.png", wield_image = "cloth_unisex_footwear_default_inv.png", @@ -87,7 +87,7 @@ player_api.register_cloth("player_api:cloth_unisex_footwear_default", { groups = {cloth = 4}, }) -player_api.register_cloth("player_api:cloth_female_head_default", { +playerz.register_cloth("playerz:cloth_female_head_default", { description = S("Pink Bow"), inventory_image = "cloth_female_head_default_inv.png", wield_image = "cloth_female_head_default_inv.png", @@ -97,7 +97,7 @@ player_api.register_cloth("player_api:cloth_female_head_default", { groups = {cloth = 1}, }) -player_api.register_cloth("player_api:cloth_male_upper_default", { +playerz.register_cloth("playerz:cloth_male_upper_default", { description = S("Classic Green Sweater"), inventory_image = "cloth_male_upper_default_inv.png", wield_image = "cloth_male_upper_default_inv.png", @@ -107,7 +107,7 @@ player_api.register_cloth("player_api:cloth_male_upper_default", { groups = {cloth = 2}, }) -player_api.register_cloth("player_api:cloth_male_lower_default", { +playerz.register_cloth("playerz:cloth_male_lower_default", { description = S("Fine Blue Pants"), inventory_image = "cloth_male_lower_default_inv.png", wield_image = "cloth_male_lower_default_inv.png", @@ -117,31 +117,31 @@ player_api.register_cloth("player_api:cloth_male_lower_default", { groups = {cloth = 3}, }) -function player_api.set_cloths(player) +function playerz.set_cloths(player) local gender = player:get_meta():get_string("gender") --Create the "cloths" inventory local inv = player:get_inventory() inv:set_size("cloths", 8) if gender == "male" then - inv:add_item("cloths", 'player_api:cloth_male_upper_default') - inv:add_item("cloths", 'player_api:cloth_male_lower_default') + inv:add_item("cloths", 'playerz:cloth_male_upper_default') + inv:add_item("cloths", 'playerz:cloth_male_lower_default') else - inv:add_item("cloths", 'player_api:cloth_female_head_default') - inv:add_item("cloths", 'player_api:cloth_female_upper_default') - inv:add_item("cloths", 'player_api:cloth_female_lower_default') + inv:add_item("cloths", 'playerz:cloth_female_head_default') + inv:add_item("cloths", 'playerz:cloth_female_upper_default') + inv:add_item("cloths", 'playerz:cloth_female_lower_default') end - inv:add_item("cloths", 'player_api:cloth_unisex_footwear_default') + inv:add_item("cloths", 'playerz:cloth_unisex_footwear_default') end -player_api.cloth_pos = { +playerz.cloth_pos = { "18,0", "12,12", "0,12", "0,12", } -function player_api.compose_cloth(player) +function playerz.compose_cloth(player) local inv = player:get_inventory() local inv_list = inv:get_list("cloths") local upper_ItemStack, lower_ItemStack, footwear_ItemStack, head_ItemStack @@ -170,8 +170,8 @@ function player_api.compose_cloth(player) if not(underwear) then lower_ItemStack = "cloth_lower_underwear_default.png" end - local _base_texture = player_api.get_base_texture_table(player) - local base_texture = player_api.compose_base_texture(_base_texture, { + local _base_texture = playerz.get_base_texture_table(player) + local base_texture = playerz.compose_base_texture(_base_texture, { canvas_size ="48x20", skin_texture = "player_skin.png", eyebrowns_pos = "6,6", @@ -183,16 +183,16 @@ function player_api.compose_cloth(player) }) local cloth = base_texture.."^".."[combine:48x20:0,0=" if head_ItemStack then - cloth = cloth .. ":"..player_api.cloth_pos[1].."="..head_ItemStack + cloth = cloth .. ":"..playerz.cloth_pos[1].."="..head_ItemStack end if upper_ItemStack then - cloth = cloth .. ":"..player_api.cloth_pos[2].."="..upper_ItemStack + cloth = cloth .. ":"..playerz.cloth_pos[2].."="..upper_ItemStack end if lower_ItemStack then - cloth = cloth .. ":"..player_api.cloth_pos[3].."="..lower_ItemStack + cloth = cloth .. ":"..playerz.cloth_pos[3].."="..lower_ItemStack end if footwear_ItemStack then - cloth = cloth .. ":"..player_api.cloth_pos[4].."="..footwear_ItemStack + cloth = cloth .. ":"..playerz.cloth_pos[4].."="..footwear_ItemStack end --Now attached cloth if not(next(attached_cloth) == nil) then @@ -200,7 +200,7 @@ function player_api.compose_cloth(player) local attached_item_name = attached_cloth[i] local attached_itemstack = minetest.registered_items[attached_item_name] local attached_cloth_type = minetest.get_item_group(attached_item_name, "cloth") - cloth = cloth .. ":"..player_api.cloth_pos[attached_cloth_type].."="..attached_itemstack._cloth_texture + cloth = cloth .. ":"..playerz.cloth_pos[attached_cloth_type].."="..attached_itemstack._cloth_texture end end return cloth diff --git a/mods/player_api/init.lua b/mods/playerz/init.lua similarity index 60% rename from mods/player_api/init.lua rename to mods/playerz/init.lua index db3a94f..4b876c8 100644 --- a/mods/player_api/init.lua +++ b/mods/playerz/init.lua @@ -1,11 +1,11 @@ -- player/init.lua -dofile(minetest.get_modpath("player_api") .. "/api.lua") -dofile(minetest.get_modpath("player_api") .. "/base_texture.lua") -dofile(minetest.get_modpath("player_api") .. "/cloths.lua") +dofile(minetest.get_modpath("playerz") .. "/api.lua") +dofile(minetest.get_modpath("playerz") .. "/base_texture.lua") +dofile(minetest.get_modpath("playerz") .. "/cloths.lua") -- Default player appearance -player_api.register_model("character.b3d", { +playerz.register_model("character.b3d", { animation_speed = 30, textures = {"character.png"}, animations = { @@ -29,19 +29,19 @@ player_api.register_model("character.b3d", { -- Update appearance when the player joins minetest.register_on_joinplayer(function(player) local player_name = player:get_player_name() - player_api.player_attached[player_name] = false - local gender = player_api.get_gender(player) + playerz.player_attached[player_name] = false + local gender = playerz.get_gender(player) if minetest.get_modpath("ptol") ~= nil then if player:get_meta():get_int("ptol:level") == 0 then player:get_meta():set_int("ptol:level", 4) end end if gender == "" then - player_api.select_gender(player_name) --select the gender + playerz.select_gender(player_name) --select the gender else - local cloth = player_api.compose_cloth(player) - player_api.registered_models[player_api.get_gender_model(gender)].textures[1] = cloth - player_api.set_model(player, player_api.get_gender_model(gender)) + local cloth = playerz.compose_cloth(player) + playerz.registered_models[playerz.get_gender_model(gender)].textures[1] = cloth + playerz.set_model(player, playerz.get_gender_model(gender)) end -- Set formspec prepend local formspec = [[ @@ -50,6 +50,6 @@ minetest.register_on_joinplayer(function(player) ]] player:set_formspec_prepend(formspec) -- Set hotbar textures - player:hud_set_hotbar_image("player_api_hotbar.png") - player:hud_set_hotbar_selected_image("player_api_hotbar_selected.png") + player:hud_set_hotbar_image("playerz_hotbar.png") + player:hud_set_hotbar_selected_image("playerz_hotbar_selected.png") end) diff --git a/mods/player_api/license.txt b/mods/playerz/license.txt similarity index 100% rename from mods/player_api/license.txt rename to mods/playerz/license.txt diff --git a/mods/player_api/locale/player_api.de.tr b/mods/playerz/locale/playerz.de.tr similarity index 73% rename from mods/player_api/locale/player_api.de.tr rename to mods/playerz/locale/playerz.de.tr index d66ba50..ae7e298 100644 --- a/mods/player_api/locale/player_api.de.tr +++ b/mods/playerz/locale/playerz.de.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Wählen Sie Ihr Geschlecht Male=Mann Female=Frau diff --git a/mods/player_api/locale/player_api.es.tr b/mods/playerz/locale/playerz.es.tr similarity index 95% rename from mods/player_api/locale/player_api.es.tr rename to mods/playerz/locale/playerz.es.tr index c8a500c..8fc4ec1 100644 --- a/mods/player_api/locale/player_api.es.tr +++ b/mods/playerz/locale/playerz.es.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Selecciona tu género Male=Hombre Female=Mujer diff --git a/mods/player_api/locale/player_api.fr.tr b/mods/playerz/locale/playerz.fr.tr similarity index 72% rename from mods/player_api/locale/player_api.fr.tr rename to mods/playerz/locale/playerz.fr.tr index 8e6da96..12cf877 100644 --- a/mods/player_api/locale/player_api.fr.tr +++ b/mods/playerz/locale/playerz.fr.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Choisissez votre sexe Male=Homme Female=Femme diff --git a/mods/player_api/locale/player_api.it.tr b/mods/playerz/locale/playerz.it.tr similarity index 72% rename from mods/player_api/locale/player_api.it.tr rename to mods/playerz/locale/playerz.it.tr index e3e8582..202d3f9 100644 --- a/mods/player_api/locale/player_api.it.tr +++ b/mods/playerz/locale/playerz.it.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Seleziona il tuo genere Male=Uomo Female=Donna diff --git a/mods/player_api/locale/player_api.pt.tr b/mods/playerz/locale/playerz.pt.tr similarity index 73% rename from mods/player_api/locale/player_api.pt.tr rename to mods/playerz/locale/playerz.pt.tr index 52d7a18..8e25f0c 100644 --- a/mods/player_api/locale/player_api.pt.tr +++ b/mods/playerz/locale/playerz.pt.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Seleccione o seu género Male=Homem Female=Mulher diff --git a/mods/player_api/locale/player_api.ru.tr b/mods/playerz/locale/playerz.ru.tr similarity index 78% rename from mods/player_api/locale/player_api.ru.tr rename to mods/playerz/locale/playerz.ru.tr index 01a5fa9..68d1646 100644 --- a/mods/player_api/locale/player_api.ru.tr +++ b/mods/playerz/locale/playerz.ru.tr @@ -1,4 +1,4 @@ -# textdomain: player_api +# textdomain: playerz Select your gender=Выберите свой пол Male=Человек Female=Женщина diff --git a/mods/playerz/mod.conf b/mods/playerz/mod.conf new file mode 100644 index 0000000..bf7c3b0 --- /dev/null +++ b/mods/playerz/mod.conf @@ -0,0 +1,2 @@ +name = playerz +description = Minetest Game mod: playerz diff --git a/mods/player_api/models/character.b3d b/mods/playerz/models/character.b3d similarity index 100% rename from mods/player_api/models/character.b3d rename to mods/playerz/models/character.b3d diff --git a/mods/player_api/models/character.blend b/mods/playerz/models/character.blend similarity index 100% rename from mods/player_api/models/character.blend rename to mods/playerz/models/character.blend diff --git a/mods/player_api/models/character.blend1 b/mods/playerz/models/character.blend1 similarity index 100% rename from mods/player_api/models/character.blend1 rename to mods/playerz/models/character.blend1 diff --git a/mods/player_api/models/character.png b/mods/playerz/models/character.png similarity index 100% rename from mods/player_api/models/character.png rename to mods/playerz/models/character.png diff --git a/mods/player_api/models/character.png~ b/mods/playerz/models/character.png~ similarity index 100% rename from mods/player_api/models/character.png~ rename to mods/playerz/models/character.png~ diff --git a/mods/player_api/models/character_old.blend b/mods/playerz/models/character_old.blend similarity index 100% rename from mods/player_api/models/character_old.blend rename to mods/playerz/models/character_old.blend diff --git a/mods/player_api/textures/cloth_female_head_default.png b/mods/playerz/textures/cloth_female_head_default.png similarity index 100% rename from mods/player_api/textures/cloth_female_head_default.png rename to mods/playerz/textures/cloth_female_head_default.png diff --git a/mods/player_api/textures/cloth_female_head_default_inv.png b/mods/playerz/textures/cloth_female_head_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_female_head_default_inv.png rename to mods/playerz/textures/cloth_female_head_default_inv.png diff --git a/mods/player_api/textures/cloth_female_head_preview.png b/mods/playerz/textures/cloth_female_head_preview.png similarity index 100% rename from mods/player_api/textures/cloth_female_head_preview.png rename to mods/playerz/textures/cloth_female_head_preview.png diff --git a/mods/player_api/textures/cloth_female_lower_default.png b/mods/playerz/textures/cloth_female_lower_default.png similarity index 100% rename from mods/player_api/textures/cloth_female_lower_default.png rename to mods/playerz/textures/cloth_female_lower_default.png diff --git a/mods/player_api/textures/cloth_female_lower_default.png~ b/mods/playerz/textures/cloth_female_lower_default.png~ similarity index 100% rename from mods/player_api/textures/cloth_female_lower_default.png~ rename to mods/playerz/textures/cloth_female_lower_default.png~ diff --git a/mods/player_api/textures/cloth_female_lower_default_inv.png b/mods/playerz/textures/cloth_female_lower_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_female_lower_default_inv.png rename to mods/playerz/textures/cloth_female_lower_default_inv.png diff --git a/mods/player_api/textures/cloth_female_lower_preview.png b/mods/playerz/textures/cloth_female_lower_preview.png similarity index 100% rename from mods/player_api/textures/cloth_female_lower_preview.png rename to mods/playerz/textures/cloth_female_lower_preview.png diff --git a/mods/player_api/textures/cloth_female_upper_default.png b/mods/playerz/textures/cloth_female_upper_default.png similarity index 100% rename from mods/player_api/textures/cloth_female_upper_default.png rename to mods/playerz/textures/cloth_female_upper_default.png diff --git a/mods/player_api/textures/cloth_female_upper_default.png~ b/mods/playerz/textures/cloth_female_upper_default.png~ similarity index 100% rename from mods/player_api/textures/cloth_female_upper_default.png~ rename to mods/playerz/textures/cloth_female_upper_default.png~ diff --git a/mods/player_api/textures/cloth_female_upper_default_inv.png b/mods/playerz/textures/cloth_female_upper_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_female_upper_default_inv.png rename to mods/playerz/textures/cloth_female_upper_default_inv.png diff --git a/mods/player_api/textures/cloth_female_upper_preview.png b/mods/playerz/textures/cloth_female_upper_preview.png similarity index 100% rename from mods/player_api/textures/cloth_female_upper_preview.png rename to mods/playerz/textures/cloth_female_upper_preview.png diff --git a/mods/player_api/textures/cloth_lower_underwear_default.png b/mods/playerz/textures/cloth_lower_underwear_default.png similarity index 100% rename from mods/player_api/textures/cloth_lower_underwear_default.png rename to mods/playerz/textures/cloth_lower_underwear_default.png diff --git a/mods/player_api/textures/cloth_lower_underwear_preview.png b/mods/playerz/textures/cloth_lower_underwear_preview.png similarity index 100% rename from mods/player_api/textures/cloth_lower_underwear_preview.png rename to mods/playerz/textures/cloth_lower_underwear_preview.png diff --git a/mods/player_api/textures/cloth_male_lower_default.png b/mods/playerz/textures/cloth_male_lower_default.png similarity index 100% rename from mods/player_api/textures/cloth_male_lower_default.png rename to mods/playerz/textures/cloth_male_lower_default.png diff --git a/mods/player_api/textures/cloth_male_lower_default_inv.png b/mods/playerz/textures/cloth_male_lower_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_male_lower_default_inv.png rename to mods/playerz/textures/cloth_male_lower_default_inv.png diff --git a/mods/player_api/textures/cloth_male_lower_preview.png b/mods/playerz/textures/cloth_male_lower_preview.png similarity index 100% rename from mods/player_api/textures/cloth_male_lower_preview.png rename to mods/playerz/textures/cloth_male_lower_preview.png diff --git a/mods/player_api/textures/cloth_male_upper_default.png b/mods/playerz/textures/cloth_male_upper_default.png similarity index 100% rename from mods/player_api/textures/cloth_male_upper_default.png rename to mods/playerz/textures/cloth_male_upper_default.png diff --git a/mods/player_api/textures/cloth_male_upper_default.png~ b/mods/playerz/textures/cloth_male_upper_default.png~ similarity index 100% rename from mods/player_api/textures/cloth_male_upper_default.png~ rename to mods/playerz/textures/cloth_male_upper_default.png~ diff --git a/mods/player_api/textures/cloth_male_upper_default_inv.png b/mods/playerz/textures/cloth_male_upper_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_male_upper_default_inv.png rename to mods/playerz/textures/cloth_male_upper_default_inv.png diff --git a/mods/player_api/textures/cloth_male_upper_preview.png b/mods/playerz/textures/cloth_male_upper_preview.png similarity index 100% rename from mods/player_api/textures/cloth_male_upper_preview.png rename to mods/playerz/textures/cloth_male_upper_preview.png diff --git a/mods/player_api/textures/cloth_unisex_footwear_default.png b/mods/playerz/textures/cloth_unisex_footwear_default.png similarity index 100% rename from mods/player_api/textures/cloth_unisex_footwear_default.png rename to mods/playerz/textures/cloth_unisex_footwear_default.png diff --git a/mods/player_api/textures/cloth_unisex_footwear_default_inv.png b/mods/playerz/textures/cloth_unisex_footwear_default_inv.png similarity index 100% rename from mods/player_api/textures/cloth_unisex_footwear_default_inv.png rename to mods/playerz/textures/cloth_unisex_footwear_default_inv.png diff --git a/mods/player_api/textures/cloth_unisex_footwear_preview.png b/mods/playerz/textures/cloth_unisex_footwear_preview.png similarity index 100% rename from mods/player_api/textures/cloth_unisex_footwear_preview.png rename to mods/playerz/textures/cloth_unisex_footwear_preview.png diff --git a/mods/player_api/textures/player.png b/mods/playerz/textures/player.png similarity index 100% rename from mods/player_api/textures/player.png rename to mods/playerz/textures/player.png diff --git a/mods/player_api/textures/player_api_formbg.png b/mods/playerz/textures/player_api_formbg.png similarity index 100% rename from mods/player_api/textures/player_api_formbg.png rename to mods/playerz/textures/player_api_formbg.png diff --git a/mods/player_api/textures/player_back.png b/mods/playerz/textures/player_back.png similarity index 100% rename from mods/player_api/textures/player_back.png rename to mods/playerz/textures/player_back.png diff --git a/mods/player_api/textures/player_black_eye.png b/mods/playerz/textures/player_black_eye.png similarity index 100% rename from mods/player_api/textures/player_black_eye.png rename to mods/playerz/textures/player_black_eye.png diff --git a/mods/player_api/textures/player_black_eye.png~ b/mods/playerz/textures/player_black_eye.png~ similarity index 100% rename from mods/player_api/textures/player_black_eye.png~ rename to mods/playerz/textures/player_black_eye.png~ diff --git a/mods/player_api/textures/player_blue_eye.png b/mods/playerz/textures/player_blue_eye.png similarity index 100% rename from mods/player_api/textures/player_blue_eye.png rename to mods/playerz/textures/player_blue_eye.png diff --git a/mods/player_api/textures/player_blue_eye.png~ b/mods/playerz/textures/player_blue_eye.png~ similarity index 100% rename from mods/player_api/textures/player_blue_eye.png~ rename to mods/playerz/textures/player_blue_eye.png~ diff --git a/mods/player_api/textures/player_brown_eye.png b/mods/playerz/textures/player_brown_eye.png similarity index 100% rename from mods/player_api/textures/player_brown_eye.png rename to mods/playerz/textures/player_brown_eye.png diff --git a/mods/player_api/textures/player_brown_eye.png~ b/mods/playerz/textures/player_brown_eye.png~ similarity index 100% rename from mods/player_api/textures/player_brown_eye.png~ rename to mods/playerz/textures/player_brown_eye.png~ diff --git a/mods/player_api/textures/player_eyebrowns_default.png b/mods/playerz/textures/player_eyebrowns_default.png similarity index 100% rename from mods/player_api/textures/player_eyebrowns_default.png rename to mods/playerz/textures/player_eyebrowns_default.png diff --git a/mods/player_api/textures/player_eyebrowns_default.png-autosave.kra b/mods/playerz/textures/player_eyebrowns_default.png-autosave.kra similarity index 100% rename from mods/player_api/textures/player_eyebrowns_default.png-autosave.kra rename to mods/playerz/textures/player_eyebrowns_default.png-autosave.kra diff --git a/mods/player_api/textures/player_eyebrowns_default.png~ b/mods/playerz/textures/player_eyebrowns_default.png~ similarity index 100% rename from mods/player_api/textures/player_eyebrowns_default.png~ rename to mods/playerz/textures/player_eyebrowns_default.png~ diff --git a/mods/player_api/textures/player_face_skin.png b/mods/playerz/textures/player_face_skin.png similarity index 100% rename from mods/player_api/textures/player_face_skin.png rename to mods/playerz/textures/player_face_skin.png diff --git a/mods/player_api/textures/player_female_face.png b/mods/playerz/textures/player_female_face.png similarity index 100% rename from mods/player_api/textures/player_female_face.png rename to mods/playerz/textures/player_female_face.png diff --git a/mods/player_api/textures/player_female_face.png~ b/mods/playerz/textures/player_female_face.png~ similarity index 100% rename from mods/player_api/textures/player_female_face.png~ rename to mods/playerz/textures/player_female_face.png~ diff --git a/mods/player_api/textures/player_female_hair_default.png b/mods/playerz/textures/player_female_hair_default.png similarity index 100% rename from mods/player_api/textures/player_female_hair_default.png rename to mods/playerz/textures/player_female_hair_default.png diff --git a/mods/player_api/textures/player_female_hair_default.png~ b/mods/playerz/textures/player_female_hair_default.png~ similarity index 100% rename from mods/player_api/textures/player_female_hair_default.png~ rename to mods/playerz/textures/player_female_hair_default.png~ diff --git a/mods/player_api/textures/player_female_hair_default_preview.png b/mods/playerz/textures/player_female_hair_default_preview.png similarity index 100% rename from mods/player_api/textures/player_female_hair_default_preview.png rename to mods/playerz/textures/player_female_hair_default_preview.png diff --git a/mods/player_api/textures/player_female_mouth_default.png b/mods/playerz/textures/player_female_mouth_default.png similarity index 100% rename from mods/player_api/textures/player_female_mouth_default.png rename to mods/playerz/textures/player_female_mouth_default.png diff --git a/mods/player_api/textures/player_female_mouth_default.png~ b/mods/playerz/textures/player_female_mouth_default.png~ similarity index 100% rename from mods/player_api/textures/player_female_mouth_default.png~ rename to mods/playerz/textures/player_female_mouth_default.png~ diff --git a/mods/player_api/textures/player_gray_eye.png b/mods/playerz/textures/player_gray_eye.png similarity index 100% rename from mods/player_api/textures/player_gray_eye.png rename to mods/playerz/textures/player_gray_eye.png diff --git a/mods/player_api/textures/player_gray_eye.png~ b/mods/playerz/textures/player_gray_eye.png~ similarity index 100% rename from mods/player_api/textures/player_gray_eye.png~ rename to mods/playerz/textures/player_gray_eye.png~ diff --git a/mods/player_api/textures/player_green_eye.png b/mods/playerz/textures/player_green_eye.png similarity index 100% rename from mods/player_api/textures/player_green_eye.png rename to mods/playerz/textures/player_green_eye.png diff --git a/mods/player_api/textures/player_green_eye.png~ b/mods/playerz/textures/player_green_eye.png~ similarity index 100% rename from mods/player_api/textures/player_green_eye.png~ rename to mods/playerz/textures/player_green_eye.png~ diff --git a/mods/player_api/textures/player_hazel_eye.png b/mods/playerz/textures/player_hazel_eye.png similarity index 100% rename from mods/player_api/textures/player_hazel_eye.png rename to mods/playerz/textures/player_hazel_eye.png diff --git a/mods/player_api/textures/player_hazel_eye.png~ b/mods/playerz/textures/player_hazel_eye.png~ similarity index 100% rename from mods/player_api/textures/player_hazel_eye.png~ rename to mods/playerz/textures/player_hazel_eye.png~ diff --git a/mods/player_api/textures/player_male_face.png b/mods/playerz/textures/player_male_face.png similarity index 100% rename from mods/player_api/textures/player_male_face.png rename to mods/playerz/textures/player_male_face.png diff --git a/mods/player_api/textures/player_male_face.png~ b/mods/playerz/textures/player_male_face.png~ similarity index 100% rename from mods/player_api/textures/player_male_face.png~ rename to mods/playerz/textures/player_male_face.png~ diff --git a/mods/player_api/textures/player_male_hair_default.png b/mods/playerz/textures/player_male_hair_default.png similarity index 100% rename from mods/player_api/textures/player_male_hair_default.png rename to mods/playerz/textures/player_male_hair_default.png diff --git a/mods/player_api/textures/player_male_hair_default.png~ b/mods/playerz/textures/player_male_hair_default.png~ similarity index 100% rename from mods/player_api/textures/player_male_hair_default.png~ rename to mods/playerz/textures/player_male_hair_default.png~ diff --git a/mods/player_api/textures/player_male_hair_default_preview.png b/mods/playerz/textures/player_male_hair_default_preview.png similarity index 100% rename from mods/player_api/textures/player_male_hair_default_preview.png rename to mods/playerz/textures/player_male_hair_default_preview.png diff --git a/mods/player_api/textures/player_male_mouth_default.png b/mods/playerz/textures/player_male_mouth_default.png similarity index 100% rename from mods/player_api/textures/player_male_mouth_default.png rename to mods/playerz/textures/player_male_mouth_default.png diff --git a/mods/player_api/textures/player_pink_eye.png b/mods/playerz/textures/player_pink_eye.png similarity index 100% rename from mods/player_api/textures/player_pink_eye.png rename to mods/playerz/textures/player_pink_eye.png diff --git a/mods/player_api/textures/player_pink_eye.png~ b/mods/playerz/textures/player_pink_eye.png~ similarity index 100% rename from mods/player_api/textures/player_pink_eye.png~ rename to mods/playerz/textures/player_pink_eye.png~ diff --git a/mods/player_api/textures/player_red_eye.png b/mods/playerz/textures/player_red_eye.png similarity index 100% rename from mods/player_api/textures/player_red_eye.png rename to mods/playerz/textures/player_red_eye.png diff --git a/mods/player_api/textures/player_red_eye.png~ b/mods/playerz/textures/player_red_eye.png~ similarity index 100% rename from mods/player_api/textures/player_red_eye.png~ rename to mods/playerz/textures/player_red_eye.png~ diff --git a/mods/player_api/textures/player_skin.png b/mods/playerz/textures/player_skin.png similarity index 100% rename from mods/player_api/textures/player_skin.png rename to mods/playerz/textures/player_skin.png diff --git a/mods/player_api/textures/player_violet_eye.png b/mods/playerz/textures/player_violet_eye.png similarity index 100% rename from mods/player_api/textures/player_violet_eye.png rename to mods/playerz/textures/player_violet_eye.png diff --git a/mods/player_api/textures/player_violet_eye.png~ b/mods/playerz/textures/player_violet_eye.png~ similarity index 100% rename from mods/player_api/textures/player_violet_eye.png~ rename to mods/playerz/textures/player_violet_eye.png~ diff --git a/mods/player_api/textures/player_api_hotbar.png b/mods/playerz/textures/playerz_hotbar.png similarity index 100% rename from mods/player_api/textures/player_api_hotbar.png rename to mods/playerz/textures/playerz_hotbar.png diff --git a/mods/player_api/textures/player_api_hotbar_selected.png b/mods/playerz/textures/playerz_hotbar_selected.png similarity index 100% rename from mods/player_api/textures/player_api_hotbar_selected.png rename to mods/playerz/textures/playerz_hotbar_selected.png diff --git a/mods/sound/sounds/nodez_cool_lava.1.ogg b/mods/sound/sounds/nodez_cool_lava.1.ogg new file mode 100644 index 0000000..42506dd Binary files /dev/null and b/mods/sound/sounds/nodez_cool_lava.1.ogg differ diff --git a/mods/sound/sounds/nodez_cool_lava.2.ogg b/mods/sound/sounds/nodez_cool_lava.2.ogg new file mode 100644 index 0000000..2747ab8 Binary files /dev/null and b/mods/sound/sounds/nodez_cool_lava.2.ogg differ diff --git a/mods/sound/sounds/nodez_cool_lava.3.ogg b/mods/sound/sounds/nodez_cool_lava.3.ogg new file mode 100644 index 0000000..8baeac3 Binary files /dev/null and b/mods/sound/sounds/nodez_cool_lava.3.ogg differ diff --git a/mods/testnodes/README.md b/mods/testnodes/README.md deleted file mode 100644 index 13ed972..0000000 --- a/mods/testnodes/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Test Nodes - -This mod contains a bunch of basic nodes to test development stuff. -Most nodes are kept as minimal as possible in order to show off one particular feature of the engine, to make testing stuff easier. - -This mod includes tests for: - -* drawtypes -* paramtype2's -* node properties such as damage, drowning, falling, etc. -* other random stuff diff --git a/mods/testnodes/drawtypes.lua b/mods/testnodes/drawtypes.lua deleted file mode 100644 index 208774f..0000000 --- a/mods/testnodes/drawtypes.lua +++ /dev/null @@ -1,629 +0,0 @@ ---[[ Drawtype Test: This file tests out and provides examples for -all drawtypes in Minetest. It is attempted to keep the node -definitions as simple and minimal as possible to keep -side-effects to a minimum. - -How to read the node definitions: -There are two parts which are separated by 2 newlines: -The first part contains the things that are more or less essential -for defining the drawtype (except description, which is -at the top for readability). -The second part (after the 2 newlines) contains stuff that are -unrelated to the drawtype, stuff that is mostly there to make -testing this node easier and more convenient. -]] - -local S = minetest.get_translator("testnodes") - --- A regular cube -minetest.register_node("testnodes:normal", { - description = S("Normal Drawtype Test Node"), - drawtype = "normal", - tiles = { "testnodes_normal.png" }, - - groups = { dig_immediate = 3 }, -}) - --- Standard glasslike node -minetest.register_node("testnodes:glasslike", { - description = S("Glasslike Drawtype Test Node"), - drawtype = "glasslike", - paramtype = "light", - tiles = { "testnodes_glasslike.png" }, - - groups = { dig_immediate = 3 }, -}) - --- Glasslike framed with the two textures (normal and "detail") -minetest.register_node("testnodes:glasslike_framed", { - description = S("Glasslike Framed Drawtype Test Node"), - drawtype = "glasslike_framed", - paramtype = "light", - tiles = { - "testnodes_glasslike_framed.png", - "testnodes_glasslike_detail.png", - }, - - - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - --- Like the one above, but without the "detail" texture (texture 2). --- This node was added to see how the engine behaves when the "detail" texture --- is missing. -minetest.register_node("testnodes:glasslike_framed_no_detail", { - description = S("Glasslike Framed without Detail Drawtype Test Node"), - drawtype = "glasslike_framed", - paramtype = "light", - tiles = { "testnodes_glasslike_framed2.png" }, - - - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - - -minetest.register_node("testnodes:glasslike_framed_optional", { - description = S("Glasslike Framed Optional Drawtype Test Node"), - drawtype = "glasslike_framed_optional", - paramtype = "light", - tiles = { - "testnodes_glasslike_framed_optional.png", - "testnodes_glasslike_detail.png", - }, - - - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - - - -minetest.register_node("testnodes:allfaces", { - description = S("Allfaces Drawtype Test Node"), - drawtype = "allfaces", - paramtype = "light", - tiles = { "testnodes_allfaces.png" }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:allfaces_optional", { - description = S("Allfaces Optional Drawtype Test Node"), - drawtype = "allfaces_optional", - paramtype = "light", - tiles = { "testnodes_allfaces_optional.png" }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:allfaces_optional_waving", { - description = S("Waving Allfaces Optional Drawtype Test Node"), - drawtype = "allfaces_optional", - paramtype = "light", - tiles = { "testnodes_allfaces_optional.png^[brighten" }, - waving = 2, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:firelike", { - description = S("Firelike Drawtype Test Node"), - drawtype = "firelike", - paramtype = "light", - tiles = { "testnodes_firelike.png" }, - - - walkable = false, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:fencelike", { - description = S("Fencelike Drawtype Test Node"), - drawtype = "fencelike", - paramtype = "light", - tiles = { "testnodes_fencelike.png" }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:torchlike", { - description = S("Floor Torchlike Drawtype Test Node"), - drawtype = "torchlike", - paramtype = "light", - tiles = { "testnodes_torchlike_floor.png^[colorize:#FF0000:64" }, - - - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:torchlike_wallmounted", { - description = S("Wallmounted Torchlike Drawtype Test Node"), - drawtype = "torchlike", - paramtype = "light", - paramtype2 = "wallmounted", - tiles = { - "testnodes_torchlike_floor.png", - "testnodes_torchlike_ceiling.png", - "testnodes_torchlike_wall.png", - }, - - - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:signlike", { - description = S("Floor Signlike Drawtype Test Node"), - drawtype = "signlike", - paramtype = "light", - tiles = { "testnodes_signlike.png^[colorize:#FF0000:64" }, - - - walkable = false, - groups = { dig_immediate = 3 }, - sunlight_propagates = true, -}) - - -minetest.register_node("testnodes:signlike_wallmounted", { - description = S("Wallmounted Signlike Drawtype Test Node"), - drawtype = "signlike", - paramtype = "light", - paramtype2 = "wallmounted", - tiles = { "testnodes_signlike.png" }, - - - walkable = false, - groups = { dig_immediate = 3 }, - sunlight_propagates = true, -}) - -minetest.register_node("testnodes:plantlike", { - description = S("Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - tiles = { "testnodes_plantlike.png" }, - - - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:plantlike_waving", { - description = S("Waving Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - tiles = { "testnodes_plantlike_waving.png" }, - waving = 1, - - - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:plantlike_wallmounted", { - description = S("Wallmounted Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - paramtype2 = "wallmounted", - tiles = { "testnodes_plantlike_wallmounted.png" }, - leveled = 1, - - - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - - --- param2 will rotate -local function rotate_on_rightclick(pos, node, clicker) - local def = minetest.registered_nodes[node.name] - local aux1 = clicker:get_player_control().aux1 - - local deg, deg_max - local color, color_mult = 0, 0 - if def.paramtype2 == "degrotate" then - deg = node.param2 - deg_max = 240 - elseif def.paramtype2 == "colordegrotate" then - -- MSB [3x color, 5x rotation] LSB - deg = node.param2 % 2^5 - deg_max = 24 - color_mult = 2^5 - color = math.floor(node.param2 / color_mult) - end - - deg = (deg + (aux1 and 10 or 1)) % deg_max - node.param2 = color * color_mult + deg - minetest.swap_node(pos, node) - minetest.chat_send_player(clicker:get_player_name(), - "Rotation is now " .. deg .. " / " .. deg_max) -end - -minetest.register_node("testnodes:plantlike_degrotate", { - description = S("Degrotate Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - paramtype2 = "degrotate", - tiles = { "testnodes_plantlike_degrotate.png" }, - - on_rightclick = rotate_on_rightclick, - place_param2 = 7, - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:mesh_degrotate", { - description = S("Degrotate Mesh Drawtype Test Node"), - drawtype = "mesh", - paramtype = "light", - paramtype2 = "degrotate", - mesh = "testnodes_ocorner.obj", - tiles = { "testnodes_mesh_stripes2.png" }, - - on_rightclick = rotate_on_rightclick, - place_param2 = 10, -- 15° - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:mesh_colordegrotate", { - description = S("Color Degrotate Mesh Drawtype Test Node"), - drawtype = "mesh", - paramtype = "light", - paramtype2 = "colordegrotate", - palette = "testnodes_palette_facedir.png", - mesh = "testnodes_ocorner.obj", - tiles = { "testnodes_mesh_stripes3.png" }, - - on_rightclick = rotate_on_rightclick, - -- color index 1, 1 step (=15°) rotated - place_param2 = 1 * 2^5 + 1, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - --- param2 will change height -minetest.register_node("testnodes:plantlike_leveled", { - description = S("Leveled Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - paramtype2 = "leveled", - tiles = { - { name = "testnodes_plantlike_leveled.png", tileable_vertical = true }, - }, - - - -- We set a default param2 here only for convenience, to make the "plant" visible after placement - place_param2 = 8, - walkable = false, - sunlight_propagates = true, - groups = { dig_immediate = 3 }, -}) - --- param2 changes shape -minetest.register_node("testnodes:plantlike_meshoptions", { - description = S("Meshoptions Plantlike Drawtype Test Node"), - drawtype = "plantlike", - paramtype = "light", - paramtype2 = "meshoptions", - tiles = { "testnodes_plantlike_meshoptions.png" }, - - - walkable = false, - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:plantlike_rooted", { - description = S("Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - tiles = { "testnodes_plantlike_rooted_base.png" }, - special_tiles = { "testnodes_plantlike_rooted.png" }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:plantlike_rooted_wallmounted", { - description = S("Wallmounted Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - paramtype2 = "wallmounted", - tiles = { - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base_side_wallmounted.png" }, - special_tiles = { "testnodes_plantlike_rooted_wallmounted.png" }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:plantlike_rooted_waving", { - description = S("Waving Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - tiles = { - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base_side_waving.png", - }, - special_tiles = { "testnodes_plantlike_rooted_waving.png" }, - waving = 1, - - groups = { dig_immediate = 3 }, -}) - --- param2 changes height -minetest.register_node("testnodes:plantlike_rooted_leveled", { - description = S("Leveled Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - paramtype2 = "leveled", - tiles = { - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base_side_leveled.png", - }, - special_tiles = { - { name = "testnodes_plantlike_rooted_leveled.png", tileable_vertical = true }, - }, - - - -- We set a default param2 here only for convenience, to make the "plant" visible after placement - place_param2 = 8, - groups = { dig_immediate = 3 }, -}) - --- param2 changes shape -minetest.register_node("testnodes:plantlike_rooted_meshoptions", { - description = S("Meshoptions Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - paramtype2 = "meshoptions", - tiles = { - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base_side_meshoptions.png", - }, - special_tiles = { - "testnodes_plantlike_rooted_meshoptions.png", - }, - - groups = { dig_immediate = 3 }, -}) - --- param2 changes rotation -minetest.register_node("testnodes:plantlike_rooted_degrotate", { - description = S("Degrotate Rooted Plantlike Drawtype Test Node"), - drawtype = "plantlike_rooted", - paramtype = "light", - paramtype2 = "degrotate", - tiles = { - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base.png", - "testnodes_plantlike_rooted_base_side_degrotate.png", - }, - special_tiles = { - "testnodes_plantlike_rooted_degrotate.png", - }, - - groups = { dig_immediate = 3 }, -}) - --- Demonstrative liquid nodes, source and flowing form. --- DRAWTYPE ONLY, NO LIQUID PHYSICS! --- Liquid ranges 0 to 8 -for r = 0, 8 do - minetest.register_node("testnodes:liquid_"..r, { - description = S("Source Liquid Drawtype Test Node, Range @1", r), - drawtype = "liquid", - paramtype = "light", - tiles = { - "testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", - }, - special_tiles = { - {name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false}, - {name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=true}, - }, - use_texture_alpha = "blend", - - - walkable = false, - liquid_range = r, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquid_flowing_"..r, - liquid_alternative_source = "testnodes:liquid_"..r, - groups = { dig_immediate = 3 }, - }) - minetest.register_node("testnodes:liquid_flowing_"..r, { - description = S("Flowing Liquid Drawtype Test Node, Range @1", r), - drawtype = "flowingliquid", - paramtype = "light", - paramtype2 = "flowingliquid", - tiles = { - "testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", - }, - special_tiles = { - {name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false}, - {name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false}, - }, - use_texture_alpha = "blend", - - - walkable = false, - liquid_range = r, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquid_flowing_"..r, - liquid_alternative_source = "testnodes:liquid_"..r, - groups = { dig_immediate = 3 }, - }) - -end - --- Waving liquid test (drawtype only) -minetest.register_node("testnodes:liquid_waving", { - description = S("Waving Source Liquid Drawtype Test Node"), - drawtype = "liquid", - paramtype = "light", - tiles = { - "testnodes_liquidsource.png^[colorize:#0000FF:127", - }, - special_tiles = { - {name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=false}, - {name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=true}, - }, - use_texture_alpha = "blend", - waving = 3, - - - walkable = false, - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquid_flowing_waving", - liquid_alternative_source = "testnodes:liquid_waving", - groups = { dig_immediate = 3 }, -}) -minetest.register_node("testnodes:liquid_flowing_waving", { - description = S("Waving Flowing Liquid Drawtype Test Node"), - drawtype = "flowingliquid", - paramtype = "light", - paramtype2 = "flowingliquid", - tiles = { - "testnodes_liquidflowing.png^[colorize:#0000FF:127", - }, - special_tiles = { - {name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false}, - {name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false}, - }, - use_texture_alpha = "blend", - waving = 3, - - - walkable = false, - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquid_flowing_waving", - liquid_alternative_source = "testnodes:liquid_waving", - groups = { dig_immediate = 3 }, -}) - --- Invisible node -minetest.register_node("testnodes:airlike", { - description = S("Airlike Drawtype Test Node"), - drawtype = "airlike", - paramtype = "light", - - - walkable = false, - groups = { dig_immediate = 3 }, - sunlight_propagates = true, -}) - --- param2 changes liquid height -minetest.register_node("testnodes:glassliquid", { - description = S("Glasslike Liquid Level Drawtype Test Node"), - drawtype = "glasslike_framed", - paramtype = "light", - paramtype2 = "glasslikeliquidlevel", - tiles = { - "testnodes_glasslikeliquid.png", - }, - special_tiles = { - "testnodes_liquid.png", - }, - - groups = { dig_immediate = 3 }, -}) - --- Adding many raillike examples, primarily to demonstrate the behavior of --- "raillike groups". Nodes of the same type (rail, groupless, line, street) --- should connect to nodes of the same "rail type" (=same shape, different --- color) only. -local rails = { - { "rail", {"testnodes_rail_straight.png", "testnodes_rail_curved.png", "testnodes_rail_t_junction.png", "testnodes_rail_crossing.png"} }, - { "line", {"testnodes_line_straight.png", "testnodes_line_curved.png", "testnodes_line_t_junction.png", "testnodes_line_crossing.png"}, }, - { "street", {"testnodes_street_straight.png", "testnodes_street_curved.png", "testnodes_street_t_junction.png", "testnodes_street_crossing.png"}, }, - -- the "groupless" nodes are nodes in which the "connect_to_raillike" group is not set - { "groupless", {"testnodes_rail2_straight.png", "testnodes_rail2_curved.png", "testnodes_rail2_t_junction.png", "testnodes_rail2_crossing.png"} }, -} -local colors = { "", "cyan", "red" } - -for r=1, #rails do - local id = rails[r][1] - local tiles = rails[r][2] - local raillike_group - if id ~= "groupless" then - raillike_group = minetest.raillike_group(id) - end - for c=1, #colors do - local color - if colors[c] ~= "" then - color = colors[c] - end - minetest.register_node("testnodes:raillike_"..id..c, { - description = S("Raillike Drawtype Test Node: @1 @2", id, c), - drawtype = "raillike", - paramtype = "light", - tiles = tiles, - groups = { connect_to_raillike = raillike_group, dig_immediate = 3 }, - - - color = color, - selection_box = { - type = "fixed", - fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}}, - }, - sunlight_propagates = true, - walkable = false, - }) - end -end - - - --- Add visual_scale variants of previous nodes for half and double size -local scale = function(subname, desc_double, desc_half) - local original = "testnodes:"..subname - local def = table.copy(minetest.registered_items[original]) - def.visual_scale = 2.0 - def.description = desc_double - minetest.register_node("testnodes:"..subname.."_double", def) - def = table.copy(minetest.registered_items[original]) - def.visual_scale = 0.5 - def.description = desc_half - minetest.register_node("testnodes:"..subname.."_half", def) -end - -scale("allfaces", - S("Double-sized Allfaces Drawtype Test Node"), - S("Half-sized Allfaces Drawtype Test Node")) -scale("allfaces_optional", - S("Double-sized Allfaces Optional Drawtype Test Node"), - S("Half-sized Allfaces Optional Drawtype Test Node")) -scale("allfaces_optional_waving", - S("Double-sized Waving Allfaces Optional Drawtype Test Node"), - S("Half-sized Waving Allfaces Optional Drawtype Test Node")) -scale("plantlike", - S("Double-sized Plantlike Drawtype Test Node"), - S("Half-sized Plantlike Drawtype Test Node")) -scale("plantlike_wallmounted", - S("Double-sized Wallmounted Plantlike Drawtype Test Node"), - S("Half-sized Wallmounted Plantlike Drawtype Test Node")) -scale("torchlike_wallmounted", - S("Double-sized Wallmounted Torchlike Drawtype Test Node"), - S("Half-sized Wallmounted Torchlike Drawtype Test Node")) -scale("signlike_wallmounted", - S("Double-sized Wallmounted Signlike Drawtype Test Node"), - S("Half-sized Wallmounted Signlike Drawtype Test Node")) -scale("firelike", - S("Double-sized Firelike Drawtype Test Node"), - S("Half-sized Firelike Drawtype Test Node")) diff --git a/mods/testnodes/init.lua b/mods/testnodes/init.lua deleted file mode 100644 index 92e2c56..0000000 --- a/mods/testnodes/init.lua +++ /dev/null @@ -1,10 +0,0 @@ -local path = minetest.get_modpath(minetest.get_current_modname()) - -dofile(path.."/drawtypes.lua") -dofile(path.."/meshes.lua") -dofile(path.."/nodeboxes.lua") -dofile(path.."/param2.lua") -dofile(path.."/properties.lua") -dofile(path.."/liquids.lua") -dofile(path.."/light.lua") -dofile(path.."/textures.lua") diff --git a/mods/testnodes/light.lua b/mods/testnodes/light.lua deleted file mode 100644 index 8ab4416..0000000 --- a/mods/testnodes/light.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Test Nodes: Light test - -local S = minetest.get_translator("testnodes") - --- All possible light levels -for i=1, minetest.LIGHT_MAX do - minetest.register_node("testnodes:light"..i, { - description = S("Light Source (@1)", i), - paramtype = "light", - light_source = i, - - - tiles ={"testnodes_light_"..i..".png"}, - drawtype = "glasslike", - walkable = false, - sunlight_propagates = true, - is_ground_content = false, - groups = {dig_immediate=3}, - }) -end - --- Lets light through, but not sunlight, leading to a --- reduction in light level when light passes through -minetest.register_node("testnodes:sunlight_filter", { - description = S("Sunlight Filter") .."\n".. - S("Lets light through, but weakens sunlight"), - paramtype = "light", - - - drawtype = "glasslike", - tiles = { - "testnodes_sunlight_filter.png", - }, - groups = { dig_immediate = 3 }, -}) - --- Lets light and sunlight through without obstruction -minetest.register_node("testnodes:sunlight_propagator", { - description = S("Sunlight Propagator") .."\n".. - S("Lets all light through"), - paramtype = "light", - sunlight_propagates = true, - - - drawtype = "glasslike", - tiles = { - "testnodes_sunlight_filter.png^[brighten", - }, - groups = { dig_immediate = 3 }, -}) diff --git a/mods/testnodes/liquids.lua b/mods/testnodes/liquids.lua deleted file mode 100644 index be33814..0000000 --- a/mods/testnodes/liquids.lua +++ /dev/null @@ -1,134 +0,0 @@ --- Add liquids for ranges and viscosity levels 0-8 - -for d=0, 8 do - minetest.register_node("testnodes:rliquid_"..d, { - description = "Test Liquid Source, Range "..d, - drawtype = "liquid", - tiles = {"testnodes_liquidsource_r"..d..".png"}, - special_tiles = { - {name = "testnodes_liquidsource_r"..d..".png", backface_culling = false}, - {name = "testnodes_liquidsource_r"..d..".png", backface_culling = true}, - }, - use_texture_alpha = "blend", - paramtype = "light", - walkable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "source", - liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d, - liquid_alternative_source = "testnodes:rliquid_"..d, - liquid_range = d, - }) - - minetest.register_node("testnodes:rliquid_flowing_"..d, { - description = "Flowing Test Liquid, Range "..d, - drawtype = "flowingliquid", - tiles = {"testnodes_liquidflowing_r"..d..".png"}, - special_tiles = { - {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false}, - {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false}, - }, - use_texture_alpha = "blend", - paramtype = "light", - paramtype2 = "flowingliquid", - walkable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "flowing", - liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d, - liquid_alternative_source = "testnodes:rliquid_"..d, - liquid_range = d, - }) - - if d <= 7 then - - local mod = "^[colorize:#000000:127" - minetest.register_node("testnodes:vliquid_"..d, { - description = "Test Liquid Source, Viscosity/Resistance "..d, - drawtype = "liquid", - tiles = {"testnodes_liquidsource_r"..d..".png"..mod}, - special_tiles = { - {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false}, - {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true}, - }, - use_texture_alpha = "blend", - paramtype = "light", - walkable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "source", - liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d, - liquid_alternative_source = "testnodes:vliquid_"..d, - liquid_viscosity = d, - }) - - minetest.register_node("testnodes:vliquid_flowing_"..d, { - description = "Flowing Test Liquid, Viscosity/Resistance "..d, - drawtype = "flowingliquid", - tiles = {"testnodes_liquidflowing_r"..d..".png"..mod}, - special_tiles = { - {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, - {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, - }, - use_texture_alpha = "blend", - paramtype = "light", - paramtype2 = "flowingliquid", - walkable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "flowing", - liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d, - liquid_alternative_source = "testnodes:vliquid_"..d, - liquid_viscosity = d, - }) - - mod = "^[colorize:#000000:192" - local v = 4 - minetest.register_node("testnodes:vrliquid_"..d, { - description = "Test Liquid Source, Viscosity "..v..", Resistance "..d, - drawtype = "liquid", - tiles = {"testnodes_liquidsource_r"..d..".png"..mod}, - special_tiles = { - {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false}, - {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true}, - }, - use_texture_alpha = "blend", - paramtype = "light", - walkable = false, - pointable = false, - diggable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "source", - liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d, - liquid_alternative_source = "testnodes:vrliquid_"..d, - liquid_viscosity = v, - move_resistance = d, - }) - - minetest.register_node("testnodes:vrliquid_flowing_"..d, { - description = "Flowing Test Liquid, Viscosity "..v..", Resistance "..d, - drawtype = "flowingliquid", - tiles = {"testnodes_liquidflowing_r"..d..".png"..mod}, - special_tiles = { - {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, - {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, - }, - use_texture_alpha = "blend", - paramtype = "light", - paramtype2 = "flowingliquid", - walkable = false, - pointable = false, - diggable = false, - buildable_to = true, - is_ground_content = false, - liquidtype = "flowing", - liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d, - liquid_alternative_source = "testnodes:vrliquid_"..d, - liquid_viscosity = v, - move_resistance = d, - }) - - end - -end diff --git a/mods/testnodes/meshes.lua b/mods/testnodes/meshes.lua deleted file mode 100644 index 900abc1..0000000 --- a/mods/testnodes/meshes.lua +++ /dev/null @@ -1,145 +0,0 @@ --- Meshes - -local S = minetest.get_translator("testnodes") - -local ocorner_cbox = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, - {-0.5, -0.25, -0.25, 0.25, 0, 0.5}, - {-0.5, 0, 0, 0, 0.25, 0.5}, - {-0.5, 0.25, 0.25, -0.25, 0.5, 0.5} - } -} - -local tall_pyr_cbox = { - type = "fixed", - fixed = { - { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }, - { -0.375, -0.25, -0.375, 0.375, 0, 0.375}, - { -0.25, 0, -0.25, 0.25, 0.25, 0.25}, - { -0.125, 0.25, -0.125, 0.125, 0.5, 0.125} - } -} - --- Normal mesh -minetest.register_node("testnodes:mesh", { - description = S("Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes2.png"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - - groups = {dig_immediate=3}, -}) - --- Facedir mesh: outer corner slope -minetest.register_node("testnodes:mesh_facedir", { - description = S("Facedir Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_ocorner.obj", - tiles = {"testnodes_mesh_stripes.png"}, - paramtype = "light", - paramtype2 = "facedir", - collision_box = ocorner_cbox, - - groups = {dig_immediate=3}, -}) - -minetest.register_node("testnodes:mesh_colorfacedir", { - description = S("Color Facedir Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_ocorner.obj", - tiles = {"testnodes_mesh_stripes3.png"}, - paramtype = "light", - paramtype2 = "colorfacedir", - palette = "testnodes_palette_facedir.png", - collision_box = ocorner_cbox, - - groups = {dig_immediate=3}, -}) - --- Wallmounted mesh: pyramid -minetest.register_node("testnodes:mesh_wallmounted", { - description = S("Wallmounted Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes2.png"}, - paramtype = "light", - paramtype2 = "wallmounted", - collision_box = tall_pyr_cbox, - - groups = {dig_immediate=3}, -}) - -minetest.register_node("testnodes:mesh_colorwallmounted", { - description = S("Color Wallmounted Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes3.png"}, - paramtype = "light", - paramtype2 = "colorwallmounted", - palette = "testnodes_palette_wallmounted.png", - collision_box = tall_pyr_cbox, - - groups = {dig_immediate=3}, -}) - - -minetest.register_node("testnodes:mesh_double", { - description = S("Double-sized Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes2.png"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - visual_scale = 2, - - groups = {dig_immediate=3}, -}) -minetest.register_node("testnodes:mesh_half", { - description = S("Half-sized Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes2.png"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - visual_scale = 0.5, - - groups = {dig_immediate=3}, -}) - -minetest.register_node("testnodes:mesh_waving1", { - description = S("Plantlike-waving Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0FFB0"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - waving = 1, - - groups = {dig_immediate=3}, -}) -minetest.register_node("testnodes:mesh_waving2", { - description = S("Leaflike-waving Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes4.png^[multiply:#FFFFB0"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - waving = 2, - - groups = {dig_immediate=3}, -}) -minetest.register_node("testnodes:mesh_waving3", { - description = S("Liquidlike-waving Mesh Test Node"), - drawtype = "mesh", - mesh = "testnodes_pyramid.obj", - tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0B0FF"}, - paramtype = "light", - collision_box = tall_pyr_cbox, - waving = 3, - - groups = {dig_immediate=3}, -}) diff --git a/mods/testnodes/mod.conf b/mods/testnodes/mod.conf deleted file mode 100644 index d894c34..0000000 --- a/mods/testnodes/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = testnodes -description = Contains a bunch of basic example nodes for demonstrative purposes, development and testing -depends = stairs diff --git a/mods/testnodes/models/testnodes_ocorner.obj b/mods/testnodes/models/testnodes_ocorner.obj deleted file mode 100644 index 231d705..0000000 --- a/mods/testnodes/models/testnodes_ocorner.obj +++ /dev/null @@ -1,23 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'slope_test_ocorner_onetexture.blend' -# www.blender.org -o Cube_Cube.002 -v 0.500000 0.500000 0.500000 -v -0.500000 -0.500000 0.500000 -v 0.500000 -0.500000 0.500000 -v -0.500000 -0.500000 -0.500000 -v 0.500000 -0.500000 -0.500000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -0.000000 1.000000 -vn -0.707100 0.707100 0.000000 -vn 0.000000 0.707100 -0.707100 -s off -f 3/1/1 2/2/1 4/3/1 5/4/1 -f 1/2/2 3/3/2 5/4/2 -f 1/1/3 2/3/3 3/4/3 -f 1/1/4 4/3/4 2/4/4 -f 1/2/5 5/3/5 4/4/5 diff --git a/mods/testnodes/models/testnodes_pyramid.obj b/mods/testnodes/models/testnodes_pyramid.obj deleted file mode 100644 index b305af2..0000000 --- a/mods/testnodes/models/testnodes_pyramid.obj +++ /dev/null @@ -1,24 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'slope_test_pyramid_onetexture.blend' -# www.blender.org -o Cube -v 0.500000 -0.500000 -0.500000 -v 0.500000 -0.500000 0.500000 -v -0.500000 -0.500000 0.500000 -v -0.500000 -0.500000 -0.500000 -v -0.000000 0.500000 -0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 0.500000 1.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.894400 0.447200 -0.000000 -vn 0.000000 0.447200 -0.894400 -vn 0.894400 0.447200 0.000000 -vn -0.000000 0.447200 0.894400 -s off -f 1/1/1 2/2/1 3/3/1 4/4/1 -f 3/4/2 5/5/2 4/3/2 -f 5/5/3 1/3/3 4/4/3 -f 1/4/4 5/5/4 2/3/4 -f 2/4/5 5/5/5 3/3/5 diff --git a/mods/testnodes/nodeboxes.lua b/mods/testnodes/nodeboxes.lua deleted file mode 100644 index 7e966fd..0000000 --- a/mods/testnodes/nodeboxes.lua +++ /dev/null @@ -1,81 +0,0 @@ -local S = minetest.get_translator("testnodes") - --- Nodebox examples and tests. - --- An simple example nodebox with one centered box -minetest.register_node("testnodes:nodebox_fixed", { - description = S("Fixed Nodebox Test Node"), - tiles = {"testnodes_nodebox.png"}, - drawtype = "nodebox", - paramtype = "light", - node_box = { - type = "fixed", - fixed = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, - }, - - groups = {dig_immediate=3}, -}) - --- 50% higher than a regular node -minetest.register_node("testnodes:nodebox_overhigh", { - description = S("+50% high Nodebox Test Node"), - tiles = {"testnodes_nodebox.png"}, - drawtype = "nodebox", - paramtype = "light", - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 1, 0.5}, - }, - - groups = {dig_immediate=3}, -}) - --- 95% higher than a regular node -minetest.register_node("testnodes:nodebox_overhigh2", { - description = S("+95% high Nodebox Test Node"), - tiles = {"testnodes_nodebox.png"}, - drawtype = "nodebox", - paramtype = "light", - node_box = { - type = "fixed", - -- Y max: more is possible, but glitchy - fixed = {-0.5, -0.5, -0.5, 0.5, 1.45, 0.5}, - }, - - groups = {dig_immediate=3}, -}) - --- Height of nodebox changes with its param2 value -minetest.register_node("testnodes:nodebox_leveled", { - description = S("Leveled Nodebox Test Node"), - tiles = {"testnodes_nodebox.png"}, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "leveled", - node_box = { - type = "leveled", - fixed = {-0.5, 0.0, -0.5, 0.5, -0.499, 0.5}, - }, - - groups = {dig_immediate=3}, -}) - --- Wall-like nodebox that connects to neighbors -minetest.register_node("testnodes:nodebox_connected", { - description = S("Connected Nodebox Test Node"), - tiles = {"testnodes_nodebox.png"}, - groups = {connected_nodebox=1, dig_immediate=3}, - drawtype = "nodebox", - paramtype = "light", - connects_to = {"group:connected_nodebox"}, - connect_sides = {"front", "back", "left", "right"}, - node_box = { - type = "connected", - fixed = {-0.125, -0.500, -0.125, 0.125, 0.500, 0.125}, - connect_front = {-0.125, -0.500, -0.500, 0.125, 0.400, -0.125}, - connect_back = {-0.125, -0.500, 0.125, 0.125, 0.400, 0.500}, - connect_left = {-0.500, -0.500, -0.125, -0.125, 0.400, 0.125}, - connect_right = {0.125, -0.500, -0.125, 0.500, 0.400, 0.125}, - }, -}) - diff --git a/mods/testnodes/param2.lua b/mods/testnodes/param2.lua deleted file mode 100644 index 5d64376..0000000 --- a/mods/testnodes/param2.lua +++ /dev/null @@ -1,168 +0,0 @@ --- This file is for misc. param2 tests that aren't covered in drawtypes.lua already. - -local S = minetest.get_translator("testnodes") - -minetest.register_node("testnodes:facedir", { - description = S("Facedir Test Node"), - paramtype2 = "facedir", - tiles = { - "testnodes_1.png", - "testnodes_2.png", - "testnodes_3.png", - "testnodes_4.png", - "testnodes_5.png", - "testnodes_6.png", - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:facedir_nodebox", { - description = S("Facedir Nodebox Test Node"), - tiles = { - "testnodes_1.png", - "testnodes_2.png", - "testnodes_3.png", - "testnodes_4.png", - "testnodes_5.png", - "testnodes_6.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.2, 0.2, 0.2}, - }, - - groups = {dig_immediate=3}, -}) - -minetest.register_node("testnodes:wallmounted", { - description = S("Wallmounted Test Node"), - paramtype2 = "wallmounted", - tiles = { - "testnodes_1w.png", - "testnodes_2w.png", - "testnodes_3w.png", - "testnodes_4w.png", - "testnodes_5w.png", - "testnodes_6w.png", - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:wallmounted_nodebox", { - description = S("Wallmounted Nodebox Test Node"), - paramtype2 = "wallmounted", - paramtype = "light", - tiles = { - "testnodes_1w.png", - "testnodes_2w.png", - "testnodes_3w.png", - "testnodes_4w.png", - "testnodes_5w.png", - "testnodes_6w.png", - }, - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }, - wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }, - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:color", { - description = S("Color Test Node"), - paramtype2 = "color", - palette = "testnodes_palette_full.png", - tiles = { - "testnodes_node.png", - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:colorfacedir", { - description = S("Color Facedir Test Node"), - paramtype2 = "colorfacedir", - palette = "testnodes_palette_facedir.png", - tiles = { - "testnodes_1g.png", - "testnodes_2g.png", - "testnodes_3g.png", - "testnodes_4g.png", - "testnodes_5g.png", - "testnodes_6g.png", - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:colorfacedir_nodebox", { - description = S("Color Facedir Nodebox Test Node"), - tiles = { - "testnodes_1g.png", - "testnodes_2g.png", - "testnodes_3g.png", - "testnodes_4g.png", - "testnodes_5g.png", - "testnodes_6g.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "colorfacedir", - palette = "testnodes_palette_facedir.png", - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.2, 0.2, 0.2}, - }, - - groups = {dig_immediate=3}, -}) - -minetest.register_node("testnodes:colorwallmounted", { - description = S("Color Wallmounted Test Node"), - paramtype2 = "colorwallmounted", - paramtype = "light", - palette = "testnodes_palette_wallmounted.png", - tiles = { - "testnodes_1wg.png", - "testnodes_2wg.png", - "testnodes_3wg.png", - "testnodes_4wg.png", - "testnodes_5wg.png", - "testnodes_6wg.png", - }, - - groups = { dig_immediate = 3 }, -}) - -minetest.register_node("testnodes:colorwallmounted_nodebox", { - description = S("Color Wallmounted Nodebox Test Node"), - paramtype2 = "colorwallmounted", - paramtype = "light", - palette = "testnodes_palette_wallmounted.png", - tiles = { - "testnodes_1wg.png", - "testnodes_2wg.png", - "testnodes_3wg.png", - "testnodes_4wg.png", - "testnodes_5wg.png", - "testnodes_6wg.png", - }, - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }, - wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }, - }, - - groups = { dig_immediate = 3 }, -}) - diff --git a/mods/testnodes/properties.lua b/mods/testnodes/properties.lua deleted file mode 100644 index 51f703d..0000000 --- a/mods/testnodes/properties.lua +++ /dev/null @@ -1,383 +0,0 @@ --- Test Nodes: Node property tests - -local S = minetest.get_translator("testnodes") - --- Is supposed to fall when it doesn't rest on solid ground -minetest.register_node("testnodes:falling", { - description = S("Falling Node"), - tiles = { - "testnodes_node.png", - "testnodes_node.png", - "testnodes_node_falling.png", - }, - groups = { falling_node = 1, dig_immediate = 3 }, -}) - --- Same as falling node, but will stop falling on top of liquids -minetest.register_node("testnodes:falling_float", { - description = S("Falling+Floating Node"), - groups = { falling_node = 1, float = 1, dig_immediate = 3 }, - - - tiles = { - "testnodes_node.png", - "testnodes_node.png", - "testnodes_node_falling.png", - }, - color = "cyan", -}) - --- This node attaches to the floor and drops as item --- when the floor is gone. -minetest.register_node("testnodes:attached", { - description = S("Floor-Attached Node"), - tiles = { - "testnodes_attached_top.png", - "testnodes_attached_bottom.png", - "testnodes_attached_side.png", - }, - groups = { attached_node = 1, dig_immediate = 3 }, -}) - --- This node attaches to the side of a node and drops as item --- when the node it attaches to is gone. -minetest.register_node("testnodes:attached_wallmounted", { - description = S("Wallmounted Attached Node"), - paramtype2 = "wallmounted", - tiles = { - "testnodes_attachedw_top.png", - "testnodes_attachedw_bottom.png", - "testnodes_attachedw_side.png", - }, - groups = { attached_node = 1, dig_immediate = 3 }, -}) - --- Jump disabled -minetest.register_node("testnodes:nojump", { - description = S("Non-jumping Node"), - groups = {disable_jump=1, dig_immediate=3}, - tiles = {"testnodes_nojump_top.png", "testnodes_nojump_side.png"}, -}) - --- Jump disabled plant -minetest.register_node("testnodes:nojump_walkable", { - description = S("Non-jumping Plant Node"), - drawtype = "plantlike", - groups = {disable_jump=1, dig_immediate=3}, - walkable = false, - tiles = {"testnodes_nojump_top.png"}, -}) - --- Climbable up and down with jump and sneak keys -minetest.register_node("testnodes:climbable", { - description = S("Climbable Node"), - climbable = true, - walkable = false, - - - paramtype = "light", - sunlight_propagates = true, - is_ground_content = false, - tiles ={"testnodes_climbable_side.png"}, - drawtype = "glasslike", - groups = {dig_immediate=3}, -}) - --- Climbable only downwards with sneak key -minetest.register_node("testnodes:climbable_nojump", { - description = S("Downwards-climbable Node"), - climbable = true, - walkable = false, - - groups = {disable_jump=1, dig_immediate=3}, - drawtype = "glasslike", - tiles ={"testnodes_climbable_nojump_side.png"}, - paramtype = "light", - sunlight_propagates = true, -}) - --- A liquid in which you can't rise -minetest.register_node("testnodes:liquid_nojump", { - description = S("Non-jumping Liquid Source Node"), - liquidtype = "source", - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquidflowing_nojump", - liquid_alternative_source = "testnodes:liquid_nojump", - liquid_renewable = false, - groups = {disable_jump=1, dig_immediate=3}, - walkable = false, - - drawtype = "liquid", - tiles = {"testnodes_liquidsource.png^[colorize:#FF0000:127"}, - special_tiles = { - {name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = false}, - {name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = true}, - }, - use_texture_alpha = "blend", - paramtype = "light", - pointable = false, - liquids_pointable = true, - buildable_to = true, - is_ground_content = false, - post_effect_color = {a = 70, r = 255, g = 0, b = 200}, -}) - --- A liquid in which you can't rise (flowing variant) -minetest.register_node("testnodes:liquidflowing_nojump", { - description = S("Non-jumping Flowing Liquid Node"), - liquidtype = "flowing", - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquidflowing_nojump", - liquid_alternative_source = "testnodes:liquid_nojump", - liquid_renewable = false, - groups = {disable_jump=1, dig_immediate=3}, - walkable = false, - - - drawtype = "flowingliquid", - tiles = {"testnodes_liquidflowing.png^[colorize:#FF0000:127"}, - special_tiles = { - {name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false}, - {name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false}, - }, - use_texture_alpha = "blend", - paramtype = "light", - paramtype2 = "flowingliquid", - pointable = false, - liquids_pointable = true, - buildable_to = true, - is_ground_content = false, - post_effect_color = {a = 70, r = 255, g = 0, b = 200}, -}) - --- A liquid which doesn't have liquid movement physics (source variant) -minetest.register_node("testnodes:liquid_noswim", { - description = S("No-swim Liquid Source Node"), - liquidtype = "source", - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquidflowing_noswim", - liquid_alternative_source = "testnodes:liquid_noswim", - liquid_renewable = false, - liquid_move_physics = false, - groups = {dig_immediate=3}, - walkable = false, - - drawtype = "liquid", - tiles = {"testnodes_liquidsource.png^[colorize:#FF00FF:127"}, - special_tiles = { - {name = "testnodes_liquidsource.png^[colorize:#FF00FF:127", backface_culling = false}, - {name = "testnodes_liquidsource.png^[colorize:#FF00FF:127", backface_culling = true}, - }, - use_texture_alpha = "blend", - paramtype = "light", - pointable = false, - liquids_pointable = true, - buildable_to = true, - is_ground_content = false, - post_effect_color = {a = 70, r = 255, g = 200, b = 200}, -}) - --- A liquid which doen't have liquid movement physics (flowing variant) -minetest.register_node("testnodes:liquidflowing_noswim", { - description = S("No-swim Flowing Liquid Node"), - liquidtype = "flowing", - liquid_range = 1, - liquid_viscosity = 0, - liquid_alternative_flowing = "testnodes:liquidflowing_noswim", - liquid_alternative_source = "testnodes:liquid_noswim", - liquid_renewable = false, - liquid_move_physics = false, - groups = {dig_immediate=3}, - walkable = false, - - - drawtype = "flowingliquid", - tiles = {"testnodes_liquidflowing.png^[colorize:#FF00FF:127"}, - special_tiles = { - {name = "testnodes_liquidflowing.png^[colorize:#FF00FF:127", backface_culling = false}, - {name = "testnodes_liquidflowing.png^[colorize:#FF00FF:127", backface_culling = false}, - }, - use_texture_alpha = "blend", - paramtype = "light", - paramtype2 = "flowingliquid", - pointable = false, - liquids_pointable = true, - buildable_to = true, - is_ground_content = false, - post_effect_color = {a = 70, r = 255, g = 200, b = 200}, -}) - - - --- Nodes that modify fall damage (various damage modifiers) -for i=-100, 100, 25 do - if i ~= 0 then - local subname, descnum - if i < 0 then - subname = "m"..math.abs(i) - descnum = tostring(i) - else - subname = tostring(i) - descnum = S("+@1", i) - end - local tex, color, desc - if i > 0 then - local val = math.floor((i/100)*255) - tex = "testnodes_fall_damage_plus.png" - color = { b=0, g=255-val, r=255, a=255 } - desc = S("Fall Damage Node (+@1%)", i) - else - tex = "testnodes_fall_damage_minus.png" - if i == -100 then - color = { r=0, b=0, g=255, a=255 } - else - local val = math.floor((math.abs(i)/100)*255) - color = { r=0, b=255, g=255-val, a=255 } - end - desc = S("Fall Damage Node (-@1%)", math.abs(i)) - end - minetest.register_node("testnodes:damage"..subname, { - description = desc, - groups = {fall_damage_add_percent=i, dig_immediate=3}, - - - tiles = { tex }, - is_ground_content = false, - color = color, - }) - end -end - --- Bouncy nodes (various bounce levels) -for i=20, 180, 20 do - local val = math.floor(((i-20)/200)*255) - minetest.register_node("testnodes:bouncy"..i, { - description = S("Bouncy Node (@1%)", i), - groups = {bouncy=i, dig_immediate=3}, - - - tiles ={"testnodes_bouncy.png"}, - is_ground_content = false, - color = { r=255, g=255-val, b=val, a=255 }, - }) -end - --- Slippery nodes (various slippery levels) -for i=1, 5 do - minetest.register_node("testnodes:slippery"..i, { - description = S("Slippery Node (@1)", i), - tiles ={"testnodes_slippery.png"}, - is_ground_content = false, - groups = {slippery=i, dig_immediate=3}, - color = { r=0, g=255, b=math.floor((i/5)*255), a=255 }, - }) -end - --- Move resistance nodes (various resistance levels) -for r=0, 7 do - if r > 0 then - minetest.register_node("testnodes:move_resistance"..r, { - description = S("Move-resistant Node (@1)", r), - walkable = false, - move_resistance = r, - - drawtype = "glasslike", - paramtype = "light", - sunlight_propagates = true, - tiles = { "testnodes_move_resistance.png" }, - is_ground_content = false, - groups = { dig_immediate = 3 }, - color = { b = 0, g = 255, r = math.floor((r/7)*255), a = 255 }, - }) - end - - minetest.register_node("testnodes:move_resistance_liquidlike"..r, { - description = S("Move-resistant Node, liquidlike (@1)", r), - walkable = false, - move_resistance = r, - liquid_move_physics = true, - - drawtype = "glasslike", - paramtype = "light", - sunlight_propagates = true, - tiles = { "testnodes_move_resistance.png" }, - is_ground_content = false, - groups = { dig_immediate = 3 }, - color = { b = 255, g = 0, r = math.floor((r/7)*255), a = 255 }, - }) -end - -minetest.register_node("testnodes:climbable_move_resistance_4", { - description = S("Climbable Move-resistant Node (4)"), - walkable = false, - climbable = true, - move_resistance = 4, - - drawtype = "glasslike", - paramtype = "light", - sunlight_propagates = true, - tiles = {"testnodes_climbable_resistance_side.png"}, - is_ground_content = false, - groups = { dig_immediate = 3 }, -}) - --- By placing something on the node, the node itself will be replaced -minetest.register_node("testnodes:buildable_to", { - description = S("Replacable Node"), - buildable_to = true, - tiles = {"testnodes_buildable_to.png"}, - is_ground_content = false, - groups = {dig_immediate=3}, -}) - --- Nodes that deal damage to players that are inside them. --- Negative damage nodes should heal. -for d=-3,3 do - if d ~= 0 then - local sub, tile - if d > 0 then - sub = tostring(d) - tile = "testnodes_damage.png" - else - sub = "m" .. tostring(math.abs(d)) - tile = "testnodes_damage_neg.png" - end - if math.abs(d) == 2 then - tile = tile .. "^[colorize:#000000:70" - elseif math.abs(d) == 3 then - tile = tile .. "^[colorize:#000000:140" - end - minetest.register_node("testnodes:damage_"..sub, { - description = S("Damage Node (@1 damage per second)", d), - damage_per_second = d, - - - walkable = false, - is_ground_content = false, - drawtype = "allfaces", - paramtype = "light", - sunlight_propagates = true, - tiles = { tile }, - groups = {dig_immediate=3}, - }) - end -end - --- Causes drowning damage -minetest.register_node("testnodes:drowning_1", { - description = S("Drowning Node (@1 damage)", 1), - drowning = 1, - - - walkable = false, - is_ground_content = false, - drawtype = "allfaces", - paramtype = "light", - sunlight_propagates = true, - tiles = { "testnodes_drowning.png" }, - groups = {dig_immediate=3}, -}) - diff --git a/mods/testnodes/textures.lua b/mods/testnodes/textures.lua deleted file mode 100644 index dc581b0..0000000 --- a/mods/testnodes/textures.lua +++ /dev/null @@ -1,173 +0,0 @@ --- Node texture tests - -local S = minetest.get_translator("testnodes") - -minetest.register_node("testnodes:6sides", { - description = S("Six Textures Test Node"), - tiles = { - "testnodes_normal1.png", - "testnodes_normal2.png", - "testnodes_normal3.png", - "testnodes_normal4.png", - "testnodes_normal5.png", - "testnodes_normal6.png", - }, - - groups = { dig_immediate = 2 }, -}) - -minetest.register_node("testnodes:anim", { - description = S("Animated Test Node"), - tiles = { - { name = "testnodes_anim.png", - animation = { - type = "vertical_frames", - aspect_w = 16, - aspect_h = 16, - length = 4.0, - }, }, - }, - - groups = { dig_immediate = 2 }, -}) - --- Node texture transparency test - -local alphas = { 64, 128, 191 } - -for a=1,#alphas do - local alpha = alphas[a] - - -- Transparency taken from texture - minetest.register_node("testnodes:alpha_texture_"..alpha, { - description = S("Texture Alpha Test Node (@1)", alpha), - drawtype = "glasslike", - paramtype = "light", - tiles = { - "testnodes_alpha"..alpha..".png", - }, - use_texture_alpha = "blend", - - groups = { dig_immediate = 3 }, - }) - - -- Transparency set via texture modifier - minetest.register_node("testnodes:alpha_"..alpha, { - description = S("Alpha Test Node (@1)", alpha), - drawtype = "glasslike", - paramtype = "light", - tiles = { - "testnodes_alpha.png^[opacity:" .. alpha, - }, - use_texture_alpha = "blend", - - groups = { dig_immediate = 3 }, - }) -end - --- Generate PNG textures - -local function mandelbrot(w, h, iterations) - local r = {} - for y=0, h-1 do - for x=0, w-1 do - local re = (x - w/2) * 4/w - local im = (y - h/2) * 4/h - -- zoom in on a nice view - re = re / 128 - 0.23 - im = im / 128 - 0.82 - - local px, py = 0, 0 - local i = 0 - while px*px + py*py <= 4 and i < iterations do - px, py = px*px - py*py + re, 2 * px * py + im - i = i + 1 - end - r[w*y+x+1] = i / iterations - end - end - return r -end - -local function gen_checkers(w, h, tile) - local r = {} - for y=0, h-1 do - for x=0, w-1 do - local hori = math.floor(x / tile) % 2 == 0 - local vert = math.floor(y / tile) % 2 == 0 - r[w*y+x+1] = hori ~= vert and 1 or 0 - end - end - return r -end - -local fractal = mandelbrot(512, 512, 128) -local frac_emb = mandelbrot(64, 64, 64) -local checker = gen_checkers(512, 512, 32) - -local floor = math.floor -local abs = math.abs -local data_emb = {} -local data_mb = {} -local data_ck = {} -for i=1, #frac_emb do - data_emb[i] = { - r = floor(abs(frac_emb[i] * 2 - 1) * 255), - g = floor(abs(1 - frac_emb[i]) * 255), - b = floor(frac_emb[i] * 255), - a = frac_emb[i] < 0.95 and 255 or 0, - } -end -for i=1, #fractal do - data_mb[i] = { - r = floor(fractal[i] * 255), - g = floor(abs(fractal[i] * 2 - 1) * 255), - b = floor(abs(1 - fractal[i]) * 255), - a = 255, - } - data_ck[i] = checker[i] > 0 and "#F80" or "#000" -end - -local textures_path = minetest.get_modpath( minetest.get_current_modname() ) .. "/textures/" -minetest.safe_file_write( - textures_path .. "testnodes_generated_mb.png", - minetest.encode_png(512,512,data_mb) -) -minetest.safe_file_write( - textures_path .. "testnodes_generated_ck.png", - minetest.encode_png(512,512,data_ck) -) - -minetest.register_node("testnodes:generated_png_mb", { - description = S("Generated Mandelbrot PNG Test Node"), - tiles = { "testnodes_generated_mb.png" }, - - groups = { dig_immediate = 2 }, -}) -minetest.register_node("testnodes:generated_png_ck", { - description = S("Generated Checker PNG Test Node"), - tiles = { "testnodes_generated_ck.png" }, - - groups = { dig_immediate = 2 }, -}) - -local png_emb = "[png:" .. minetest.encode_base64(minetest.encode_png(64,64,data_emb)) - -minetest.register_node("testnodes:generated_png_emb", { - description = S("Generated In-Band Mandelbrot PNG Test Node"), - tiles = { png_emb }, - - groups = { dig_immediate = 2 }, -}) -minetest.register_node("testnodes:generated_png_src_emb", { - description = S("Generated In-Band Source Blit Mandelbrot PNG Test Node"), - tiles = { png_emb .. "^testnodes_damage_neg.png" }, - - groups = { dig_immediate = 2 }, -}) -minetest.register_node("testnodes:generated_png_dst_emb", { - description = S("Generated In-Band Dest Blit Mandelbrot PNG Test Node"), - tiles = { "testnodes_generated_ck.png^" .. png_emb }, - - groups = { dig_immediate = 2 }, -}) diff --git a/mods/testnodes/textures/testnodes_1.png b/mods/testnodes/textures/testnodes_1.png deleted file mode 100644 index 6730997..0000000 Binary files a/mods/testnodes/textures/testnodes_1.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_1g.png b/mods/testnodes/textures/testnodes_1g.png deleted file mode 100644 index 529298e..0000000 Binary files a/mods/testnodes/textures/testnodes_1g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_1w.png b/mods/testnodes/textures/testnodes_1w.png deleted file mode 100644 index d24e571..0000000 Binary files a/mods/testnodes/textures/testnodes_1w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_1wg.png b/mods/testnodes/textures/testnodes_1wg.png deleted file mode 100644 index b2eba0e..0000000 Binary files a/mods/testnodes/textures/testnodes_1wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_2.png b/mods/testnodes/textures/testnodes_2.png deleted file mode 100644 index 6c87c86..0000000 Binary files a/mods/testnodes/textures/testnodes_2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_2g.png b/mods/testnodes/textures/testnodes_2g.png deleted file mode 100644 index cb9060f..0000000 Binary files a/mods/testnodes/textures/testnodes_2g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_2w.png b/mods/testnodes/textures/testnodes_2w.png deleted file mode 100644 index b56874e..0000000 Binary files a/mods/testnodes/textures/testnodes_2w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_2wg.png b/mods/testnodes/textures/testnodes_2wg.png deleted file mode 100644 index 108dc87..0000000 Binary files a/mods/testnodes/textures/testnodes_2wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_3.png b/mods/testnodes/textures/testnodes_3.png deleted file mode 100644 index 05b4562..0000000 Binary files a/mods/testnodes/textures/testnodes_3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_3g.png b/mods/testnodes/textures/testnodes_3g.png deleted file mode 100644 index 5c84f58..0000000 Binary files a/mods/testnodes/textures/testnodes_3g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_3w.png b/mods/testnodes/textures/testnodes_3w.png deleted file mode 100644 index 8b435cf..0000000 Binary files a/mods/testnodes/textures/testnodes_3w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_3wg.png b/mods/testnodes/textures/testnodes_3wg.png deleted file mode 100644 index 9ee9006..0000000 Binary files a/mods/testnodes/textures/testnodes_3wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_4.png b/mods/testnodes/textures/testnodes_4.png deleted file mode 100644 index 15e6ffe..0000000 Binary files a/mods/testnodes/textures/testnodes_4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_4g.png b/mods/testnodes/textures/testnodes_4g.png deleted file mode 100644 index 8f144fa..0000000 Binary files a/mods/testnodes/textures/testnodes_4g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_4w.png b/mods/testnodes/textures/testnodes_4w.png deleted file mode 100644 index 214e0df..0000000 Binary files a/mods/testnodes/textures/testnodes_4w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_4wg.png b/mods/testnodes/textures/testnodes_4wg.png deleted file mode 100644 index 888b3d4..0000000 Binary files a/mods/testnodes/textures/testnodes_4wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_5.png b/mods/testnodes/textures/testnodes_5.png deleted file mode 100644 index 1ef1c72..0000000 Binary files a/mods/testnodes/textures/testnodes_5.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_5g.png b/mods/testnodes/textures/testnodes_5g.png deleted file mode 100644 index 30da479..0000000 Binary files a/mods/testnodes/textures/testnodes_5g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_5w.png b/mods/testnodes/textures/testnodes_5w.png deleted file mode 100644 index b4cb424..0000000 Binary files a/mods/testnodes/textures/testnodes_5w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_5wg.png b/mods/testnodes/textures/testnodes_5wg.png deleted file mode 100644 index fac9db2..0000000 Binary files a/mods/testnodes/textures/testnodes_5wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_6.png b/mods/testnodes/textures/testnodes_6.png deleted file mode 100644 index 805813e..0000000 Binary files a/mods/testnodes/textures/testnodes_6.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_6g.png b/mods/testnodes/textures/testnodes_6g.png deleted file mode 100644 index a88f4c9..0000000 Binary files a/mods/testnodes/textures/testnodes_6g.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_6w.png b/mods/testnodes/textures/testnodes_6w.png deleted file mode 100644 index e6bbf97..0000000 Binary files a/mods/testnodes/textures/testnodes_6w.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_6wg.png b/mods/testnodes/textures/testnodes_6wg.png deleted file mode 100644 index 29ca933..0000000 Binary files a/mods/testnodes/textures/testnodes_6wg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_airlike.png b/mods/testnodes/textures/testnodes_airlike.png deleted file mode 100644 index 5a5664a..0000000 Binary files a/mods/testnodes/textures/testnodes_airlike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_allfaces.png b/mods/testnodes/textures/testnodes_allfaces.png deleted file mode 100644 index c0a7dc5..0000000 Binary files a/mods/testnodes/textures/testnodes_allfaces.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_allfaces_optional.png b/mods/testnodes/textures/testnodes_allfaces_optional.png deleted file mode 100644 index 1f6a173..0000000 Binary files a/mods/testnodes/textures/testnodes_allfaces_optional.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_alpha.png b/mods/testnodes/textures/testnodes_alpha.png deleted file mode 100644 index 157fa73..0000000 Binary files a/mods/testnodes/textures/testnodes_alpha.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_alpha128.png b/mods/testnodes/textures/testnodes_alpha128.png deleted file mode 100644 index 16babf6..0000000 Binary files a/mods/testnodes/textures/testnodes_alpha128.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_alpha191.png b/mods/testnodes/textures/testnodes_alpha191.png deleted file mode 100644 index f165d28..0000000 Binary files a/mods/testnodes/textures/testnodes_alpha191.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_alpha64.png b/mods/testnodes/textures/testnodes_alpha64.png deleted file mode 100644 index c343c32..0000000 Binary files a/mods/testnodes/textures/testnodes_alpha64.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_anim.png b/mods/testnodes/textures/testnodes_anim.png deleted file mode 100644 index d321fe8..0000000 Binary files a/mods/testnodes/textures/testnodes_anim.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attached_bottom.png b/mods/testnodes/textures/testnodes_attached_bottom.png deleted file mode 100644 index e01ae57..0000000 Binary files a/mods/testnodes/textures/testnodes_attached_bottom.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attached_side.png b/mods/testnodes/textures/testnodes_attached_side.png deleted file mode 100644 index 9459cbb..0000000 Binary files a/mods/testnodes/textures/testnodes_attached_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attached_top.png b/mods/testnodes/textures/testnodes_attached_top.png deleted file mode 100644 index 0148b41..0000000 Binary files a/mods/testnodes/textures/testnodes_attached_top.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attachedw_bottom.png b/mods/testnodes/textures/testnodes_attachedw_bottom.png deleted file mode 100644 index 488ad23..0000000 Binary files a/mods/testnodes/textures/testnodes_attachedw_bottom.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attachedw_side.png b/mods/testnodes/textures/testnodes_attachedw_side.png deleted file mode 100644 index a02facb..0000000 Binary files a/mods/testnodes/textures/testnodes_attachedw_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_attachedw_top.png b/mods/testnodes/textures/testnodes_attachedw_top.png deleted file mode 100644 index 1f4fc7b..0000000 Binary files a/mods/testnodes/textures/testnodes_attachedw_top.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_bouncy.png b/mods/testnodes/textures/testnodes_bouncy.png deleted file mode 100644 index eabbbdf..0000000 Binary files a/mods/testnodes/textures/testnodes_bouncy.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_buildable_to.png b/mods/testnodes/textures/testnodes_buildable_to.png deleted file mode 100644 index 23b5e54..0000000 Binary files a/mods/testnodes/textures/testnodes_buildable_to.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_climbable_nojump_side.png b/mods/testnodes/textures/testnodes_climbable_nojump_side.png deleted file mode 100644 index d5ca130..0000000 Binary files a/mods/testnodes/textures/testnodes_climbable_nojump_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_climbable_resistance_side.png b/mods/testnodes/textures/testnodes_climbable_resistance_side.png deleted file mode 100644 index be01583..0000000 Binary files a/mods/testnodes/textures/testnodes_climbable_resistance_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_climbable_side.png b/mods/testnodes/textures/testnodes_climbable_side.png deleted file mode 100644 index c56ea90..0000000 Binary files a/mods/testnodes/textures/testnodes_climbable_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_damage.png b/mods/testnodes/textures/testnodes_damage.png deleted file mode 100644 index 9de2ab5..0000000 Binary files a/mods/testnodes/textures/testnodes_damage.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_damage_neg.png b/mods/testnodes/textures/testnodes_damage_neg.png deleted file mode 100644 index 85811bc..0000000 Binary files a/mods/testnodes/textures/testnodes_damage_neg.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_drowning.png b/mods/testnodes/textures/testnodes_drowning.png deleted file mode 100644 index 57ffc8f..0000000 Binary files a/mods/testnodes/textures/testnodes_drowning.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_fall_damage_minus.png b/mods/testnodes/textures/testnodes_fall_damage_minus.png deleted file mode 100644 index 88d3bdf..0000000 Binary files a/mods/testnodes/textures/testnodes_fall_damage_minus.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_fall_damage_plus.png b/mods/testnodes/textures/testnodes_fall_damage_plus.png deleted file mode 100644 index 61fdec2..0000000 Binary files a/mods/testnodes/textures/testnodes_fall_damage_plus.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_fencelike.png b/mods/testnodes/textures/testnodes_fencelike.png deleted file mode 100644 index 84dea1b..0000000 Binary files a/mods/testnodes/textures/testnodes_fencelike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_firelike.png b/mods/testnodes/textures/testnodes_firelike.png deleted file mode 100644 index ee59b0d..0000000 Binary files a/mods/testnodes/textures/testnodes_firelike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_generated_ck.png b/mods/testnodes/textures/testnodes_generated_ck.png deleted file mode 100644 index a41915e..0000000 Binary files a/mods/testnodes/textures/testnodes_generated_ck.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_generated_mb.png b/mods/testnodes/textures/testnodes_generated_mb.png deleted file mode 100644 index 3470e32..0000000 Binary files a/mods/testnodes/textures/testnodes_generated_mb.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslike.png b/mods/testnodes/textures/testnodes_glasslike.png deleted file mode 100644 index cf3e354..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslike_detail.png b/mods/testnodes/textures/testnodes_glasslike_detail.png deleted file mode 100644 index 30c9586..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslike_detail.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslike_framed.png b/mods/testnodes/textures/testnodes_glasslike_framed.png deleted file mode 100644 index 8a513f2..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslike_framed.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslike_framed2.png b/mods/testnodes/textures/testnodes_glasslike_framed2.png deleted file mode 100644 index 4ea839c..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslike_framed2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslike_framed_optional.png b/mods/testnodes/textures/testnodes_glasslike_framed_optional.png deleted file mode 100644 index 37de77d..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslike_framed_optional.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_glasslikeliquid.png b/mods/testnodes/textures/testnodes_glasslikeliquid.png deleted file mode 100644 index e1e96ff..0000000 Binary files a/mods/testnodes/textures/testnodes_glasslikeliquid.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light.png b/mods/testnodes/textures/testnodes_light.png deleted file mode 100644 index 4ba0081..0000000 Binary files a/mods/testnodes/textures/testnodes_light.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_1.png b/mods/testnodes/textures/testnodes_light_1.png deleted file mode 100644 index 57adf5a..0000000 Binary files a/mods/testnodes/textures/testnodes_light_1.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_10.png b/mods/testnodes/textures/testnodes_light_10.png deleted file mode 100644 index 4838347..0000000 Binary files a/mods/testnodes/textures/testnodes_light_10.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_11.png b/mods/testnodes/textures/testnodes_light_11.png deleted file mode 100644 index 4c423d9..0000000 Binary files a/mods/testnodes/textures/testnodes_light_11.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_12.png b/mods/testnodes/textures/testnodes_light_12.png deleted file mode 100644 index bc7946d..0000000 Binary files a/mods/testnodes/textures/testnodes_light_12.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_13.png b/mods/testnodes/textures/testnodes_light_13.png deleted file mode 100644 index 0b63c84..0000000 Binary files a/mods/testnodes/textures/testnodes_light_13.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_14.png b/mods/testnodes/textures/testnodes_light_14.png deleted file mode 100644 index a817bd3..0000000 Binary files a/mods/testnodes/textures/testnodes_light_14.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_2.png b/mods/testnodes/textures/testnodes_light_2.png deleted file mode 100644 index 852eaef..0000000 Binary files a/mods/testnodes/textures/testnodes_light_2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_3.png b/mods/testnodes/textures/testnodes_light_3.png deleted file mode 100644 index 79fc834..0000000 Binary files a/mods/testnodes/textures/testnodes_light_3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_4.png b/mods/testnodes/textures/testnodes_light_4.png deleted file mode 100644 index 75f8c61..0000000 Binary files a/mods/testnodes/textures/testnodes_light_4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_5.png b/mods/testnodes/textures/testnodes_light_5.png deleted file mode 100644 index b6eede0..0000000 Binary files a/mods/testnodes/textures/testnodes_light_5.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_6.png b/mods/testnodes/textures/testnodes_light_6.png deleted file mode 100644 index ef54add..0000000 Binary files a/mods/testnodes/textures/testnodes_light_6.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_7.png b/mods/testnodes/textures/testnodes_light_7.png deleted file mode 100644 index 4a885b0..0000000 Binary files a/mods/testnodes/textures/testnodes_light_7.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_8.png b/mods/testnodes/textures/testnodes_light_8.png deleted file mode 100644 index b283301..0000000 Binary files a/mods/testnodes/textures/testnodes_light_8.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_light_9.png b/mods/testnodes/textures/testnodes_light_9.png deleted file mode 100644 index 2aa9023..0000000 Binary files a/mods/testnodes/textures/testnodes_light_9.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_line_crossing.png b/mods/testnodes/textures/testnodes_line_crossing.png deleted file mode 100644 index e566f27..0000000 Binary files a/mods/testnodes/textures/testnodes_line_crossing.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_line_curved.png b/mods/testnodes/textures/testnodes_line_curved.png deleted file mode 100644 index ab9f8e7..0000000 Binary files a/mods/testnodes/textures/testnodes_line_curved.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_line_straight.png b/mods/testnodes/textures/testnodes_line_straight.png deleted file mode 100644 index 4f33d9c..0000000 Binary files a/mods/testnodes/textures/testnodes_line_straight.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_line_t_junction.png b/mods/testnodes/textures/testnodes_line_t_junction.png deleted file mode 100644 index 5668f6e..0000000 Binary files a/mods/testnodes/textures/testnodes_line_t_junction.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquid.png b/mods/testnodes/textures/testnodes_liquid.png deleted file mode 100644 index 98ab270..0000000 Binary files a/mods/testnodes/textures/testnodes_liquid.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing.png b/mods/testnodes/textures/testnodes_liquidflowing.png deleted file mode 100644 index 1736b89..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r0.png b/mods/testnodes/textures/testnodes_liquidflowing_r0.png deleted file mode 100644 index e8a6103..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r0.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r1.png b/mods/testnodes/textures/testnodes_liquidflowing_r1.png deleted file mode 100644 index b4e45b4..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r1.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r2.png b/mods/testnodes/textures/testnodes_liquidflowing_r2.png deleted file mode 100644 index e064b8f..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r3.png b/mods/testnodes/textures/testnodes_liquidflowing_r3.png deleted file mode 100644 index bef7739..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r4.png b/mods/testnodes/textures/testnodes_liquidflowing_r4.png deleted file mode 100644 index de1001b..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r5.png b/mods/testnodes/textures/testnodes_liquidflowing_r5.png deleted file mode 100644 index 97b422e..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r5.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r6.png b/mods/testnodes/textures/testnodes_liquidflowing_r6.png deleted file mode 100644 index 4cd8e4e..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r6.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r7.png b/mods/testnodes/textures/testnodes_liquidflowing_r7.png deleted file mode 100644 index 711dd96..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r7.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidflowing_r8.png b/mods/testnodes/textures/testnodes_liquidflowing_r8.png deleted file mode 100644 index 9cf22b8..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidflowing_r8.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource.png b/mods/testnodes/textures/testnodes_liquidsource.png deleted file mode 100644 index b3f29b7..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r0.png b/mods/testnodes/textures/testnodes_liquidsource_r0.png deleted file mode 100644 index da0a996..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r0.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r1.png b/mods/testnodes/textures/testnodes_liquidsource_r1.png deleted file mode 100644 index 66bf2be..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r1.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r2.png b/mods/testnodes/textures/testnodes_liquidsource_r2.png deleted file mode 100644 index fc5f65c..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r3.png b/mods/testnodes/textures/testnodes_liquidsource_r3.png deleted file mode 100644 index 0f46e29..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r4.png b/mods/testnodes/textures/testnodes_liquidsource_r4.png deleted file mode 100644 index 0693a04..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r5.png b/mods/testnodes/textures/testnodes_liquidsource_r5.png deleted file mode 100644 index cc9d039..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r5.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r6.png b/mods/testnodes/textures/testnodes_liquidsource_r6.png deleted file mode 100644 index e276a07..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r6.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r7.png b/mods/testnodes/textures/testnodes_liquidsource_r7.png deleted file mode 100644 index 3534a4b..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r7.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_liquidsource_r8.png b/mods/testnodes/textures/testnodes_liquidsource_r8.png deleted file mode 100644 index ee1a8b1..0000000 Binary files a/mods/testnodes/textures/testnodes_liquidsource_r8.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_mesh_stripes.png b/mods/testnodes/textures/testnodes_mesh_stripes.png deleted file mode 100644 index 51b8e00..0000000 Binary files a/mods/testnodes/textures/testnodes_mesh_stripes.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_mesh_stripes2.png b/mods/testnodes/textures/testnodes_mesh_stripes2.png deleted file mode 100644 index 9ea65c1..0000000 Binary files a/mods/testnodes/textures/testnodes_mesh_stripes2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_mesh_stripes3.png b/mods/testnodes/textures/testnodes_mesh_stripes3.png deleted file mode 100644 index 96bc55a..0000000 Binary files a/mods/testnodes/textures/testnodes_mesh_stripes3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_mesh_stripes4.png b/mods/testnodes/textures/testnodes_mesh_stripes4.png deleted file mode 100644 index fca3372..0000000 Binary files a/mods/testnodes/textures/testnodes_mesh_stripes4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_move_resistance.png b/mods/testnodes/textures/testnodes_move_resistance.png deleted file mode 100644 index cac3944..0000000 Binary files a/mods/testnodes/textures/testnodes_move_resistance.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_node.png b/mods/testnodes/textures/testnodes_node.png deleted file mode 100644 index 145099b..0000000 Binary files a/mods/testnodes/textures/testnodes_node.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_node_falling.png b/mods/testnodes/textures/testnodes_node_falling.png deleted file mode 100644 index 4415318..0000000 Binary files a/mods/testnodes/textures/testnodes_node_falling.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_nodebox.png b/mods/testnodes/textures/testnodes_nodebox.png deleted file mode 100644 index 66e8dd6..0000000 Binary files a/mods/testnodes/textures/testnodes_nodebox.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_nojump_side.png b/mods/testnodes/textures/testnodes_nojump_side.png deleted file mode 100644 index 6a64cff..0000000 Binary files a/mods/testnodes/textures/testnodes_nojump_side.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_nojump_top.png b/mods/testnodes/textures/testnodes_nojump_top.png deleted file mode 100644 index fe77083..0000000 Binary files a/mods/testnodes/textures/testnodes_nojump_top.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal.png b/mods/testnodes/textures/testnodes_normal.png deleted file mode 100644 index a1acfd9..0000000 Binary files a/mods/testnodes/textures/testnodes_normal.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal1.png b/mods/testnodes/textures/testnodes_normal1.png deleted file mode 100644 index edaba77..0000000 Binary files a/mods/testnodes/textures/testnodes_normal1.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal2.png b/mods/testnodes/textures/testnodes_normal2.png deleted file mode 100644 index 0080a9e..0000000 Binary files a/mods/testnodes/textures/testnodes_normal2.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal3.png b/mods/testnodes/textures/testnodes_normal3.png deleted file mode 100644 index 0426ab2..0000000 Binary files a/mods/testnodes/textures/testnodes_normal3.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal4.png b/mods/testnodes/textures/testnodes_normal4.png deleted file mode 100644 index 0d1922e..0000000 Binary files a/mods/testnodes/textures/testnodes_normal4.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal5.png b/mods/testnodes/textures/testnodes_normal5.png deleted file mode 100644 index 0b7dcd2..0000000 Binary files a/mods/testnodes/textures/testnodes_normal5.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_normal6.png b/mods/testnodes/textures/testnodes_normal6.png deleted file mode 100644 index f34a67d..0000000 Binary files a/mods/testnodes/textures/testnodes_normal6.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_palette_facedir.png b/mods/testnodes/textures/testnodes_palette_facedir.png deleted file mode 100644 index 8cf47bb..0000000 Binary files a/mods/testnodes/textures/testnodes_palette_facedir.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_palette_full.png b/mods/testnodes/textures/testnodes_palette_full.png deleted file mode 100644 index e0a5f8b..0000000 Binary files a/mods/testnodes/textures/testnodes_palette_full.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_palette_wallmounted.png b/mods/testnodes/textures/testnodes_palette_wallmounted.png deleted file mode 100644 index 682f3ac..0000000 Binary files a/mods/testnodes/textures/testnodes_palette_wallmounted.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike.png b/mods/testnodes/textures/testnodes_plantlike.png deleted file mode 100644 index cc46444..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_degrotate.png b/mods/testnodes/textures/testnodes_plantlike_degrotate.png deleted file mode 100644 index 01c81da..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_degrotate.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_leveled.png b/mods/testnodes/textures/testnodes_plantlike_leveled.png deleted file mode 100644 index 53504db..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_leveled.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_meshoptions.png b/mods/testnodes/textures/testnodes_plantlike_meshoptions.png deleted file mode 100644 index d504d45..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_meshoptions.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted.png b/mods/testnodes/textures/testnodes_plantlike_rooted.png deleted file mode 100644 index 79cf212..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base.png deleted file mode 100644 index b9ee9e5..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_degrotate.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_degrotate.png deleted file mode 100644 index 85311cb..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_degrotate.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_leveled.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_leveled.png deleted file mode 100644 index bc602ba..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_leveled.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_meshoptions.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_meshoptions.png deleted file mode 100644 index d100023..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_meshoptions.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_wallmounted.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_wallmounted.png deleted file mode 100644 index b0be8d0..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_wallmounted.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_waving.png b/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_waving.png deleted file mode 100644 index 527817b..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_base_side_waving.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_degrotate.png b/mods/testnodes/textures/testnodes_plantlike_rooted_degrotate.png deleted file mode 100644 index 45e75bd..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_degrotate.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_leveled.png b/mods/testnodes/textures/testnodes_plantlike_rooted_leveled.png deleted file mode 100644 index 8954b2c..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_leveled.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_meshoptions.png b/mods/testnodes/textures/testnodes_plantlike_rooted_meshoptions.png deleted file mode 100644 index a782d48..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_meshoptions.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_wallmounted.png b/mods/testnodes/textures/testnodes_plantlike_rooted_wallmounted.png deleted file mode 100644 index 4214664..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_wallmounted.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_rooted_waving.png b/mods/testnodes/textures/testnodes_plantlike_rooted_waving.png deleted file mode 100644 index 112a054..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_rooted_waving.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_wallmounted.png b/mods/testnodes/textures/testnodes_plantlike_wallmounted.png deleted file mode 100644 index c89b29e..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_wallmounted.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_plantlike_waving.png b/mods/testnodes/textures/testnodes_plantlike_waving.png deleted file mode 100644 index b584a8d..0000000 Binary files a/mods/testnodes/textures/testnodes_plantlike_waving.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail2_crossing.png b/mods/testnodes/textures/testnodes_rail2_crossing.png deleted file mode 100644 index 530bbba..0000000 Binary files a/mods/testnodes/textures/testnodes_rail2_crossing.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail2_curved.png b/mods/testnodes/textures/testnodes_rail2_curved.png deleted file mode 100644 index 4ed1ca0..0000000 Binary files a/mods/testnodes/textures/testnodes_rail2_curved.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail2_straight.png b/mods/testnodes/textures/testnodes_rail2_straight.png deleted file mode 100644 index 8749330..0000000 Binary files a/mods/testnodes/textures/testnodes_rail2_straight.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail2_t_junction.png b/mods/testnodes/textures/testnodes_rail2_t_junction.png deleted file mode 100644 index 0517f65..0000000 Binary files a/mods/testnodes/textures/testnodes_rail2_t_junction.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail_crossing.png b/mods/testnodes/textures/testnodes_rail_crossing.png deleted file mode 100644 index 3916ce1..0000000 Binary files a/mods/testnodes/textures/testnodes_rail_crossing.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail_curved.png b/mods/testnodes/textures/testnodes_rail_curved.png deleted file mode 100644 index e444198..0000000 Binary files a/mods/testnodes/textures/testnodes_rail_curved.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail_straight.png b/mods/testnodes/textures/testnodes_rail_straight.png deleted file mode 100644 index 872d04f..0000000 Binary files a/mods/testnodes/textures/testnodes_rail_straight.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_rail_t_junction.png b/mods/testnodes/textures/testnodes_rail_t_junction.png deleted file mode 100644 index 7e4af51..0000000 Binary files a/mods/testnodes/textures/testnodes_rail_t_junction.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_signlike.png b/mods/testnodes/textures/testnodes_signlike.png deleted file mode 100644 index 33ffcba..0000000 Binary files a/mods/testnodes/textures/testnodes_signlike.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_slippery.png b/mods/testnodes/textures/testnodes_slippery.png deleted file mode 100644 index b990468..0000000 Binary files a/mods/testnodes/textures/testnodes_slippery.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_street_crossing.png b/mods/testnodes/textures/testnodes_street_crossing.png deleted file mode 100644 index d6e35ad..0000000 Binary files a/mods/testnodes/textures/testnodes_street_crossing.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_street_curved.png b/mods/testnodes/textures/testnodes_street_curved.png deleted file mode 100644 index 251b7fb..0000000 Binary files a/mods/testnodes/textures/testnodes_street_curved.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_street_straight.png b/mods/testnodes/textures/testnodes_street_straight.png deleted file mode 100644 index 639e24b..0000000 Binary files a/mods/testnodes/textures/testnodes_street_straight.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_street_t_junction.png b/mods/testnodes/textures/testnodes_street_t_junction.png deleted file mode 100644 index 713621e..0000000 Binary files a/mods/testnodes/textures/testnodes_street_t_junction.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_sunlight_filter.png b/mods/testnodes/textures/testnodes_sunlight_filter.png deleted file mode 100644 index b38ea40..0000000 Binary files a/mods/testnodes/textures/testnodes_sunlight_filter.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_torchlike_ceiling.png b/mods/testnodes/textures/testnodes_torchlike_ceiling.png deleted file mode 100644 index 5d9862c..0000000 Binary files a/mods/testnodes/textures/testnodes_torchlike_ceiling.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_torchlike_floor.png b/mods/testnodes/textures/testnodes_torchlike_floor.png deleted file mode 100644 index adf1e00..0000000 Binary files a/mods/testnodes/textures/testnodes_torchlike_floor.png and /dev/null differ diff --git a/mods/testnodes/textures/testnodes_torchlike_wall.png b/mods/testnodes/textures/testnodes_torchlike_wall.png deleted file mode 100644 index cb442b2..0000000 Binary files a/mods/testnodes/textures/testnodes_torchlike_wall.png and /dev/null differ diff --git a/mods/testtools/README.md b/mods/testtools/README.md deleted file mode 100644 index a1eb95e..0000000 --- a/mods/testtools/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# Test Tools readme - -Test Tools is a mod for developers that adds a bunch of tools to directly manipulate nodes and entities. This is great for quickly testing out stuff. - -Here's the list of tools: - -## Remover -Removes nodes and non-player entities that you punch. - -## Node Setter -Replace a node with another one. - -First, punch a node you want to remember. -Then rightclick any other node to replace it with the node you remembered. - -If you rightclick while pointing nothing, you can manually enter the node and param2. - -## Param2 Tool -Change the value param2 of nodes. - -* Punch: Add 1 to param2 -* Sneak+Punch: Add 8 to param2 -* Place: Subtract 1 from param2 -* Sneak+Place: Subtract 8 from param2 - -Note: Use the debug screen (F5) to see the param2 of the pointed node. - -## Falling Node Tool -Turns nodes into falling nodes. - -Usage: - -* Punch node: Make it fall -* Place: Try to teleport up to 2 units upwards, then make it fall - -## Node Meta Editor -Edit and view metadata of nodes. - -Usage: - -* Punch: Open node metadata editor - -## Entity Rotator -Changes the entity rotation (with `set_rotation`). - -Usage: - -* Punch entity: Rotate yaw -* Punch entity while holding down “Sneak” key: Rotate pitch -* Punch entity while holding down “Special” key (aka “Aux”): Rotate roll - -Each usage rotates the entity by 22.5°. - -## Entity Spawner -Spawns entities. - -Usage: - -* Punch to select entity or spawn one directly -* Place to place selected entity - -## Object Property Editor -Edits properties of objects. - -Usage: - -* Punch object to open a formspec that allows you to view and edit properties -* Punch air to edit properties of your own player object - -To edit a property, select it in the list, enter a new value (in Lua syntax) -and hit “Submit”. - -## Object Attacher -Allows you to attach an object to another one. - -Basic usage: -* First select the parent object, then the child object that should be attached -* Selecting an object is done by punching it -* Sneak+punch to detach selected object -* If you punch air, you select yourself - -Configuration: -* Place: Increase attachment Y position -* Sneak+place: decrease attachment Y position -* Aux+place: Increase attachment X rotation -* Aux+Sneak+Rightclick: Decrease attachment X rotation - -Hint: To detach all objects nearby you (including on yourself), use the -`/detach` server command. - -## Object Mover -Move an object by a given distance. - -Usage: -* Punch object into the direction you want to move it -* Sneak+punch: Move object towards you -* Place: Increase move distance -* Sneak+place: Decrease move distance - -## Children Getter -Shows list of objects that are attached to an object (aka "children") in chat. - -Usage: -* Punch object: Show children of punched object -* Punch air: Show your own children - -## Entity Visual Scaler -Change visual size of entities - -Usage: - -* Punch entity to increase visual size -* Sneak+punch entity to decrease visual size - -## Light Tool -Show light level of node. - -Usage: -* Punch: Show light info of node in front of the punched node's side -* Place: Show light info of the node that you touched diff --git a/mods/testtools/init.lua b/mods/testtools/init.lua deleted file mode 100644 index 1041acd..0000000 --- a/mods/testtools/init.lua +++ /dev/null @@ -1,886 +0,0 @@ -local S = minetest.get_translator("testtools") -local F = minetest.formspec_escape - -dofile(minetest.get_modpath("testtools") .. "/light.lua") - -minetest.register_tool("testtools:param2tool", { - description = S("Param2 Tool") .."\n".. - S("Modify param2 value of nodes") .."\n".. - S("Punch: +1") .."\n".. - S("Sneak+Punch: +8") .."\n".. - S("Place: -1") .."\n".. - S("Sneak+Place: -8"), - inventory_image = "testtools_param2tool.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type ~= "node" or (not pos) then - return - end - local add = 1 - if user then - local ctrl = user:get_player_control() - if ctrl.sneak then - add = 8 - end - end - local node = minetest.get_node(pos) - node.param2 = node.param2 + add - minetest.swap_node(pos, node) - end, - on_place = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type ~= "node" or (not pos) then - return - end - local add = -1 - if user then - local ctrl = user:get_player_control() - if ctrl.sneak then - add = -8 - end - end - local node = minetest.get_node(pos) - node.param2 = node.param2 + add - minetest.swap_node(pos, node) - end, -}) - -minetest.register_tool("testtools:node_setter", { - description = S("Node Setter") .."\n".. - S("Replace pointed node with something else") .."\n".. - S("Punch: Select pointed node") .."\n".. - S("Place on node: Replace node with selected node") .."\n".. - S("Place in air: Manually select a node"), - inventory_image = "testtools_node_setter.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type == "nothing" then - local meta = itemstack:get_meta() - meta:set_string("node", "air") - meta:set_int("node_param2", 0) - if user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), S("Now placing: @1 (param2=@2)", "air", 0)) - end - return itemstack - elseif pointed_thing.type ~= "node" or (not pos) then - return - end - local node = minetest.get_node(pos) - local meta = itemstack:get_meta() - meta:set_string("node", node.name) - meta:set_int("node_param2", node.param2) - if user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), S("Now placing: @1 (param2=@2)", node.name, node.param2)) - end - return itemstack - end, - on_secondary_use = function(itemstack, user, pointed_thing) - local meta = itemstack:get_meta() - local nodename = meta:get_string("node") or "" - local param2 = meta:get_int("node_param2") or 0 - - minetest.show_formspec(user:get_player_name(), "testtools:node_setter", - "size[4,4]".. - "field[0.5,1;3,1;nodename;"..F(S("Node name (itemstring):"))..";"..F(nodename).."]".. - "field[0.5,2;3,1;param2;"..F(S("param2:"))..";"..F(tostring(param2)).."]".. - "button_exit[0.5,3;3,1;submit;"..F(S("Submit")).."]" - ) - end, - on_place = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - local meta = itemstack:get_meta() - local nodename = meta:get_string("node") - if nodename == "" and user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), S("Punch a node first!")) - return - end - local param2 = meta:get_int("node_param2") - if not param2 then - param2 = 0 - end - local node = { name = nodename, param2 = param2 } - if not minetest.registered_nodes[nodename] then - minetest.chat_send_player(user:get_player_name(), S("Cannot set unknown node: @1", nodename)) - return - end - minetest.set_node(pos, node) - end, -}) - -minetest.register_tool("testtools:remover", { - description = S("Remover") .."\n".. - S("Punch: Remove pointed node or object"), - inventory_image = "testtools_remover.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type == "node" and pos ~= nil then - minetest.remove_node(pos) - elseif pointed_thing.type == "object" then - local obj = pointed_thing.ref - if not obj:is_player() then - obj:remove() - else - minetest.chat_send_player(user:get_player_name(), S("Can't remove players!")) - end - end - end, -}) - -minetest.register_tool("testtools:falling_node_tool", { - description = S("Falling Node Tool") .."\n".. - S("Punch: Make pointed node fall") .."\n".. - S("Place: Move pointed node 2 units upwards, then make it fall"), - inventory_image = "testtools_falling_node_tool.png", - groups = { testtool = 1, disable_repair = 1 }, - on_place = function(itemstack, user, pointed_thing) - -- Teleport node 1-2 units upwards (if possible) and make it fall - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type ~= "node" or (not pos) then - return - end - local ok = false - local highest - for i=1,2 do - local above = {x=pos.x,y=pos.y+i,z=pos.z} - local n2 = minetest.get_node(above) - local def2 = minetest.registered_nodes[n2.name] - if def2 and (not def2.walkable) then - highest = above - else - break - end - end - if highest then - local node = minetest.get_node(pos) - local metatable = minetest.get_meta(pos):to_table() - minetest.remove_node(pos) - minetest.set_node(highest, node) - local meta_highest = minetest.get_meta(highest) - meta_highest:from_table(metatable) - ok = minetest.spawn_falling_node(highest) - else - ok = minetest.spawn_falling_node(pos) - end - if not ok and user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), S("Falling node could not be spawned!")) - end - end, - on_use = function(itemstack, user, pointed_thing) - local pos = minetest.get_pointed_thing_position(pointed_thing) - if pointed_thing.type ~= "node" or (not pos) then - return - end - local ok = minetest.spawn_falling_node(pos) - if not ok and user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), S("Falling node could not be spawned!")) - end - end, -}) - -minetest.register_tool("testtools:rotator", { - description = S("Entity Rotator") .. "\n" .. - S("Rotate pointed entity") .."\n".. - S("Punch: Yaw") .."\n".. - S("Sneak+Punch: Pitch") .."\n".. - S("Aux1+Punch: Roll"), - inventory_image = "testtools_entity_rotator.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type ~= "object" then - return - end - local obj = pointed_thing.ref - if obj:is_player() then - -- No player rotation - return - else - local axis = "y" - if user and user:is_player() then - local ctrl = user:get_player_control() - if ctrl.sneak then - axis = "x" - elseif ctrl.aux1 then - axis = "z" - end - end - local rot = obj:get_rotation() - rot[axis] = rot[axis] + math.pi/8 - if rot[axis] > math.pi*2 then - rot[axis] = rot[axis] - math.pi*2 - end - obj:set_rotation(rot) - end - end, -}) - -local mover_config = function(itemstack, user, pointed_thing) - if not (user and user:is_player()) then - return - end - local name = user:get_player_name() - local ctrl = user:get_player_control() - local meta = itemstack:get_meta() - local dist = 1.0 - if meta:contains("distance") then - dist = meta:get_int("distance") - end - if ctrl.sneak then - dist = dist - 1 - else - dist = dist + 1 - end - meta:set_int("distance", dist) - minetest.chat_send_player(user:get_player_name(), S("distance=@1/10", dist*2)) - return itemstack -end - -minetest.register_tool("testtools:object_mover", { - description = S("Object Mover") .."\n".. - S("Move pointed object towards or away from you") .."\n".. - S("Punch: Move by distance").."\n".. - S("Sneak+Punch: Move by negative distance").."\n".. - S("Place: Increase distance").."\n".. - S("Sneak+Place: Decrease distance"), - inventory_image = "testtools_object_mover.png", - groups = { testtool = 1, disable_repair = 1 }, - on_place = mover_config, - on_secondary_use = mover_config, - on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type ~= "object" then - return - end - local obj = pointed_thing.ref - if not (user and user:is_player()) then - return - end - local yaw = user:get_look_horizontal() - local dir = minetest.yaw_to_dir(yaw) - local pos = obj:get_pos() - local pitch = user:get_look_vertical() - if pitch > 0.25 * math.pi then - dir.y = -1 - dir.x = 0 - dir.z = 0 - elseif pitch < -0.25 * math.pi then - dir.y = 1 - dir.x = 0 - dir.z = 0 - end - local ctrl = user:get_player_control() - if ctrl.sneak then - dir = vector.multiply(dir, -1) - end - local meta = itemstack:get_meta() - if meta:contains("distance") then - local dist = meta:get_int("distance") - dir = vector.multiply(dir, dist*0.2) - end - pos = vector.add(pos, dir) - obj:set_pos(pos) - end, -}) - - - -minetest.register_tool("testtools:entity_scaler", { - description = S("Entity Visual Scaler") .."\n".. - S("Scale visual size of entities") .."\n".. - S("Punch: Increase size") .."\n".. - S("Sneak+Punch: Decrease scale"), - inventory_image = "testtools_entity_scaler.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type ~= "object" then - return - end - local obj = pointed_thing.ref - if obj:is_player() then - -- No player scaling - return - else - local diff = 0.1 - if user and user:is_player() then - local ctrl = user:get_player_control() - if ctrl.sneak then - diff = -0.1 - end - end - local prop = obj:get_properties() - if not prop.visual_size then - prop.visual_size = { x=1, y=1, z=1 } - else - prop.visual_size = { x=prop.visual_size.x+diff, y=prop.visual_size.y+diff, z=prop.visual_size.z+diff } - if prop.visual_size.x <= 0.1 then - prop.visual_size.x = 0.1 - end - if prop.visual_size.y <= 0.1 then - prop.visual_size.y = 0.1 - end - if prop.visual_size.z <= 0.1 then - prop.visual_size.z = 0.1 - end - end - obj:set_properties(prop) - end - end, -}) - -local selections = {} -local entity_list -local function get_entity_list() - if entity_list then - return entity_list - end - local ents = minetest.registered_entities - local list = {} - for k,_ in pairs(ents) do - table.insert(list, k) - end - table.sort(list) - entity_list = list - return entity_list -end -minetest.register_tool("testtools:entity_spawner", { - description = S("Entity Spawner") .."\n".. - S("Spawns entities") .."\n".. - S("Punch: Select entity to spawn") .."\n".. - S("Place: Spawn selected entity"), - inventory_image = "testtools_entity_spawner.png", - groups = { testtool = 1, disable_repair = 1 }, - on_place = function(itemstack, user, pointed_thing) - local name = user:get_player_name() - if pointed_thing.type == "node" then - if selections[name] then - local pos = pointed_thing.above - minetest.add_entity(pos, get_entity_list()[selections[name]]) - else - minetest.chat_send_player(name, S("Select an entity first (with punch key)!")) - end - end - end, - on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type == "object" then - return - end - if user and user:is_player() then - local list = table.concat(get_entity_list(), ",") - local name = user:get_player_name() - local sel = selections[name] or "" - minetest.show_formspec(name, "testtools:entity_list", - "size[9,9]".. - "textlist[0,0;9,8;entity_list;"..list..";"..sel..";false]".. - "button[0,8;4,1;spawn;Spawn entity]" - ) - end - end, -}) - -local function prop_to_string(property) - if type(property) == "string" then - return "\"" .. property .. "\"" - elseif type(property) == "table" then - return tostring(dump(property)):gsub("\n", "") - else - return tostring(property) - end -end - -local property_formspec_data = {} -local property_formspec_index = {} -local selected_objects = {} -local function get_object_properties_form(obj, playername) - if not playername then return "" end - local props = obj:get_properties() - local str = "" - property_formspec_data[playername] = {} - local proplist = {} - for k,_ in pairs(props) do - table.insert(proplist, k) - end - table.sort(proplist) - for p=1, #proplist do - local k = proplist[p] - local v = props[k] - local newline = "" - newline = k .. " = " - newline = newline .. prop_to_string(v) - str = str .. F(newline) - if p < #proplist then - str = str .. "," - end - table.insert(property_formspec_data[playername], k) - end - return str -end - -local editor_formspec_selindex = {} - -local editor_formspec = function(playername, obj, value, sel) - if not value then - value = "" - end - if not sel then - sel = "" - end - local list = get_object_properties_form(obj, playername) - local title - if obj:is_player() then - title = S("Object properties of player “@1”", obj:get_player_name()) - else - local ent = obj:get_luaentity() - title = S("Object properties of @1", ent.name) - end - minetest.show_formspec(playername, "testtools:object_editor", - "size[9,9]".. - "label[0,0;"..F(title).."]".. - "textlist[0,0.5;9,7.5;object_props;"..list..";"..sel..";false]".. - "field[0.2,8.75;8,1;value;"..F(S("Value"))..";"..F(value).."]".. - "field_close_on_enter[value;false]".. - "button[8,8.5;1,1;submit;"..F(S("Submit")).."]" - ) -end - -minetest.register_tool("testtools:object_editor", { - description = S("Object Property Editor") .."\n".. - S("Edit properties of objects") .."\n".. - S("Punch object: Edit object") .."\n".. - S("Punch air: Edit yourself"), - inventory_image = "testtools_object_editor.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - if user and user:is_player() then - local name = user:get_player_name() - - if pointed_thing.type == "object" then - selected_objects[name] = pointed_thing.ref - elseif pointed_thing.type == "nothing" then - -- Use on yourself if pointing nothing - selected_objects[name] = user - else - -- Unsupported pointed thing - return - end - - local sel = editor_formspec_selindex[name] - local val - if selected_objects[name] and selected_objects[name]:get_properties() then - local props = selected_objects[name]:get_properties() - local keys = property_formspec_data[name] - if property_formspec_index[name] and props then - local key = keys[property_formspec_index[name]] - val = prop_to_string(props[key]) - end - end - - editor_formspec(name, selected_objects[name], val, sel) - end - end, -}) - -local ent_parent = {} -local ent_child = {} -local DEFAULT_ATTACH_OFFSET_Y = 11 - -local attacher_config = function(itemstack, user, pointed_thing) - if not (user and user:is_player()) then - return - end - if pointed_thing.type == "object" then - return - end - local name = user:get_player_name() - local ctrl = user:get_player_control() - local meta = itemstack:get_meta() - if ctrl.aux1 then - local rot_x = meta:get_float("rot_x") - if ctrl.sneak then - rot_x = rot_x - math.pi/8 - else - rot_x = rot_x + math.pi/8 - end - if rot_x > 6.2 then - rot_x = 0 - elseif rot_x < 0 then - rot_x = math.pi * (15/8) - end - minetest.chat_send_player(name, S("rotation=@1", minetest.pos_to_string({x=rot_x,y=0,z=0}))) - meta:set_float("rot_x", rot_x) - else - local pos_y - if meta:contains("pos_y") then - pos_y = meta:get_int("pos_y") - else - pos_y = DEFAULT_ATTACH_OFFSET_Y - end - if ctrl.sneak then - pos_y = pos_y - 1 - else - pos_y = pos_y + 1 - end - minetest.chat_send_player(name, S("position=@1", minetest.pos_to_string({x=0,y=pos_y,z=0}))) - meta:set_int("pos_y", pos_y) - end - return itemstack -end - -minetest.register_tool("testtools:object_attacher", { - description = S("Object Attacher") .."\n".. - S("Attach object to another") .."\n".. - S("Punch objects to first select parent object, then the child object to attach") .."\n".. - S("Punch air to select yourself") .."\n".. - S("Place: Incease attachment Y offset") .."\n".. - S("Sneak+Place: Decease attachment Y offset") .."\n".. - S("Aux1+Place: Incease attachment rotation") .."\n".. - S("Aux1+Sneak+Place: Decrease attachment rotation"), - inventory_image = "testtools_object_attacher.png", - groups = { testtool = 1, disable_repair = 1 }, - on_place = attacher_config, - on_secondary_use = attacher_config, - on_use = function(itemstack, user, pointed_thing) - if user and user:is_player() then - local name = user:get_player_name() - local selected_object - if pointed_thing.type == "object" then - selected_object = pointed_thing.ref - elseif pointed_thing.type == "nothing" then - selected_object = user - else - return - end - local ctrl = user:get_player_control() - if ctrl.sneak then - if selected_object:get_attach() then - selected_object:set_detach() - minetest.chat_send_player(name, S("Object detached!")) - else - minetest.chat_send_player(name, S("Object is not attached!")) - end - return - end - local parent = ent_parent[name] - local child = ent_child[name] - local ename = S("") - if not parent then - parent = selected_object - ent_parent[name] = parent - elseif not child then - child = selected_object - ent_child[name] = child - end - local entity = selected_object:get_luaentity() - if entity then - ename = entity.name - elseif selected_object:is_player() then - ename = selected_object:get_player_name() - end - if selected_object == parent then - minetest.chat_send_player(name, S("Parent object selected: @1", ename)) - elseif selected_object == child then - minetest.chat_send_player(name, S("Child object selected: @1", ename)) - end - if parent and child then - if parent == child then - minetest.chat_send_player(name, S("Can't attach an object to itself!")) - ent_parent[name] = nil - ent_child[name] = nil - return - end - local meta = itemstack:get_meta() - local y - if meta:contains("pos_y") then - y = meta:get_int("pos_y") - else - y = DEFAULT_ATTACH_OFFSET_Y - end - local rx = meta:get_float("rot_x") or 0 - local offset = {x=0,y=y,z=0} - local angle = {x=rx,y=0,z=0} - child:set_attach(parent, "", offset, angle) - local check_parent = child:get_attach() - if check_parent then - minetest.chat_send_player(name, S("Object attached! position=@1, rotation=@2", - minetest.pos_to_string(offset), minetest.pos_to_string(angle))) - else - minetest.chat_send_player(name, S("Attachment failed!")) - end - ent_parent[name] = nil - ent_child[name] = nil - end - end - end, -}) - -local function print_object(obj) - if obj:is_player() then - return "player '"..obj:get_player_name().."'" - elseif obj:get_luaentity() then - return "LuaEntity '"..obj:get_luaentity().name.."'" - else - return "object" - end -end - -minetest.register_tool("testtools:children_getter", { - description = S("Children Getter") .."\n".. - S("Shows list of objects attached to object") .."\n".. - S("Punch object to show its 'children'") .."\n".. - S("Punch air to show your own 'children'"), - inventory_image = "testtools_children_getter.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = function(itemstack, user, pointed_thing) - if user and user:is_player() then - local name = user:get_player_name() - local selected_object - local self_name - if pointed_thing.type == "object" then - selected_object = pointed_thing.ref - elseif pointed_thing.type == "nothing" then - selected_object = user - else - return - end - self_name = print_object(selected_object) - local children = selected_object:get_children() - local ret = "" - for c=1, #children do - ret = ret .. "* " .. print_object(children[c]) - if c < #children then - ret = ret .. "\n" - end - end - if ret == "" then - ret = S("No children attached to @1.", self_name) - else - ret = S("Children of @1:", self_name) .. "\n" .. ret - end - minetest.chat_send_player(user:get_player_name(), ret) - end - end, -}) - --- Use loadstring to parse param as a Lua value -local function use_loadstring(param, player) - -- For security reasons, require 'server' priv, just in case - -- someone is actually crazy enough to run this on a public server. - local privs = minetest.get_player_privs(player:get_player_name()) - if not privs.server then - return false, "You need 'server' privilege to change object properties!" - end - if not param then - return false, "Failed: parameter is nil" - end - --[[ DANGER ZONE ]] - -- Interpret string as Lua value - local func, errormsg = loadstring("return (" .. param .. ")") - if not func then - return false, "Failed: " .. errormsg - end - - -- Apply sandbox here using setfenv - setfenv(func, {}) - - -- Run it - local good, errOrResult = pcall(func) - if not good then - -- A Lua error was thrown - return false, "Failed: " .. errOrResult - end - - -- errOrResult will be the value - return true, errOrResult -end - --- Node Meta Editor -local node_meta_posses = {} -local node_meta_latest_keylist = {} - -local function show_node_meta_formspec(user, pos, key, value, keylist) - local textlist - if keylist then - textlist = "textlist[0,0.5;2.5,6.5;keylist;"..keylist.."]" - else - textlist = "" - end - minetest.show_formspec(user:get_player_name(), - "testtools:node_meta_editor", - "size[15,9]".. - "label[0,0;"..F(S("Current keys:")).."]".. - textlist.. - "field[3,0.5;12,1;key;"..F(S("Key"))..";"..F(key).."]".. - "textarea[3,1.5;12,6;value;"..F(S("Value (use empty value to delete key)"))..";"..F(value).."]".. - "button[0,8;3,1;get;"..F(S("Get value")).."]".. - "button[4,8;3,1;set;"..F(S("Set value")).."]".. - "label[0,7.2;"..F(S("pos = @1", minetest.pos_to_string(pos))).."]") -end - -local function get_node_meta_keylist(meta, playername, escaped) - local keys = {} - local ekeys = {} - local mtable = meta:to_table() - for k,_ in pairs(mtable.fields) do - table.insert(keys, k) - if escaped then - table.insert(ekeys, F(k)) - else - table.insert(ekeys, k) - end - end - if playername then - node_meta_latest_keylist[playername] = keys - end - return table.concat(ekeys, ",") -end - -minetest.register_tool("testtools:node_meta_editor", { - description = S("Node Meta Editor") .. "\n" .. - S("Place: Edit node metadata"), - inventory_image = "testtools_node_meta_editor.png", - groups = { testtool = 1, disable_repair = 1 }, - on_place = function(itemstack, user, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - if not user:is_player() then - return itemstack - end - local pos = pointed_thing.under - node_meta_posses[user:get_player_name()] = pos - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - show_node_meta_formspec(user, pos, "", "", get_node_meta_keylist(meta, user:get_player_name(), true)) - return itemstack - end, -}) - -minetest.register_on_player_receive_fields(function(player, formname, fields) - if not (player and player:is_player()) then - return - end - if formname == "testtools:entity_list" then - local name = player:get_player_name() - if fields.entity_list then - local expl = minetest.explode_textlist_event(fields.entity_list) - if expl.type == "DCL" then - local pos = vector.add(player:get_pos(), {x=0,y=1,z=0}) - selections[name] = expl.index - minetest.add_entity(pos, get_entity_list()[expl.index]) - return - elseif expl.type == "CHG" then - selections[name] = expl.index - return - end - elseif fields.spawn and selections[name] then - local pos = vector.add(player:get_pos(), {x=0,y=1,z=0}) - minetest.add_entity(pos, get_entity_list()[selections[name]]) - return - end - elseif formname == "testtools:object_editor" then - local name = player:get_player_name() - if fields.object_props then - local expl = minetest.explode_textlist_event(fields.object_props) - if expl.type == "DCL" or expl.type == "CHG" then - property_formspec_index[name] = expl.index - - local props = selected_objects[name]:get_properties() - local keys = property_formspec_data[name] - if (not property_formspec_index[name]) or (not props) then - return - end - local key = keys[property_formspec_index[name]] - editor_formspec_selindex[name] = expl.index - editor_formspec(name, selected_objects[name], prop_to_string(props[key]), expl.index) - return - end - end - if fields.key_enter_field == "value" or fields.submit then - local props = selected_objects[name]:get_properties() - local keys = property_formspec_data[name] - if (not property_formspec_index[name]) or (not props) then - return - end - local key = keys[property_formspec_index[name]] - if not key then - return - end - local success, str = use_loadstring(fields.value, player) - if success then - props[key] = str - else - minetest.chat_send_player(name, str) - return - end - selected_objects[name]:set_properties(props) - local sel = editor_formspec_selindex[name] - editor_formspec(name, selected_objects[name], prop_to_string(props[key]), sel) - return - end - elseif formname == "testtools:node_setter" then - local playername = player:get_player_name() - local witem = player:get_wielded_item() - if witem:get_name() == "testtools:node_setter" then - if fields.nodename and fields.param2 then - local param2 = tonumber(fields.param2) - if not param2 then - return - end - local meta = witem:get_meta() - meta:set_string("node", fields.nodename) - meta:set_int("node_param2", param2) - player:set_wielded_item(witem) - end - end - elseif formname == "testtools:node_meta_editor" then - local name = player:get_player_name() - local pos = node_meta_posses[name] - if fields.keylist then - local evnt = minetest.explode_textlist_event(fields.keylist) - if evnt.type == "DCL" or evnt.type == "CHG" then - local keylist_table = node_meta_latest_keylist[name] - if not pos then - return - end - local meta = minetest.get_meta(pos) - if not keylist_table then - return - end - if #keylist_table == 0 then - return - end - local key = keylist_table[evnt.index] - local value = meta:get_string(key) - local keylist_escaped = {} - for k,v in pairs(keylist_table) do - keylist_escaped[k] = F(v) - end - local keylist = table.concat(keylist_escaped, ",") - show_node_meta_formspec(player, pos, key, value, keylist) - return - end - elseif fields.key and fields.key ~= "" and fields.value then - if not pos then - return - end - local meta = minetest.get_meta(pos) - if fields.get then - local value = meta:get_string(fields.key) - show_node_meta_formspec(player, pos, fields.key, value, - get_node_meta_keylist(meta, name, true)) - return - elseif fields.set then - meta:set_string(fields.key, fields.value) - show_node_meta_formspec(player, pos, fields.key, fields.value, - get_node_meta_keylist(meta, name, true)) - return - end - end - end -end) - -minetest.register_on_leaveplayer(function(player) - local name = player:get_player_name() - node_meta_latest_keylist[name] = nil - node_meta_posses[name] = nil -end) diff --git a/mods/testtools/light.lua b/mods/testtools/light.lua deleted file mode 100644 index afca9a4..0000000 --- a/mods/testtools/light.lua +++ /dev/null @@ -1,37 +0,0 @@ - -local S = minetest.get_translator("testtools") - -local function get_func(is_place) - return function(itemstack, user, pointed_thing) - local pos - if is_place then - pos = pointed_thing.under - else - pos = pointed_thing.above - end - if pointed_thing.type ~= "node" or not pos then - return - end - - local node = minetest.get_node(pos) - local pstr = minetest.pos_to_string(pos) - local time = minetest.get_timeofday() - local sunlight = minetest.get_natural_light(pos) - local artificial = minetest.get_artificial_light(node.param1) - local message = ("pos=%s | param1=0x%02x | " .. - "sunlight=%d | artificial=%d | timeofday=%.5f" ) - :format(pstr, node.param1, sunlight, artificial, time) - minetest.chat_send_player(user:get_player_name(), message) - end -end - -minetest.register_tool("testtools:lighttool", { - description = S("Light Tool") .. "\n" .. - S("Show light values of node") .. "\n" .. - S("Punch: Light of node above touched node") .. "\n" .. - S("Place: Light of touched node itself"), - inventory_image = "testtools_lighttool.png", - groups = { testtool = 1, disable_repair = 1 }, - on_use = get_func(false), - on_place = get_func(true), -}) diff --git a/mods/testtools/mod.conf b/mods/testtools/mod.conf deleted file mode 100644 index cde1b26..0000000 --- a/mods/testtools/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = testtools -description = Some tools to directly manipulate nodes and entities. Great for development and testing diff --git a/mods/testtools/textures/testtools_children_getter.png b/mods/testtools/textures/testtools_children_getter.png deleted file mode 100644 index b7fa340..0000000 Binary files a/mods/testtools/textures/testtools_children_getter.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_entity_rotator.png b/mods/testtools/textures/testtools_entity_rotator.png deleted file mode 100644 index 17ebb2d..0000000 Binary files a/mods/testtools/textures/testtools_entity_rotator.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_entity_scaler.png b/mods/testtools/textures/testtools_entity_scaler.png deleted file mode 100644 index 4909c25..0000000 Binary files a/mods/testtools/textures/testtools_entity_scaler.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_entity_spawner.png b/mods/testtools/textures/testtools_entity_spawner.png deleted file mode 100644 index 6199e01..0000000 Binary files a/mods/testtools/textures/testtools_entity_spawner.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_falling_node_tool.png b/mods/testtools/textures/testtools_falling_node_tool.png deleted file mode 100644 index 30099a7..0000000 Binary files a/mods/testtools/textures/testtools_falling_node_tool.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_lighttool.png b/mods/testtools/textures/testtools_lighttool.png deleted file mode 100644 index 6f744b7..0000000 Binary files a/mods/testtools/textures/testtools_lighttool.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_node_meta_editor.png b/mods/testtools/textures/testtools_node_meta_editor.png deleted file mode 100644 index 89eafd6..0000000 Binary files a/mods/testtools/textures/testtools_node_meta_editor.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_node_setter.png b/mods/testtools/textures/testtools_node_setter.png deleted file mode 100644 index 8599438..0000000 Binary files a/mods/testtools/textures/testtools_node_setter.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_object_attacher.png b/mods/testtools/textures/testtools_object_attacher.png deleted file mode 100644 index 4d9bf6f..0000000 Binary files a/mods/testtools/textures/testtools_object_attacher.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_object_editor.png b/mods/testtools/textures/testtools_object_editor.png deleted file mode 100644 index d1ce9ce..0000000 Binary files a/mods/testtools/textures/testtools_object_editor.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_object_mover.png b/mods/testtools/textures/testtools_object_mover.png deleted file mode 100644 index 8b14e9f..0000000 Binary files a/mods/testtools/textures/testtools_object_mover.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_param2tool.png b/mods/testtools/textures/testtools_param2tool.png deleted file mode 100644 index dbc6635..0000000 Binary files a/mods/testtools/textures/testtools_param2tool.png and /dev/null differ diff --git a/mods/testtools/textures/testtools_remover.png b/mods/testtools/textures/testtools_remover.png deleted file mode 100644 index 73f14cd..0000000 Binary files a/mods/testtools/textures/testtools_remover.png and /dev/null differ diff --git a/mods/tiled/init.lua b/mods/tiled/init.lua deleted file mode 100644 index 68ead8e..0000000 --- a/mods/tiled/init.lua +++ /dev/null @@ -1,33 +0,0 @@ -minetest.register_node("tiled:tiled", { - description = "Tiled Node (world-aligned)", - tiles = {{ - name = "tiled_tiled.png", - align_style = "world", - scale = 8, - }}, - groups = {cracky=3}, -}) - -minetest.register_node("tiled:tiled_n", { - description = "Tiled Node (node-aligned)", - tiles = {{ - name = "tiled_tiled.png", - align_style = "node", - scale = 8, - }}, - groups = {cracky=3}, -}) - -stairs.register_stair_and_slab("tiled_n", "tiled:tiled", - {cracky=3}, - {{name="tiled_tiled.png", align_style="node", scale=8}}, - "Tiled Stair (node-aligned)", - "Tiled Slab (node-aligned)") - -stairs.register_stair_and_slab("tiled", "tiled:tiled", - {cracky=3}, - {{name="tiled_tiled.png", align_style="world", scale=8}}, - "Tiled Stair (world-aligned)", - "Tiled Slab (world-aligned)") - - diff --git a/mods/tiled/mod.conf b/mods/tiled/mod.conf deleted file mode 100644 index 78b19f9..0000000 --- a/mods/tiled/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = tiled -description = Add nodes with a special texture that spans multiple nodes (aka "world-aligned") -depends = stairs diff --git a/mods/tiled/textures/tiled_tiled.png b/mods/tiled/textures/tiled_tiled.png deleted file mode 100644 index 363a264..0000000 Binary files a/mods/tiled/textures/tiled_tiled.png and /dev/null differ diff --git a/mods/basetools/init.lua b/mods/tools/init.lua similarity index 74% rename from mods/basetools/init.lua rename to mods/tools/init.lua index fd83b82..31693ad 100644 --- a/mods/basetools/init.lua +++ b/mods/tools/init.lua @@ -69,10 +69,10 @@ else end -- Mese Pickaxe: special tool that digs "everything" instantly -minetest.register_tool("basetools:pick_mese", { +minetest.register_tool("tools:pick_mese", { description = "Mese Pickaxe".."\n".. "Digs diggable nodes instantly", - inventory_image = "basetools_mesepick.png", + inventory_image = "tools_mesepick.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=3, @@ -92,10 +92,10 @@ minetest.register_tool("basetools:pick_mese", { -- Pickaxes: Dig cracky -- -minetest.register_tool("basetools:pick_wood", { +minetest.register_tool("tools:pick_wood", { description = "Wooden Pickaxe".."\n".. "Digs cracky=3", - inventory_image = "basetools_woodpick.png", + inventory_image = "tools_woodpick.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -103,10 +103,10 @@ minetest.register_tool("basetools:pick_wood", { }, }, }) -minetest.register_tool("basetools:pick_stone", { +minetest.register_tool("tools:pick_stone", { description = "Stone Pickaxe".."\n".. "Digs cracky=2..3", - inventory_image = "basetools_stonepick.png", + inventory_image = "tools_stonepick.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -114,10 +114,10 @@ minetest.register_tool("basetools:pick_stone", { }, }, }) -minetest.register_tool("basetools:pick_steel", { +minetest.register_tool("tools:pick_steel", { description = "Steel Pickaxe".."\n".. "Digs cracky=1..3", - inventory_image = "basetools_steelpick.png", + inventory_image = "tools_steelpick.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -125,11 +125,11 @@ minetest.register_tool("basetools:pick_steel", { }, }, }) -minetest.register_tool("basetools:pick_steel_l1", { +minetest.register_tool("tools:pick_steel_l1", { description = "Steel Pickaxe Level 1".."\n".. "Digs cracky=1..3".."\n".. "maxlevel=1", - inventory_image = "basetools_steelpick_l1.png", + inventory_image = "tools_steelpick_l1.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -137,11 +137,11 @@ minetest.register_tool("basetools:pick_steel_l1", { }, }, }) -minetest.register_tool("basetools:pick_steel_l2", { +minetest.register_tool("tools:pick_steel_l2", { description = "Steel Pickaxe Level 2".."\n".. "Digs cracky=1..3".."\n".. "maxlevel=2", - inventory_image = "basetools_steelpick_l2.png", + inventory_image = "tools_steelpick_l2.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -154,10 +154,10 @@ minetest.register_tool("basetools:pick_steel_l2", { -- Shovels (dig crumbly) -- -minetest.register_tool("basetools:shovel_wood", { +minetest.register_tool("tools:shovel_wood", { description = "Wooden Shovel".."\n".. "Digs crumbly=3", - inventory_image = "basetools_woodshovel.png", + inventory_image = "tools_woodshovel.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -165,10 +165,10 @@ minetest.register_tool("basetools:shovel_wood", { }, }, }) -minetest.register_tool("basetools:shovel_stone", { +minetest.register_tool("tools:shovel_stone", { description = "Stone Shovel".."\n".. "Digs crumbly=2..3", - inventory_image = "basetools_stoneshovel.png", + inventory_image = "tools_stoneshovel.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -176,10 +176,10 @@ minetest.register_tool("basetools:shovel_stone", { }, }, }) -minetest.register_tool("basetools:shovel_steel", { +minetest.register_tool("tools:shovel_steel", { description = "Steel Shovel".."\n".. "Digs crumbly=1..3", - inventory_image = "basetools_steelshovel.png", + inventory_image = "tools_steelshovel.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -192,10 +192,10 @@ minetest.register_tool("basetools:shovel_steel", { -- Axes (dig choppy) -- -minetest.register_tool("basetools:axe_wood", { +minetest.register_tool("tools:axe_wood", { description = "Wooden Axe".."\n".. "Digs choppy=3", - inventory_image = "basetools_woodaxe.png", + inventory_image = "tools_woodaxe.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -203,10 +203,10 @@ minetest.register_tool("basetools:axe_wood", { }, }, }) -minetest.register_tool("basetools:axe_stone", { +minetest.register_tool("tools:axe_stone", { description = "Stone Axe".."\n".. "Digs choppy=2..3", - inventory_image = "basetools_stoneaxe.png", + inventory_image = "tools_stoneaxe.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -214,10 +214,10 @@ minetest.register_tool("basetools:axe_stone", { }, }, }) -minetest.register_tool("basetools:axe_steel", { +minetest.register_tool("tools:axe_steel", { description = "Steel Axe".."\n".. "Digs choppy=1..3", - inventory_image = "basetools_steelaxe.png", + inventory_image = "tools_steelaxe.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -230,10 +230,10 @@ minetest.register_tool("basetools:axe_steel", { -- Shears (dig snappy) -- -minetest.register_tool("basetools:shears_wood", { +minetest.register_tool("tools:shears_wood", { description = "Wooden Shears".."\n".. "Digs snappy=3", - inventory_image = "basetools_woodshears.png", + inventory_image = "tools_woodshears.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -241,10 +241,10 @@ minetest.register_tool("basetools:shears_wood", { }, }, }) -minetest.register_tool("basetools:shears_stone", { +minetest.register_tool("tools:shears_stone", { description = "Stone Shears".."\n".. "Digs snappy=2..3", - inventory_image = "basetools_stoneshears.png", + inventory_image = "tools_stoneshears.png", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -252,10 +252,10 @@ minetest.register_tool("basetools:shears_stone", { }, }, }) -minetest.register_tool("basetools:shears_steel", { +minetest.register_tool("tools:shears_steel", { description = "Steel Shears".."\n".. "Digs snappy=1..3", - inventory_image = "basetools_steelshears.png", + inventory_image = "tools_steelshears.png", tool_capabilities = { max_drop_level=1, groupcaps={ @@ -268,29 +268,29 @@ minetest.register_tool("basetools:shears_steel", { -- Swords (deal damage) -- -minetest.register_tool("basetools:sword_wood", { +minetest.register_tool("tools:sword_wood", { description = "Wooden Sword".."\n".. "Damage: fleshy=2", - inventory_image = "basetools_woodsword.png", + inventory_image = "tools_woodsword.png", tool_capabilities = { full_punch_interval = 1.0, damage_groups = {fleshy=2}, } }) -minetest.register_tool("basetools:sword_stone", { +minetest.register_tool("tools:sword_stone", { description = "Stone Sword".."\n".. "Damage: fleshy=4", - inventory_image = "basetools_stonesword.png", + inventory_image = "tools_stonesword.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=0, damage_groups = {fleshy=4}, } }) -minetest.register_tool("basetools:sword_steel", { +minetest.register_tool("tools:sword_steel", { description = "Steel Sword".."\n".. "Damage: fleshy=6", - inventory_image = "basetools_steelsword.png", + inventory_image = "tools_steelsword.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=1, @@ -299,20 +299,20 @@ minetest.register_tool("basetools:sword_steel", { }) -- Fire/Ice sword: Deal damage to non-fleshy damage groups -minetest.register_tool("basetools:sword_fire", { +minetest.register_tool("tools:sword_fire", { description = "Fire Sword".."\n".. "Damage: icy=6", - inventory_image = "basetools_firesword.png", + inventory_image = "tools_firesword.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=0, damage_groups = {icy=6}, } }) -minetest.register_tool("basetools:sword_ice", { +minetest.register_tool("tools:sword_ice", { description = "Ice Sword".."\n".. "Damage: fiery=6", - inventory_image = "basetools_icesword.png", + inventory_image = "tools_icesword.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=0, @@ -323,11 +323,11 @@ minetest.register_tool("basetools:sword_ice", { -- -- Dagger: Low damage, fast punch interval -- -minetest.register_tool("basetools:dagger_steel", { +minetest.register_tool("tools:dagger_steel", { description = "Steel Dagger".."\n".. "Damage: fleshy=2".."\n".. "Full Punch Interval: 0.5s", - inventory_image = "basetools_steeldagger.png", + inventory_image = "tools_steeldagger.png", tool_capabilities = { full_punch_interval = 0.5, max_drop_level=0, @@ -340,10 +340,10 @@ local uses = { 1, 2, 3, 5, 10, 50, 100, 1000, 10000, 65535 } for i=1, #uses do local u = uses[i] local color = string.format("#FF00%02X", math.floor(((i-1)/#uses) * 255)) - minetest.register_tool("basetools:pick_uses_"..string.format("%05d", u), { + minetest.register_tool("tools:pick_uses_"..string.format("%05d", u), { description = u.."-Uses Pickaxe".."\n".. "Digs cracky=3", - inventory_image = "basetools_steelpick.png^[colorize:"..color..":127", + inventory_image = "tools_steelpick.png^[colorize:"..color..":127", tool_capabilities = { max_drop_level=0, groupcaps={ @@ -352,10 +352,10 @@ for i=1, #uses do }, }) - minetest.register_tool("basetools:sword_uses_"..string.format("%05d", u), { + minetest.register_tool("tools:sword_uses_"..string.format("%05d", u), { description = u.."-Uses Sword".."\n".. "Damage: fleshy=1", - inventory_image = "basetools_woodsword.png^[colorize:"..color..":127", + inventory_image = "tools_woodsword.png^[colorize:"..color..":127", tool_capabilities = { damage_groups = {fleshy=1}, punch_attack_uses = u, diff --git a/mods/basetools/mod.conf b/mods/tools/mod.conf similarity index 71% rename from mods/basetools/mod.conf rename to mods/tools/mod.conf index f0d9f65..68e94c6 100644 --- a/mods/basetools/mod.conf +++ b/mods/tools/mod.conf @@ -1,2 +1,2 @@ -name = basetools +name = tools description = Contains basic digging tools diff --git a/mods/basetools/textures/basetools_firesword.png b/mods/tools/textures/tools_firesword.png similarity index 100% rename from mods/basetools/textures/basetools_firesword.png rename to mods/tools/textures/tools_firesword.png diff --git a/mods/basetools/textures/basetools_icesword.png b/mods/tools/textures/tools_icesword.png similarity index 100% rename from mods/basetools/textures/basetools_icesword.png rename to mods/tools/textures/tools_icesword.png diff --git a/mods/basetools/textures/basetools_mesepick.png b/mods/tools/textures/tools_mesepick.png similarity index 100% rename from mods/basetools/textures/basetools_mesepick.png rename to mods/tools/textures/tools_mesepick.png diff --git a/mods/basetools/textures/basetools_steelaxe.png b/mods/tools/textures/tools_steelaxe.png similarity index 100% rename from mods/basetools/textures/basetools_steelaxe.png rename to mods/tools/textures/tools_steelaxe.png diff --git a/mods/basetools/textures/basetools_steeldagger.png b/mods/tools/textures/tools_steeldagger.png similarity index 100% rename from mods/basetools/textures/basetools_steeldagger.png rename to mods/tools/textures/tools_steeldagger.png diff --git a/mods/tools/textures/tools_steelpick.png b/mods/tools/textures/tools_steelpick.png new file mode 100644 index 0000000..9a7fa6a Binary files /dev/null and b/mods/tools/textures/tools_steelpick.png differ diff --git a/mods/basetools/textures/basetools_steelpick_l1.png b/mods/tools/textures/tools_steelpick_l1.png similarity index 100% rename from mods/basetools/textures/basetools_steelpick_l1.png rename to mods/tools/textures/tools_steelpick_l1.png diff --git a/mods/basetools/textures/basetools_steelpick_l2.png b/mods/tools/textures/tools_steelpick_l2.png similarity index 100% rename from mods/basetools/textures/basetools_steelpick_l2.png rename to mods/tools/textures/tools_steelpick_l2.png diff --git a/mods/basetools/textures/basetools_steelshears.png b/mods/tools/textures/tools_steelshears.png similarity index 100% rename from mods/basetools/textures/basetools_steelshears.png rename to mods/tools/textures/tools_steelshears.png diff --git a/mods/basetools/textures/basetools_steelshovel.png b/mods/tools/textures/tools_steelshovel.png similarity index 100% rename from mods/basetools/textures/basetools_steelshovel.png rename to mods/tools/textures/tools_steelshovel.png diff --git a/mods/tools/textures/tools_steelsword.png b/mods/tools/textures/tools_steelsword.png new file mode 100644 index 0000000..e691262 Binary files /dev/null and b/mods/tools/textures/tools_steelsword.png differ diff --git a/mods/basetools/textures/basetools_stoneaxe.png b/mods/tools/textures/tools_stoneaxe.png similarity index 100% rename from mods/basetools/textures/basetools_stoneaxe.png rename to mods/tools/textures/tools_stoneaxe.png diff --git a/mods/basetools/textures/basetools_stonepick.png b/mods/tools/textures/tools_stonepick.png similarity index 100% rename from mods/basetools/textures/basetools_stonepick.png rename to mods/tools/textures/tools_stonepick.png diff --git a/mods/basetools/textures/basetools_stoneshears.png b/mods/tools/textures/tools_stoneshears.png similarity index 100% rename from mods/basetools/textures/basetools_stoneshears.png rename to mods/tools/textures/tools_stoneshears.png diff --git a/mods/basetools/textures/basetools_stoneshovel.png b/mods/tools/textures/tools_stoneshovel.png similarity index 100% rename from mods/basetools/textures/basetools_stoneshovel.png rename to mods/tools/textures/tools_stoneshovel.png diff --git a/mods/basetools/textures/basetools_stonesword.png b/mods/tools/textures/tools_stonesword.png similarity index 100% rename from mods/basetools/textures/basetools_stonesword.png rename to mods/tools/textures/tools_stonesword.png diff --git a/mods/basetools/textures/basetools_woodaxe.png b/mods/tools/textures/tools_woodaxe.png similarity index 100% rename from mods/basetools/textures/basetools_woodaxe.png rename to mods/tools/textures/tools_woodaxe.png diff --git a/mods/basetools/textures/basetools_woodpick.png b/mods/tools/textures/tools_woodpick.png similarity index 100% rename from mods/basetools/textures/basetools_woodpick.png rename to mods/tools/textures/tools_woodpick.png diff --git a/mods/basetools/textures/basetools_woodshears.png b/mods/tools/textures/tools_woodshears.png similarity index 100% rename from mods/basetools/textures/basetools_woodshears.png rename to mods/tools/textures/tools_woodshears.png diff --git a/mods/basetools/textures/basetools_woodshovel.png b/mods/tools/textures/tools_woodshovel.png similarity index 100% rename from mods/basetools/textures/basetools_woodshovel.png rename to mods/tools/textures/tools_woodshovel.png diff --git a/mods/basetools/textures/basetools_woodsword.png b/mods/tools/textures/tools_woodsword.png similarity index 100% rename from mods/basetools/textures/basetools_woodsword.png rename to mods/tools/textures/tools_woodsword.png diff --git a/mods/torch/init.lua b/mods/torch/init.lua new file mode 100644 index 0000000..ca1f113 --- /dev/null +++ b/mods/torch/init.lua @@ -0,0 +1,121 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +local function on_flood(pos, oldnode, newnode) + minetest.add_item(pos, ItemStack("torch:torch 1")) + -- Play flame-extinguish sound if liquid is not an 'igniter' + local nodedef = minetest.registered_items[newnode.name] + if not (nodedef and nodedef.groups and + nodedef.groups.igniter and nodedef.groups.igniter > 0) then + minetest.sound_play( + "sound_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.1}, + true + ) + end + -- Remove the torch node + return false +end + +minetest.register_node("torch:torch", { + description = S("Torch"), + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.0625, -0.5, -0.0625, 0.0625, -0.125, 0.0625}, -- NodeBox1 + {-0.1875, -0.5, 0, 0.1875, 0.5, 0}, -- NodeBox2 + {0, -0.5, -0.1875, 0, 0.5, 0.1875}, -- NodeBox4 + } + }, + inventory_image = "torch_on_floor.png", + wield_image = "torch_on_floor.png", + tiles = {{ + name = "torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.0} + }}, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + liquids_pointable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1}, + drop = "torch:torch", + selection_box = { + type = "wallmounted", + wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8}, + }, + sounds = sound.wood(), + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local def = minetest.registered_nodes[node.name] + if def and def.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return def.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + local above = pointed_thing.above + local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above)) + local fakestack = itemstack + if wdir == 0 then + fakestack:set_name("torch:torch_ceiling") + elseif wdir == 1 then + fakestack:set_name("torch:torch") + else + fakestack:set_name("torch:torch_wall") + end + + itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir) + itemstack:set_name("torch:torch") + + return itemstack + end, + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_node("torch:torch_wall", { + drawtype = "mesh", + mesh = "torch_wall.obj", + tiles = {{ + name = "torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1} + }}, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, + drop = "torch:torch", + selection_box = { + type = "wallmounted", + wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8}, + }, + sounds = sound.wood(), + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_craft({ + output = "torch:torch 4", + type = "shapeless", + recipe = { + "nodez:coal_lump", + "group:stick", + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "torch:torch", + burntime = 4, +}) diff --git a/mods/torch/locale/torch.es.tr b/mods/torch/locale/torch.es.tr new file mode 100644 index 0000000..f191fc4 --- /dev/null +++ b/mods/torch/locale/torch.es.tr @@ -0,0 +1,2 @@ +# textdomain: torch +Torch=Antorcha diff --git a/mods/torch/mod.conf b/mods/torch/mod.conf new file mode 100644 index 0000000..424c2c2 --- /dev/null +++ b/mods/torch/mod.conf @@ -0,0 +1,3 @@ +name = torch +description = Torch +depends = nodez, treez diff --git a/mods/torch/models/torch_wall.obj b/mods/torch/models/torch_wall.obj new file mode 100644 index 0000000..57baa9e --- /dev/null +++ b/mods/torch/models/torch_wall.obj @@ -0,0 +1,64 @@ +# Blender v2.76 (sub 11) OBJ File: 'torch_wall.blend' +# www.blender.org +mtllib torch_wall.mtl +o Cube_Cube.001 +v 0.062469 -0.195248 0.023570 +v 0.062469 -0.476498 -0.463570 +v 0.062469 -0.303502 0.086070 +v 0.062469 -0.584752 -0.401070 +v -0.062531 -0.195248 0.023570 +v -0.062531 -0.476498 -0.463570 +v -0.062531 -0.303502 0.086070 +v -0.062531 -0.584752 -0.401070 +v -0.353584 -0.613553 0.022500 +v -0.353584 -0.613553 0.460000 +v 0.353522 0.093553 0.022500 +v 0.353522 0.093553 0.460000 +v -0.353584 0.093553 0.022500 +v 0.353522 -0.613553 0.022500 +v -0.353584 0.093553 0.460000 +v 0.353522 -0.613553 0.460000 +v 0.353553 0.056811 -0.121957 +v 0.353553 -0.224439 -0.609096 +v -0.353553 -0.555561 0.231596 +v -0.353553 -0.836811 -0.255543 +v -0.353553 0.056811 -0.121957 +v -0.353553 -0.224439 -0.609096 +v 0.353553 -0.555561 0.231596 +v 0.353553 -0.836811 -0.255543 +vt 0.562500 0.500000 +vt 0.562500 0.625000 +vt 0.437500 0.625000 +vt 0.437500 0.500000 +vt 0.437500 0.000000 +vt 0.562500 0.000000 +vt 0.562500 0.125000 +vt 0.437500 0.125000 +vt 0.000000 0.562500 +vt 0.000000 -0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.562500 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vn -0.000000 0.500000 0.866000 +vn -0.000000 0.866000 -0.500000 +vn 1.000000 0.000000 0.000000 +vn -0.707100 0.612400 -0.353600 +vn -0.707100 -0.612400 0.353600 +vn -0.707100 0.707100 -0.000000 +vn -0.707100 -0.707100 -0.000000 +g Cube_Cube.001_Cube_Cube.001_Material.001 +usemtl Material.001 +s off +f 3/1/1 1/2/1 5/3/1 7/4/1 +f 8/5/1 4/6/1 2/7/1 6/8/1 +f 3/2/2 4/6/2 8/5/2 7/3/2 +f 1/3/3 3/2/3 4/6/3 2/5/3 +f 5/2/2 1/3/2 2/5/2 6/6/2 +f 7/3/3 8/5/3 6/6/3 5/2/3 +f 17/9/4 18/10/4 20/11/4 19/12/4 +f 21/9/5 22/10/5 24/11/5 23/12/5 +g Cube_Cube.001_Cube_Cube.001_Material.002 +usemtl Material.002 +f 9/12/6 10/13/6 12/14/6 11/9/6 +f 13/9/7 14/12/7 16/13/7 15/14/7 diff --git a/mods/torch/textures/torch_on_floor.png b/mods/torch/textures/torch_on_floor.png new file mode 100755 index 0000000..a39a6b5 Binary files /dev/null and b/mods/torch/textures/torch_on_floor.png differ diff --git a/mods/torch/textures/torch_on_floor.png~ b/mods/torch/textures/torch_on_floor.png~ new file mode 100755 index 0000000..e78c774 Binary files /dev/null and b/mods/torch/textures/torch_on_floor.png~ differ diff --git a/mods/torch/textures/torch_on_floor_animated.png b/mods/torch/textures/torch_on_floor_animated.png new file mode 100755 index 0000000..2e0ee0a Binary files /dev/null and b/mods/torch/textures/torch_on_floor_animated.png differ diff --git a/mods/torch/textures/torch_on_floor_animated.png~ b/mods/torch/textures/torch_on_floor_animated.png~ new file mode 100755 index 0000000..0f3a5ab Binary files /dev/null and b/mods/torch/textures/torch_on_floor_animated.png~ differ diff --git a/mods/treez/api.lua b/mods/treez/api.lua index 7b9812a..251381f 100644 --- a/mods/treez/api.lua +++ b/mods/treez/api.lua @@ -22,6 +22,7 @@ function treez.register_tree(name, def) }, groups = {fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1}, + sounds = sound.leaves(), on_use = minetest.item_eat(2), @@ -58,10 +59,12 @@ function treez.register_tree(name, def) paramtype = "light", sunlight_propagates = true, walkable = false, + sounds = sound.leaves(), on_timer = function(pos) minetest.remove_node(pos) - minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/"..name..".mts", "0", nil, false) + minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/"..name..".mts", "0", + nil, false) end, selection_box = { @@ -89,6 +92,7 @@ function treez.register_tree(name, def) groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, paramtype2 = "facedir", is_ground_content = false, + sounds = sound.wood(), on_place = minetest.rotate_node, }) @@ -100,6 +104,7 @@ function treez.register_tree(name, def) place_param2 = 0, is_ground_content = false, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = sound.wood(), }) --Leaves @@ -118,6 +123,7 @@ function treez.register_tree(name, def) {items = {"treez:"..name.."_leaves"}} } }, + sounds = sound.leaves(), }) -- @@ -148,17 +154,10 @@ function treez.register_tree(name, def) deco_type = "schematic", place_on = def.deco.place_on, sidelen = 16, - noise_params = { - offset = -0.005, - scale = 0.02, - spread = {x = 250, y = 250, z = 250}, - seed = 729, - octaves = 3, - persist = 0.66 - }, + noise_params = def.deco.noise_params, biomes = def.deco.biomes, y_min = 1, - y_max = biomes.peaky_mountain_height, + y_max = mapgen.biomes.peaky_mountain_height, place_offset_y = 1, schematic = modpath.."/schematics/"..name..".mts", flags = "place_center_x, place_center_z, force_placement", diff --git a/mods/treez/apple_tree.lua b/mods/treez/apple_tree.lua deleted file mode 100644 index 346b8c9..0000000 --- a/mods/treez/apple_tree.lua +++ /dev/null @@ -1,176 +0,0 @@ --- --- Apple Tree --- - -local S, modpath, mg_name = ... - -local variability = 0.2 --20% -local fruit_grow_time = 1200 --1200 by default -local tree_grow_time = 5 --3600 by default - --- Apple Fruit - -minetest.register_node("treez:apple", { - description = S("Apple"), - drawtype = "plantlike", - tiles = {"treez_apple.png"}, - inventory_image = "treez_apple_inv.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - is_ground_content = false, - selection_box = { - type = "fixed", - fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} - }, - groups = {fleshy = 3, dig_immediate = 3, flammable = 2, - leafdecay = 3, leafdecay_drop = 1}, - - on_use = minetest.item_eat(2), - - after_place_node = function(pos, placer, itemstack) - minetest.set_node(pos, {name = "treez:apple", param2 = 1}) - end, - - on_dig = function(pos, node, digger) - if digger:is_player() then - local inv = digger:get_inventory() - if inv:room_for_item("main", "treez:apple") then - inv:add_item("main", "treez:apple") - end - end - minetest.remove_node(pos) - pos.y = pos.y + 1 - local node_above = minetest.get_node_or_nil(pos) - if node_above and node_above.param2 == 0 and node_above.name == "treez:apple_tree_leaves" then - --20% of variation on time - local grow_time = math.random(fruit_grow_time - (fruit_grow_time * variability), - fruit_grow_time + (fruit_grow_time * variability)) - minetest.get_node_timer(pos):start(grow_time) - end - end, -}) - --- Apple Tree - -local function grow_new_apple_tree(pos) - minetest.remove_node(pos) - minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/apple_tree.mts", "0", nil, false) -end - --- --- Decoration --- - -if mg_name ~= "v6" and mg_name ~= "singlenode" then - minetest.register_decoration({ - name = "treez:apple_tree", - deco_type = "schematic", - place_on = "nodez:dirt_with_grass", - sidelen = 16, - noise_params = { - offset = -0.005, - scale = 0.02, - spread = {x = 250, y = 250, z = 250}, - seed = 729, - octaves = 3, - persist = 0.66 - }, - biomes = {"forest"}, - y_min = 1, - y_max = biomes.peaky_mountain_height, - place_offset_y = 1, - schematic = modpath.."/schematics/apple_tree.mts", - flags = "place_center_x, place_center_z, force_placement", - rotation = "random", - }) -end - --- --- Nodes --- - -minetest.register_node("treez:apple_tree_sapling", { - description = S("Apple Tree Sapling"), - drawtype = "plantlike", - tiles = {"treez_apple_tree_sapling.png"}, - inventory_image = "treez_apple_tree_sapling.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - on_timer = grow_new_apple_tree, - selection_box = { - type = "fixed", - fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} - }, - - groups = {snappy = 2, dig_immediate = 3, flammable = 2, - attached_node = 1, sapling = 1}, - - on_construct = function(pos) - minetest.get_node_timer(pos):start(math.random(tree_grow_time - (tree_grow_time * variability), - tree_grow_time + (tree_grow_time * variability))) - end, - -}) - -minetest.register_node("treez:apple_tree_trunk", { - description = S("Apple Tree Trunk"), - tiles = { - "treez_apple_tree_trunk_top.png", - "treez_apple_tree_trunk_top.png", - "treez_apple_tree_trunk.png" - }, - groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, - paramtype2 = "facedir", - is_ground_content = false, - on_place = minetest.rotate_node, -}) - -minetest.register_node("treez:apple_tree_wood", { - description = S("Apple Tree Wood"), - tiles = {"treez_apple_tree_wood.png"}, - paramtype2 = "facedir", - place_param2 = 0, - is_ground_content = false, - groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, -}) - -minetest.register_node("treez:apple_tree_leaves", { - description = S("Apple Tree Leaves"), - drawtype = "allfaces_optional", - tiles = {"treez_apple_tree_leaves.png"}, - paramtype = "light", - walkable = true, - waving = 1, - groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, - drop = { - max_items = 1, - items = { - {items = {"treez:apple_tree_sapling"}, rarity = 20}, - {items = {"treez:apple_tree_leaves"}} - } - }, -}) - --- --- Recipes --- - -minetest.register_craft({ - output = "treez:apple_tree_wood 4", - recipe = {{"treez:apple_tree_trunk"}} -}) - - -minetest.register_craft({ - type = "fuel", - recipe = "treez:apple_tree_trunk", - burntime = 30, -}) - -minetest.register_craft({ - type = "fuel", - recipe = "treez:apple_tree_wood", - burntime = 7, -}) diff --git a/mods/treez/init.lua b/mods/treez/init.lua index 824021c..e31208c 100644 --- a/mods/treez/init.lua +++ b/mods/treez/init.lua @@ -7,3 +7,4 @@ local mg_name = minetest.get_mapgen_setting("mg_name") assert(loadfile(modpath .. "/api.lua"))(S, modpath, mg_name) assert(loadfile(modpath .. "/trees.lua"))() +assert(loadfile(modpath .. "/wood.lua"))(S) diff --git a/mods/treez/locale/treez.es.tr b/mods/treez/locale/treez.es.tr index 3878242..8123845 100644 --- a/mods/treez/locale/treez.es.tr +++ b/mods/treez/locale/treez.es.tr @@ -7,3 +7,4 @@ Apple=Manzana Apple Tree=de manzano Cherries=Cerezas Cherry Tree=de cerezo +Stick=Palo de madera diff --git a/mods/treez/schematics/cherry_tree.mts b/mods/treez/schematics/cherry_tree.mts new file mode 100644 index 0000000..ac0978c Binary files /dev/null and b/mods/treez/schematics/cherry_tree.mts differ diff --git a/mods/treez/textures/.treez_apple_tree_trunk_top.png-autosave.kra b/mods/treez/textures/.treez_apple_tree_trunk_top.png-autosave.kra deleted file mode 100644 index 25bb8da..0000000 Binary files a/mods/treez/textures/.treez_apple_tree_trunk_top.png-autosave.kra and /dev/null differ diff --git a/mods/treez/textures/treez_cherries.png b/mods/treez/textures/treez_cherries.png index 96c0693..24c01d6 100644 Binary files a/mods/treez/textures/treez_cherries.png and b/mods/treez/textures/treez_cherries.png differ diff --git a/mods/treez/textures/treez_cherries.png~ b/mods/treez/textures/treez_cherries.png~ index 122e818..18fc580 100644 Binary files a/mods/treez/textures/treez_cherries.png~ and b/mods/treez/textures/treez_cherries.png~ differ diff --git a/mods/treez/textures/treez_cherry_tree_sapling.png b/mods/treez/textures/treez_cherry_tree_sapling.png new file mode 100644 index 0000000..e481d2e Binary files /dev/null and b/mods/treez/textures/treez_cherry_tree_sapling.png differ diff --git a/mods/treez/textures/treez_cherry_tree_sapling.png~ b/mods/treez/textures/treez_cherry_tree_sapling.png~ new file mode 100644 index 0000000..823bb13 Binary files /dev/null and b/mods/treez/textures/treez_cherry_tree_sapling.png~ differ diff --git a/mods/treez/textures/treez_cherry_tree_wood.png b/mods/treez/textures/treez_cherry_tree_wood.png new file mode 100644 index 0000000..4e8d126 Binary files /dev/null and b/mods/treez/textures/treez_cherry_tree_wood.png differ diff --git a/mods/treez/textures/treez_stick.png b/mods/treez/textures/treez_stick.png new file mode 100644 index 0000000..f5212d7 Binary files /dev/null and b/mods/treez/textures/treez_stick.png differ diff --git a/mods/treez/textures/treez_stick.png~ b/mods/treez/textures/treez_stick.png~ new file mode 100644 index 0000000..f5212d7 Binary files /dev/null and b/mods/treez/textures/treez_stick.png~ differ diff --git a/mods/treez/trees.lua b/mods/treez/trees.lua index 6dd7633..dffe03c 100644 --- a/mods/treez/trees.lua +++ b/mods/treez/trees.lua @@ -7,7 +7,15 @@ treez.register_tree("apple_tree", { }, deco = { biomes = {"forest"}, - place_on = "nodez:dirt_with_grass" + place_on = "nodez:dirt_with_grass", + noise_params = { + offset = -0.005, + scale = 0.02, + spread = {x = 250, y = 250, z = 250}, + seed = 729, + octaves = 3, + persist = 0.66 + }, } }) @@ -20,6 +28,14 @@ treez.register_tree("cherry_tree", { }, deco = { biomes = {"forest"}, - place_on = "nodez:dirt_with_grass" + place_on = "nodez:dirt_with_grass", + noise_params = { + offset = -0.005, + scale = 0.008, + spread = {x = 250, y = 250, z = 250}, + seed = 237, + octaves = 3, + persist = 0.66 + }, } }) diff --git a/mods/treez/wood.lua b/mods/treez/wood.lua new file mode 100644 index 0000000..ac5575c --- /dev/null +++ b/mods/treez/wood.lua @@ -0,0 +1,16 @@ +local S = ... + +--Stick +minetest.register_craftitem("treez:stick", { + description = S("Stick"), + inventory_image = "treez_stick.png", + groups = {stick = 1} +}) + +minetest.register_craft({ + output = "treez:stick 4", + type = "shapeless", + recipe = { + "group:wood" + } +}) diff --git a/mods/wield3d/LICENSE.md b/mods/wield3d/LICENSE.md new file mode 100644 index 0000000..d7f31ff --- /dev/null +++ b/mods/wield3d/LICENSE.md @@ -0,0 +1,4 @@ +[mod] 3d wielded items [wield3d] +================================ + +Copyright (C) 2013 Stuart Jones - WTFPL diff --git a/mods/wield3d/README.md b/mods/wield3d/README.md index ac8de02..7a3fdba 100644 --- a/mods/wield3d/README.md +++ b/mods/wield3d/README.md @@ -1,26 +1,17 @@ [mod] 3d wielded items [wield3d] ================================ -Mod Version: 0.5.1 +Mod Version: 0.4.0 -Minetest Version: 5.0.0 or later +Minetest Version: 0.4.12 or later Decription: Visible 3d wielded items for Minetest +Depends: default + Makes hand wielded items visible to other players. By default the wielded object is updated at one second intervals, -you can override this by adding `wield3d_update_time = 1` (seconds) +you can override this by adding wield3d_update_time = 1 (seconds) to your minetest.conf -Servers can also control how often to verify the wield item of each -individual player by setting `wield3d_verify_time = 10` (seconds) - -The default wielditem scale can now be specified by including `wield3d_scale = 0.25` - - -### Known Issues - -Items occasionally disappear when viewing in 3rd person. This is a minetest engine bug and not the fault of the mod, turning 3rd person off then back on restores the view. - -Wield item switches direction at certain animation key-frames. I have yet to identify the true cause of this issue but a specially adapted version of the player model can be found [here](https://github.com/stujones11/minetest-models/tree/master/character/sam_viewer) that attempts to work around the problem. diff --git a/mods/wield3d/description.txt b/mods/wield3d/description.txt new file mode 100644 index 0000000..0f99fb8 --- /dev/null +++ b/mods/wield3d/description.txt @@ -0,0 +1,2 @@ +Visible 3d wielded items for Minetest. +Adds 3d wield-items that are visible in third person view and to other players. diff --git a/mods/wield3d/init.lua b/mods/wield3d/init.lua index eb8d516..772b5c4 100644 --- a/mods/wield3d/init.lua +++ b/mods/wield3d/init.lua @@ -1,207 +1,120 @@ ---[[ - -MIT License - -Copyright (c) 2019 stujones11, Stuart Jones - -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. - -]]-- - wield3d = {} dofile(minetest.get_modpath(minetest.get_current_modname()).."/location.lua") -local player_wielding = {} local has_wieldview = minetest.get_modpath("wieldview") -local update_time = minetest.settings:get("wield3d_update_time") -local verify_time = minetest.settings:get("wield3d_verify_time") -local wield_scale = minetest.settings:get("wield3d_scale") - -update_time = update_time and tonumber(update_time) or 1 -verify_time = verify_time and tonumber(verify_time) or 10 -wield_scale = wield_scale and tonumber(wield_scale) or 0.25 -- default scale - +local update_time_conf = minetest.setting_get("wield3d_update_time") or 1 +local update_time = tonumber(update_time_conf) or 1 +local timer = 0 +local player_wielding = {} local location = { "Arm_Right", -- default bone - {x=0, y=5, z=3}, -- default position + {x=0, y=5.5, z=3}, -- default position {x=-90, y=225, z=90}, -- default rotation - {x=wield_scale, y=wield_scale}, + {x=0.25, y=0.25}, -- default scale } local function add_wield_entity(player) - if not player or not player:is_player() then - return - end local name = player:get_player_name() - local pos = player:get_pos() - if name and pos and not player_wielding[name] then + local pos = player:getpos() + if name and pos then pos.y = pos.y + 0.5 - local object = minetest.add_entity(pos, "wield3d:wield_entity", name) + local object = minetest.add_entity(pos, "wield3d:wield_entity") if object then object:set_attach(player, location[1], location[2], location[3]) object:set_properties({ textures = {"wield3d:hand"}, visual_size = location[4], }) - player_wielding[name] = {item="", location=location} + player_wielding[name] = {} + player_wielding[name].item = "" + player_wielding[name].object = object + player_wielding[name].location = location end end end -local function sq_dist(a, b) - local x = a.x - b.x - local y = a.y - b.y - local z = a.z - b.z - return x * x + y * y + z * z -end - -local wield_entity = { - physical = false, - collisionbox = {-0.125,-0.125,-0.125, 0.125,0.125,0.125}, - visual = "wielditem", - textures = {"wield3d:hand"}, - wielder = nil, - timer = 0, - static_save = false, -} - -function wield_entity:on_activate(staticdata) - if staticdata and staticdata ~= "" then - self.wielder = staticdata - return - end - self.object:remove() -end - -function wield_entity:on_step(dtime) - if self.wielder == nil then - return - end - self.timer = self.timer + dtime - if self.timer < update_time then - return - end - local player = minetest.get_player_by_name(self.wielder) - if player == nil or not player:is_player() or - sq_dist(player:get_pos(), self.object:get_pos()) > 3 then - self.object:remove() - return - end - local wield = player_wielding[self.wielder] - local stack = player:get_wielded_item() - local item = stack:get_name() or "" - if wield and item ~= wield.item then - if has_wieldview then - local def = minetest.registered_items[item] or {} - if def.inventory_image ~= "" then - item = "" - end - end - wield.item = item - if item == "" then - item = "wield3d:hand" - end - local loc = wield3d.location[item] or location - if loc[1] ~= wield.location[1] or - not vector.equals(loc[2], wield.location[2]) or - not vector.equals(loc[3], wield.location[3]) then - self.object:set_attach(player, loc[1], loc[2], loc[3]) - wield.location = {loc[1], loc[2], loc[3]} - end - self.object:set_properties({ - textures = {item}, - visual_size = loc[4], - }) - end - self.timer = 0 -end - -local function table_iter(t) - local i = 0 - local n = table.getn(t) - return function () - i = i + 1 - if i <= n then - return t[i] - end - end -end - -local player_iter = nil - -local function verify_wielditems() - if player_iter == nil then - local names = {} - local tmp = {} - for player in table_iter(minetest.get_connected_players()) do - local name = player:get_player_name() - if name then - tmp[name] = true; - table.insert(names, name) - end - end - player_iter = table_iter(names) - -- clean-up player_wielding table - for name, wield in pairs(player_wielding) do - player_wielding[name] = tmp[name] and wield - end - end - -- only deal with one player per server step - local name = player_iter() - if name then - local player = minetest.get_player_by_name(name) - if player and player:is_player() then - local pos = player:get_pos() - pos.y = pos.y + 0.5 - local wielding = false - local objects = minetest.get_objects_inside_radius(pos, 1) - for _, object in pairs(objects) do - local entity = object:get_luaentity() - if entity and entity.wielder == name then - if wielding then - -- remove duplicates - object:remove() - end - wielding = true - end - end - if not wielding then - player_wielding[name] = nil - add_wield_entity(player) - end - end - return minetest.after(0, verify_wielditems) - end - player_iter = nil - minetest.after(verify_time, verify_wielditems) -end - -minetest.after(verify_time, verify_wielditems) - -minetest.register_entity("wield3d:wield_entity", wield_entity) - minetest.register_item("wield3d:hand", { type = "none", wield_image = "blank.png", }) -minetest.register_on_joinplayer(function(player) - minetest.after(2, add_wield_entity, player) +minetest.register_entity("wield3d:wield_entity", { + physical = false, + collisionbox = {-0.125,-0.125,-0.125, 0.125,0.125,0.125}, + visual = "wielditem", + on_activate = function(self, staticdata) + if staticdata == "expired" then + self.object:remove() + end + end, + on_punch = function(self) + self.object:remove() + end, + get_staticdata = function(self) + return "expired" + end, +}) + +minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer < update_time then + return + end + local active_players = {} + for _, player in pairs(minetest.get_connected_players()) do + local name = player:get_player_name() + local wield = player_wielding[name] + if wield and wield.object then + local stack = player:get_wielded_item() + local item = stack:get_name() or "" + if item ~= wield.item then + if has_wieldview then + local def = minetest.registered_items[item] or {} + if def.inventory_image ~= "" then + item = "" + end + end + wield.item = item + if item == "" then + item = "wield3d:hand" + end + local loc = wield3d.location[item] or location + if loc[1] ~= wield.location[1] or + not vector.equals(loc[2], wield.location[2]) or + not vector.equals(loc[3], wield.location[3]) then + wield.object:set_attach(player, loc[1], loc[2], loc[3]) + wield.location = {loc[1], loc[2], loc[3]} + end + wield.object:set_properties({ + textures = {item}, + visual_size = loc[4], + }) + end + else + add_wield_entity(player) + end + active_players[name] = true + end + for name, wield in pairs(player_wielding) do + if not active_players[name] then + if wield.object then + wield.object:remove() + end + player_wielding[name] = nil + end + end + timer = 0 end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + if name then + local wield = player_wielding[name] or {} + if wield.object then + wield.object:remove() + end + player_wielding[name] = nil + end +end) + diff --git a/mods/wield3d/location.lua b/mods/wield3d/location.lua index d7765f3..3cd9bc3 100644 --- a/mods/wield3d/location.lua +++ b/mods/wield3d/location.lua @@ -1,29 +1,3 @@ ---[[ - -MIT License - -Copyright (c) 2019 stujones11, Stuart Jones - -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. - -]]-- - -- Wielded Item Location Overrides - [item_name] = {bone, position, rotation} local bone = "Arm_Right" diff --git a/mods/wield3d/mod.conf b/mods/wield3d/mod.conf index 4c0277d..7ab29fb 100644 --- a/mods/wield3d/mod.conf +++ b/mods/wield3d/mod.conf @@ -1,2 +1 @@ name = wield3d -description = Adds 3d wield-items that are visible in third person view and to other players. diff --git a/mods/wield3d/screenshot.png b/mods/wield3d/screenshot.png index 8fb662a..9609595 100644 Binary files a/mods/wield3d/screenshot.png and b/mods/wield3d/screenshot.png differ diff --git a/mods/wield3d/textures/blank.png b/mods/wield3d/textures/blank.png index 26ea0a4..d22205c 100644 Binary files a/mods/wield3d/textures/blank.png and b/mods/wield3d/textures/blank.png differ