Remove debugging. Fix meteor probability.
This commit is contained in:
parent
9ef29d3feb
commit
50ce118087
2 changed files with 8 additions and 20 deletions
27
abms.lua
27
abms.lua
|
@ -2,9 +2,6 @@
|
|||
|
||||
-- player surface damage and hunger
|
||||
local dps_delay = 3000000
|
||||
if fun_caves.DEBUG then
|
||||
local dps_delay = 1000000
|
||||
end
|
||||
|
||||
local last_dps_check = 0
|
||||
local cold_delay = 5
|
||||
|
@ -64,9 +61,6 @@ minetest.register_globalstep(function(dtime)
|
|||
end
|
||||
mob.hp_max = math.floor(mob.hp_max * factor)
|
||||
mob.damage = math.floor(mob.damage * factor)
|
||||
if fun_caves.DEBUG then
|
||||
print("Promoting "..mob.name..": "..mob.hp_max.." at "..pos.x..","..pos.y..","..pos.z)
|
||||
end
|
||||
mob.object:set_hp(mob.hp_max)
|
||||
mob.health = mob.hp_max
|
||||
mob.initial_promotion = true
|
||||
|
@ -105,12 +99,7 @@ minetest.register_globalstep(function(dtime)
|
|||
-- Mobs are treated exacty the same. Spawn harder ones differently?
|
||||
--------------------------------------
|
||||
local name = fun_caves.fortress_spawns[math.random(#fun_caves.fortress_spawns)]
|
||||
local mob = minetest.add_entity(new_mob_pos, name)
|
||||
if mob then
|
||||
print("Fun Caves: Spawned "..name.." at ("..new_mob_pos.x..","..new_mob_pos.y..","..new_mob_pos.z..")")
|
||||
else
|
||||
print("Fun Caves: failed to spawn "..name)
|
||||
end
|
||||
minetest.add_entity(new_mob_pos, name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -136,7 +125,6 @@ minetest.register_globalstep(function(dtime)
|
|||
player:set_hp(20)
|
||||
return
|
||||
else
|
||||
--print(dump(player:get_armor_groups()))
|
||||
if fun_caves.armor_expire and fun_caves.armor_expire[player_name] and fun_caves.armor_expire[player_name] < time then
|
||||
player:set_armor_groups({fleshy=100})
|
||||
minetest.chat_send_player(player_name, minetest.colorize('#FF0000', 'Your skin feels softer...'))
|
||||
|
@ -272,7 +260,6 @@ minetest.register_abm({
|
|||
else
|
||||
minetest.set_node(new_pos, {name = "fun_caves:tree"})
|
||||
end
|
||||
print('tree +1')
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -482,17 +469,18 @@ minetest.register_abm({
|
|||
|
||||
-- meteor strikes
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"},
|
||||
neighbors = {"air"},
|
||||
interval = 10000 * fun_caves.time_factor,
|
||||
nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass", 'default:dirt_with_snow'},
|
||||
neighbors = {"air", 'default:snow'},
|
||||
interval = 25 * fun_caves.time_factor,
|
||||
catch_up = false,
|
||||
chance = 3000000,
|
||||
chance = 32767,
|
||||
action = function(pos, node)
|
||||
local ps = {}
|
||||
local players = minetest.get_connected_players()
|
||||
for i = 1, #players do
|
||||
local pp = players[i]:getpos()
|
||||
if pp and pp.y > 0 then
|
||||
local pd = vector.subtract(pp, pos)
|
||||
if pp and pp.y > 0 and math.abs(pd.x) < 1000 and math.abs(pd.z) < 1000 then
|
||||
local sky = {}
|
||||
sky.bgcolor, sky.type, sky.textures = players[i]:get_sky()
|
||||
ps[#ps+1] = { p = players[i], sky = sky }
|
||||
|
@ -501,7 +489,6 @@ minetest.register_abm({
|
|||
end
|
||||
|
||||
minetest.set_node(pos, {name="fun_caves:meteorite_crater"})
|
||||
print('Fun Caves: meteorite impact '..pos.x..','..pos.y..','..pos.z)
|
||||
|
||||
minetest.after(1, function()
|
||||
for i = 1, #ps do
|
||||
|
|
|
@ -677,6 +677,7 @@ minetest.register_node("fun_caves:rope_ladder_piece", {
|
|||
drop = {},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue