diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..ba158b3 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Enchanting and more. diff --git a/licence.txt b/licence.txt new file mode 100644 index 0000000..f50419b --- /dev/null +++ b/licence.txt @@ -0,0 +1,13 @@ +DO WHAT YOU WANT TO PUBLIC LICENSE +or abbreviated DWYWPL + +December 2nd 2015 +License Copyright (C) 2015 Michael Tomaino (PlatinumArts@gmail.com) +www.sandboxgamemaker.com/DWYWPL/ + +DO WHAT YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +1. You are allowed to do whatever you want to with what content is using this license. +2. This content is provided 'as-is', without any express or implied warranty. In no event +will the authors be held liable for any damages arising from the use of this content. diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..d8f0b1d --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = mymagic_mp diff --git a/mymagic/gem_blocks.lua b/mymagic/gem_blocks.lua index d8b758e..d22c292 100644 --- a/mymagic/gem_blocks.lua +++ b/mymagic/gem_blocks.lua @@ -8,16 +8,57 @@ local function parti(pos) false, "mymagic_magic_parti.png") end +minetest.register_node("mymagic:gem_block",{ + description = "Gem Block", + tiles = {"mymagic_gem_block_orange.png^[colorize:#000000:150"}, + light_source = 10, + paramtype = "light", + groups = {cracky = 1}, + after_place_node = function(pos, placer, itemstack, pointed_thing) + --local meta = minetest.get_meta(pos) + + minetest.show_formspec(placer:get_player_name(),"mymagic_fs", + "size[4,4;]".. + "image_button_exit[1,1;1,1;mymagic_crystal_orange.png;orange;]".. + "image_button_exit[1,2;1,1;mymagic_crystal_green.png;green;]".. + "image_button_exit[2,1;1,1;mymagic_crystal_blue.png;blue;]".. + "image_button_exit[2,2;1,1;mymagic_crystal_red.png;red;]") + + minetest.register_on_player_receive_fields(function(player, mymagic_fs, fields) + if fields["orange"] or fields["green"] or fields["blue"] or fields["red"] then + if fields["orange"] then + minetest.remove_node(pos) + minetest.place_node(pos, {name = "mymagic:gem_block_orange"}) + end + if fields["green"] then + minetest.remove_node(pos) + minetest.place_node(pos, {name = "mymagic:gem_block_green"}) + end + if fields["blue"] then + minetest.remove_node(pos) + minetest.place_node(pos, {name = "mymagic:gem_block_blue"}) + end + if fields["red"] then + minetest.remove_node(pos) + minetest.place_node(pos, {name = "mymagic:gem_block_red"}) + end + end + end) + end, +}) + minetest.register_node("mymagic:gem_block_orange",{ description = "Orange Gem Block", tiles = {"mymagic_gem_block_orange.png"}, light_source = 11, paramtype2 = "facedir", - groups = {cracky = 1}, - - on_construct = function(pos) + groups = {cracky = 1, not_in_creative_inventory = 1}, + + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[4,5.5;]".. + minetest.show_formspec(player:get_player_name(),"mymagic_orange_fs", + "size[4,5.5;]".. "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_orange.png]".. "background[0.5,0.5;3,3;mymagic_gem_block_orange.png]".. "listcolors[#cf7f00;#fb9c06;#000000]".. @@ -28,7 +69,7 @@ minetest.register_node("mymagic:gem_block_orange",{ local inv = meta:get_inventory() inv:set_size("orange_gem", 1) end, - on_receive_fields = function(pos, formname, fields, sender) + on_receive_fields = function(pos, mymagic_orange_fs, fields, sender) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() @@ -61,11 +102,12 @@ minetest.register_node("mymagic:gem_block_green",{ tiles = {"mymagic_gem_block_green.png"}, light_source = 11, paramtype2 = "facedir", - groups = {cracky = 1}, + groups = {cracky = 1, not_in_creative_inventory = 1}, - on_construct = function(pos) + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[4,5.5;]".. + minetest.show_formspec(player:get_player_name(),"mymagic_green_fs", + "size[4,5.5;]".. "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_green.png]".. "background[0.5,0.5;3,3;mymagic_gem_block_green.png]".. "listcolors[#0d6601;#13a400;#000000]".. @@ -76,7 +118,7 @@ minetest.register_node("mymagic:gem_block_green",{ local inv = meta:get_inventory() inv:set_size("green_gem", 1) end, - on_receive_fields = function(pos, formname, fields, sender) + on_receive_fields = function(pos, mymagic_green_fs, fields, sender) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() @@ -110,11 +152,13 @@ minetest.register_node("mymagic:gem_block_blue",{ tiles = {"mymagic_gem_block_blue.png"}, light_source = 11, paramtype2 = "facedir", - groups = {cracky = 1}, + groups = {cracky = 1, not_in_creative_inventory = 1}, - on_construct = function(pos) + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[4,5.5;]".. + minetest.show_formspec(player:get_player_name(),"mymagic_orange_fs", + "size[4,5.5;]".. "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_blue.png]".. "background[0.5,0.5;3,3;mymagic_gem_block_blue.png]".. "listcolors[#030f4a;#030f7b;#000000]".. @@ -125,7 +169,7 @@ minetest.register_node("mymagic:gem_block_blue",{ local inv = meta:get_inventory() inv:set_size("blue_gem", 1) end, - on_receive_fields = function(pos, formname, fields, sender) + on_receive_fields = function(pos, mymagic_orange_fs, fields, sender) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() @@ -153,11 +197,13 @@ minetest.register_node("mymagic:gem_block_red",{ tiles = {"mymagic_gem_block_red.png"}, light_source = 11, paramtype2 = "facedir", - groups = {cracky = 1}, + groups = {cracky = 1, not_in_creative_inventory = 1}, - on_construct = function(pos) + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[4,5.5;]".. + minetest.show_formspec(player:get_player_name(),"mymagic_red_fs", + "size[4,5.5;]".. "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_red.png]".. "background[0.5,0.5;3,3;mymagic_gem_block_red.png]".. "listcolors[#910000;#d50000;#000000]".. @@ -168,7 +214,7 @@ minetest.register_node("mymagic:gem_block_red",{ local inv = meta:get_inventory() inv:set_size("red_gem", 1) end, - on_receive_fields = function(pos, formname, fields, sender) + on_receive_fields = function(pos, mymagic_red_fs, fields, sender) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() diff --git a/mymagic/textures/mymagic_wand_blue.png b/mymagic/textures/mymagic_wand_blue.png new file mode 100644 index 0000000..91a216b Binary files /dev/null and b/mymagic/textures/mymagic_wand_blue.png differ diff --git a/mymagic/textures/mymagic_wand_blue2.png b/mymagic/textures/mymagic_wand_blue2.png new file mode 100644 index 0000000..eb6df32 Binary files /dev/null and b/mymagic/textures/mymagic_wand_blue2.png differ diff --git a/mymagic/textures/mymagic_wand_green.png b/mymagic/textures/mymagic_wand_green.png new file mode 100644 index 0000000..b513e6a Binary files /dev/null and b/mymagic/textures/mymagic_wand_green.png differ diff --git a/mymagic/textures/mymagic_wand_green2.png b/mymagic/textures/mymagic_wand_green2.png new file mode 100644 index 0000000..0f89e2c Binary files /dev/null and b/mymagic/textures/mymagic_wand_green2.png differ diff --git a/mymagic/textures/mymagic_wand_orange.png b/mymagic/textures/mymagic_wand_orange.png new file mode 100644 index 0000000..6fd7276 Binary files /dev/null and b/mymagic/textures/mymagic_wand_orange.png differ diff --git a/mymagic/textures/mymagic_wand_orange2.png b/mymagic/textures/mymagic_wand_orange2.png new file mode 100644 index 0000000..6595cb8 Binary files /dev/null and b/mymagic/textures/mymagic_wand_orange2.png differ diff --git a/mymagic/textures/mymagic_wand_red.png b/mymagic/textures/mymagic_wand_red.png new file mode 100644 index 0000000..d0d95a3 Binary files /dev/null and b/mymagic/textures/mymagic_wand_red.png differ diff --git a/mymagic/textures/mymagic_wand_red2.png b/mymagic/textures/mymagic_wand_red2.png new file mode 100644 index 0000000..1038e9c Binary files /dev/null and b/mymagic/textures/mymagic_wand_red2.png differ diff --git a/mymagic_tools/forge_armor.lua b/mymagic_tools/forge_armor.lua index 1d3df9b..0b0f09a 100644 --- a/mymagic_tools/forge_armor.lua +++ b/mymagic_tools/forge_armor.lua @@ -94,8 +94,8 @@ if fields["helmet"]then {"default:cactus", "3d_armor:helmet_cactus"}, {"default:steel_ingot", "3d_armor:helmet_steel"}, {"default:bronze_ingot", "3d_armor:helmet_bronze"}, - {"default:gold_ingot", "3d_armor:helmet_diamond"}, - {"default:diamond", "3d_armor:helmet_gold"}, + {"default:gold_ingot", "3d_armor:helmet_gold"}, + {"default:diamond", "3d_armor:helmet_diamond"}, } for i in ipairs (helmets) do local mat = helmets[i][1] diff --git a/readme.md b/readme.md index 9e23616..5a72a93 100644 --- a/readme.md +++ b/readme.md @@ -99,4 +99,4 @@ To make you need stonebrick aroung the outside of the crafting grid and an orang - +Licence - DWYWPL