commit d6321113416731311e1a2e014fb33c70f12118c3 Author: FaceDeer Date: Sat Feb 25 19:06:35 2017 -0700 Initial commit This was split out of the venerable Castle mod, https://github.com/minetest-mods/castle, which has been maintained by a long line of distinguished modders. diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cd2946a --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..456d091 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Minetest Mods Team + +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. diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..cf37900 --- /dev/null +++ b/README.txt @@ -0,0 +1,14 @@ +=-=-=-=-=-=-=-=-=-= + +Castles Mod +by: Philipbenr And DanDuncombe + +=-=-=-=-=-=-=-=-=-= + +Licence: MIT + +see: LICENSE + +=-=-=-=-=-=-=-=-=-= + +This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons. diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..9207dab --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +default +intllib? diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..aae3f9b --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +This mod contains medieval castle lighting solutions diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..3b005e1 --- /dev/null +++ b/init.lua @@ -0,0 +1,96 @@ +minetest.register_alias("darkage:lamp", "castle_lighting:light") +minetest.register_alias("castle:street_light", "castle_lighting:light") +minetest.register_alias("castle:light", "castle_lighting:light") +minetest.register_alias("castle:chandelier", "castle_lighting:chandelier") +minetest.register_alias("castle:chandelier_chain", "castle_lighting:chandelier_chain") + +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +minetest.register_node("castle_lighting:light",{ + drawtype = "glasslike", + description = S("Light Block"), + sunlight_propagates = true, + light_source = 14, + tiles = {"castle_street_light.png"}, + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + paramtype = "light", +}) + +minetest.register_craft({ + output = "castle_lighting:light", + recipe = { + {"default:stick", "default:glass", "default:stick"}, + {"default:glass", "default:torch", "default:glass"}, + {"default:stick", "default:glass", "default:stick"}, + } +}) + +minetest.register_node( "castle_lighting:chandelier", { + drawtype = "plantlike", + description = S("Chandelier"), + paramtype = "light", + wield_image = "castle_chandelier_wield.png", + inventory_image = "castle_chandelier_wield.png", + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + sunlight_propagates = true, + light_source = 14, + tiles = { + { + name = "castle_chandelier.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.0 + }, + }, + }, + selection_box = { + type = "fixed", + fixed = { + {0.35,-0.375,0.35,-0.35,0.5,-0.35}, + + }, + }, +}) + +minetest.register_craft({ + output = "castle_lighting:chandelier", + recipe = { + {"", "", ""}, + {"", "default:steel_ingot", ""}, + {"default:torch","default:torch","default:torch"}, + } +}) + +minetest.register_node( "castle_lighting:chandelier_chain", { + drawtype = "plantlike", + description = S("Chandelier Chain"), + paramtype = "light", + wield_image = "castle_chandelier_chain.png", + inventory_image = "castle_chandelier_chain.png", + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), + sunlight_propagates = true, + tiles = {"castle_chandelier_chain.png"}, + selection_box = { + type = "fixed", + fixed = { + {0.1,-0.5,0.1,-0.1,0.5,-0.1}, + + }, + }, +}) + +minetest.register_craft({ + output = "castle_lighting:chandelier_chain 4", + recipe = { + {"", "default:steel_ingot", ""}, + {"", "", ""}, + {"","default:steel_ingot",""}, + } +}) \ No newline at end of file diff --git a/intllib.lua b/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/locale/template.pot b/locale/template.pot new file mode 100644 index 0000000..6879b4d --- /dev/null +++ b/locale/template.pot @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-25 19:02-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua:13 +msgid "Light Block" +msgstr "" + +#: init.lua:33 +msgid "Chandelier" +msgstr "" + +#: init.lua:72 +msgid "Chandelier Chain" +msgstr "" diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..b894c97 --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = castle_lighting diff --git a/textures/LICENSE.txt b/textures/LICENSE.txt new file mode 100644 index 0000000..7d7ed99 --- /dev/null +++ b/textures/LICENSE.txt @@ -0,0 +1,17 @@ +License Textures: Philipner - CC-BY-SA 3.0 + +-castle_chandelier.png +-castle_chandelier_chain.png +-castle_chandelier_wield.png + + +-------------------------------------------- + +16 px textures based on Castle mod +original textures by Philipner + +License Textures: Napiophelios - CC-BY-SA 3.0 + +-castle_street_light.png + +-------------------------------------------- diff --git a/textures/castle_chandelier.png b/textures/castle_chandelier.png new file mode 100644 index 0000000..fbc0039 Binary files /dev/null and b/textures/castle_chandelier.png differ diff --git a/textures/castle_chandelier_chain.png b/textures/castle_chandelier_chain.png new file mode 100644 index 0000000..47a526a Binary files /dev/null and b/textures/castle_chandelier_chain.png differ diff --git a/textures/castle_chandelier_wield.png b/textures/castle_chandelier_wield.png new file mode 100644 index 0000000..59dae96 Binary files /dev/null and b/textures/castle_chandelier_wield.png differ diff --git a/textures/castle_street_light.png b/textures/castle_street_light.png new file mode 100644 index 0000000..dc3f72e Binary files /dev/null and b/textures/castle_street_light.png differ