// Function from file: newscaster.dm public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null) { dynamic human_user = null; dynamic dat = null; Newscaster_FeedChannel NP = null; int temp_page = 0; Newscaster_FeedChannel NP2 = null; Newscaster_FeedChannel NP3 = null; Newscaster_FeedChannel C = null; int i = 0; Newscaster_FeedMessage MESSAGE = null; Newscaster_FeedChannel NP4 = null; if (user is Mob_Living_Carbon_Human) { human_user = user; this.pages = 0; switch ((int)(this.screen)) { case 0: dat += "<DIV ALIGN='center'><B><FONT SIZE=6>The Griffon</FONT></B></div>"; dat += "<DIV ALIGN='center'><FONT SIZE=2>Nanotrasen-standard newspaper, for use on Nanotrasen© Space Facilities</FONT></div><HR>"; if (GlobalFuncs.isemptylist(this.news_content)) { if (Lang13.Bool(this.wantedAuthor)) { dat += "Contents:<BR><ul><B><FONT COLOR='red'>**</FONT>Important Security Announcement<FONT COLOR='red'>**</FONT></B> <FONT SIZE=2>[page " + (this.pages + 2) + "]</FONT><BR></ul>"; } else { dat += "<I>Other than the title, the rest of the newspaper is unprinted...</I>"; } } else { dat += "Contents:<BR><ul>"; foreach (dynamic _a in Lang13.Enumerate(this.news_content, typeof(Newscaster_FeedChannel))) { NP = _a; this.pages++; } if (Lang13.Bool(this.wantedAuthor)) { dat += "<B><FONT COLOR='red'>**</FONT>Important Security Announcement<FONT COLOR='red'>**</FONT></B> <FONT SIZE=2>[page " + (this.pages + 2) + "]</FONT><BR>"; } temp_page = 0; foreach (dynamic _b in Lang13.Enumerate(this.news_content, typeof(Newscaster_FeedChannel))) { NP2 = _b; temp_page++; dat += "<B>" + NP2.channel_name + "</B> <FONT SIZE=2>[page " + (temp_page + 1) + "]</FONT><BR>"; } dat += "</ul>"; } if (this.scribble_page == this.curr_page) { dat += "<BR><I>There is a small scribble near the end of this page... It reads: \"" + this.scribble + "\"</I>"; } dat += new Txt("<HR><DIV STYLE='float:right;'><A href='?src=").Ref(this).str(";next_page=1'>Next Page</A></DIV> <div style='float:left;'><A href='?src=").Ref(human_user).str(";mach_close=newspaper_main'>Done reading</A></DIV>").ToString(); break; case 1: foreach (dynamic _c in Lang13.Enumerate(this.news_content, typeof(Newscaster_FeedChannel))) { NP3 = _c; this.pages++; } C = this.news_content[this.curr_page]; dat += "<FONT SIZE=4><B>" + C.channel_name + "</B></FONT><FONT SIZE=1> [created by: <FONT COLOR='maroon'>" + C.returnAuthor(this.notContent(C.authorCensorTime) ?1:0) + "</FONT>]</FONT><BR><BR>"; if (this.notContent(C.DclassCensorTime)) { dat += "This channel was deemed dangerous to the general welfare of the station and therefore marked with a <B><FONT COLOR='red'>D-Notice</B></FONT>. Its contents were not transferred to the newspaper at the time of printing."; } else if (GlobalFuncs.isemptylist(C.messages)) { dat += "No Feed stories stem from this channel..."; } else { i = 0; foreach (dynamic _d in Lang13.Enumerate(C.messages, typeof(Newscaster_FeedMessage))) { MESSAGE = _d; if (MESSAGE.creationTime > this.creationTime) { if (i == 0) { dat += "No Feed stories stem from this channel..."; } break; } if (i == 0) { dat += "<ul>"; } i++; dat += "-" + MESSAGE.returnBody(this.notContent(MESSAGE.bodyCensorTime) ?1:0) + " <BR>"; if (MESSAGE.img != null) { Interface13.CacheBrowseResource(user, MESSAGE.img, "tmp_photo" + i + ".png"); dat += "<img src='tmp_photo" + i + ".png' width = '180'><BR>"; } dat += "<FONT SIZE=1>[Story by <FONT COLOR='maroon'>" + MESSAGE.returnAuthor(this.notContent(MESSAGE.authorCensorTime) ?1:0) + "</FONT>]</FONT><BR><BR>"; } dat += "</ul>"; } if (this.scribble_page == this.curr_page) { dat += "<BR><I>There is a small scribble near the end of this page... It reads: \"" + this.scribble + "\"</I>"; } dat += new Txt("<BR><HR><DIV STYLE='float:left;'><A href='?src=").Ref(this).str(";prev_page=1'>Previous Page</A></DIV> <DIV STYLE='float:right;'><A href='?src=").Ref(this).str(";next_page=1'>Next Page</A></DIV>").ToString(); break; case 2: foreach (dynamic _e in Lang13.Enumerate(this.news_content, typeof(Newscaster_FeedChannel))) { NP4 = _e; this.pages++; } if (this.wantedAuthor != null) { dat += "<DIV STYLE='float:center;'><FONT SIZE=4><B>Wanted Issue:</B></FONT SIZE></DIV><BR><BR>"; dat += "<B>Criminal name</B>: <FONT COLOR='maroon'>" + this.wantedCriminal + "</FONT><BR>"; dat += "<B>Description</B>: " + this.wantedBody + "<BR>"; dat += "<B>Photo:</B>: "; if (this.wantedPhoto != null) { Interface13.CacheBrowseResource(user, this.wantedPhoto, "tmp_photow.png"); dat += "<BR><img src='tmp_photow.png' width = '180'>"; } else { dat += "None"; } } else { dat += "<I>Apart from some uninteresting Classified ads, there's nothing on this page...</I>"; } if (this.scribble_page == this.curr_page) { dat += "<BR><I>There is a small scribble near the end of this page... It reads: \"" + this.scribble + "\"</I>"; } dat += new Txt("<HR><DIV STYLE='float:left;'><A href='?src=").Ref(this).str(";prev_page=1'>Previous Page</A></DIV>").ToString(); break; } dat += "<BR><HR><div align='center'>" + (this.curr_page + 1) + "</div>"; Interface13.Browse(human_user, dat, "window=newspaper_main;size=300x400"); GlobalFuncs.onclose(human_user, "newspaper_main"); } else { user.WriteMsg("The paper is full of intelligible symbols!"); } return(null); }