mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-30 04:30:58 +02:00
Merge pull request #1153 from Refactorio/accessibility_notifications
Added white text above player when mentioned in chat
This commit is contained in:
commit
9ce26844f1
@ -100,8 +100,13 @@ local function mentions(event)
|
||||
success = true
|
||||
break
|
||||
end
|
||||
p.print(prefix .. game.get_player(event.player_index).name .. ' mentioned you!', Color.yellow)
|
||||
|
||||
p.print({'chat_triggers.mention_success_target', prefix, player.name}, Color.yellow)
|
||||
p.play_sound {path = 'utility/new_objective', volume_modifier = 1}
|
||||
if p.character and p.character.valid then -- If player is dead and they don't have a character then they won't get the hovering notification.
|
||||
local message = {'chat_triggers.mention_success_target_floating', player.name}
|
||||
rendering.draw_text({text = message, target_offset = {0,-3},surface = p.surface, target = p.character, time_to_live = 360, alignment="center", scale=3, players={p.name}, color= {1, 1, 1, 1}})
|
||||
end
|
||||
success = true
|
||||
if _DEBUG then
|
||||
player.print(prefix .. 'Successful mentioned ' .. p.name, Color.red)
|
||||
|
@ -99,6 +99,8 @@ patreon=Did you ask about our patreon?\nYou can find it here: patreon.com/redmew
|
||||
donate=Did you ask about donating to the server?\nYou can find our patreon here: patreon.com/redmew
|
||||
grief=To report grief please use the /report function.\nIf no admins are online use #helpdesk-and-moderation on the discord and make sure the @mention the appropriate role.
|
||||
mention_success=__1__ __2__ mentioned __3__!
|
||||
mention_success_target=__1__ __2__ mentioned you!
|
||||
mention_success_target_floating=__1__ mentioned you in the chat!
|
||||
mention_fail_mention_self=__1__ Can't mention yourself!
|
||||
mention_not_found_plural=__1__ Players not found: __2__
|
||||
mention_not_found_singular=__1__ Player not found: __2__
|
||||
|
Loading…
x
Reference in New Issue
Block a user