mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Decon log locale (#319)
* Update deconlog.lua * Update addons.cfg * Update addons.cfg * Update addons.cfg * Update deconlog.lua * Update deconlog.lua * Update addons.cfg * Update addons.cfg * Update addons.cfg * Update modules/addons/deconlog.lua --------- Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
This commit is contained in:
@@ -39,23 +39,24 @@ Event.on_init(function()
|
||||
end)
|
||||
|
||||
if config.decon_area then
|
||||
Event.add(defines.events.on_player_deconstructed_area, function (e)
|
||||
Event.add(defines.events.on_player_deconstructed_area, function(e)
|
||||
if e.alt then
|
||||
return
|
||||
end
|
||||
|
||||
local player = game.get_player(e.player_index)
|
||||
if Roles.player_has_flag(player, "deconlog-bypass") then
|
||||
|
||||
if Roles.player_has_flag(player, 'deconlog-bypass') then
|
||||
return
|
||||
end
|
||||
|
||||
local items = e.surface.find_entities_filtered{area=e.area, force=player.force}
|
||||
|
||||
if #items > 250 then
|
||||
print_to_players(true, player.name .. ' tried to deconstruct the area ' .. pos_to_gps_string(e.area.left_top) .. ' to ' .. pos_to_gps_string(e.area.right_bottom) .. ' that have ' .. format_number(#items) .. ' items, but were not allowed.')
|
||||
print_to_players(true, {'deconlog.decon', player.name, e.surface.name, pos_to_gps_string(e.area.left_top), pos_to_gps_string(e.area.right_bottom), format_number(#items)})
|
||||
end
|
||||
|
||||
add_log(get_secs() .. "," .. player.name .. ",decon_area," .. pos_to_string(e.area.left_top) .. "," .. pos_to_string(e.area.right_bottom))
|
||||
add_log(get_secs() .. ',' .. player.name .. ',decon_area,' .. e.surface.name .. ',' .. pos_to_string(e.area.left_top) .. ',' .. pos_to_string(e.area.right_bottom))
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user