Skip to content

Commit

Permalink
[MIRROR] Reading a newspaper conceals your identity (#779)
Browse files Browse the repository at this point in the history
* Reading a newspaper conceals your identity (#81276)

## About The Pull Request


![dreamseeker_T49SJcwCEf](https://github.com/tgstation/tgstation/assets/7483112/53fd391a-bf01-4dd3-9f58-6977b9b1d3f5)
While you are reading a newspaper with a free hand you will hold it up
in front of your face and ID, rendering you as "Unknown" to anyone who
examines you (although it does not conceal your voice).

If you don't have a free hand you can still read the paper but it won't
do these things.
I don't want to have to care about the balance of people hiding a gun
behind their newspaper, even if that is also pretty funny.

Inspired by a forum post:
https://tgstation13.org/phpBB/viewtopic.php?f=9&t=35650

## Why It's Good For The Game

I think that it's pretty funny.

## Changelog

:cl:
add: Reading a newspaper will conceal your identity.
/:cl:

* Reading a newspaper conceals your identity

---------

Co-authored-by: Jacquerel <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Feb 5, 2024
1 parent dc85592 commit 5b6988c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions code/game/machinery/newscaster/newspaper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
/obj/item/newspaper/Initialize(mapload)
. = ..()
register_context()
AddComponent(\
/datum/component/two_handed,\
wield_callback = CALLBACK(src, PROC_REF(on_wielded)),\
unwield_callback = CALLBACK(src, PROC_REF(on_unwielded)),\
)
creation_time = GLOB.news_network.last_action
for(var/datum/feed_channel/iterated_feed_channel in GLOB.news_network.network_channels)
news_content += iterated_feed_channel
Expand Down Expand Up @@ -105,11 +110,37 @@
return FALSE
return FALSE

/// Called when you start reading the paper with both hands
/obj/item/newspaper/proc/on_wielded(obj/item/source, mob/user)
RegisterSignal(user, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(holder_updated_overlays))
RegisterSignal(user, COMSIG_HUMAN_GET_VISIBLE_NAME, PROC_REF(holder_checked_name))
user.update_appearance(UPDATE_OVERLAYS)
user.name = user.get_visible_name()

/// Called when you stop doing that
/obj/item/newspaper/proc/on_unwielded(obj/item/source, mob/user)
UnregisterSignal(user, list(COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_HUMAN_GET_VISIBLE_NAME))
user.update_appearance(UPDATE_OVERLAYS)
user.name = user.get_visible_name()

/// Called when we're being read and overlays are updated, we should show a big newspaper over the reader
/obj/item/newspaper/proc/holder_updated_overlays(atom/reader, list/overlays)
SIGNAL_HANDLER
overlays += mutable_appearance(icon, "newspaper_held_over", ABOVE_MOB_LAYER)
overlays += mutable_appearance(icon, "newspaper_held_under", BELOW_MOB_LAYER)

/// Called when someone tries to figure out what our identity is, but they can't see it because of the newspaper
/obj/item/newspaper/proc/holder_checked_name(mob/living/carbon/human/source, list/identity)
SIGNAL_HANDLER
identity[VISIBLE_NAME_FACE] = ""
identity[VISIBLE_NAME_ID] = ""

/obj/item/newspaper/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Newspaper", name)
ui.open()
if(ui)
return
ui = new(user, src, "Newspaper", name)
ui.open()

/obj/item/newspaper/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
Expand Down
Binary file modified icons/obj/service/bureaucracy.dmi
Binary file not shown.

0 comments on commit 5b6988c

Please sign in to comment.