forked from Sokomine/yl_speak_up
		
	used yl_speak_up.log_change where appropriate
This commit is contained in:
		
							parent
							
								
									32a0613780
								
							
						
					
					
						commit
						8aad949ee2
					
				| @ -193,20 +193,18 @@ yl_speak_up.load_npc_inventory = function(n_id) | ||||
| 
 | ||||
| 		-- log inventory changes (same way as modifications to chest inventories) | ||||
| 	        on_move = function(inv, from_list, from_index, to_list, to_index, count, player) | ||||
| 			minetest.log("action", "(yl_speak_up) "..player:get_player_name() .. | ||||
| 				" moves stuff in inventory of NPC " .. tostring(n_id)) | ||||
| 			yl_speak_up.log_change(player:get_player_name(), n_id, | ||||
| 				"moves stuff inside inventory of NPC") | ||||
| 
 | ||||
| 		end, | ||||
| 	        on_put = function(inv, listname, index, stack, player) | ||||
| 			minetest.log("action", "(yl_speak_up) "..player:get_player_name() .. | ||||
| 				" moves " .. stack:get_name() .. | ||||
| 				" to inventory of NPC " .. tostring(n_id)) | ||||
| 			yl_speak_up.log_change(player:get_player_name(), n_id, | ||||
| 				"adds "..tostring(stack:to_string()).." to inventory of NPC") | ||||
| 
 | ||||
| 		end, | ||||
| 	        on_take = function(inv, listname, index, stack, player) | ||||
| 			minetest.log("action", "(yl_speak_up) "..player:get_player_name() .. | ||||
| 				" takes " .. stack:get_name() .. | ||||
| 				" from inventory of NPC " .. tostring(n_id)) | ||||
| 			yl_speak_up.log_change(player:get_player_name(), n_id, | ||||
| 				"takes "..tostring(stack:to_string()).." from inventory of NPC") | ||||
| 		end, | ||||
| 	}) | ||||
| 	-- the NPC needs enough room for trade items, payment and questitems | ||||
|  | ||||
| @ -62,10 +62,8 @@ yl_speak_up.npc_has_priv = function(n_id, priv_name, generic_npc_id) | ||||
| 	end | ||||
| 	if(not(yl_speak_up.npc_priv_table[n_id]) | ||||
| 	   or not(yl_speak_up.npc_priv_table[n_id][priv_name])) then | ||||
| 		minetest.log( | ||||
| 			"action", | ||||
| 			"[MOD] yl_speak_up: NPC with ID "..tostring(n_id).. | ||||
| 				" was denied the NPC priv "..tostring(priv_name)..".") | ||||
| 		yl_speak_up.log_change("-", n_id, | ||||
| 			"error: NPC was denied priv priv "..tostring(priv_name)..".") | ||||
| 		return false | ||||
| 	end | ||||
| 	return true | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user