This commit is contained in:
Elias Fleckenstein 2021-01-22 19:08:11 +01:00
commit 291991c745
8 changed files with 64 additions and 43 deletions

@ -124,6 +124,10 @@ function mcl_burning.set_on_fire(obj, burn_time, damage, reason)
local max_fire_prot_lvl = 0
if obj:is_player() then
if minetest.is_creative_enabled(obj:get_player_name()) then
burn_time = burn_time / 100
end
local inv = obj:get_inventory()
for i = 2, 5 do
@ -240,11 +244,12 @@ function mcl_burning.tick(obj, dtime)
end
function mcl_burning.update_animation_frame(obj, fire_entity, animation_frame)
local fire_texture = "fire_basic_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame
local fire_texture = "mcl_burning_entity_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame
local fire_HUD_texture = "mcl_burning_hud_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame
fire_entity:set_properties({textures = {"blank.png", "blank.png", fire_texture, fire_texture, fire_texture, fire_texture}})
if obj:is_player() then
local hud_id = mcl_burning.get(obj, "int", "hud_id") - 1
obj:hud_change(hud_id, "text", fire_texture)
obj:hud_change(hud_id, "text", fire_HUD_texture)
end
end

@ -393,7 +393,7 @@ local is_node_dangerous = function(self, nodename)
return true
end
end
if minetest.registered_nodes[nn].damage_per_second > 0 then
if minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then
return true
end
return false

