More machetes and bugs.

master
NathanSalapat 2015-03-18 19:43:54 -05:00
parent 963b6f0092
commit eaedd74fb1
20 changed files with 212 additions and 21 deletions

View File

@ -42,3 +42,63 @@ minetest.register_craft({
{'group:stick', '', ''},
}
})
minetest.register_craft({
output = 'survival:machete_diamond 1',
recipe = {
{'', '', 'default:diamond'},
{'', 'default:diamond', ''},
{'group:stick', '', ''},
}
})
minetest.register_craft({
output = 'survival:machete_mese 1',
recipe = {
{'', '', 'default:mese_crystal'},
{'', 'default:mese_crystal', ''},
{'group:stick', '', ''},
}
})
minetest.register_craft({
type = 'cooking',
output = 'survival:slug_cooked',
recipe = 'survival:slug_raw',
cooktime = 1,
})
minetest.register_craft({
type = 'cooking',
output = 'survival:cricket_cooked',
recipe = 'survival:cricket_raw',
cooktime = 1,
})
minetest.register_craft({
type = 'cooking',
output = 'survival:worm_cooked',
recipe = 'survival:worm_raw',
cooktime = 1,
})
minetest.register_craft({
type = 'cooking',
output = 'survival:centipede_cooked',
recipe = 'survival:centipede_raw',
cooktime = 1,
})
minetest.register_craft({
type = 'cooking',
output = 'survival:milipede_cooked',
recipe = 'survival:milipede_raw',
cooktime = 1,
})
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.
})

View File

@ -2,17 +2,18 @@
-- 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_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 string.find(minetest.get_node(pointed_thing.under).name, 'default:water_source')
then
local giving_back = 'survival:canteen_water_dirty',
else -- Do nothing
end,
})
--minetest.register_craft({
-- output = 'survival:canteen_empty 1',
@ -25,19 +26,13 @@ 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'),
on_use = minetest.item_eat(1, 'default:wood'),
})
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'),
})
on_use = minetest.item_eat((math.random(-2, 1)), 'default:wood'),
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.
})

65
foods.lua Normal file
View File

@ -0,0 +1,65 @@
minetest.register_craftitem('survival:energy_bar', {
description = 'energy_bar',
inventory_image = 'survival_energy_bar.png',
on_use = minetest.item_eat(10) -- Should also make you thirsty.
})
minetest.register_craftitem('survival:slug_raw', {
description = 'slug',
inventory_image = 'survival_slug_raw.png',
on_use = minetest.item_eat(-4)
})
minetest.register_craftitem('survival:slug_cooked', {
description = 'cooked slug',
inventory_image = 'survival_slug_cooked.png',
on_use = minetest.item_eat(.25)
})
minetest.register_craftitem('survival:cricket_raw', {
description = 'cricket',
inventory_image = 'survival_cricket_raw.png',
on_use = minetest.item_eat(.25)
})
minetest.register_craftitem('survival:cricket_cooked', {
description = 'cooked cricket',
inventory_image = 'survival_cricket_cooked.png',
on_use = minetest.item_eat(.125)
})
minetest.register_craftitem('survival:worm_raw', {
description = 'worm',
inventory_image = 'survival_worm_raw.png',
on_use = minetest.item_eat(.25)
})
minetest.register_craftitem('survival:worm_cooked', {
description = 'cooked worm',
inventory_image = 'survival_worm_cooked.png',
on_use = minetest.item_eat(.125)
})
minetest.register_craftitem('survival:centipede_raw', {
description = 'centipede',
inventory_image = 'survival_centipede_raw.png',
on_use = minetest.item_eat(.25)
})
minetest.register_craftitem('survival:centipede_cooked', {
description = 'cooked centipede',
inventory_image = 'survival_centipede_cooked.png',
on_use = minetest.item_eat(.25)
})
minetest.register_craftitem('survival:milipede_raw', {
description = 'milipede',
inventory_image = 'survival_milipede_raw.png',
on_use = minetest.item_eat(-4)
})
minetest.register_craftitem('survival:milipede_cooked', {
description = 'cooked milipede',
inventory_image = 'survival_milipede_cooked.png',
on_use = minetest.item_eat(-3)
})

View File

@ -2,4 +2,5 @@
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.
--dofile(minetest.get_modpath('survival')..'/drinking.lua')-- working on this yet.
dofile(minetest.get_modpath('survival')..'/foods.lua')

View File

@ -42,3 +42,41 @@ minetest.register_node('survival:barrel', {
" takes stuff from barrel at "..minetest.pos_to_string(pos))
end,
})
minetest.register_node(":default:dirt_with_grass", {
description = "Dirt with Grass",
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
is_ground_content = true,
groups = {crumbly=3,soil=1},
drop = {
max_items = 2,
items = {
{
items = {'survival:slug_raw'},
rarity = 30,
},
{
items = {'survival:cricket_raw'},
rarity = 30,
},
{
items = {'survival:worm_raw'},
rarity = 30,
},
{
items = {'survival:centipede_raw'},
rarity = 30,
},
{
items = {'survival:milipede_raw'},
rarity = 30,
},
{
items = {'default:dirt'},
},
},
},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25},
}),
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

View File

@ -44,6 +44,38 @@ minetest.register_tool('survival:machete_bronze', {
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}
damage_groups = {fleshy=5}
},
})
-- Diamond Machete
minetest.register_tool('survival:machete_diamond', {
description = 'diamond machete',
inventory_image = 'survival_machete_diamond.png',
tool_capabilities = {
full_punch_interval = 1,
max_drop_level = 1,
groupcaps = {
crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3},
choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=2},
snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
},
damage_groups = {fleshy=6},
}
})
-- Mese Machete
minetest.register_tool('survival:machete_mese', {
description = 'mese machete',
inventory_image = 'survival_machete_mese.png',
tool_capabilities = {
full_punch_interval = 1,
max_drop_level = 3,
groupcaps = {
crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3},
choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3},
snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3},
},
damage_groups = {fleshy=7},
}
})