]> git.lizzy.rs Git - Crafter.git/commitdiff
add in flint and steel, flint, and gravel
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 18 Apr 2020 18:12:55 +0000 (14:12 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 18 Apr 2020 18:12:55 +0000 (14:12 -0400)
README.md
mods/fire/init.lua
mods/fire/sounds/attributes.txt
mods/fire/sounds/flint_and_steel.ogg
mods/fire/sounds/flint_failed.ogg [new file with mode: 0644]
mods/fire/textures/attributes.txt [new file with mode: 0644]
mods/main/items.lua
mods/main/nodes.lua
mods/main/textures/attributes.txt.txt
mods/main/textures/flint.png [new file with mode: 0644]
mods/main/textures/gravel.png [new file with mode: 0644]

index 21e1c55eae867b334dee844d0dd52ff6fbfc72a2..746d0ddc00c3c5778bb89d0fe167d414c58dcd66 100644 (file)
--- a/README.md
+++ b/README.md
@@ -84,6 +84,7 @@
 - Added lava
 - Added ithor weather
 - Added nether portal node and fire
+- Added in flint and steel, flint, and gravel
 ---
 
 
index e37372d354b81309c64fd955f463dbc44795c439..7e0b2cac4a7d6bfc945ba29bcf36d06b1f9cea5b 100644 (file)
@@ -46,6 +46,13 @@ minetest.register_tool("fire:flint_and_steel", {
        description = "Flint and Steel",
        inventory_image = "flint_and_steel.png",
        on_place = function(itemstack, placer, pointed_thing)
+               if pointed_thing.type ~= "node" then
+                       return
+               end
+               if minetest.get_node(pointed_thing.above).name ~= "air" then
+                       minetest.sound_play("flint_failed", {pos=pointed_thing.above})
+                       return
+               end
                minetest.add_node(pointed_thing.above,{name="fire:fire"})
                minetest.sound_play("flint_and_steel", {pos=pointed_thing.above})
                itemstack:add_wear(100)
@@ -53,3 +60,9 @@ minetest.register_tool("fire:flint_and_steel", {
        end,
        sound = {breaks = {name="tool_break",gain=0.4}},
 })
+
+minetest.register_craft({
+       type = "shapeless",
+       output = "fire:flint_and_steel",
+       recipe = {"main:flint","main:iron"},
+})
index 1cf7ea7576209f2590c98a09fdc042a33aac6431..a119b1aeab79064fe8ad827916d1a2073db81cef 100644 (file)
@@ -1 +1 @@
-flint_and_steel - https://freesound.org/people/Benboncan/sounds/63257/
+flint_and_steel/flint_failed - https://freesound.org/people/Benboncan/sounds/63257/
index 3657f40e18d1e0e9ebc5f4f174255527704a4019..76036c8064c48cd61f93e1ee304b2c55850c24c0 100644 (file)
Binary files a/mods/fire/sounds/flint_and_steel.ogg and b/mods/fire/sounds/flint_and_steel.ogg differ
diff --git a/mods/fire/sounds/flint_failed.ogg b/mods/fire/sounds/flint_failed.ogg
new file mode 100644 (file)
index 0000000..879db51
Binary files /dev/null and b/mods/fire/sounds/flint_failed.ogg differ
diff --git a/mods/fire/textures/attributes.txt b/mods/fire/textures/attributes.txt
new file mode 100644 (file)
index 0000000..d1ac09c
--- /dev/null
@@ -0,0 +1 @@
+flint_and_steel - https://github.com/MysticTempest/REFI_Textures
index f4f502979cc4df2d52b31411830e5d81961a7e1f..a250f4004d611d9e34d1c6ba0393c5707e81138c 100644 (file)
@@ -35,3 +35,7 @@ minetest.register_craftitem("main:diamond", {
        description = "Diamond",
        inventory_image = "diamond.png",
 })
+minetest.register_craftitem("main:flint", {
+       description = "Flint",
+       inventory_image = "flint.png",
+})
index 98f24b00b9afd28e5555960076c5d18594f6855f..736c771e36d08b7a26e5dc996ce4d7bc0d287a53 100644 (file)
@@ -119,6 +119,38 @@ minetest.register_node("main:sand", {
     sounds = main.sandSound(),
 })
 
+minetest.register_node("main:gravel", {
+    description = "Gravel",
+    tiles = {"gravel.png"},
+    groups = {sand = 1, falling_node = 1,pathable = 1},
+    sounds = main.dirtSound(),
+    drop = {
+               max_items = 1,
+               items= {
+                {
+                       -- Only drop if using a tool whose name is identical to one
+                       -- of these.
+                       rarity = 10,
+                       items = {"main:flint"},
+                       -- Whether all items in the dropped item list inherit the
+                       -- hardware coloring palette color from the dug node.
+                       -- Default is 'false'.
+                       --inherit_color = true,
+               },
+               {
+                       -- Only drop if using a tool whose name is identical to one
+                       -- of these.
+                       --tools = {"main:shears"},
+                       rarity = 0,
+                       items = {"main:gravel"},
+                       -- Whether all items in the dropped item list inherit the
+                       -- hardware coloring palette color from the dug node.
+                       -- Default is 'false'.
+                       --inherit_color = true,
+               },
+       }},
+})
+
 minetest.register_node("main:tree", {
     description = "Tree",
     tiles = {"treeCore.png","treeCore.png","treeOut.png","treeOut.png","treeOut.png","treeOut.png"},
index fb5d4ec2152cba5a3d55be59366904704d1a5c84..f7c3f6200b854eca41106527d1c7dce7312ef972 100644 (file)
@@ -1,5 +1,5 @@
-textures ={
 https://github.com/Gerold55/MineClone-2-Textures
 https://forum.minetest.net/viewtopic.php?t=16407
 https://github.com/minetest/minetest_game/tree/master/mods/default/textures
-}
\ No newline at end of file
+flint - https://github.com/MysticTempest/REFI_Textures/blob/master/textures/default_mcl_core/stone/default_flint.png
+gravel - https://github.com/minetest-texture-packs/Good-Morning-Craft/blob/master/default/default_gravel.png
\ No newline at end of file
diff --git a/mods/main/textures/flint.png b/mods/main/textures/flint.png
new file mode 100644 (file)
index 0000000..ca19465
Binary files /dev/null and b/mods/main/textures/flint.png differ
diff --git a/mods/main/textures/gravel.png b/mods/main/textures/gravel.png
new file mode 100644 (file)
index 0000000..9805251
Binary files /dev/null and b/mods/main/textures/gravel.png differ