//######################################################################################################################## //###################################### NEWSPAPER! ###################################################################### //######################################################################################################################## /obj/item/weapon/newspaper name = "newspaper" desc = "An issue of The Griffon, the newspaper circulating aboard most stations." icon = 'icons/obj/bureaucracy.dmi' icon_state = "newspaper" w_class = ITEMSIZE_SMALL //Let's make it fit in trashbags! attack_verb = list("bapped") var/screen = 0 var/pages = 0 var/curr_page = 0 var/list/datum/feed_channel/news_content = list() var/datum/feed_message/important_message = null var/scribble="" var/scribble_page = null drop_sound = 'sound/items/drop/wrapper.ogg' pickup_sound = 'sound/items/pickup/wrapper.ogg' obj/item/weapon/newspaper/attack_self(mob/user as mob) if(ishuman(user)) var/mob/living/carbon/human/human_user = user var/dat pages = 0 switch(screen) if(0) //Cover dat+="
The Griffon
" dat+="
[using_map.company_name]-standard newspaper, for use on [using_map.company_name]© Space Facilities

" if(isemptylist(news_content)) if(important_message) 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/feed_channel/NP in news_content) pages++ //Let's get it right again. var/datum/feed_channel/C = news_content[curr_page] dat+="[C.channel_name] \[created by: [C.author]\]

" if(C.censored) 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 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/feed_channel/NP in news_content) pages++ if(important_message!=null) dat+="
Wanted Issue:


" dat+="Criminal name: [important_message.author]
" dat+="Description: [important_message.body]
" dat+="Photo:: " if(important_message.img) user << browse_rsc(important_message.img, "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
" else dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" 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 intelligible symbols!") obj/item/weapon/newspaper/Topic(href, href_list) var/mob/living/U = usr ..() if((src in U.contents) || (istype(loc, /turf) && 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(src, "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(src, "pageturn", 50, 1) if(istype(src.loc, /mob)) attack_self(src.loc) obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen)) 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 = sanitize(input(user, "Write something", "Newspaper", "")) s = sanitize(s) if(!s) return if(!in_range(src, usr) && src.loc != usr) return scribble_page = curr_page scribble = s attack_self(user) return