diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 4c14df16ec3..dfde3ee64b8 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -3,28 +3,25 @@ //###-Agouri################################### /datum/feed_message - var/author ="" - var/body ="" - var/message_type ="Story" - //var/parent_channel - var/backup_body ="" - var/backup_author ="" + var/author = "" + var/body = "" + var/message_type = "Story" + var/backup_body = "" + var/backup_author = "" var/is_admin_message = 0 var/icon/img = null var/icon/backup_img var/view_count = 0 /datum/feed_channel - var/channel_name="" + var/channel_name = "" var/list/datum/feed_message/messages = list() - //var/message_count = 0 - var/locked=0 - var/author="" - var/backup_author="" - var/censored=0 - var/is_admin_channel=0 + var/locked = 0 + var/author = "" + var/backup_author = "" + var/censored = 0 + var/is_admin_channel = 0 var/total_view_count = 0 - //var/page = null //For newspapers /datum/feed_message/proc/clear() author = "" @@ -59,468 +56,280 @@ var/datum/feed_network/news_network = new /datum/feed_network //The global n var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence. +#define NEWSCASTER_MAIN 0 // Main menu +#define NEWSCASTER_FC_LIST 1 // Feed channel list +#define NEWSCASTER_CREATE_FC 2 // Create feed channel +#define NEWSCASTER_CREATE_FM 3 // Create feed message +#define NEWSCASTER_PRINT 4 // Print newspaper +#define NEWSCASTER_VIEW_FC 5 // Read feed channel +#define NEWSCASTER_NT_CENSOR 6 // Nanotrasen Feed Censorship Tool +#define NEWSCASTER_D_NOTICE 7 // Nanotrasen D-Notice Handler +#define NEWSCASTER_CENSOR_FC 8 // Censor feed channel +#define NEWSCASTER_D_NOTICE_FC 9 // D-Notice feed channel +#define NEWSCASTER_W_ISSUE_H 10 // Wanted Issue handler +#define NEWSCASTER_W_ISSUE 11 // STATIONWIDE WANTED ISSUE + /obj/machinery/newscaster name = "newscaster" desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!" icon = 'icons/obj/terminals.dmi' icon_state = "newscaster_normal" - var/isbroken = 0 //1 if someone banged it with something heavy - var/ispowered = 1 //starts powered, changes with power_change() - //var/list/datum/feed_channel/channel_list = list() //This list will contain the names of the feed channels. Each name will refer to a data region where the messages of the feed channels are stored. - //OBSOLETE: We're now using a global news network - var/screen = 0 //Or maybe I'll make it into a list within a list afterwards... whichever I prefer, go fuck yourselves :3 - // 0 = welcome screen - main menu - // 1 = view feed channels - // 2 = create feed channel - // 3 = create feed story - // 4 = feed story submited sucessfully - // 5 = feed channel created successfully - // 6 = ERROR: Cannot create feed story - // 7 = ERROR: Cannot create feed channel - // 8 = print newspaper - // 9 = viewing channel feeds - // 10 = censor feed story - // 11 = censor feed channel - //Holy shit this is outdated, made this when I was still starting newscasters :3 - var/paper_remaining = 0 + var/screen = NEWSCASTER_MAIN + var/paper_remaining = 15 var/securityCaster = 0 // 0 = Caster cannot be used to issue wanted posters // 1 = the opposite var/unit_no = 0 //Each newscaster has a unit number - //var/datum/feed_message/wanted //We're gonna use a feed_message to store data of the wanted person because fields are similar - //var/wanted_issue = 0 //OBSOLETE - // 0 = there's no WANTED issued, we don't need a special icon_state - // 1 = Guess what. var/alert_delay = 500 var/alert = 0 // 0 = there hasn't been a news/wanted update in the last alert_delay // 1 = there has var/scanned_user = "Unknown" //Will contain the name of the person who currently uses the newscaster - var/msg = ""; //Feed message + var/msg = "" //Feed message var/obj/item/weapon/photo/photo = null - var/channel_name = ""; //the feed channel which will be receiving the feed, or being created - var/c_locked=0; //Will our new channel be locked to public submissions? - var/hitstaken = 0 //Death at 3 hits from an item with force>=15 + var/channel_name = "" //the feed channel which will be receiving the feed, or being created + var/c_locked = 0 //Will our new channel be locked to public submissions? + var/hitstaken = 0 //Death at 3 hits from an item with force>=15 var/datum/feed_channel/viewing_channel = null var/silence = 0 + var/temp = null + var/temp_back_screen = NEWSCASTER_MAIN + + var/static/REDACTED = "\[REDACTED\]" light_range = 0 anchored = 1 -/obj/machinery/newscaster/security_unit //Security unit +/obj/machinery/newscaster/security_unit name = "Security Newscaster" securityCaster = 1 -/obj/machinery/newscaster/New() //Constructor, ho~ +/obj/machinery/newscaster/New() allCasters += src - paper_remaining = 15 // Will probably change this to something better - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) // Let's give it an appropriate unit number - unit_no++ + unit_no = allCasters.len update_icon() //for any custom ones on the map... - ..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that + ..() /obj/machinery/newscaster/Destroy() allCasters -= src viewing_channel = null - photo = null + if(photo) + qdel(photo) + photo = null return ..() /obj/machinery/newscaster/update_icon() - if(!ispowered || isbroken) + overlays.Cut() + if(inoperable()) icon_state = "newscaster_off" - if(isbroken) //If the thing is smashed, add crack overlay on top of the unpowered sprite. - overlays.Cut() + if(stat & BROKEN) //If the thing is smashed, add crack overlay on top of the unpowered sprite. overlays += image(icon, "crack3") - return + else + if(!news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message + icon_state = "newscaster_normal" + if(alert) //new message alert overlay + overlays += "newscaster_alert" + else + icon_state = "newscaster_wanted" - overlays.Cut() //reset overlays - - if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message - icon_state = "newscaster_wanted" - return - - if(alert) //new message alert overlay - overlays += "newscaster_alert" - - if(hitstaken > 0) //Cosmetic damage overlay - overlays += image(icon, "crack[hitstaken]") - - icon_state = "newscaster_normal" - return + if(hitstaken > 0) //Cosmetic damage overlay + overlays += image(icon, "crack[hitstaken]") /obj/machinery/newscaster/power_change() - if(isbroken) //Broken shit can't be powered. - return - if( powered() ) - ispowered = 1 - stat &= ~NOPOWER - update_icon() - else - spawn(rand(0, 15)) - ispowered = 0 - stat |= NOPOWER - update_icon() - + ..() + update_icon() /obj/machinery/newscaster/ex_act(severity) switch(severity) - if(1.0) + if(1) qdel(src) return - if(2.0) - isbroken=1 + if(2) + stat |= BROKEN if(prob(50)) qdel(src) else update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in. - return else if(prob(50)) - isbroken=1 + stat |= BROKEN update_icon() - return - return -/obj/machinery/newscaster/attack_ai(mob/user) - return attack_hand(user) - /obj/machinery/newscaster/attack_ghost(mob/user) return attack_hand(user) -/obj/machinery/newscaster/attack_hand(mob/user) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ - interact(user) - -/obj/machinery/newscaster/interact(mob/user) - if(!ispowered || isbroken) +/obj/machinery/newscaster/attack_hand(mob/user) + if(..()) return + ui_interact(user) - if(ishuman(user) || issilicon(user) || isobserver(user)) - var/dat - dat = text("Newscaster

