#363 Flush transitional merge (might be overwritten)

This commit is contained in:
kay27 2022-07-18 02:33:48 +03:00
parent f1a7e951af
commit c061e7cc6a
8 changed files with 256 additions and 422 deletions

View File

@ -1,8 +1,3 @@
mods/ITEMS/mcl_itemframes/init.lua
mods/ITEMS/mcl_lanterns/init.lua
mods/ITEMS/mcl_lanterns/mod.conf
mods/ITEMS/mcl_lanterns/register.lua
mods/ITEMS/mcl_maps/init.lua
mods/ITEMS/mcl_mobitems/init.lua
mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr
mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr

View File

@ -120,29 +120,6 @@ for v = 1, #vari do
return self.id
end,
})
=======
minetest.register_entity("mcl_itemframes:map", {
initial_properties = {
visual = "upright_sprite",
visual_size = {x = 1, y = 1},
pointable = false,
physical = false,
collide_with_objects = false,
textures = {"blank.png"},
},
on_activate = function(self, staticdata)
self.id = staticdata
mcl_maps.load_map(self.id, function(texture)
-- will not crash even if self.object is invalid by now
self.object:set_properties({textures = {texture}})
end)
end,
get_staticdata = function(self)
return self.id
end,
})
>>>>>>> mcl2/master
local facedir = {}
facedir[0] = {x=0,y=0,z=1}
@ -269,7 +246,6 @@ minetest.register_entity("mcl_itemframes:map", {
end
end
<<<<<<< HEAD
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
end,
on_construct = function(pos)
@ -299,7 +275,7 @@ minetest.register_entity("mcl_itemframes:map", {
put_itemstack:set_count(1)
local itemname = put_itemstack:get_name()
if minetest.get_item_group(itemname, "compass") > 0 then
put_itemstack:set_name("mcl_compass:" .. mcl_compass.get_compass_image(pos, minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2))))
put_itemstack:set_name(mcl_compass.get_compass_itemname(pos, minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2)), put_itemstack))
end
if minetest.get_item_group(itemname, "clock") > 0 then
minetest.get_node_timer(pos):start(1.0)
@ -374,50 +350,6 @@ minetest.register_entity("mcl_itemframes:map", {
end
end,
})
=======
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 1)
end,
on_rightclick = function(pos, node, clicker, itemstack)
if not itemstack then
return
end
local pname = clicker:get_player_name()
if minetest.is_protected(pos, pname) then
minetest.record_protection_violation(pos, pname)
return
end
local meta = minetest.get_meta(pos)
drop_item(pos, node, meta, clicker)
local inv = meta:get_inventory()
if itemstack:is_empty() then
remove_item_entity(pos, node)
meta:set_string("infotext", "")
inv:set_stack("main", 1, "")
return itemstack
end
local put_itemstack = ItemStack(itemstack)
put_itemstack:set_count(1)
local itemname = put_itemstack:get_name()
if minetest.get_item_group(itemname, "compass") > 0 then
put_itemstack:set_name(mcl_compass.get_compass_itemname(pos, minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2)), put_itemstack))
end
if minetest.get_item_group(itemname, "clock") > 0 then
minetest.get_node_timer(pos):start(1.0)
end
inv:set_stack("main", 1, put_itemstack)
update_item_entity(pos, node)
-- Add node infotext when item has been named
local imeta = itemstack:get_meta()
local iname = imeta:get_string("name")
if iname then
meta:set_string("infotext", iname)
end
>>>>>>> mcl2/master
minetest.register_lbm({
label = "Update legacy item frames",

View File

@ -1,10 +1,5 @@
<<<<<<< HEAD
local S = minetest.get_translator(minetest.get_current_modname())
local modpath = minetest.get_modpath(minetest.get_current_modname())
=======
local S = minetest.get_translator("mcl_lanterns")
local modpath = minetest.get_modpath("mcl_lanterns")
>>>>>>> mcl2/master
mcl_lanterns = {}
@ -14,8 +9,6 @@ TODO:
- remove the hack arround walmounted nodes
]]
<<<<<<< HEAD
=======
local allowed_non_solid_nodes_floor = {
"mcl_core:ice",
"mcl_nether:soul_sand",
@ -91,7 +84,6 @@ local function check_placement(node, wdir)
end
end
>>>>>>> mcl2/master
function mcl_lanterns.register_lantern(name, def)
local itemstring_floor = "mcl_lanterns:"..name.."_floor"
local itemstring_ceiling = "mcl_lanterns:"..name.."_ceiling"
@ -144,11 +136,6 @@ function mcl_lanterns.register_lantern(name, def)
local under = pointed_thing.under
local above = pointed_thing.above
<<<<<<< HEAD
local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above))
local fakestack = itemstack
=======
local node = minetest.get_node(under)
local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above))
@ -158,7 +145,6 @@ function mcl_lanterns.register_lantern(name, def)
return itemstack
end
>>>>>>> mcl2/master
if wdir == 0 then
fakestack:set_name(itemstring_ceiling)
elseif wdir == 1 then

