diff --git a/changelog.txt b/changelog.txt index bf51c9b..d914ab1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,3 +3,9 @@ Started mod, added cotton recipe. Uploaded to GitHub 3-11-15: Added Barrels. + +3-17-15: +Added a few machetes and start working on the drinking part of the mod. + +3-18-15: +Added another machete diff --git a/crafting.lua b/crafting.lua index 4edb4c9..27210b7 100644 --- a/crafting.lua +++ b/crafting.lua @@ -15,3 +15,30 @@ minetest.register_craft({ {'group:wood', 'default:tree', 'group:wood'}, } }) + +minetest.register_craft({ + output = 'survival:machete_wood 1', + recipe = { + {'', '', 'group:wood'}, + {'', 'group:wood', ''}, + {'group:stick', '', ''}, + } +}) + +minetest.register_craft({ + output = 'survival:machete_steel 1', + recipe = { + {'', '', 'default:steel_ingot'}, + {'', 'default:steel_ingot', ''}, + {'group:stick', '', ''}, + } +}) + +minetest.register_craft({ + output = 'survival:machete_bronze 1', + recipe = { + {'', '', 'default:bronze_ingot'}, + {'', 'default:bronze_ingot', ''}, + {'group:stick', '', ''}, + } +}) diff --git a/drinking.lua b/drinking.lua new file mode 100644 index 0000000..56cfe9d --- /dev/null +++ b/drinking.lua @@ -0,0 +1,43 @@ +-- I opted to put all the drinking stuff in this file, so if you don't want to play with +-- drinking enabled you can just modify the init.lua file and remove the line that loads +-- this file. + +--minetest.register_craftitem('survival:canteen_empty', { +-- description = 'empty canteen', +-- inventory_image = 'survival_canteen_empty.png', +-- stack_max = 1, +-- liquids_pointable = true, +-- on_use = function(itemstack, user, pointed_thing) +-- if pointed_thing.type ~= 'node' then +-- return +-- end + +--}) + +--minetest.register_craft({ +-- output = 'survival:canteen_empty 1', +-- recipe = { +-- {probably steel, glass, and maybe string}, +-- }, +--}) + +minetest.register_craftitem('survival:canteen_water_clean', { + description = 'clean drinking water', + inventory_image = 'survival_canteen_water_clean.png', + stack_max = 1, + on_use = minetest.item_eat(1, 'survival:canteen_empty'), +}) + +minetest.register_craftitem('survival:canteen_water_dirty', { + description = 'dirty water', + inventory_image = 'survival_canteen_water_dirty.png', + stack_max = 1, + on_use = minetest.item_eat (math.random(-5,1) 'survival:canteen_empty'), +}) + +minetest.register_craft({ + type = 'cooking', + output = 'survival:canteen_water_clean', + recipe = 'survival:canteen_water_dirty', + cooktime = 30, --boiling the water should take a long time. +}) diff --git a/init.lua b/init.lua index cf5dec3..810ef1d 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,5 @@ --Load File dofile(minetest.get_modpath('survival')..'/crafting.lua') dofile(minetest.get_modpath('survival')..'/nodes.lua') +dofile(minetest.get_modpath('survival')..'/tools.lua') +--dofile(minetest.get_modpath('survival')..'/drinking.lua') working on this yet. diff --git a/textures/survival_barrel.png b/textures/survival_barrel.png index 4d8e3e3..12d2394 100644 Binary files a/textures/survival_barrel.png and b/textures/survival_barrel.png differ diff --git a/textures/survival_canteen_empty.png b/textures/survival_canteen_empty.png new file mode 100644 index 0000000..9af9be1 Binary files /dev/null and b/textures/survival_canteen_empty.png differ diff --git a/textures/survival_canteen_water_clean.png b/textures/survival_canteen_water_clean.png new file mode 100644 index 0000000..2d93f6d Binary files /dev/null and b/textures/survival_canteen_water_clean.png differ diff --git a/textures/survival_canteen_water_dirty.png b/textures/survival_canteen_water_dirty.png new file mode 100644 index 0000000..ddd3f87 Binary files /dev/null and b/textures/survival_canteen_water_dirty.png differ diff --git a/textures/survival_machete_bronze.png b/textures/survival_machete_bronze.png new file mode 100644 index 0000000..12b449a Binary files /dev/null and b/textures/survival_machete_bronze.png differ diff --git a/textures/survival_machete_diamond.png b/textures/survival_machete_diamond.png new file mode 100644 index 0000000..0387bcd Binary files /dev/null and b/textures/survival_machete_diamond.png differ diff --git a/textures/survival_machete_gold.png b/textures/survival_machete_gold.png new file mode 100644 index 0000000..f5fd785 Binary files /dev/null and b/textures/survival_machete_gold.png differ diff --git a/textures/survival_machete_silver.png b/textures/survival_machete_silver.png new file mode 100644 index 0000000..287443e Binary files /dev/null and b/textures/survival_machete_silver.png differ diff --git a/textures/survival_machete_steel.png b/textures/survival_machete_steel.png new file mode 100644 index 0000000..3c3e5e2 Binary files /dev/null and b/textures/survival_machete_steel.png differ diff --git a/textures/survival_machete_wood.png b/textures/survival_machete_wood.png new file mode 100644 index 0000000..ba8eae5 Binary files /dev/null and b/textures/survival_machete_wood.png differ diff --git a/tools.lua b/tools.lua new file mode 100644 index 0000000..ea47b5b --- /dev/null +++ b/tools.lua @@ -0,0 +1,49 @@ +-- Wooden Machete (This may be removed in the future, not sure how realistic it is.) +minetest.register_tool('survival:machete_wood', { + description = 'wooden machete', + inventory_image = 'survival_machete_wood.png', + tool_capabilities = { + full_punch_interval = 1.2, --amount of seconds between repeating action. + max_drop_level = 0, -- not sure what this does. + groupcaps= { --how many times the tool can 'attack' nodes of a type. + crumbly = {times = {[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1}, --dirt like + choppy = {times = {[2]=3.00, [3]=1.60}, uses=10, maxlevel=1}, --woody + snappy = {times = {[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, --fleshy? + }, + damage_groups = {fleshy=2}, --damage delt to mobs and other players? + }, +}) + +-- there will be no stone machete, ever. + +-- Steel machete +minetest.register_tool('survival:machete_steel', { + description = 'steel machete', + inventory_image = 'survival_machete_steel.png', + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level = 1, + groupcaps = { + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2}, + choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2}, + snappy={times={[1]=2.50, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=5} --a sword will do more damage than a machete. + }, +}) + +-- Bronze Machete +minetest.register_tool('survival:machete_bronze', { + description = 'bronze machete', + inventory_image = 'survival_machete_bronze.png', + tool_capabilities = { + full_punch_interval = 1, + max_drop_level = 1, + groupcaps = { + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2}, + choppy = {times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=30, maxlevel=2}, + snappy = {times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=40, maxlevel=2}, + }, + damage_grpups = {fleshy=5} + }, +})