Newscaster Unit #[unit_no]

") +/obj/machinery/newscaster/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + user.set_machine(src) + if(can_scan(user)) + scan_user(user) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "newscaster.tmpl", name, 400, 600) + ui.open() - if(can_scan(user)) - scan_user(user) //Newscaster scans you +/obj/machinery/newscaster/ui_data(user) + var/list/data = list() - switch(screen) - if(0) - dat += {"Welcome to Newscasting Unit #[unit_no].
Interface & News networks Operational. -
Property of Nanotrasen"} - if(news_network.wanted_issue) - dat+= "
Read Wanted Issue" - dat+= {"

Create Feed Channel -
View Feed Channels -
Submit new Feed story -
Print newspaper"} - if(!silence) - dat+= "
Silence unit" + data["unit_no"] = unit_no + data["temp"] = temp + data["temp_back_screen"] = temp_back_screen + data["screen"] = screen + + switch(screen) + if(0) + data["wanted_issue"] = news_network.wanted_issue ? 1 : 0 + data["silence"] = silence + data["securityCaster"] = securityCaster + if(securityCaster) + data["scanned_user"] = scanned_user + if(1, 6, 7) + var/list/channels = list() + data["channels"] = channels + for(var/datum/feed_channel/C in news_network.network_channels) + channels[++channels.len] = list("name" = C.channel_name, "ref" = "\ref[C]", "censored" = C.censored, "admin" = C.is_admin_channel) + if(2) + data["scanned_user"] = scanned_user + data["channel_name"] = channel_name + data["c_locked"] = c_locked + if(3) + data["scanned_user"] = scanned_user + data["channel_name"] = channel_name + data["msg"] = msg + data["photo"] = photo ? 1 : 0 + if(4) + var/total_num = length(news_network.network_channels) + var/active_num = total_num + var/message_num=0 + for(var/datum/feed_channel/FC in news_network.network_channels) + if(!FC.censored) + message_num += length(FC.messages) else - dat+= "
Unsilence unit" - dat+= {"
Re-scan User -

