mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-16 06:50:18 +01:00
intuitive order of arguments for default.log_player_action()
This commit is contained in:
parent
26553bfaee
commit
4e11628982
|
@ -1131,11 +1131,11 @@ These non-players are marked by the content of `is_fake_player`
|
|||
(if it is a string) or a "*" in brackets after the player name in
|
||||
the log.
|
||||
|
||||
`default.log_player_action(player, pos, message)`
|
||||
`default.log_player_action(player, message, pos)`
|
||||
|
||||
* `player` The player who performed the action
|
||||
* `pos` Position of the node at which the action was performed
|
||||
* `message` A message describing the action in 3rd person singular present tense.
|
||||
* `pos` Position of the node at which the action was performed
|
||||
|
||||
`default.set_inventory_action_loggers(def, name)`
|
||||
|
||||
|
|
|
@ -721,7 +721,7 @@ end
|
|||
|
||||
local log_non_player_actions = minetest.settings:get_bool("log_non_player_actions") ~= false
|
||||
|
||||
function default.log_player_action(player, pos, message)
|
||||
function default.log_player_action(player, message, pos)
|
||||
local who = player:get_player_name()
|
||||
if not player.is_fake_player and player:is_player() then
|
||||
-- log action of real player
|
||||
|
@ -737,13 +737,13 @@ end
|
|||
function default.set_inventory_action_loggers(def, name)
|
||||
def.on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
default.log_player_action(player, pos, "moves stuff in " .. name)
|
||||
default.log_player_action(player, "moves stuff in " .. name, pos)
|
||||
end
|
||||
def.on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
default.log_player_action(player, pos, "moves " .. stack:get_name() .. " to " .. name)
|
||||
default.log_player_action(player, "moves " .. stack:get_name() .. " to " .. name, pos)
|
||||
end
|
||||
def.on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
default.log_player_action(player, pos, "takes " .. stack:get_name() .. " from " .. name)
|
||||
default.log_player_action(player, "takes " .. stack:get_name() .. " from " .. name, pos)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user