Add hunger. Make goblins attack. Remove easy bread.

This commit is contained in:
Duane Robertson 2016-05-23 07:54:39 -05:00
parent 689548aa9b
commit 11e404c23a
4 changed files with 12 additions and 3 deletions

View file

@ -11,6 +11,10 @@ colors["^[colorize:#FF4500:80"] = "dye:green"
colors[""] = "dye:white" colors[""] = "dye:white"
fun_caves.fungal_tree_leaves = {} fun_caves.fungal_tree_leaves = {}
local newnode = fun_caves.clone_node("farming:straw")
newnode.description = "Dry Fiber"
minetest.register_node("fun_caves:dry_fiber", newnode)
-- all leaves -- all leaves
function fun_caves.make_fungal_tree(data, area, ivm, height, leaves, fruit) function fun_caves.make_fungal_tree(data, area, ivm, height, leaves, fruit)
for y = 0, height do for y = 0, height do
@ -63,7 +67,7 @@ for color, dye in pairs(colors) do
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "farming:straw", output = "fun_caves:dry_fiber",
recipe = name, recipe = name,
cooktime = 2, cooktime = 2,
}) })

View file

@ -3,7 +3,7 @@
mobs:register_mob("fun_caves:goblin_cobble", { mobs:register_mob("fun_caves:goblin_cobble", {
description = "Cobble Goblin", description = "Cobble Goblin",
type = "animal", type = "animal",
passive = false, passive = true,
damage = 1, damage = 1,
attack_type = "dogfight", attack_type = "dogfight",
attacks_monsters = true, attacks_monsters = true,

View file

@ -98,7 +98,7 @@ end
mobs:register_mob("fun_caves:goblin_digger", { mobs:register_mob("fun_caves:goblin_digger", {
description = "Digger Goblin", description = "Digger Goblin",
type = "animal", type = "animal",
passive = false, passive = true,
damage = 1, damage = 1,
attack_type = "dogfight", attack_type = "dogfight",
attacks_monsters = true, attacks_monsters = true,

View file

@ -411,6 +411,11 @@ minetest.register_globalstep(function(dtime)
player:set_hp(player:get_hp() - 1) player:set_hp(player:get_hp() - 1)
end end
end end
-- hunger
if last_dps_check % 2000 == 0 then
player:set_hp(player:get_hp() - 1)
end
end end
end end
end) end)