diff --git a/README.md b/README.md index 6955e07..0cedf4a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ ## UGX Realms -This is the repo for the Minetest server UGX Realms. \ No newline at end of file +This is the repo for the Minetest server UGX Realms. + +####Server Details +https://forum.minetest.net/viewtopic.php?f=10&t=18183 \ No newline at end of file diff --git a/worldmods/abripanes/README.md b/worldmods/abripanes/README.md new file mode 100644 index 0000000..5b77fbd --- /dev/null +++ b/worldmods/abripanes/README.md @@ -0,0 +1,20 @@ +abripanes +=== + +Mod for Minetest by Shara RedCat which adds faintly glowing coloured glass panes.These can be used for stained glass windows or for gentle lighting. + +NOTE: This mod is only fully functional from version 0.4.15. + + +Crafting +--------- + +Coloured glass panes can be made from six glass nodes and the matching dye. + + +Licenses and Attribution +----------------------- + +Code for this mod is released under MIT (https://opensource.org/licenses/MIT). + +Textures for this mod are released under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/), attribution: Shara RedCat. diff --git a/worldmods/abripanes/depends.txt b/worldmods/abripanes/depends.txt new file mode 100644 index 0000000..2717bef --- /dev/null +++ b/worldmods/abripanes/depends.txt @@ -0,0 +1,2 @@ +default +dye diff --git a/worldmods/abripanes/description.txt b/worldmods/abripanes/description.txt new file mode 100644 index 0000000..0f1977b --- /dev/null +++ b/worldmods/abripanes/description.txt @@ -0,0 +1 @@ +Adds faintly glowing coloured glass panes which can be used for stained glass windows or for gentle lighting. \ No newline at end of file diff --git a/worldmods/abripanes/init.lua b/worldmods/abripanes/init.lua new file mode 100644 index 0000000..837361d --- /dev/null +++ b/worldmods/abripanes/init.lua @@ -0,0 +1,95 @@ + +function register_pane(name, def) + for i = 1, 15 do + minetest.register_alias("xpanes:" .. name .. "_" .. i, "xpanes:" .. name .. "_flat") + end + + local flatgroups = table.copy(def.groups) + flatgroups.pane = 1 + minetest.register_node(":xpanes:" .. name .. "_flat", { + description = def.description, + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + paramtype2 = "facedir", + use_texture_alpha = true, + light_source = 4, + tiles = {def.textures[3], def.textures[3], def.textures[1]}, + groups = flatgroups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connect_sides = { "left", "right" }, + }) + + local groups = table.copy(def.groups) + groups.pane = 1 + groups.not_in_creative_inventory = 1 + minetest.register_node(":xpanes:" .. name, { + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + use_texture_alpha = true, + light_source = 4, + description = def.description, + tiles = {def.textures[3], def.textures[3], def.textures[1]}, + groups = groups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + node_box = { + type = "connected", + fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}}, + connect_front = {{-1/32, -1/2, -1/2, 1/32, 1/2, -1/32}}, + connect_left = {{-1/2, -1/2, -1/32, -1/32, 1/2, 1/32}}, + connect_back = {{-1/32, -1/2, 1/32, 1/32, 1/2, 1/2}}, + connect_right = {{1/32, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"}, + }) + + minetest.register_craft({ + output = "xpanes:" .. name .. "_flat 16", + recipe = def.recipe + }) +end + +local panes_list = { + {"white", "White", "ffffff", }, {"blue", "Blue", "0000FF", }, + {"cyan", "Cyan", "00FFFF", }, {"green", "Green", "00FF00", }, + {"magenta", "Magenta", "FF00FF", }, {"orange", "Orange", "FF6103", }, + {"violet", "Purple", "800080", }, {"red", "Red", "FF0000", }, + {"yellow", "Yellow", "FFFF00", }, +} + +for i in ipairs(panes_list) do + local name = panes_list[i][1] + local description = panes_list[i][2] + local colour = panes_list[i][3] + local tex = "abriglass_plainglass.png^[colorize:#"..colour..":122" + + register_pane("abriglass_pane_"..name, { + description = description.." Glass Pane", + textures = {tex, tex, tex}, + groups = {cracky = 3}, + use_texture_alpha = true, + wield_image = tex, + inventory_image = tex, + sounds = default.node_sound_glass_defaults(), + recipe = { + {"default:glass", "default:glass", "default:glass",}, + {"default:glass", "default:glass", "default:glass",}, + {"","dye:"..name,"",}, + } + }) +end diff --git a/worldmods/abripanes/license.txt b/worldmods/abripanes/license.txt new file mode 100644 index 0000000..4a3dfb4 --- /dev/null +++ b/worldmods/abripanes/license.txt @@ -0,0 +1,36 @@ + +Textures: +CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) +Attribution: Shara RedCat + +Code: +License: MIT (https://opensource.org/licenses/MIT) +By Shara RedCat + +Registry code adapted from xpanes mod in minetest_game (https://github.com/minetest/minetest_game/tree/master/mods/xpanes) + + + +--- + +The MIT License (MIT) + +Copyright (c) 2016 Shara RedCat + +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. \ No newline at end of file diff --git a/worldmods/abripanes/mod.conf b/worldmods/abripanes/mod.conf new file mode 100644 index 0000000..84658a1 --- /dev/null +++ b/worldmods/abripanes/mod.conf @@ -0,0 +1 @@ +name = abripanes \ No newline at end of file diff --git a/worldmods/abripanes/textures/abriglass_plainglass.png b/worldmods/abripanes/textures/abriglass_plainglass.png new file mode 100644 index 0000000..cef370b Binary files /dev/null and b/worldmods/abripanes/textures/abriglass_plainglass.png differ