From 81d0f28e29bc0f5170e1d2e242430e4437289ddb Mon Sep 17 00:00:00 2001 From: Carter Kolwey Date: Thu, 15 May 2014 18:58:13 -0500 Subject: [PATCH] Added plastic powder (formed by grinding plastic boxes or sheets. No non-technic recipe (or use) for it yet.) --- depends.txt | 1 + init.lua | 32 ++++++++++++++++++++++++++++++++ textures/plastic_powder.png | Bin 0 -> 234 bytes 3 files changed, 33 insertions(+) create mode 100644 textures/plastic_powder.png diff --git a/depends.txt b/depends.txt index 2bf0202..8793099 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1,2 @@ homedecor +technic? diff --git a/init.lua b/init.lua index dc632f1..6b5e9fa 100644 --- a/init.lua +++ b/init.lua @@ -130,6 +130,10 @@ minetest.register_node("plasticbox:plasticbox_yellow", { groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1}, sounds = default.node_sound_stone_defaults(), }) +minetest.register_craftitem("plasticbox:plastic_powder", { + image = "plastic_powder.png", + description="Plastic Powder", +}) --Register craft for plain box @@ -142,6 +146,34 @@ minetest.register_craft( { }, }) +--Register crafts for plastic powder + +if minetest.get_modpath("technic") then + local grinder_recipes = { + {"plasticbox:plasticbox", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_black", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_blue", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_brown", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_cyan", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_darkgreen", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_darkgrey", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_green", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_grey", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_magenta", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_orange", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_pink", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_red", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_violet", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_white", "plasticbox:plastic_powder 2"}, + {"plasticbox:plasticbox_yellow", "plasticbox:plastic_powder 2"}, + {"homedecor:plastic_sheeting", "plasticbox:plastic_powder 1"} + } + for _, data in pairs(grinder_recipes) do + technic.register_grinder_recipe({input=data[1], output=data[2]}) + end +else +end + --Register crafts for colored boxes minetest.register_craft({ type = "shapeless", diff --git a/textures/plastic_powder.png b/textures/plastic_powder.png new file mode 100644 index 0000000000000000000000000000000000000000..3dde7028267e6ae634392c5ea96b880ce4b9611b GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ za0`PlBg3pY5gTe~DWM4f$hTKV literal 0 HcmV?d00001