From 18cd2be89bd878bea5862c9354f9ab10714532c6 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Feb 2017 16:39:51 +0100 Subject: [PATCH] Add fire charge --- mods/mcl_fire/fire_charge.lua | 26 ++++++++++++++++++ mods/mcl_fire/fireworks_charge.png | Bin 0 -> 307 bytes mods/mcl_fire/flint_and_steel.lua | 2 +- mods/mcl_fire/init.lua | 1 + .../textures/mcl_fire_fire_charge.png | Bin 0 -> 1185 bytes 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 mods/mcl_fire/fire_charge.lua create mode 100644 mods/mcl_fire/fireworks_charge.png create mode 100644 mods/mcl_fire/textures/mcl_fire_fire_charge.png diff --git a/mods/mcl_fire/fire_charge.lua b/mods/mcl_fire/fire_charge.lua new file mode 100644 index 000000000..c556653e7 --- /dev/null +++ b/mods/mcl_fire/fire_charge.lua @@ -0,0 +1,26 @@ +-- Fire Charge +minetest.register_craftitem("mcl_fire:fire_charge", { + description = "Fire Charge", + inventory_image = "mcl_fire_fire_charge.png", + liquids_pointable = false, + stack_max = 64, + groups = { tool = 1 }, + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type == "node" then + if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then + tnt.ignite(pointed_thing.under) + itemstack:take_item() + else + mcl_core.set_fire(pointed_thing) + itemstack:take_item() + end + end + return itemstack + end, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'mcl_fire:fire_charge 3', + recipe = { 'mcl_mobitems:blaze_powder', 'group:coal', 'mcl_core:gunpowder' }, +}) diff --git a/mods/mcl_fire/fireworks_charge.png b/mods/mcl_fire/fireworks_charge.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f508fef1809f0893a441fc2685d08947244fdf GIT binary patch literal 307 zcmV-30nGl1P)1k4_5@7&qdI>}V81K>`+`XR(e@iE27{FpIEyC4eT(&?m*H*q% zepdx}6?R1jQRpj>#;=wf@A1;R0W^r6V8wh?LrDzO^0i%3{8C zAQ>+lq9!~&PCTo*>qsVnVB#I)@Szk9y~g){!3FpmfEQ_!(SpcJG28$E002ovPDHLk FV1hvOeo+7b literal 0 HcmV?d00001 diff --git a/mods/mcl_fire/flint_and_steel.lua b/mods/mcl_fire/flint_and_steel.lua index 5b8d94edc..5b0ccd51b 100644 --- a/mods/mcl_fire/flint_and_steel.lua +++ b/mods/mcl_fire/flint_and_steel.lua @@ -27,6 +27,6 @@ minetest.register_tool("mcl_fire:flint_and_steel", { minetest.register_craft({ type = 'shapeless', - output = 'mcl_core:flint_and_steel', + output = 'mcl_fire:flint_and_steel', recipe = { 'mcl_core:steel_ingot', 'mcl_core:flint'}, }) diff --git a/mods/mcl_fire/init.lua b/mods/mcl_fire/init.lua index e461e7d6c..d28d6f902 100644 --- a/mods/mcl_fire/init.lua +++ b/mods/mcl_fire/init.lua @@ -192,6 +192,7 @@ minetest.register_abm({ }) dofile(minetest.get_modpath(minetest.get_current_modname()).."/flint_and_steel.lua") +dofile(minetest.get_modpath(minetest.get_current_modname()).."/fire_charge.lua") local time_to_load= os.clock() - init print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) diff --git a/mods/mcl_fire/textures/mcl_fire_fire_charge.png b/mods/mcl_fire/textures/mcl_fire_fire_charge.png new file mode 100644 index 0000000000000000000000000000000000000000..ce8c7ee99049926f4b9be0ede121acb2845a7005 GIT binary patch literal 1185 zcmV;S1YY}zP)4dHyhJuP?A_%h+h6pmy44(E-r?lhWM)_|E~b7gp2X2A~-@oidl*A#&L)1}>jNRiz+h88NS9YSt=Gl%d=MsDh{ z>LIg8AWjyGL9Piv%i8DlVRU2@4n01B`DbQv_`nqQnvW$Vdx-s|IPP}wz8b=Q1uxENJW_E2UnBzSOSI&q9h@fDA;!xY6 zK~xN&W#1YJv2x#sxqTCu$qpkoF~p^1KNMz%e-!8Dr{g-DWg-X%tAfZx6%p!<9#QQF{!UBiqV0# z6(LHNe|)qbd#8ud98?gBrm-+<hN+<&6FSrESc`$QL6?i;v{o*Bx#TEH<(Jc zVMPGy{rI*4q!YoyN+0j&Us#V{-*)5cc@YcD{CJ2}z^3QMF?TICcEu{MfFMZx;%)}u5Jax#a1w2q zZUh_G!0$Bk%zt^)g&*H=;hPg8&P^I{G*-oXPUazJEjkkc+}pSQN?8EK5Q^gGrjpc% z9fK(}Sk+!Cay>pc`x<`wHcz2r~i!pY-S?zs<05GO;D?&D{fxq=Ii*s(NKgZIa3@oMrWKBAPlutv{sOa#$nH~dx+ zfCfPslc@&q#dE_rzrPaHvE<0rt8)lC1>du^BFt0gL=b z)0bL{?zkVBn3s$%U-yU7f6Zh0jekb}TYx_RzK~kob>*!K00000NkvXXu0mjfQ~fvD literal 0 HcmV?d00001