Exit"} - if(securityCaster) - var/wanted_already = 0 - if(news_network.wanted_issue) - wanted_already = 1 - - dat += {"
Feed Security functions:
-
[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue -
Censor Feed Stories -
Mark Feed Channel with Nanotrasen D-Notice -

The newscaster recognises you as: [scanned_user]"} - if(1) - dat+= "Station Feed Channels
" - if( isemptylist(news_network.network_channels) ) - dat+="No active channels found..." - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - if(CHANNEL.is_admin_channel) - dat+="[CHANNEL.channel_name]
" - else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - /*for(var/datum/feed_channel/CHANNEL in channel_list) - dat+="[CHANNEL.channel_name]:
\[created by: [CHANNEL.author]\]

" - if( isemptylist(CHANNEL.messages) ) - dat+="No feed messages found in channel...

" - else - for(var/datum/feed_message/MESSAGE in CHANNEL.messages) - dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
"*/ - - dat+="

Refresh" - dat+="
Back" - if(2) - dat+={"Creating new Feed Channel... -
Channel Name: [channel_name]
- Channel Author: [scanned_user]
- Will Accept Public Feeds: [(c_locked) ? ("NO") : ("YES")]

-
Submit

Cancel
"} - if(3) - dat+={"Creating new Feed Message... -
Receiving Channel: [channel_name]
- Message Author: [scanned_user]
- Message Body: [msg]
- Attach Photo: [(photo ? "Photo Attached" : "No Photo")]
-
Submit

Cancel
"} - if(4) - dat+="Feed story successfully submitted to [channel_name].

" - dat+="
Return
" - if(5) - dat+="Feed Channel [channel_name] created successfully.

" - dat+="
Return
" - if(6) - dat+="ERROR: Could not submit Feed story to Network.

" - if(channel_name=="") - dat+="Invalid receiving channel name.
" - if(scanned_user=="Unknown") - dat+="Channel author unverified.
" - if(msg == "" || msg == "\[REDACTED\]") - dat+="Invalid message body.
" - - dat+="
Return
" - if(7) - dat+="ERROR: Could not submit Feed Channel to Network.

" - //var/list/existing_channels = list() //Let's get dem existing channels - OBSOLETE - var/list/existing_authors = list() - for(var/datum/feed_channel/FC in news_network.network_channels) - //existing_channels += FC.channel_name //OBSOLETE - if(FC.author == "\[REDACTED\]") - existing_authors += FC.backup_author - else - existing_authors += FC.author - if(scanned_user in existing_authors) - dat+="There already exists a Feed channel under your name.
" - if(channel_name=="" || channel_name == "\[REDACTED\]") - dat+="Invalid channel name.
" - var/check = 0 - for(var/datum/feed_channel/FC in news_network.network_channels) - if(FC.channel_name == channel_name) - check = 1 - break - if(check) - dat+="Channel name already in use.
" - if(scanned_user=="Unknown") - dat+="Channel author unverified.
" - dat+="
Return
" - if(8) - var/total_num=length(news_network.network_channels) - var/active_num=total_num - var/message_num=0 - for(var/datum/feed_channel/FC in news_network.network_channels) - if(!FC.censored) - message_num += length(FC.messages) //Dont forget, datum/feed_channel's var messages is a list of datum/feed_message - else - active_num-- - dat+="Network currently serves a total of [total_num] Feed channels, [active_num] of which are active, and a total of [message_num] Feed Stories." //TODO: CONTINUE - dat+="

Liquid Paper remaining: [(paper_remaining) *100 ] cm^3" - dat+="

Print Paper" - dat+="
Cancel" - if(9) - dat+="[viewing_channel.channel_name]: \[created by: [viewing_channel.author]\]
" - dat+="Feed view count: [viewing_channel.total_view_count]
" - viewing_channel.total_view_count++ - if(viewing_channel.censored) - dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" - dat+="No further feed story additions are allowed while the D-Notice is in effect.

" - else - if( isemptylist(viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - var/i = 0 - for(var/datum/feed_message/MESSAGE in viewing_channel.messages) - i++ - dat+="-[MESSAGE.body]
" - if(MESSAGE.img) - usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png") - dat+="

" - dat+="\[[MESSAGE.message_type] by [MESSAGE.author]\]
" - dat+="Message view count: [MESSAGE.view_count]
" - MESSAGE.view_count++ - dat+="

Refresh" - dat+="
Back" - if(10) - dat+="Nanotrasen Feed Censorship Tool
" - dat+="NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.
" - dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.
" - dat+="
Select Feed channel to get Stories from:
" - if(isemptylist(news_network.network_channels)) - dat+="No feed channels found active...
" - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - dat+="
Cancel" - if(11) - dat+="Nanotrasen D-Notice Handler
" - dat+="A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's" - dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed" - dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.
" - if(isemptylist(news_network.network_channels)) - dat+="No feed channels found active...
" - else - for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" - - dat+="
Back" - if(12) - dat+="[viewing_channel.channel_name]: \[ created by: [viewing_channel.author] \]
" - dat+="[(viewing_channel.author=="\[REDACTED\]") ? ("Undo Author censorship") : ("Censor channel Author")]
" - - - if( isemptylist(viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - for(var/datum/feed_message/MESSAGE in viewing_channel.messages) - dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
" - dat+="[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
" - dat+="
Back" - if(13) - dat+="[viewing_channel.channel_name]: \[ created by: [viewing_channel.author] \]
" - dat+="Channel messages listed below. If you deem them dangerous to the station, you can Bestow a D-Notice upon the channel.
" - if(viewing_channel.censored) - dat+="ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" - dat+="No further feed story additions are allowed while the D-Notice is in effect.

" - else - if( isemptylist(viewing_channel.messages) ) - dat+="No feed messages found in channel...
" - else - for(var/datum/feed_message/MESSAGE in viewing_channel.messages) - dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
" - - dat+="
Back" - if(14) - dat+="Wanted Issue Handler:" - var/wanted_already = 0 - var/end_param = 1 - if(news_network.wanted_issue) - wanted_already = 1 - end_param = 2 - - if(wanted_already) - dat+="
A wanted issue is already in Feed Circulation. You can edit or cancel it below.
" - dat+="
" - dat+="Criminal Name: [channel_name]
" - dat+="Description: [msg]
" - dat+="Attach Photo: [(photo ? "Photo Attached" : "No Photo")]
" - if(wanted_already) - dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author]
" - else - dat+="Wanted Issue will be created under prosecutor: [scanned_user]
" - dat+="
[(wanted_already) ? ("Edit Issue") : ("Submit")]" - if(wanted_already) - dat+="
Take down Issue" - dat+="
Cancel" - if(15) - dat+="Wanted issue for [channel_name] is now in Network Circulation.

" - dat+="
Return
" - if(16) - dat+="ERROR: Wanted Issue rejected by Network.

" - if(channel_name=="" || channel_name == "\[REDACTED\]") - dat+="Invalid name for person wanted.
" - if(scanned_user=="Unknown") - dat+="Issue author unverified.
" - if(msg == "" || msg == "\[REDACTED\]") - dat+="Invalid description.
" - dat+="
Return
" - if(17) - dat+="Wanted Issue successfully deleted from Circulation
" - dat+="
Return
" - if(18) - dat+="-- STATIONWIDE WANTED ISSUE --
\[Submitted by: [news_network.wanted_issue.backup_author]\]
" - dat+="Criminal: [news_network.wanted_issue.author]
" - dat+="Description: [news_network.wanted_issue.body]
" - dat+="Photo:: " - if(news_network.wanted_issue.img) - usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png") - dat+="
" - else - dat+="None" - dat+="