View File

@ -1,6 +0,0 @@
# textdomain: mcl_lanterns
Chain=Chaine
Chains are metallic decoration blocks.=Les chaines sont des blocs de décoration métalliques.
Lantern=Lanterne
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=Les lanternes sont des sources de lumières qui peuvent être placées au sommet ou en-dessous de la plupart des blocs.
Soul Lantern=Lanterne des âmes

View File

@ -1,6 +0,0 @@
# textdomain: mcl_lanterns
Chain=
Chains are metallic decoration blocks.=
Lantern=
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=
Soul Lantern=

View File

@ -1,12 +1,6 @@
name = mcl_lanterns
description = Add lanterns and chains to MineClone2
<<<<<<< HEAD
depends = mcl_sounds, mcl_blackstone
optional_depends =
author = AFCMS
=======
depends = mcl_sounds
optional_depends =
author = AFCMS
title = MineClone2 Lanterns
>>>>>>> mcl2/master

View File

@ -1,8 +1,4 @@
<<<<<<< HEAD
local S = minetest.get_translator(minetest.get_current_modname())
=======
local S = minetest.get_translator("mcl_lanterns")
>>>>>>> mcl2/master
mcl_lanterns.register_lantern("lantern", {
description = S("Lantern"),
@ -12,18 +8,6 @@ mcl_lanterns.register_lantern("lantern", {
light_level = 14,
})
<<<<<<< HEAD
minetest.register_craft({
output = "mcl_lanterns:lantern_floor",
recipe = {
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_torches:torch" , "mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
},
})
=======
>>>>>>> mcl2/master
mcl_lanterns.register_lantern("soul_lantern", {
description = S("Soul Lantern"),
longdesc = S("Lanterns are light sources which can be placed on the top or the bottom of most blocks."),
@ -33,17 +17,6 @@ mcl_lanterns.register_lantern("soul_lantern", {
})
minetest.register_craft({
<<<<<<< HEAD
output = "mcl_lanterns:soul_lantern_floor",
recipe = {
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_blackstone:soul_torch", "mcl_core:iron_nugget"},
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
},
})
minetest.register_alias("mcl_blackstone:soul_lantern", "mcl_lanterns:soul_lantern_floor")
=======
output = "mcl_lanterns:lantern_floor",
recipe = {
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
@ -51,4 +24,3 @@ minetest.register_alias("mcl_blackstone:soul_lantern", "mcl_lanterns:soul_lanter
{"mcl_core:iron_nugget", "mcl_core:iron_nugget", "mcl_core:iron_nugget"},
},
})
>>>>>>> mcl2/master

View File

@ -147,15 +147,8 @@ function mcl_maps.create_map(pos)
return itemstack
end
<<<<<<< HEAD
--local loading_maps = {}
function mcl_maps.load_map(id, callback)
if id == "" or creating_maps[id] then--or loading_maps[id] then
=======
function mcl_maps.load_map(id, callback)
if id == "" or creating_maps[id] then
>>>>>>> mcl2/master
return
end
@ -163,31 +156,6 @@ function mcl_maps.load_map(id, callback)
local texture = "mcl_maps_map_texture_" .. id .. ".tga"
if not loaded_maps[id] then
<<<<<<< HEAD
--loading_maps[id] = true
if not minetest.features.dynamic_add_media_table then
-- minetest.dynamic_add_media() blocks in
-- Minetest 5.3 and 5.4 until media loads
dynamic_add_media(map_textures_path .. texture, function(player_name) end)
loaded_maps[id] = true
if callback then callback(texture) end
--loading_maps[id] = nil
else
-- minetest.dynamic_add_media() never blocks
-- in Minetest 5.5, callback runs after load
dynamic_add_media(map_textures_path .. texture, function(player_name)
loaded_maps[id] = true
if callback then callback(texture) end
--loading_maps[id] = nil
end)
end
end
if loaded_maps[id] then
if callback then callback(texture) end
return texture
end
=======
if not minetest.features.dynamic_add_media_table then
-- minetest.dynamic_add_media() blocks in
-- Minetest 5.3 and 5.4 until media loads
@ -208,7 +176,6 @@ function mcl_maps.load_map(id, callback)
if callback then callback(texture) end
return texture
end
>>>>>>> mcl2/master
end
function mcl_maps.load_map_item(itemstack)