/obj/item/newspaper name = "newspaper" desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations." icon = 'icons/obj/bureaucracy.dmi' icon_state = "newspaper" lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi' w_class = WEIGHT_CLASS_SMALL attack_verb = list("bapped") var/screen = 0 var/pages = 0 var/curr_page = 0 var/list/datum/news/feed_channel/news_content = list() var/scribble="" var/scribble_page = null var/wantedAuthor var/wantedCriminal var/wantedBody var/wantedPhoto var/creationTime /obj/item/newspaper/suicide_act(mob/user) user.visible_message("[user] is focusing intently on [src]! It looks like [user.p_theyre()] trying to commit sudoku... until [user.p_their()] eyes light up with realization!") user.say(";JOURNALISM IS MY CALLING! EVERYBODY APPRECIATES UNBIASED REPORTI-GLORF", forced="newspaper suicide") var/mob/living/carbon/human/H = user var/obj/W = new /obj/item/reagent_containers/food/drinks/bottle/whiskey(H.loc) playsound(H.loc, 'sound/items/drink.ogg', rand(10,50), 1) W.reagents.trans_to(H, W.reagents.total_volume) user.visible_message("[user] downs the contents of [W.name] in one gulp! Shoulda stuck to sudoku!") return(TOXLOSS) /obj/item/newspaper/attack_self(mob/user) if(ishuman(user)) var/mob/living/carbon/human/human_user = user var/dat pages = 0 switch(screen) if(0) //Cover dat+="
The Griffon
" dat+="
Nanotrasen-standard newspaper, for use on Nanotrasen? Space Facilities

" if(isemptylist(news_content)) if(wantedAuthor) dat+="Contents:
" else dat+="Other than the title, the rest of the newspaper is unprinted..." else dat+="Contents:
" if(scribble_page==curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "
Next Page
Done reading
" if(1) // X channel pages inbetween. for(var/datum/news/feed_channel/NP in news_content) pages++ var/datum/news/feed_channel/C = news_content[curr_page] dat += "[C.channel_name] \[created by: [C.returnAuthor(notContent(C.authorCensorTime))]\]

" if(notContent(C.DclassCensorTime)) dat+="This channel was deemed dangerous to the general welfare of the station and therefore marked with a D-Notice. Its contents were not transferred to the newspaper at the time of printing." else if(isemptylist(C.messages)) dat+="No Feed stories stem from this channel..." else var/i = 0 for(var/datum/news/feed_message/MESSAGE in C.messages) if(MESSAGE.creationTime > creationTime) if(i == 0) dat+="No Feed stories stem from this channel..." break if(i == 0) dat+="" if(scribble_page==curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "

Previous Page
Next Page
" if(2) //Last page for(var/datum/news/feed_channel/NP in news_content) pages++ if(wantedAuthor!=null) dat+="
Wanted Issue:


" dat+="Criminal name: [wantedCriminal]
" dat+="Description: [wantedBody]
" dat+="Photo:: " if(wantedPhoto) user << browse_rsc(wantedPhoto, "tmp_photow.png") dat+="
" else dat+="None" else dat+="Apart from some uninteresting classified ads, there's nothing on this page..." if(scribble_page==curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "
Previous Page
" dat+="

[curr_page+1]
" human_user << browse(dat, "window=newspaper_main;size=300x400") onclose(human_user, "newspaper_main") else to_chat(user, "The paper is full of unintelligible symbols!") /obj/item/newspaper/proc/notContent(list/L) if(!L.len) return 0 for(var/i=L.len;i>0;i--) var/num = abs(L[i]) if(creationTime <= num) continue else if(L[i] > 0) return 1 else return 0 return 0 /obj/item/newspaper/Topic(href, href_list) var/mob/living/U = usr ..() if((src in U.contents) || (isturf(loc) && in_range(src, U))) U.set_machine(src) if(href_list["next_page"]) if(curr_page == pages+1) return //Don't need that at all, but anyway. if(curr_page == pages) //We're at the middle, get to the end screen = 2 else if(curr_page == 0) //We're at the start, get to the middle screen=1 curr_page++ playsound(loc, "pageturn", 50, 1) else if(href_list["prev_page"]) if(curr_page == 0) return if(curr_page == 1) screen = 0 else if(curr_page == pages+1) //we're at the end, let's go back to the middle. screen = 1 curr_page-- playsound(loc, "pageturn", 50, 1) if(ismob(loc)) attack_self(loc) /obj/item/newspaper/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/pen)) if(!user.is_literate()) to_chat(user, "You scribble illegibly on [src]!") return if(scribble_page == curr_page) to_chat(user, "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?") else var/s = stripped_input(user, "Write something", "Newspaper") if (!s) return if(!user.canUseTopic(src, BE_CLOSE)) return scribble_page = curr_page scribble = s attack_self(user) else return ..()