Back
" - if(19) - dat+="Wanted issue for [channel_name] successfully edited.

" - dat+="
Return
" - if(20) - dat+="Printing successfull. Please receive your newspaper from the bottom of the machine.

" - dat+="Return" - if(21) - dat+="Unable to print newspaper. Insufficient paper. Please notify maintenance personnell to refill machine storage.

" - dat+="Return" + active_num-- + data["total_num"] = total_num + data["active_num"] = active_num + data["message_num"] = message_num + data["paper_remaining"] = paper_remaining * 100 + if(5) + data["channel_name"] = viewing_channel.channel_name + data["author"] = viewing_channel.author + data["total_view_count"] = viewing_channel.total_view_count + data["censored"] = viewing_channel.censored + var/list/messages = list() + data["messages"] = messages + for(var/datum/feed_message/M in viewing_channel.messages) + messages[++messages.len] = list("body" = M.body, "img" = M.img ? icon2base64(M.img) : null, "message_type" = M.message_type, "author" = M.author, "view_count" = M.view_count) + if(8, 9) + data["channel_name"] = viewing_channel.channel_name + data["ref"] = "\ref[viewing_channel]" + data["author"] = viewing_channel.author + data["author_redacted"] = viewing_channel.author == REDACTED ? 1 : 0 + data["total_view_count"] = viewing_channel.total_view_count + data["censored"] = viewing_channel.censored + var/list/messages = list() + data["messages"] = messages + for(var/datum/feed_message/M in viewing_channel.messages) + messages[++messages.len] = list("body" = M.body, "body_redacted" = (M.body == REDACTED ? 1 : 0) , "message_type" = M.message_type, "author" = M.author, "author_redacted" = (M.author == REDACTED ? 1 : 0), "ref" = "\ref[M]", "view_count" = M.view_count) + if(10) + var/wanted_already = 0 + var/end_param = 1 + if(news_network.wanted_issue) + wanted_already = 1 + end_param = 2 + data["wanted_already"] = wanted_already + data["end_param"] = end_param + data["channel_name"] = channel_name + data["msg"] = msg + data["photo"] = photo ? 1 : 0 + if(wanted_already) + data["author"] = news_network.wanted_issue.backup_author else - dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" + data["scanned_user"] = scanned_user + if(11) + data["author"] = news_network.wanted_issue.backup_author + data["criminal"] = news_network.wanted_issue.author + data["description"] = news_network.wanted_issue.body + data["photo"] = news_network.wanted_issue.img ? icon2base64(news_network.wanted_issue.img) : 0 + return data - - var/datum/browser/popup = new(user, "newscaster_main", name, 400, 600) - popup.set_content(dat) - popup.open(0) - onclose(user, "newscaster_main") - /obj/machinery/newscaster/Topic(href, href_list) if(..()) return 1 - usr.set_machine(src) if(href_list["set_channel_name"]) channel_name = sanitizeSQL(strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))) while(findtext(channel_name," ") == 1) - channel_name = copytext(channel_name,2,lentext(channel_name)+1) - updateUsrDialog() - //update_icon() + channel_name = copytext(channel_name, 2, lentext(channel_name) + 1) else if(href_list["set_channel_lock"]) c_locked = !c_locked - updateUsrDialog() - //update_icon() else if(href_list["submit_new_channel"]) - //var/list/existing_channels = list() //OBSOLETE var/list/existing_authors = list() for(var/datum/feed_channel/FC in news_network.network_channels) - //existing_channels += FC.channel_name - if(FC.author == "\[REDACTED\]") + if(FC.author == REDACTED) existing_authors += FC.backup_author else - existing_authors +=FC.author + existing_authors += FC.author var/check = 0 for(var/datum/feed_channel/FC in news_network.network_channels) if(FC.channel_name == channel_name) check = 1 break - if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) ) - screen=7 + if(channel_name == "" || channel_name == REDACTED || scanned_user == "Unknown" || check || (scanned_user in existing_authors)) + temp = "ERROR: Could not submit feed channel to Network." + temp_back_screen = NEWSCASTER_CREATE_FC else - var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") - if(choice=="Confirm") + var/choice = alert("Please confirm feed channel creation", "Network Channel Handler", "Confirm", "Cancel") + if(choice == "Confirm") var/datum/feed_channel/newChannel = new /datum/feed_channel newChannel.channel_name = channel_name newChannel.author = scanned_user newChannel.locked = c_locked - feedback_inc("newscaster_channels",1) - /*for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) //Let's add the new channel in all casters. - NEWSCASTER.channel_list += newChannel*/ //Now that it is sane, get it into the list. -OBSOLETE - news_network.network_channels += newChannel //Adding channel to the global network - screen=5 - updateUsrDialog() - //update_icon() + feedback_inc("newscaster_channels", 1) + news_network.network_channels += newChannel //Adding channel to the global network + temp = "Feed channel '[channel_name]' created successfully." + temp_back_screen = NEWSCASTER_MAIN else if(href_list["set_channel_receiving"]) - //var/list/datum/feed_channel/available_channels = list() var/list/available_channels = list() for(var/datum/feed_channel/F in news_network.network_channels) - if( (!F.locked || F.author == scanned_user) && !F.censored) + if((!F.locked || F.author == scanned_user) && !F.censored) available_channels += F.channel_name - channel_name = strip_html_simple(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels ) - updateUsrDialog() + channel_name = strip_html_simple(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels) else if(href_list["set_new_message"]) msg = strip_html(input(usr, "Write your feed story", "Network Channel Handler", "")) - while(findtext(msg," ") == 1) - msg = copytext(msg,2,lentext(msg)+1) - updateUsrDialog() + while(findtext(msg, " ") == 1) + msg = copytext(msg, 2, lentext(msg) + 1) else if(href_list["set_attachment"]) AttachPhoto(usr) - updateUsrDialog() else if(href_list["submit_new_message"]) - if(msg =="" || msg=="\[REDACTED\]" || scanned_user == "Unknown" || channel_name == "" ) - screen=6 + if(msg == "" || msg == REDACTED || scanned_user == "Unknown" || channel_name == "" ) + temp = "ERROR: Could not submit feed story to Network." + temp_back_screen = NEWSCASTER_CREATE_FM else var/datum/feed_message/newMsg = new /datum/feed_message newMsg.author = scanned_user @@ -534,46 +343,37 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co FC.messages += newMsg //Adding message to the network's appropriate feed_channel announcement = FC.announce_news() break - screen=4 - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(announcement) - - updateUsrDialog() + temp = "Feed story successfully submitted to [channel_name]." + temp_back_screen = NEWSCASTER_MAIN + for(var/obj/machinery/newscaster/NC in allCasters) + NC.newsAlert(announcement) else if(href_list["create_channel"]) - screen=2 - updateUsrDialog() + screen = NEWSCASTER_CREATE_FC else if(href_list["create_feed_story"]) - screen=3 - updateUsrDialog() + screen = NEWSCASTER_CREATE_FM else if(href_list["menu_paper"]) - screen=8 - updateUsrDialog() + screen = NEWSCASTER_PRINT + else if(href_list["print_paper"]) if(!paper_remaining) - screen=21 + temp = "Unable to print newspaper. Insufficient paper. Please notify maintenance personnell to refill machine storage." + temp_back_screen = NEWSCASTER_MAIN else print_paper() - screen = 20 - updateUsrDialog() + temp = "Printing successful. Please receive your newspaper from the bottom of the machine." + temp_back_screen = NEWSCASTER_MAIN else if(href_list["silence_unit"]) - silence=1 - updateUsrDialog() - - else if(href_list["unsilence_unit"]) - silence=0 - updateUsrDialog() + silence = !silence else if(href_list["menu_censor_story"]) - screen=10 - updateUsrDialog() + screen = NEWSCASTER_NT_CENSOR else if(href_list["menu_censor_channel"]) - screen=11 - updateUsrDialog() + screen = NEWSCASTER_D_NOTICE else if(href_list["menu_wanted"]) var/already_wanted = 0 @@ -583,40 +383,46 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(already_wanted) channel_name = news_network.wanted_issue.author msg = news_network.wanted_issue.body - screen = 14 - updateUsrDialog() + screen = NEWSCASTER_W_ISSUE_H else if(href_list["set_wanted_name"]) - channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", "")) - while(findtext(channel_name," ") == 1) - channel_name = copytext(channel_name,2,lentext(channel_name)+1) - updateUsrDialog() + channel_name = strip_html(input(usr, "Provide the name of the wanted person", "Network Security Handler", "")) + while(findtext(channel_name, " ") == 1) + channel_name = copytext(channel_name, 2, lentext(channel_name) + 1) else if(href_list["set_wanted_desc"]) - msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "")) - while(findtext(msg," ") == 1) - msg = copytext(msg,2,lentext(msg)+1) - updateUsrDialog() + msg = strip_html(input(usr, "Provide the a description of the wanted person and any other details you deem important", "Network Security Handler", "")) + while(findtext(msg, " ") == 1) + msg = copytext(msg, 2, lentext(msg) + 1) else if(href_list["submit_wanted"]) var/input_param = text2num(href_list["submit_wanted"]) if(msg == "" || channel_name == "" || scanned_user == "Unknown") - screen = 16 + temp = "ERROR: Wanted issue rejected by Network." + temp_back_screen = NEWSCASTER_MAIN else - var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel") - if(choice=="Confirm") - if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below - var/datum/feed_message/WANTED = new /datum/feed_message - WANTED.author = channel_name - WANTED.body = msg - WANTED.backup_author = scanned_user //I know, a bit wacky + var/choice = alert("Please confirm wanted issue [input_param == 1 ? "creation." : "edit."]", "Network Security Handler", "Confirm", "Cancel") + if(choice == "Confirm") + if(input_param == 1) //input_param == 1: new wanted issue, input_param == 2: editing an existing one + var/datum/feed_message/W = new /datum/feed_message + W.author = channel_name + W.body = msg + W.backup_author = scanned_user //I know, a bit wacky if(photo) - WANTED.img = photo.img - news_network.wanted_issue = WANTED - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert() - NEWSCASTER.update_icon() - screen = 15 + W.img = photo.img + news_network.wanted_issue = W + for(var/obj/machinery/newscaster/NS in allCasters) + NS.newsAlert() + NS.update_icon() + temp = "Wanted issue for [channel_name] is now in Network Circulation." + temp_back_screen = NEWSCASTER_MAIN else if(news_network.wanted_issue.is_admin_message) alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok") @@ -626,110 +432,115 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co news_network.wanted_issue.backup_author = scanned_user if(photo) news_network.wanted_issue.img = photo.img - screen = 19 - - updateUsrDialog() + temp = "Wanted issue for [channel_name] successfully edited." + temp_back_screen = NEWSCASTER_MAIN else if(href_list["cancel_wanted"]) if(news_network.wanted_issue.is_admin_message) - alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok") + alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.", "Ok") return - var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel") - if(choice=="Confirm") + var/choice = alert("Please confirm wanted issue removal", "Network Security Handler", "Confirm", "Cancel") + if(choice == "Confirm") news_network.wanted_issue = null - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.update_icon() - screen=17 - updateUsrDialog() + for(var/obj/machinery/newscaster/NC in allCasters) + NC.update_icon() + temp = "Wanted Issue successfully deleted from Circulation" + temp_back_screen = NEWSCASTER_MAIN else if(href_list["view_wanted"]) - screen=18 - updateUsrDialog() + screen = NEWSCASTER_W_ISSUE else if(href_list["censor_channel_author"]) var/datum/feed_channel/FC = locate(href_list["censor_channel_author"]) - if(FC.is_admin_channel) - alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") - return - if(FC.author != "\[REDACTED\]") - FC.backup_author = FC.author - FC.author = "\[REDACTED\]" - else - FC.author = FC.backup_author - updateUsrDialog() + if(FC) + if(FC.is_admin_channel) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") + return + if(FC.author != REDACTED) + FC.backup_author = FC.author + FC.author = REDACTED + else + FC.author = FC.backup_author else if(href_list["censor_channel_story_author"]) - var/datum/feed_message/MSG = locate(href_list["censor_channel_story_author"]) - if(MSG.is_admin_message) - alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok") - return - if(MSG.author != "\[REDACTED\]") - MSG.backup_author = MSG.author - MSG.author = "\[REDACTED\]" - else - MSG.author = MSG.backup_author - updateUsrDialog() + var/datum/feed_message/M = locate(href_list["censor_channel_story_author"]) + if(M) + if(M.is_admin_message) + alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok") + return + if(M.author != REDACTED) + M.backup_author = M.author + M.author = REDACTED + else + M.author = M.backup_author else if(href_list["censor_channel_story_body"]) - var/datum/feed_message/MSG = locate(href_list["censor_channel_story_body"]) - if(MSG.is_admin_message) - alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") - return - if(MSG.img != null) - MSG.backup_img = MSG.img - MSG.img = null - else - MSG.img = MSG.backup_img - if(MSG.body != "\[REDACTED\]") - MSG.backup_body = MSG.body - MSG.body = "\[REDACTED\]" - else - MSG.body = MSG.backup_body - updateUsrDialog() + var/datum/feed_message/M = locate(href_list["censor_channel_story_body"]) + if(M) + if(M.is_admin_message) + alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok") + return + if(M.img != null) + M.backup_img = M.img + M.img = null + else + M.img = M.backup_img + if(M.body != REDACTED) + M.backup_body = M.body + M.body = REDACTED + else + M.body = M.backup_body else if(href_list["pick_d_notice"]) var/datum/feed_channel/FC = locate(href_list["pick_d_notice"]) - viewing_channel = FC - screen=13 - updateUsrDialog() + if(FC) + viewing_channel = FC + screen = NEWSCASTER_D_NOTICE_FC else if(href_list["toggle_d_notice"]) var/datum/feed_channel/FC = locate(href_list["toggle_d_notice"]) - if(FC.is_admin_channel) - alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok") - return - FC.censored = !FC.censored - updateUsrDialog() + if(FC) + if(FC.is_admin_channel) + alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.", "Ok") + return + FC.censored = !FC.censored else if(href_list["view"]) - screen=1 - updateUsrDialog() + screen = NEWSCASTER_FC_LIST else if(href_list["setScreen"]) //Brings us to the main menu and resets all fields~ screen = text2num(href_list["setScreen"]) - if(screen == 0) - scanned_user = "Unknown"; - msg = ""; - c_locked=0; - channel_name=""; + if(screen == NEWSCASTER_MAIN) + scanned_user = "Unknown" + msg = "" + c_locked = 0 + channel_name = "" viewing_channel = null - updateUsrDialog() + temp = null + temp_back_screen = NEWSCASTER_MAIN else if(href_list["show_channel"]) var/datum/feed_channel/FC = locate(href_list["show_channel"]) - viewing_channel = FC - screen = 9 - updateUsrDialog() + if(FC) + viewing_channel = FC + viewing_channel.total_view_count++ + for(var/datum/feed_message/M in viewing_channel.messages) + M.view_count++ + screen = NEWSCASTER_VIEW_FC else if(href_list["pick_censor_channel"]) var/datum/feed_channel/FC = locate(href_list["pick_censor_channel"]) - viewing_channel = FC - screen = 12 - updateUsrDialog() + if(FC) + viewing_channel = FC + screen = NEWSCASTER_CENSOR_FC else if(href_list["refresh"]) - updateUsrDialog() + if(can_scan(usr)) + scan_user(usr) //Newscaster scans you -/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob, params) + nanomanager.update_uis(src) + return 1 + +/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/wrench)) to_chat(user, "Now [anchored ? "un" : ""]securing [name]") playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) @@ -739,41 +550,42 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co qdel(src) return - if(isbroken) + if(stat & BROKEN) playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) - visible_message("[user.name] further abuses the shattered [name].", null, 5 ) + visible_message("[user.name] further abuses the shattered [name].", null, 5) else if(istype(I, /obj/item/weapon) ) var/obj/item/weapon/W = I if(W.damtype == STAMINA) return - if(W.force <15) - visible_message("[user.name] hits the [name] with the [W.name] with no visible effect.", null , 5 ) + if(W.force < 15) + visible_message("[user.name] hits the [name] with the [W.name] with no visible effect.", null , 5) playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) else hitstaken++ - if(hitstaken==3) - visible_message("[user.name] smashes the [name]!", null, 5 ) - isbroken=1 + if(hitstaken == 3) + visible_message("[user.name] smashes the [name]!", null, 5) + stat |= BROKEN playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) else - visible_message("[user.name] forcefully slams the [name] with the [I.name]!", null, 5 ) + visible_message("[user.name] forcefully slams the [name] with the [I.name]!", null, 5) playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) else - to_chat(user, "This does nothing.") + to_chat(user, "This does nothing.") update_icon() + ..() -/obj/machinery/newscaster/proc/AttachPhoto(mob/user as mob) +/obj/machinery/newscaster/proc/AttachPhoto(mob/user) if(photo) if(!issilicon(user)) - photo.loc = loc + photo.forceMove(get_turf(src)) user.put_in_inactive_hand(photo) photo = null if(istype(user.get_active_hand(), /obj/item/weapon/photo)) photo = user.get_active_hand() user.drop_item() - photo.loc = src - else if(istype(user,/mob/living/silicon)) + photo.forceMove(src) + else if(issilicon(user)) var/mob/living/silicon/tempAI = user var/obj/item/device/camera/siliconcam/camera = tempAI.aiCamera @@ -960,7 +772,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co scanned_user = "[ai_user.name] ([ai_user.job])" else scanned_user = "Unknown" - + /obj/machinery/newscaster/proc/can_scan(mob/user) if(ishuman(user) || issilicon(user)) return TRUE diff --git a/nano/templates/newscaster.tmpl b/nano/templates/newscaster.tmpl new file mode 100644 index 00000000000..af4edb702ad --- /dev/null +++ b/nano/templates/newscaster.tmpl @@ -0,0 +1,301 @@ + + + + +

