aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoracmgit <undertakers_help@yahoo.com>2016-08-02 20:34:35 +0200
committeracmgit <undertakers_help@yahoo.com>2016-08-02 20:34:35 +0200
commit991248deb89bbcf0b1215b398abdb87b3d5aa313 (patch)
tree908389f9f911c53fa35fa083723d5c7a9b6098b1
parent48dc7b4c929c0596bc710bebafc4ca53cacb1748 (diff)
downloadbillboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.tar.gz
billboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.tar.bz2
billboard-991248deb89bbcf0b1215b398abdb87b3d5aa313.zip
Filenameparameter in nodes.lua added.
-rw-r--r--README.md11
-rw-r--r--init.lua22
-rw-r--r--nodes.lua30
-rw-r--r--textures/aikido.jpgbin0 -> 31236 bytes
-rw-r--r--textures/aikido.pngbin0 -> 157284 bytes
-rw-r--r--textures/army.jpgbin0 -> 37469 bytes
-rw-r--r--textures/army.pngbin0 -> 278232 bytes
-rw-r--r--textures/detergen.jpgbin0 -> 28806 bytes
-rw-r--r--textures/detergen.pngbin0 -> 220503 bytes
-rw-r--r--textures/mesedrink.jpgbin0 -> 21930 bytes
-rw-r--r--textures/mesedrink.pngbin0 -> 116924 bytes
-rw-r--r--textures/meseforte.jpgbin0 -> 18977 bytes
-rw-r--r--textures/meseforte.pngbin0 -> 148629 bytes
-rw-r--r--textures/mesewave.jpgbin0 -> 21936 bytes
-rw-r--r--textures/mesewave.pngbin0 -> 154606 bytes
-rw-r--r--textures/newspaper.jpgbin0 -> 16951 bytes
-rw-r--r--textures/newspaper.pngbin0 -> 141975 bytes
17 files changed, 35 insertions, 28 deletions
diff --git a/README.md b/README.md
index 64f9676..b55075c 100644
--- a/README.md
+++ b/README.md
@@ -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:*
diff --git a/init.lua b/init.lua
index b05303b..d85cd4f 100644
--- a/init.lua
+++ b/init.lua
@@ -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,
diff --git a/nodes.lua b/nodes.lua
index 615e2bc..7bd0a73 100644
--- a/nodes.lua
+++ b/nodes.lua
@@ -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
new file mode 100644
index 0000000..6df3aee
--- /dev/null
+++ b/textures/aikido.jpg
Binary files differ
diff --git a/textures/aikido.png b/textures/aikido.png
new file mode 100644
index 0000000..5865706
--- /dev/null
+++ b/textures/aikido.png
Binary files differ
diff --git a/textures/army.jpg b/textures/army.jpg
new file mode 100644
index 0000000..a48b6a8
--- /dev/null
+++ b/textures/army.jpg
Binary files differ
diff --git a/textures/army.png b/textures/army.png
new file mode 100644
index 0000000..4f6686d
--- /dev/null
+++ b/textures/army.png
Binary files differ
diff --git a/textures/detergen.jpg b/textures/detergen.jpg
new file mode 100644
index 0000000..c5f080b
--- /dev/null
+++ b/textures/detergen.jpg
Binary files differ
diff --git a/textures/detergen.png b/textures/detergen.png
new file mode 100644
index 0000000..7e659de
--- /dev/null
+++ b/textures/detergen.png
Binary files differ
diff --git a/textures/mesedrink.jpg b/textures/mesedrink.jpg
new file mode 100644
index 0000000..3b17cbb
--- /dev/null
+++ b/textures/mesedrink.jpg
Binary files differ
diff --git a/textures/mesedrink.png b/textures/mesedrink.png
new file mode 100644
index 0000000..e11b72b
--- /dev/null
+++ b/textures/mesedrink.png
Binary files differ
diff --git a/textures/meseforte.jpg b/textures/meseforte.jpg
new file mode 100644
index 0000000..8b2355b
--- /dev/null
+++ b/textures/meseforte.jpg
Binary files differ
diff --git a/textures/meseforte.png b/textures/meseforte.png
new file mode 100644
index 0000000..5aad220
--- /dev/null
+++ b/textures/meseforte.png
Binary files differ
diff --git a/textures/mesewave.jpg b/textures/mesewave.jpg
new file mode 100644
index 0000000..582af14
--- /dev/null
+++ b/textures/mesewave.jpg
Binary files differ
diff --git a/textures/mesewave.png b/textures/mesewave.png
new file mode 100644
index 0000000..a6df1ba
--- /dev/null
+++ b/textures/mesewave.png
Binary files differ
diff --git a/textures/newspaper.jpg b/textures/newspaper.jpg
new file mode 100644
index 0000000..9021a8d
--- /dev/null
+++ b/textures/newspaper.jpg
Binary files differ
diff --git a/textures/newspaper.png b/textures/newspaper.png
new file mode 100644
index 0000000..67880b6
--- /dev/null
+++ b/textures/newspaper.png
Binary files differ