From ba68248ab609f6b56377e30a4df6574cce6d0fbe Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Wed, 2 May 2012 00:35:39 +0100 Subject: [PATCH] TG: Re-adds metadata support. Adds ghost sight as its own verb to see all emotes in the world. Revision: r3419 Author: VivianFoxfoot --- code/modules/mob/living/carbon/human/emote.dm | 8 +++++--- code/modules/mob/mob.dm | 13 +++++++++++++ code/modules/mob/new_player/preferences.dm | 6 ++++++ code/modules/mob/new_player/savefile.dm | 3 +++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index bcb96ce4893..0eae0dd45d8 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -516,15 +516,17 @@ if (message) log_emote("[name]/[key] : [message]") -/* Hearing gasp and such every five seconds is not good emotes were not global for a reason. + //Hearing gasp and such every five seconds is not good emotes were not global for a reason. + // Maybe some people are okay with that. + for(var/mob/M in world) if (!M.client) continue //skip monkeys and leavers if (istype(M, /mob/new_player)) continue - if(M.stat == 2 && M.client.ghost_ears && !(M in viewers(src,null))) + if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) M.show_message(message) -*/ + if (m_type & 1) for (var/mob/O in viewers(src, null)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 066eb4ccbd4..51bd5db118b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -537,6 +537,19 @@ else usr << "\blue Now you hear speech only from nearest creatures." +/client/var/ghost_sight = 1 +/client/verb/toggle_ghost_sight() + set name = "Ghost sight" + set category = "OOC" + set desc = "Hear emotes from everywhere" + ghost_sight = !ghost_sight + if (ghost_sight) + usr << "\blue Now you hear all emotes in the world" + else + usr << "\blue Now you hear emotes only from nearest creatures." + + + /mob/verb/observe() set name = "Observe" set category = "OOC" diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 9575db4a923..ebb7e012d41 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -247,6 +247,8 @@ datum/preferences dat += "UI Style: [UI == UI_NEW ? "New" : "Old"]
" dat += "Play admin midis: [midis == 1 ? "Yes" : "No"]
" dat += "Ghost ears: [ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]
" + dat += "Ghost sight: [ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]
" + if(config.allow_Metadata) dat += "OOC Notes: Edit
" @@ -809,6 +811,9 @@ datum/preferences if(link_tags["ghost_ears"]) ghost_ears = !ghost_ears + if(link_tags["ghost_sight"]) + ghost_sight = !ghost_sight + if(link_tags["underwear"]) switch(link_tags["underwear"]) if("inputmale") @@ -1017,6 +1022,7 @@ datum/preferences C.be_syndicate = be_special if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile. C.ghost_ears = src.ghost_ears + C.ghost_sight = src.ghost_sight proc/copydisabilities(mob/living/carbon/human/character) if(disabilities & 1) diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index 61c55fa852e..48f44415f76 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -141,6 +141,7 @@ datum/preferences/proc/savefile_save(mob/user, slot) F["UI"] << src.UI F["midis"] << src.midis F["ghost_ears"] << src.ghost_ears + F["ghost_sight"] << src.ghost_sight F["pregame_music"] << src.pregame_music F["ooccolor"] << src.ooccolor F["lastchangelog"] << src.lastchangelog @@ -214,6 +215,8 @@ datum/preferences/proc/savefile_load(mob/user, slot) F["ghost_ears"] >> src.ghost_ears if(isnull(ghost_ears)) ghost_ears = 1 //Hotfix F["pregame_music"] >> src.pregame_music + F["ghost_sight"] >> src.ghost_sight + if(isnull(ghost_sight)) ghost_sight = 1 //Hotfix F["ooccolor"] >> src.ooccolor F["lastchangelog"] >> src.lastchangelog F["UI"] >> src.UI