Welcome to Newscasting Unit #{{:data.unit_no}}.

+Interface & News networks Operational.
+Property of Nanotrasen

+
+{{if data.temp}} +
{{:data.temp}}
+
{{:helper.link('Return', 'arrow-left', {'setScreen' : data.temp_back_screen})}}
+{{else}} + {{if data.screen == 0}} +
+ {{if data.wanted_issue}} +
{{:helper.link('Read Wanted issue', 'exclamation-triangle', {'view_wanted' : 1})}}
+ {{/if}} +
{{:helper.link('Create feed channel', 'plus', {'create_channel' : 1})}}
+
{{:helper.link('View feed channels', 'arrow-right', {'view' : 1})}}
+
{{:helper.link('Submit new feed story', 'share', {'create_feed_story' : 1})}}
+
{{:helper.link('Print newspaper', 'print', {'menu_paper' : 1})}}
+
{{:helper.link(data.silence ? 'Unsilence unit' : 'Silence unit', data.silence ? 'volume-up' : 'volume-off', {'silence_unit' : 1})}}
+
{{:helper.link('Re-scan user', 'refresh', {'refresh' : 1})}}
+ {{if data.securityCaster}} +
Feed Security functions:
+
{{:helper.link(data.wanted_issue ? 'Manage wanted issue' : 'Publish wanted issue', data.wanted_issue ? 'pencil' : 'share', {'menu_wanted' : 1})}}
+
{{:helper.link('Censor feed stories', 'ban', {'menu_censor_story' : 1})}}
+
{{:helper.link('Mark feed channel with Nanotrasen D-Notice', 'thumb-tack', {'menu_censor_channel' : 1})}}
+
The newscaster recognises you as: {{:data.scanned_user}}
+ {{/if}} +
+ {{else data.screen == 1}} +