@ -360,6 +360,15 @@ minetest.register_node("mcl_chests:"..basename, {
end,
})
local function close_forms(canonical_basename, pos)
local players = minetest.get_connected_players()
for p=1, #players do
if vector.distance(players[p]:get_pos(), pos) <= 30 then
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
end
end
minetest.register_node(small_name, {
description = desc,
_tt_help = tt_help,
@ -483,10 +492,7 @@ minetest.register_node(small_name, {
end,
on_destruct = function(pos)
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
close_forms(canonical_basename, pos)
end,
mesecons = mesecons,
on_rotate = simple_rotate,
@ -527,19 +533,15 @@ minetest.register_node(left_name, {
return
end
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
close_forms(canonical_basename, pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then
return
end
for pl=1, #players do
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z)
end
close_forms(canonical_basename, p)
minetest.swap_node(p, { name = small_name, param2 = param2 })
create_entity(p, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest")
end,
@ -678,19 +680,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
return
end
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
close_forms(canonical_basename, pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then
return
end
for pl=1, #players do
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z)
end
close_forms(canonical_basename, p)
minetest.swap_node(p, { name = small_name, param2 = param2 })
create_entity(p, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest")
local meta = minetest.get_meta(pos)

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

@ -22,18 +22,18 @@ local destroy_portal = function(pos)
end
local ep_scheme = {
{ o={x=0, y=0, z=1}, p=3 },
{ o={x=0, y=0, z=2}, p=3 },
{ o={x=0, y=0, z=3}, p=3 },
{ o={x=1, y=0, z=4}, p=0 },
{ o={x=2, y=0, z=4}, p=0 },
{ o={x=3, y=0, z=4}, p=0 },
{ o={x=4, y=0, z=3}, p=1 },
{ o={x=4, y=0, z=2}, p=1 },
{ o={x=4, y=0, z=1}, p=1 },
{ o={x=3, y=0, z=0}, p=2 },
{ o={x=2, y=0, z=0}, p=2 },
{ o={x=1, y=0, z=0}, p=2 },
{ o={x=0, y=0, z=1}, p=1 },
{ o={x=0, y=0, z=2}, p=1 },
{ o={x=0, y=0, z=3}, p=1 },
{ o={x=1, y=0, z=4}, p=2 },
{ o={x=2, y=0, z=4}, p=2 },
{ o={x=3, y=0, z=4}, p=2 },
{ o={x=4, y=0, z=3}, p=3 },
{ o={x=4, y=0, z=2}, p=3 },
{ o={x=4, y=0, z=1}, p=3 },
{ o={x=3, y=0, z=0}, p=0 },
{ o={x=2, y=0, z=0}, p=0 },
{ o={x=1, y=0, z=0}, p=0 },
}
-- End portal
@ -255,6 +255,21 @@ if minetest.get_modpath("screwdriver") then
rotate_frame_eye = false
end
local function after_place_node(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node(pos)
if node then
node.param2 = (node.param2+2) % 4
minetest.swap_node(pos, node)
local ok, ppos = check_end_portal_frame(pos)
if ok then
-- Epic 'portal open' sound effect that can be heard everywhere
minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true)
end_portal_area(ppos)
end
end
end
minetest.register_node("mcl_portals:end_portal_frame", {
description = S("End Portal Frame"),
_tt_help = S("Used to construct end portals"),
@ -276,6 +291,8 @@ minetest.register_node("mcl_portals:end_portal_frame", {
on_rotate = rotate_frame,
after_place_node = after_place_node,
_mcl_blast_resistance = 36000000,
_mcl_hardness = -1,
})
@ -306,17 +323,11 @@ minetest.register_node("mcl_portals:end_portal_frame_eye", {
end_portal_area(ppos, true)
end
end,
on_construct = function(pos)
local ok, ppos = check_end_portal_frame(pos)
if ok then
-- Epic 'portal open' sound effect that can be heard everywhere
minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true)
end_portal_area(ppos)
end
end,
on_rotate = rotate_frame_eye,
after_place_node = after_place_node,
_mcl_blast_resistance = 36000000,
_mcl_hardness = -1,
})
@ -358,8 +369,11 @@ minetest.override_item("mcl_end:ender_eye", {
itemstack:take_item() -- 1 use
end
local ok = check_end_portal_frame(pointed_thing.under)
local ok, ppos = check_end_portal_frame(pointed_thing.under)
if ok then
-- Epic 'portal open' sound effect that can be heard everywhere
minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true)
end_portal_area(ppos)
if minetest.get_modpath("doc") then
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal_end")
end

@ -197,7 +197,9 @@ local destruct_sign = function(pos)
end
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z)
if vector.distance(players[p]:get_pos(), pos) <= 30 then
minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z)
end
end
end

@ -388,6 +388,8 @@ Source path,Source file,Target path,Target file,xs,ys,xl,yl,xt,yt,Blacklisted?
/assets/minecraft/textures/blocks,wheat_stage_6.png,/mods/ITEMS/mcl_farming/textures,mcl_farming_wheat_stage_6.png,,,,,,,
/assets/minecraft/textures/blocks,wheat_stage_7.png,/mods/ITEMS/mcl_farming/textures,mcl_farming_wheat_stage_7.png,,,,,,,
/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,fire_basic_flame_animated.png,,,,,,,
/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,mcl_burning_entity_flame_animated.png,,,,,,,
/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,mcl_burning_hud_flame_animated.png,,,,,,,
/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,fire_basic_flame.png,0,0,16,16,0,0,y
/assets/minecraft/textures/items,fireball.png,/mods/ITEMS/mcl_fire/textures,mcl_fire_fire_charge.png,,,,,,,
/assets/minecraft/textures/items,flint_and_steel.png,/mods/ITEMS/mcl_fire/textures,mcl_fire_flint_and_steel.png,,,,,,,

1 Source path Source file Target path Target file xs ys xl yl xt yt Blacklisted?
388 /assets/minecraft/textures/blocks wheat_stage_6.png /mods/ITEMS/mcl_farming/textures mcl_farming_wheat_stage_6.png
389 /assets/minecraft/textures/blocks wheat_stage_7.png /mods/ITEMS/mcl_farming/textures mcl_farming_wheat_stage_7.png
390 /assets/minecraft/textures/blocks fire_layer_0.png /mods/ITEMS/mcl_fire/textures fire_basic_flame_animated.png
391 /assets/minecraft/textures/blocks fire_layer_0.png /mods/ITEMS/mcl_fire/textures mcl_burning_entity_flame_animated.png
392 /assets/minecraft/textures/blocks fire_layer_0.png /mods/ITEMS/mcl_fire/textures mcl_burning_hud_flame_animated.png
393 /assets/minecraft/textures/blocks fire_layer_0.png /mods/ITEMS/mcl_fire/textures fire_basic_flame.png 0 0 16 16 0 0 y
394 /assets/minecraft/textures/items fireball.png /mods/ITEMS/mcl_fire/textures mcl_fire_fire_charge.png
395 /assets/minecraft/textures/items flint_and_steel.png /mods/ITEMS/mcl_fire/textures mcl_fire_flint_and_steel.png