diff options
author | acmgit <undertakers_help@yahoo.com> | 2016-08-02 20:34:35 +0200 |
---|---|---|
committer | acmgit <undertakers_help@yahoo.com> | 2016-08-02 20:34:35 +0200 |
commit | 991248deb89bbcf0b1215b398abdb87b3d5aa313 (patch) | |
tree | 908389f9f911c53fa35fa083723d5c7a9b6098b1 | |
parent | 48dc7b4c929c0596bc710bebafc4ca53cacb1748 (diff) | |
download | billboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.tar.gz billboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.tar.bz2 billboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.zip |
Filenameparameter in nodes.lua added.
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | init.lua | 22 | ||||
-rw-r--r-- | nodes.lua | 30 | ||||
-rw-r--r-- | textures/aikido.jpg | bin | 0 -> 31236 bytes | |||
-rw-r--r-- | textures/aikido.png | bin | 0 -> 157284 bytes | |||
-rw-r--r-- | textures/army.jpg | bin | 0 -> 37469 bytes | |||
-rw-r--r-- | textures/army.png | bin | 0 -> 278232 bytes | |||
-rw-r--r-- | textures/detergen.jpg | bin | 0 -> 28806 bytes | |||
-rw-r--r-- | textures/detergen.png | bin | 0 -> 220503 bytes | |||
-rw-r--r-- | textures/mesedrink.jpg | bin | 0 -> 21930 bytes | |||
-rw-r--r-- | textures/mesedrink.png | bin | 0 -> 116924 bytes | |||
-rw-r--r-- | textures/meseforte.jpg | bin | 0 -> 18977 bytes | |||
-rw-r--r-- | textures/meseforte.png | bin | 0 -> 148629 bytes | |||
-rw-r--r-- | textures/mesewave.jpg | bin | 0 -> 21936 bytes | |||
-rw-r--r-- | textures/mesewave.png | bin | 0 -> 154606 bytes | |||
-rw-r--r-- | textures/newspaper.jpg | bin | 0 -> 16951 bytes | |||
-rw-r--r-- | textures/newspaper.png | bin | 0 -> 141975 bytes |
17 files changed, 35 insertions, 28 deletions
@@ -5,15 +5,8 @@ https://github.com/crazyginger72/billboard.git This Mod adds signlike Billboards and different sizes with Craftrecipes. You only need a Texture for the Billboard. -To add a Billboard, save the Texture in textures, rename the image in shape of: - -bb_itemname_color_color.png - -then add an Entry in nodes.lua like: - -{ itemname, color, color, size, imagetyp } - -then craft your Billboard in Minetest. +To add a new or own Billboard: +Save your Image in textures and add an Entry in nodes.lua. #*Depends:* @@ -10,25 +10,23 @@ for i,n in ipairs(bb_boardlist) do -- For Recipe: Item isn't given? if n.item1 == nil then n.item1 = "sign_wall_wood" - end - if n.item2 == nil then + elseif n.item2 == nil then n.item2 = "white" - end - if n.item3 == nil then + elseif n.item3 == nil then n.item3 = "white" end -- scale isn't given or 0 (invalid)? if n.scale == nil or n.scale == 0 then n.scale = 1 - end - -- scale has a negative value? - if n.scale < 0 then + elseif n.scale < 0 then -- scale has a negative value? n.scale = n.scale * -1 end - -- no Imagetyp is given? - if n.imgtyp == nil then + -- Filename isn't given? + if n.filename == nil then + n.filename = "bb_" .. n.item1 .. "_" .. n.item2 .. "_" .. n.item3 + elseif n.imgtyp == nil then -- no Imagetyp is given? n.imgtyp = "png" end @@ -38,10 +36,10 @@ for i,n in ipairs(bb_boardlist) do drawtype = "signlike", visual_scale = n.scale, tiles = { - "bb_"..n.item1.."_"..n.item2.."_"..n.item3.."."..n.imgtyp + n.filename .. "." ..n.imgtyp }, - inventory_image = "bb_"..n.item1.."_"..n.item2.."_"..n.item3.."."..n.imgtyp, - wield_image = "bb_"..n.item1.."_"..n.item2.."_"..n.item3.."."..n.imgtyp, + inventory_image = n.filename .."."..n.imgtyp, + wield_image = n.filename .. "." ..n.imgtyp, paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, @@ -15,6 +15,8 @@ bb_boardlist = Size of the Billboard in Blocks scale = number , default = 0 + filename = Filename for the Image, default = bb_item1_item2_item3 + Typ of the taken Image (must be in textures) imgtyp = "Typ" , default = "png" } @@ -26,48 +28,62 @@ bb_boardlist = item2 = "white", item3 = "white", scale = 3.0, - imgtyp = "jpg" }, + filename = "aikido", + imgtyp = "jpg" + }, { title = "Detergen Billboard", item1 = "sign_wall_wood", item2 = "yellow", item3 = "yellow", scale = 3.0, - imgtyp = "jpg" }, + filename = "detergen", + imgtyp = "jpg" + }, { title = "Mesedrink Billboard", item1 = "sign_wall_wood", item2 = "black", item3 = "yellow", scale = 3.5, - imgtyp = "jpg" }, + filename = "mesedrink", + imgtyp = "jpg" + }, { title = "Meseforte Billboard", item1 = "sign_wall_wood", item2 = "green", item3 = "blue", scale = 3.0, - imgtyp = "png" }, + filename = "meseforte", + imgtyp = "png" + }, { title = "Mesewave Billboard", item1 = "sign_wall_wood", item2 = "blue", item3 = "yellow", scale = 2.0, - imgtyp = "jpg" }, + filename = "mesewave", + imgtyp = "jpg" + }, { title = "Newspaper Billboard", item1 = "paper", item2 = "black", item3 = "orange", scale = 2.5, - imgtyp = "jpg" }, + filename = "newspaper", + imgtyp = "jpg" + }, { title = "Army Billboard", item1 = "paper", item2 = "green", item3 = "green", scale = 2.0, - imgtyp = "png" } + filename = "army", + imgtyp = "png" + } } diff --git a/textures/aikido.jpg b/textures/aikido.jpg Binary files differnew file mode 100644 index 0000000..6df3aee --- /dev/null +++ b/textures/aikido.jpg diff --git a/textures/aikido.png b/textures/aikido.png Binary files differnew file mode 100644 index 0000000..5865706 --- /dev/null +++ b/textures/aikido.png diff --git a/textures/army.jpg b/textures/army.jpg Binary files differnew file mode 100644 index 0000000..a48b6a8 --- /dev/null +++ b/textures/army.jpg diff --git a/textures/army.png b/textures/army.png Binary files differnew file mode 100644 index 0000000..4f6686d --- /dev/null +++ b/textures/army.png diff --git a/textures/detergen.jpg b/textures/detergen.jpg Binary files differnew file mode 100644 index 0000000..c5f080b --- /dev/null +++ b/textures/detergen.jpg diff --git a/textures/detergen.png b/textures/detergen.png Binary files differnew file mode 100644 index 0000000..7e659de --- /dev/null +++ b/textures/detergen.png diff --git a/textures/mesedrink.jpg b/textures/mesedrink.jpg Binary files differnew file mode 100644 index 0000000..3b17cbb --- /dev/null +++ b/textures/mesedrink.jpg diff --git a/textures/mesedrink.png b/textures/mesedrink.png Binary files differnew file mode 100644 index 0000000..e11b72b --- /dev/null +++ b/textures/mesedrink.png diff --git a/textures/meseforte.jpg b/textures/meseforte.jpg Binary files differnew file mode 100644 index 0000000..8b2355b --- /dev/null +++ b/textures/meseforte.jpg diff --git a/textures/meseforte.png b/textures/meseforte.png Binary files differnew file mode 100644 index 0000000..5aad220 --- /dev/null +++ b/textures/meseforte.png diff --git a/textures/mesewave.jpg b/textures/mesewave.jpg Binary files differnew file mode 100644 index 0000000..582af14 --- /dev/null +++ b/textures/mesewave.jpg diff --git a/textures/mesewave.png b/textures/mesewave.png Binary files differnew file mode 100644 index 0000000..a6df1ba --- /dev/null +++ b/textures/mesewave.png diff --git a/textures/newspaper.jpg b/textures/newspaper.jpg Binary files differnew file mode 100644 index 0000000..9021a8d --- /dev/null +++ b/textures/newspaper.jpg diff --git a/textures/newspaper.png b/textures/newspaper.png Binary files differnew file mode 100644 index 0000000..67880b6 --- /dev/null +++ b/textures/newspaper.png |