Station Feed Channels

+
+ {{for data.channels}} +
+ {{if value.admin}} + {{:helper.link('' + value.name + '', 'arrow-right', {'show_channel' : value.ref})}} + {{else}} + {{:helper.link(value.name, 'arrow-right', {'show_channel' : value.ref}, null, value.censored ? 'link linkDanger' : null)}} + {{/if}} +
+ {{empty}} + No active channels found... + {{/for}} +
+
+
+
{{:helper.link('Refresh', 'refresh', {'refresh' : 1})}}
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 0})}}
+
+ {{else data.screen == 2}} +

Creating new feed channel...

+
+
Channel name:
+
+ {{:data.channel_name}} + {{:helper.link('Edit', 'pencil', {'set_channel_name' : 1})}} +
+
+
+
Channel author:
+
{{:data.scanned_user}}
+
+
+
Accept public feeds:
+
{{:helper.link(data.c_locked ? 'NO' : 'YES', data.c_locked ? 'times' : 'check', {'set_channel_lock' : 1})}}
+
+
+ {{:helper.link('Submit', 'share', {'submit_new_channel' : 1})}} + {{:helper.link('Cancel', 'arrow-left', {'setScreen' : 0})}} +
+ {{else data.screen == 3}} + Creating new feed message... +
+
Receiving channel:
+
+ {{:data.channel_name}} + {{:helper.link('Edit', 'pencil', {'set_channel_receiving' : 1})}} +
+
+
+
Message body:
+
+ {{:data.msg}} + {{:helper.link('Edit', 'pencil', {'set_new_message' : 1})}} +
+
+
+
Attached photo:
+
{{:helper.link(data.photo ? 'Dettach photo' : 'Attach photo', data.photo ? 'times' : 'paperclip', {'set_attachment' : 1})}}
+
+
+ {{:helper.link('Submit', 'share', {'submit_new_message' : 1})}} + {{:helper.link('Cancel', 'arrow-left', {'setScreen' : 0})}} +
+ {{else data.screen == 4}} + Network currently serves a total of {{:data.total_num}} feed channels, {{:data.active_num}} of which are active, and a total of {{:data.message_num}} feed stories. +
+
Liquid paper remaining:
+
{{:data.paper_remaining}} cm3
+
+
+ {{:helper.link('Print paper', 'print', {'print_paper' : 0})}} + {{:helper.link('Cancel', 'arrow-left', {'setScreen' : 0})}} +
+ {{else data.screen == 5}} + {{:data.channel_name}} [created by: {{:data.author}}]
+ Feed view count: {{:data.total_view_count}}
+ {{if data.censored}} +
+ ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
+ No further feed story additions are allowed while the D-Notice is in effect. +
+ {{else}} + {{for data.messages}} +
+ - {{:value.body}}
+ {{if value.img}} +
+ {{/if}} + [{{:value.message_type}} by {{:value.author}}]
+ Message view count: {{:value.view_count}} +
+ {{empty}} + No feed messages found in channel... + {{/for}} + {{/if}} +
+
+
{{:helper.link('Refresh', 'refresh', {'refresh' : 0})}}
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 1})}}
+
+ {{else data.screen == 6}} + Nanotrasen Feed Censorship Tool
+ NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible. + Keep in mind that users attempting to view a censored feed will instead see the [REDACTED] tag above it. +
+ Select feed channel to get stories from: +
+ {{for data.channels}} +
+ {{if value.admin}} + {{:helper.link('' + value.name + '', 'arrow-right', {'pick_censor_channel' : value.ref})}} + {{else}} + {{:helper.link(value.name, 'arrow-right', {'pick_censor_channel' : value.ref}, null, value.censored ? 'link linkDanger' : null)}} + {{/if}} +
+ {{empty}} + No feed channels found active... + {{/for}} +
+
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 0})}}
+
+ {{else data.screen == 7}} + Nanotrasen D-Notice Handler
+ A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station<>s morale, integrity or disciplinary behaviour. + A D-Notice will render a channel unable to be updated by anyone, without deleting any feedstories it might contain at the time. + You can lift a D-Notice if you have the required access at any time. +
+
+ {{for data.channels}} +
+ {{if value.admin}} + {{:helper.link('' + value.name + '', 'arrow-right', {'pick_d_notice' : value.ref})}} + {{else}} + {{:helper.link(value.name, 'arrow-right', {'pick_d_notice' : value.ref}, null, value.censored ? 'link linkDanger' : null)}} + {{/if}} +
+ {{empty}} + No feed channels found active... + {{/for}} +
+
+
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 0})}}
+
+ {{else data.screen == 8}} + {{:data.channel_name}} [created by: {{:data.author}}]
+ {{:helper.link(data.author_redacted ? 'Undo author censorship' : 'Censor channel author', null, {'censor_channel_author' : data.ref})}}

