Merge branch 'dev' into feature/entity-alert

This commit is contained in:
Cooldude2606 authored and GitHub committed 2021-04-26 00:21:48 +01:00
commit 2e1e024ac7
127 files changed
+4579 -629

No files matched your search

+6 -3
View File
@@ -59,7 +59,7 @@ local function emit_event(args)
}
local new_value, inline = value:gsub('<inline>', '', 1)
if inline then
if inline > 0 then
field.value = new_value
field.inline = true
end
@@ -102,6 +102,7 @@ if config.player_reports then
color=Colors.yellow,
['Player']='<inline>'..player_name,
['By']='<inline>'..by_player_name,
['Report Count']='<inline>'..Reports.count_reports(player_name),
['Reason']=event.reason
}
end)
@@ -114,7 +115,7 @@ if config.player_reports then
color=Colors.green,
['Player']='<inline>'..player_name,
['By']='<inline>'..event.removed_by_name,
['Amount']='<inline>'..event.batch_count
['Report Count']='<inline>'..event.batch_count
}
end)
end
@@ -124,12 +125,14 @@ if config.player_warnings then
local Warnings = require 'modules.control.warnings' --- @dep modules.control.warnings
Event.add(Warnings.events.on_warning_added, function(event)
local player_name, by_player_name = get_player_name(event)
local player = game.get_player(player_name)
emit_event{
title='Warning',
description='A player has been given a warning',
color=Colors.yellow,
['Player']='<inline>'..player_name,
['By']='<inline>'..by_player_name,
['Warning Count']='<inline>'..Warnings.count_warnings(player),
['Reason']=event.reason
}
end)
@@ -142,7 +145,7 @@ if config.player_warnings then
color=Colors.green,
['Player']='<inline>'..player_name,
['By']='<inline>'..event.removed_by_name,
['Amount']='<inline>'..event.batch_count
['Warning Count']='<inline>'..event.batch_count
}
end)
end