Skip to content

Commit

Permalink
Merge pull request #3441 from MistakeNot4892/config_look
Browse files Browse the repository at this point in the history
Adds a server config to disable visible examine messages.
  • Loading branch information
out-of-phaze authored Oct 14, 2023
2 parents 643d9cd + 73b1995 commit a5a3445
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ var/global/list/gamemode_cache = list()
var/exoplanet_max_day_duration = 40 MINUTES
///If true, exoplanets won't have daycycles
var/disable_daycycle = FALSE
/// Whether or not you will show a message when examining something.
var/visible_examine = TRUE

/datum/configuration/VV_hidden()
. = ..() | protected_vars
Expand Down Expand Up @@ -837,6 +839,9 @@ var/global/list/gamemode_cache = list()
if("show_typing_indicator_for_whispers")
config.show_typing_indicator_for_whispers = TRUE

if("visible_examine")
config.visible_examine = text2num(value)

else
//crappy hook to get modpacks to load any extra config
if(!load_mod_config(name, value))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@

face_atom(A)

if(!isghost(src))
if(!isghost(src) && config.visible_examine)
if((A.loc != src || (A in get_held_items())))
var/look_target = "at \the [A]"
if(isobj(A.loc))
Expand Down
3 changes: 3 additions & 0 deletions config/example/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,3 +462,6 @@ RADIATION_LOWER_LIMIT 0.15

## Uncomment this to show a typing indicator for people writing whispers.
#SHOW_TYPING_INDICATOR_FOR_WHISPERS

## Set this to 0 to hide visible examine messages.
VISIBLE_EXAMINE 1

0 comments on commit a5a3445

Please sign in to comment.