+ {{for data.messages}} +
+ - {{:value.body}}
+ {{if value.img}} +
+ {{/if}} + [{{:value.message_type}} by {{:value.author}}]
+ + {{:helper.link(value.body_redacted ? 'Undo story censorship' : 'Censor story', null, {'censor_channel_story_body' : value.ref})}} + {{:helper.link(value.author_redacted ? 'Undo author censorship' : 'Censor message author', null, {'censor_channel_story_author' : value.ref})}} + +
+ {{empty}} + No feed messages found in channel... + {{/for}} +
+
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 6})}}
+
+ {{else data.screen == 9}} + {{:data.channel_name}} [created by: {{:data.author}}]
+ Channel messages listed below. If you deem them dangerous to the station, you can
{{:helper.link('Bestow a D-Notice upon the channel', null, {'toggle_d_notice' : data.ref})}}


+ {{if data.censored}} +
+ ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice. + No further feed story additions are allowed while the D-Notice is in effect. +
+ {{else}} + {{for data.messages}} +
+ - {{:value.body}}
+ {{if value.img}} +
+ {{/if}} + [{{:value.message_type}} by {{:value.author}}] +
+ {{empty}} + No feed messages found in channel... + {{/for}} + {{/if}} +
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 7})}}
+
+ {{else data.screen == 10}} + Wanted Issue handler:
+ {{if data.wanted_already}} + A wanted issue is already in Feed Circulation. You can edit or cancel it below.
+ {{/if}} +
+
Criminal name:
+
+ {{:data.channel_name}} + {{:helper.link('Edit', 'pencil', {'set_wanted_name' : 1})}} +
+
+
+
Description:
+
+ {{:data.msg}} + {{:helper.link('Edit', 'pencil', {'set_wanted_desc' : 1})}} +
+
+
+
Attached photo:
+
{{:helper.link(data.photo ? 'Dettach photo' : 'Attach photo', data.photo ? 'times' : 'paperclip', {'set_attachment' : 1})}}
+
+
+
Author:
+
{{:data.wanted_already ? data.author : data.scanned_user}}
+
+
+
+ {{:helper.link(data.wanted_already ? 'Edit issue' : 'Submit', data.wanted_already ? 'pencil' : 'share', {'submit_wanted' : data.end_param})}} + {{if data.wanted_already}} + {{:helper.link('Take down issue', 'times', {'cancel_wanted' : 1})}} + {{/if}} + {{:helper.link('Back', 'arrow-left', {'setScreen' : 0})}} +
+ {{else data.screen == 11}} +

STATIONWIDE WANTED ISSUE

+ [Submitted by: {{:data.author}}]

+
+
Criminal:
+
{{:data.criminal}}
+
+
+
Description:
+
{{:data.description}}
+
+
+
Photo:
+
+ {{if data.photo}} + + {{else}} + None + {{/if}} +
+
+
+
{{:helper.link('Back', 'arrow-left', {'setScreen' : 0})}}
+
+ {{/if}} +{{/if}} \ No newline at end of file