Newscaster
For all of the crew's news need. Includes reading, submitting and printing stories.
Includes a security variant which can be used to issue wanted notices, censor channels and stories. Allows full access when aghosting.
Vars | |
alert | Whether the newscaster has new stories or not. |
---|---|
is_printing | Whether the newscaster is currently printing a newspaper or not. |
is_security | Whether the newscaster can be used to make wanted issues or not. |
is_silent | Whether the unit is silent or not. |
jobblacklist | Static list of jobs that shouldn't be advertised if a position is available. |
last_views | Static, lazy list containing a user's last view time per channel. |
paper_remaining | The amount of newspapers the newscaster can print. |
photo | The currently attached photo. |
scanned_user | The name of the mob currently using the newscaster. |
screen | The current screen index in the UI. |
temp_notice | The current temporary notice. |
unit_number | The newcaster's index among all newscasters (GLOB.allNewscasters). |
viewing_channel | The currently viewed channel. |
Procs | |
AltClick | Ejects the currently loaded photo if there is one. |
alert_news | Makes the newscaster say a message and change its icon state for a while. |
alert_timer_finish | Called when the timer following a call to /obj/machinery/newscaster/proc/alert_news finishes. |
can_scan | Returns whether the machine's /obj/machinery/newscaster/var/scanned_user should update on interact. |
eject_photo | Ejects the photo currently held by the machine if there is one. |
get_message_data | Returns a /datum/feed_message in a format that can be used as TGUI data. |
get_scanned_user | Tries to obtain a mob's name and security access based on their ID. |
print_newspaper | Tries to print a newspaper with all of the content so far. |
print_newspaper_finish | Called when the timer following a call to /obj/machinery/newscaster/proc/print_newspaper finishes. |
set_temp | Sets a temporary message to display to the user |
ui_act_modal | Called in ui_act() to process modal actions |
Var Details
alert
Whether the newscaster has new stories or not.
is_printing
Whether the newscaster is currently printing a newspaper or not.
is_security
Whether the newscaster can be used to make wanted issues or not.
is_silent
Whether the unit is silent or not.
jobblacklist
Static list of jobs that shouldn't be advertised if a position is available.
last_views
Static, lazy list containing a user's last view time per channel.
paper_remaining
The amount of newspapers the newscaster can print.
photo
The currently attached photo.
scanned_user
The name of the mob currently using the newscaster.
screen
The current screen index in the UI.
temp_notice
The current temporary notice.
unit_number
The newcaster's index among all newscasters (GLOB.allNewscasters).
viewing_channel
The currently viewed channel.
Proc Details
AltClick
Ejects the currently loaded photo if there is one.
alert_news
Makes the newscaster say a message and change its icon state for a while.
Arguments:
- announcement - The message to say
- wanted_notice - Whether the alert is a wanted notice notification (overrides announcement)
alert_timer_finish
Called when the timer following a call to /obj/machinery/newscaster/proc/alert_news finishes.
can_scan
Returns whether the machine's /obj/machinery/newscaster/var/scanned_user should update on interact.
Arguments:
- user - The user to check
eject_photo
Ejects the photo currently held by the machine if there is one.
Arguments:
- user - The user to try to give the photo to.
get_message_data
Returns a /datum/feed_message in a format that can be used as TGUI data.
Arguments:
- FM - The story to send
- M - Optional. The user to send the story's photo to if it exists
get_scanned_user
Tries to obtain a mob's name and security access based on their ID.
Arguments:
- user - The user
print_newspaper
Tries to print a newspaper with all of the content so far.
print_newspaper_finish
Called when the timer following a call to /obj/machinery/newscaster/proc/print_newspaper finishes.
set_temp
Sets a temporary message to display to the user
Arguments:
- text - Text to display, null/empty to clear the message from the UI
- style - The style of the message: (color name), info, success, warning, danger
ui_act_modal
Called in ui_act() to process modal actions
Arguments:
- action - The action passed by tgui
- params - The params passed by tgui