mirror of
https://github.com/minetest/minetest_game.git
synced 2025-02-22 18:50:21 +01:00
use default.log_player_action
This commit is contained in:
parent
4e11628982
commit
86a4b7ccb7
@ -2057,10 +2057,10 @@ local function coral_on_place(itemstack, placer, pointed_thing)
|
|||||||
|
|
||||||
if minetest.is_protected(pos_under, player_name) or
|
if minetest.is_protected(pos_under, player_name) or
|
||||||
minetest.is_protected(pos_above, player_name) then
|
minetest.is_protected(pos_above, player_name) then
|
||||||
minetest.log("action", player_name
|
default.log_player_action(placer,
|
||||||
.. " tried to place " .. itemstack:get_name()
|
"tried to place " .. itemstack:get_name()
|
||||||
.. " at protected position "
|
.. " at protected position "
|
||||||
.. minetest.pos_to_string(pos_under))
|
, pos_under)
|
||||||
minetest.record_protection_violation(pos_under, player_name)
|
minetest.record_protection_violation(pos_under, player_name)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
@ -2602,8 +2602,8 @@ local function register_sign(material, desc, def)
|
|||||||
minetest.chat_send_player(player_name, S("Text too long"))
|
minetest.chat_send_player(player_name, S("Text too long"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
minetest.log("action", player_name .. " wrote \"" .. text ..
|
default.log_player_action(sender, "wrote \"" .. text ..
|
||||||
"\" to the sign at " .. minetest.pos_to_string(pos))
|
"\" to the sign", pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("text", text)
|
meta:set_string("text", text)
|
||||||
|
|
||||||
|
@ -572,8 +572,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("action", player_name .. " places node "
|
default.log_player_action(placer, "places node " .. sapling_name, pos)
|
||||||
.. sapling_name .. " at " .. minetest.pos_to_string(pos))
|
|
||||||
|
|
||||||
local take_item = not minetest.is_creative_enabled(player_name)
|
local take_item = not minetest.is_creative_enabled(player_name)
|
||||||
local newnode = {name = sapling_name}
|
local newnode = {name = sapling_name}
|
||||||
|
@ -178,8 +178,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
minetest.log("action", player_name .. " places node " .. plantname .. " at " ..
|
default.log_player_action(placer, "places node " .. plantname, pt.above)
|
||||||
minetest.pos_to_string(pt.above))
|
|
||||||
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
||||||
tick(pt.above)
|
tick(pt.above)
|
||||||
if not minetest.is_creative_enabled(player_name) then
|
if not minetest.is_creative_enabled(player_name) then
|
||||||
|
@ -465,9 +465,7 @@ minetest.register_node("tnt:gunpowder", {
|
|||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
if puncher:get_wielded_item():get_name() == "default:torch" then
|
if puncher:get_wielded_item():get_name() == "default:torch" then
|
||||||
minetest.set_node(pos, {name = "tnt:gunpowder_burning"})
|
minetest.set_node(pos, {name = "tnt:gunpowder_burning"})
|
||||||
minetest.log("action", puncher:get_player_name() ..
|
default.log_player_action(puncher, "ignites tnt:gunpowder", pos)
|
||||||
" ignites tnt:gunpowder at " ..
|
|
||||||
minetest.pos_to_string(pos))
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_blast = function(pos, intensity)
|
on_blast = function(pos, intensity)
|
||||||
@ -635,9 +633,8 @@ function tnt.register_tnt(def)
|
|||||||
if puncher:get_wielded_item():get_name() == "default:torch" then
|
if puncher:get_wielded_item():get_name() == "default:torch" then
|
||||||
minetest.swap_node(pos, {name = name .. "_burning"})
|
minetest.swap_node(pos, {name = name .. "_burning"})
|
||||||
minetest.registered_nodes[name .. "_burning"].on_construct(pos)
|
minetest.registered_nodes[name .. "_burning"].on_construct(pos)
|
||||||
minetest.log("action", puncher:get_player_name() ..
|
default.log_player_action(puncher,
|
||||||
" ignites " .. node.name .. " at " ..
|
"ignites " .. node.name, pos)
|
||||||
minetest.pos_to_string(pos))
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_blast = function(pos, intensity)
|
on_blast = function(pos, intensity)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user