Skip to content

Commit

Permalink
there (MrMelbert#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert authored Oct 22, 2021
1 parent d3a13c4 commit 58fe0ae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
14 changes: 8 additions & 6 deletions jollystation_modules/code/modules/client/verbs/looc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ GLOBAL_VAR_INIT(looc_allowed, TRUE)
to_chat(src, span_danger("LOOC is globally muted."))
return
if(!GLOB.dooc_allowed && (mob.stat == DEAD))
to_chat(src, span_danger("LOOC for dead mobs has been turned off."))
to_chat(src, span_danger("OOC / LOOC for dead mobs has been turned off."))
return
if(prefs.muted & MUTE_OOC)
to_chat(src, span_danger("You cannot use LOOC (muted)."))
return

else
if(!GLOB.looc_allowed)
to_chat(src, span_danger("LOOC is globally muted, but you are bypassing it as an admin."))

// Really?
if(!SSticker.HasRoundStarted())
Expand All @@ -42,12 +44,12 @@ GLOBAL_VAR_INIT(looc_allowed, TRUE)

// Check for people with OOC muted
if(!(prefs.toggles & CHAT_OOC))
to_chat(src, span_danger("You have LOOC muted."))
to_chat(src, span_danger("You have OOC / LOOC muted."))
return

// Check for people banned from OOC
if(is_banned_from(ckey, "OOC"))
to_chat(src, span_danger("You have been banned from OOC."))
to_chat(src, span_danger("You have been banned from OOC / LOOC."))
return

if(QDELETED(src))
Expand All @@ -72,9 +74,9 @@ GLOBAL_VAR_INIT(looc_allowed, TRUE)
return


/// Source mob of the message
/// Source mob of the message.
var/mob/source = mob.get_looc_source()
/// EVeryone that can hear it
/// Everyone that can hear the message.
var/list/heard = get_hearers_in_view(7, source)

/// The ckey of the source mob
Expand Down
9 changes: 9 additions & 0 deletions tgui/packages/tgui-panel/chat/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const MESSAGE_TYPE_INFO = 'info';
export const MESSAGE_TYPE_WARNING = 'warning';
export const MESSAGE_TYPE_DEADCHAT = 'deadchat';
export const MESSAGE_TYPE_OOC = 'ooc';
export const MESSAGE_TYPE_LOOC = 'looc'; // NON-MODULE CHANGE
export const MESSAGE_TYPE_ADMINPM = 'adminpm';
export const MESSAGE_TYPE_COMBAT = 'combat';
export const MESSAGE_TYPE_ADMINCHAT = 'adminchat';
Expand Down Expand Up @@ -84,6 +85,14 @@ export const MESSAGE_TYPES = [
description: 'The bluewall of global OOC messages',
selector: '.ooc, .adminooc, .oocplain',
},
// NON-MODULE CHANGE
{
type: MESSAGE_TYPE_LOOC,
name: 'LOOC',
description: 'The lighter bluewall of local OOC messages',
selector: '.looc',
},
// NON-MODULE CHANGE END
{
type: MESSAGE_TYPE_ADMINPM,
name: 'Admin PMs',
Expand Down

0 comments on commit 58fe0ae

Please sign in to comment.