Ejemplo n.º 1
0
        // Function from file: god.dm
        public void trap_construction_ui(Mob_Camera_God user = null)
        {
            string  dat           = null;
            dynamic t             = null;
            dynamic T             = null;
            Icon    I             = null;
            string  img_component = null;
            Browser popup         = null;

            dat = "";

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.global_handofgod_traptypes))
            {
                t = _a;


                if (Lang13.Bool(GlobalVars.global_handofgod_traptypes[t]))
                {
                    T             = GlobalVars.global_handofgod_traptypes[t];
                    dat          += "<center><B>" + GlobalFuncs.capitalize(t) + "</B></center><BR>";
                    I             = new Icon("icons/obj/hand_of_god_structures.dmi", "" + Lang13.Initial(T, "icon_state"));
                    img_component = String13.ToLower(t);
                    Interface13.CacheBrowseResource(user, I, "hog_trap-" + img_component + ".png");
                    dat += "<center><img src='hog_trap-" + img_component + ".png' height=64 width=64></center>";
                    dat += "Description: " + Lang13.Initial(T, "desc") + "<BR>";
                    dat += new Txt("<center><a href='?src=").Ref(this).str(";place_trap=").item(T).str("'>Place ").item(GlobalFuncs.capitalize(t)).str("</a></center><BR><BR>").ToString();
                }
            }
            popup = new Browser(this, "traps", "Place Trap", 350, 500);
            popup.set_content(dat);
            popup.open();
            return;
        }
Ejemplo n.º 2
0
        // Function from file: god.dm
        public void structure_construction_ui(Mob_Camera_God user = null)
        {
            string  dat           = null;
            dynamic t             = null;
            dynamic apath         = null;
            string  imgstate      = null;
            Icon    I             = null;
            string  img_component = null;
            Browser popup         = null;

            dat = "";

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.global_handofgod_structuretypes))
            {
                t = _a;


                if (Lang13.Bool(GlobalVars.global_handofgod_structuretypes[t]))
                {
                    apath         = GlobalVars.global_handofgod_structuretypes[t];
                    dat          += "<center><B>" + GlobalFuncs.capitalize(t) + "</B></center><BR>";
                    imgstate      = (Lang13.Bool(Lang13.Initial(apath, "autocolours")) ? "" + Lang13.Initial(apath, "icon_state") + "-" + this.side : "" + Lang13.Initial(apath, "icon_state"));
                    I             = new Icon("icons/obj/hand_of_god_structures.dmi", imgstate);
                    img_component = String13.ToLower(t);
                    Interface13.CacheBrowseResource(user, I, "hog_structure-" + img_component + ".png");
                    dat += "<center><img src='hog_structure-" + img_component + ".png' height=64 width=64></center>";
                    dat += "Description: " + Lang13.Initial(apath, "desc") + "<BR>";
                    dat += new Txt("<center><a href='?src=").Ref(this).str(";create_structure=").item(apath).str("'>Construct ").item(GlobalFuncs.capitalize(t)).str("</a></center><BR><BR>").ToString();
                }
            }
            popup = new Browser(this, "structures", "Construct Structure", 350, 500);
            popup.set_content(dat);
            popup.open();
            return;
        }
        // Function from file: experiment.dm
        public void experimentUI(dynamic user = null)
        {
            dynamic dat             = null;
            Obj_Item_Weapon_Photo P = null;
            Browser popup           = null;

            dat += "<h3> Experiment </h3>";

            if (Lang13.Bool(this.occupant))
            {
                P = new Obj_Item_Weapon_Photo();
                P.photocreate(null, new Icon(this.dissection_icon(this.occupant), null, GlobalVars.SOUTH));
                Interface13.CacheBrowseResource(user, P.img, "dissection_img");
                dat += "<table><tr><td>";
                dat += "<img src=dissection_img height=80 width=80>";
                dat += "</td><td>";
                dat += new Txt("<a href='?src=").Ref(this).str(";experiment=1'>Probe</a><br>").ToString();
                dat += new Txt("<a href='?src=").Ref(this).str(";experiment=2'>Dissect</a><br>").ToString();
                dat += new Txt("<a href='?src=").Ref(this).str(";experiment=3'>Analyze</a><br>").ToString();
                dat += "</td></tr></table>";
            }
            else
            {
                dat += "<span class='linkOff'>Experiment </span>";
            }

            if (!Lang13.Bool(this.occupant))
            {
                dat += "<h3>Machine Unoccupied</h3>";
            }
            else
            {
                dat += "<h3>Subject Status : </h3>";
                dat += "" + this.occupant.name + " => ";

                dynamic _a = this.occupant.stat;                 // Was a switch-case, sorry for the mess.
                if (_a == 0)
                {
                    dat += "<span class='good'>Conscious</span>";
                }
                else if (_a == 1)
                {
                    dat += "<span class='average'>Unconscious</span>";
                }
                else
                {
                    dat += "<span class='bad'>Deceased</span>";
                }
            }
            dat  += "<br>";
            dat  += "" + this.flash;
            dat  += "<br>";
            dat  += new Txt("<a href='?src=").Ref(this).str(";refresh=1'>Scan</a>").ToString();
            dat  += new Txt("<a href='?src=").Ref(this).str(";").item((Lang13.Bool(this.state_open) ? "close=1'>Close</a>" : "open=1'>Open</a>")).ToString();
            popup = new Browser(user, "experiment", "Probing Console", 300, 300);
            popup.set_title_image(((Mob)user).browse_rsc_icon(this.icon, this.icon_state));
            popup.set_content(dat);
            popup.open();
            return;
        }
Ejemplo n.º 4
0
 // Function from file: photography.dm
 public void show(dynamic user = null)
 {
     Interface13.CacheBrowseResource(user, this.img, "tmp_photo.png");
     Interface13.Browse(user, "<html><head><title>" + this.name + "</title></head>" + "<body style='overflow:hidden;margin:0;text-align:center'>" + "<img src='tmp_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />" + ("" + (Lang13.Bool(this.scribble) ? "<br>Written on the back:<br><i>" + this.scribble + "</i>" : "")) + "</body></html>", "window=book;size=192x" + (Lang13.Bool(this.scribble) ? 400 : 192));
     GlobalFuncs.onclose(user, "" + this.name);
     return;
 }
        // Function from file: book.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string  dat       = null;
            int     i         = 0;
            Icon    bibleicon = null;
            dynamic nicename  = null;


            if (!(user is Mob_Living_Carbon_Human))
            {
                return(null);
            }

            if (GlobalVars.ticker != null && !Lang13.Bool(GlobalVars.ticker.Bible_icon_state) && user.job == "Chaplain")
            {
                dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>";
                i   = 1;

                while (i < GlobalVars.biblestates.len)
                {
                    bibleicon = new Icon("icons/obj/storage.dmi", GlobalVars.biblestates[i]);
                    nicename  = GlobalVars.biblenames[i];
                    Interface13.CacheBrowseResource(user, bibleicon, nicename);
                    dat += new Txt("<tr><td><img src=\"").item(nicename).str("\"></td><td><a href=\"?src=").Ref(this).str(";seticon=").item(i).str("\">").item(nicename).str("</a></td></tr>").ToString();
                    i++;
                }
                dat += "</table></body></html>";
                Interface13.Browse(user, dat, "window=editicon;can_close=0;can_minimize=0;size=250x650");
            }
            return(null);
        }
Ejemplo n.º 6
0
        // Function from file: message_server.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            Mob M = null;

            base.Topic(href, href_list, (object)(hsrc));

            if (Lang13.Bool(href_list["photo"]))
            {
                M = Task13.User;
                Interface13.CacheBrowseResource(M, this.photo, "pda_photo.png");
                Interface13.Browse(M, "<html><head><title>PDA Photo</title></head><body style='overflow:hidden;margin:0;text-align:center'><img src='pda_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' /></body></html>", "window=book;size=192x192");
                GlobalFuncs.onclose(M, "PDA Photo");
            }
            return(null);
        }
Ejemplo n.º 7
0
        // Function from file: browser.dm
        public string get_header(  )
        {
            dynamic key              = null;
            string  filename         = null;
            string  title_attributes = null;


            foreach (dynamic _a in Lang13.Enumerate(this.stylesheets))
            {
                key = _a;

                filename = "" + String13.CKey(key) + ".css";
                Interface13.CacheBrowseResource(this.user, this.stylesheets[key], filename);
                this.head_content += "<link rel='stylesheet' type='text/css' href='" + filename + "'>";
            }

            foreach (dynamic _b in Lang13.Enumerate(this.scripts))
            {
                key = _b;

                filename = "" + String13.CKey(key) + ".js";
                Interface13.CacheBrowseResource(this.user, this.scripts[key], filename);
                this.head_content += "<script type='text/javascript' src='" + filename + "'></script>";
            }
            title_attributes = "class='uiTitle'";

            if (Lang13.Bool(this.title_image))
            {
                title_attributes = "class='uiTitle icon' style='background-image: url(" + this.title_image + ");'";
            }
            return(@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"" ""http://www.w3.org/TR/html4/loose.dtd"">
<html>
	<meta http-equiv=""Content-Type"" content=""text/html; charset=ISO-8859-1"">
	<meta http-equiv=""X-UA-Compatible"" content=""IE=edge"">
	<head>
		"         + this.head_content + @"
	</head>
	<body scroll=auto>
		<div class='uiWrapper'>
			"             + (Lang13.Bool(this.title) ? "<div class='uiTitleWrapper'><div " + title_attributes + "><tt>" + this.title + "</tt></div></div>" : "") + "\n			<div class='uiContent'>\n	");
        }
Ejemplo n.º 8
0
        // Function from file: crew.dm
        public void show(dynamic mob = null, int?z = null)
        {
            HtmlInterface hi = null;


            if (Lang13.Bool(mob.client))
            {
                this.sendResources(mob.client);
            }

            if (!Lang13.Bool(z))
            {
                z = Lang13.IntNullable(mob.z);
            }

            if ((z ?? 0) > 0 && this.interfaces != null)
            {
                if (!Lang13.Bool(this.interfaces["" + z]))
                {
                    this.interfaces["" + z] = new HtmlInterface_Nanotrasen(this, "Crew Monitoring", 900, 540, "<link rel=\"stylesheet\" type=\"text/css\" href=\"crewmonitor.css\" /><script type=\"text/javascript\">var z = " + z + "; var tile_size = " + Game13.icon_size + "; var maxx = " + Game13.map_size_x + "; var maxy = " + Game13.map_size_y + ";</script><script type=\"text/javascript\" src=\"crewmonitor.js\"></script>");
                    hi = this.interfaces["" + z];
                    hi.updateContent("content", "<div id=\"minimap\"><a href=\"javascript:zoomIn();\" class=\"zoom in\">+</a><a href=\"javascript:zoomOut();\" class=\"zoom\">-</a></div><div id=\"textbased\"></div>");
                    this.update(z, GlobalVars.TRUE);
                }
                else
                {
                    hi = this.interfaces["" + z];
                }
                Interface13.CacheBrowseResource(mob, new File("code/game/machinery/computer/crew.js"), "crew.js");
                Interface13.CacheBrowseResource(mob, new File("code/game/machinery/computer/crew.css"), "crew.css");
                hi = this.interfaces["" + z];
                hi.show(mob);
                this.updateFor(mob, hi, z);
            }
            return;
        }
Ejemplo n.º 9
0
        // Function from file: cart.dm
        public void generate_menu(Mob user = null)
        {
            Obj_Item_Radio_Integrated_Signal S = null;
            Data_Record t          = null;
            int         powercount = 0;
            Obj_Machinery_Computer_Monitor pMon = null;
            int count = 0;
            Obj_Machinery_Computer_Monitor pMon2 = null;
            ByTable L = null;
            Obj_Machinery_Power_Terminal term = null;
            Obj_Machinery_Power          A    = null;
            ByTable S2  = null;
            ByTable chg = null;
            Obj_Machinery_Power_Apc A2     = null;
            Data_Record             R      = null;
            Data_Record             R2     = null;
            Data_Crime          c          = null;
            Data_Crime          c2         = null;
            dynamic             S3         = null;
            dynamic             SO         = null;
            dynamic             S4         = null;
            dynamic             SO2        = null;
            dynamic             cl         = null;
            dynamic             ldat       = null;
            Obj_Item_Weapon_Mop M          = null;
            dynamic             ml         = null;
            double?direction               = null;
            Obj_Structure_Janitorialcart B = null;
            dynamic bl         = null;
            double? direction2 = null;
            Mob_Living_SimpleAnimal_Bot_Cleanbot B2 = null;
            dynamic bl2                    = null;
            double? direction3             = null;
            Newscaster_FeedChannel current = null;
            Newscaster_FeedChannel chan    = null;
            int i = 0;
            Newscaster_FeedMessage msg     = null;
            Newscaster_FeedComment comment = null;


            switch ((int)(this.mode))
            {
            case 40:
                S          = this.radio;
                this.menu  = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>";
                this.menu += new Txt("\n<a href='byond://?src=").Ref(this).str(";choice=Send Signal'>Send Signal</A><BR>\nFrequency:\n<a href='byond://?src=").Ref(this).str(";choice=Signal Frequency;sfreq=-10'>-</a>\n<a href='byond://?src=").Ref(this).str(";choice=Signal Frequency;sfreq=-2'>-</a>\n").item(GlobalFuncs.format_frequency(S.frequency)).str("\n<a href='byond://?src=").Ref(this).str(";choice=Signal Frequency;sfreq=2'>+</a>\n<a href='byond://?src=").Ref(this).str(";choice=Signal Frequency;sfreq=10'>+</a><br>\n<br>\nCode:\n<a href='byond://?src=").Ref(this).str(";choice=Signal Code;scode=-5'>-</a>\n<a href='byond://?src=").Ref(this).str(";choice=Signal Code;scode=-1'>-</a>\n").item(S.code).str("\n<a href='byond://?src=").Ref(this).str(";choice=Signal Code;scode=1'>+</a>\n<a href='byond://?src=").Ref(this).str(";choice=Signal Code;scode=5'>+</a><br>").ToString();
                break;

            case 41:
                this.menu  = "<h4><img src=pda_notes.png> Crew Manifest</h4>";
                this.menu += "Entries cannot be modified from this terminal.<br><br>";

                if (GlobalVars.data_core.general != null)
                {
                    foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.sortRecord(GlobalVars.data_core.general), typeof(Data_Record)))
                    {
                        t = _a;

                        this.menu += "" + t.fields["name"] + " - " + t.fields["rank"] + "<br>";
                    }
                }
                this.menu += "<br>";
                break;

            case 42:
                this.menu  = "<h4><img src=pda_status.png> Station Status Display Interlink</h4>";
                this.menu += new Txt("[ <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=blank'>Clear</A> ]<BR>").ToString();
                this.menu += new Txt("[ <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=shuttle'>Shuttle ETA</A> ]<BR>").ToString();
                this.menu += new Txt("[ <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=message'>Message</A> ]").ToString();
                this.menu += new Txt("<ul><li> Line 1: <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=setmsg1'>").item((Lang13.Bool(this.message1) ? this.message1 : ((dynamic)("(none)")))).str("</A>").ToString();
                this.menu += new Txt("<li> Line 2: <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=setmsg2'>").item((Lang13.Bool(this.message2) ? this.message2 : ((dynamic)("(none)")))).str("</A></ul><br>").ToString();
                this.menu += new Txt("[ Alert: <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=alert;alert=default'>None</A> |").ToString();
                this.menu += new Txt(" <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=alert;alert=redalert'>Red Alert</A> |").ToString();
                this.menu += new Txt(" <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=alert;alert=lockdown'>Lockdown</A> |").ToString();
                this.menu += new Txt(" <A HREF='?src=").Ref(this).str(";choice=Status;statdisp=alert;alert=biohazard'>Biohazard</A> ]<BR>").ToString();
                break;

            case 43:
                this.menu          = "<h4><img src=pda_power.png> Power Monitors - Please select one</h4><BR>";
                this.powmonitor    = null;
                this.powermonitors = new ByTable();
                powercount         = 0;

                foreach (dynamic _b in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Computer_Monitor)))
                {
                    pMon = _b;


                    if (!((pMon.stat & 3) != 0))
                    {
                        powercount++;
                        this.powermonitors.Add(pMon);
                    }
                }

                if (!(powercount != 0))
                {
                    this.menu += "<span class='danger'>No connection<BR></span>";
                }
                else
                {
                    this.menu += "<FONT SIZE=-1>";
                    count      = 0;

                    foreach (dynamic _c in Lang13.Enumerate(this.powermonitors, typeof(Obj_Machinery_Computer_Monitor)))
                    {
                        pMon2 = _c;

                        count++;
                        this.menu += new Txt("<a href='byond://?src=").Ref(this).str(";choice=Power Select;target=").item(count).str("'>").item(pMon2).str(" </a><BR>").ToString();
                    }
                    this.menu += "</FONT>";
                }
                break;

            case 433:
                this.menu = "<h4><img src=pda_power.png> Power Monitor </h4><BR>";

                if (!Lang13.Bool(this.powmonitor))
                {
                    this.menu += "<span class='danger'>No connection<BR></span>";
                }
                else
                {
                    L = new ByTable();

                    foreach (dynamic _d in Lang13.Enumerate(this.powmonitor.attached.powernet.nodes, typeof(Obj_Machinery_Power_Terminal)))
                    {
                        term = _d;


                        if (term.master is Obj_Machinery_Power_Apc)
                        {
                            A = term.master;
                            L.Add(A);
                        }
                    }
                    this.menu += "<PRE>Total power: " + this.powmonitor.attached.powernet.viewavail + " W<BR>Total load:  " + String13.NumberToString(this.powmonitor.attached.powernet.viewload, 10) + " W<BR>";
                    this.menu += "<FONT SIZE=-1>";

                    if (L.len > 0)
                    {
                        this.menu += "Area                           Eqp./Lgt./Env.  Load   Cell<HR>";
                        S2         = new ByTable(new object [] { " Off", "AOff", "  On", " AOn" });
                        chg        = new ByTable(new object [] { "N", "C", "F" });

                        foreach (dynamic _e in Lang13.Enumerate(L, typeof(Obj_Machinery_Power_Apc)))
                        {
                            A2 = _e;

                            this.menu += String13.SubStr(GlobalFuncs.add_tspace(A2.area.name, 30), 1, 30);
                            this.menu += " " + S2[(A2.equipment ?? 0) + 1] + " " + S2[(A2.lighting ?? 0) + 1] + " " + S2[(A2.environ ?? 0) + 1] + " " + GlobalFuncs.add_lspace(A2.lastused_total, 6) + "  " + (Lang13.Bool(A2.cell) ? "" + GlobalFuncs.add_lspace(Num13.Floor(((Obj_Item_Weapon_StockParts_Cell)A2.cell).percent()), 3) + "% " + chg[A2.charging + 1] : "  N/C") + "<BR>";
                        }
                    }
                    this.menu += "</FONT></PRE>";
                }
                break;

            case 44:
                this.menu = "<h4><img src=pda_medical.png> Medical Record List</h4>";

                if (GlobalVars.data_core.general != null)
                {
                    foreach (dynamic _f in Lang13.Enumerate(GlobalFuncs.sortRecord(GlobalVars.data_core.general), typeof(Data_Record)))
                    {
                        R = _f;

                        this.menu += new Txt("<a href='byond://?src=").Ref(this).str(";choice=Medical Records;target=").item(R.fields["id"]).str("'>").item(R.fields["id"]).str(": ").item(R.fields["name"]).str("<br>").ToString();
                    }
                }
                this.menu += "<br>";
                break;

            case 441:
                this.menu = "<h4><img src=pda_medical.png> Medical Record</h4>";

                if (GlobalVars.data_core.general.Contains(this.active1))
                {
                    this.menu += "Name: " + this.active1.fields["name"] + " ID: " + this.active1.fields["id"] + "<br>";
                    this.menu += "Sex: " + this.active1.fields["sex"] + "<br>";
                    this.menu += "Age: " + this.active1.fields["age"] + "<br>";
                    this.menu += "Rank: " + this.active1.fields["rank"] + "<br>";
                    this.menu += "Fingerprint: " + this.active1.fields["fingerprint"] + "<br>";
                    this.menu += "Physical Status: " + this.active1.fields["p_stat"] + "<br>";
                    this.menu += "Mental Status: " + this.active1.fields["m_stat"] + "<br>";
                }
                else
                {
                    this.menu += "<b>Record Lost!</b><br>";
                }
                this.menu += "<br>";
                this.menu += "<h4><img src=pda_medical.png> Medical Data</h4>";

                if (GlobalVars.data_core.medical.Contains(this.active2))
                {
                    this.menu += "Blood Type: " + this.active2.fields["blood_type"] + "<br><br>";
                    this.menu += "Minor Disabilities: " + this.active2.fields["mi_dis"] + "<br>";
                    this.menu += "Details: " + this.active2.fields["mi_dis_d"] + "<br><br>";
                    this.menu += "Major Disabilities: " + this.active2.fields["ma_dis"] + "<br>";
                    this.menu += "Details: " + this.active2.fields["ma_dis_d"] + "<br><br>";
                    this.menu += "Allergies: " + this.active2.fields["alg"] + "<br>";
                    this.menu += "Details: " + this.active2.fields["alg_d"] + "<br><br>";
                    this.menu += "Current Diseases: " + this.active2.fields["cdi"] + "<br>";
                    this.menu += "Details: " + this.active2.fields["cdi_d"] + "<br><br>";
                    this.menu += "Important Notes: " + this.active2.fields["notes"] + "<br>";
                }
                else
                {
                    this.menu += "<b>Record Lost!</b><br>";
                }
                this.menu += "<br>";
                break;

            case 45:
                this.menu = "<h4><img src=pda_cuffs.png> Security Record List</h4>";

                if (GlobalVars.data_core.general != null)
                {
                    foreach (dynamic _g in Lang13.Enumerate(GlobalFuncs.sortRecord(GlobalVars.data_core.general), typeof(Data_Record)))
                    {
                        R2 = _g;

                        this.menu += new Txt("<a href='byond://?src=").Ref(this).str(";choice=Security Records;target=").item(R2.fields["id"]).str("'>").item(R2.fields["id"]).str(": ").item(R2.fields["name"]).str("<br>").ToString();
                    }
                }
                this.menu += "<br>";
                break;

            case 451:
                this.menu = "<h4><img src=pda_cuffs.png> Security Record</h4>";

                if (GlobalVars.data_core.general.Contains(this.active1))
                {
                    this.menu += "Name: " + this.active1.fields["name"] + " ID: " + this.active1.fields["id"] + "<br>";
                    this.menu += "Sex: " + this.active1.fields["sex"] + "<br>";
                    this.menu += "Age: " + this.active1.fields["age"] + "<br>";
                    this.menu += "Rank: " + this.active1.fields["rank"] + "<br>";
                    this.menu += "Fingerprint: " + this.active1.fields["fingerprint"] + "<br>";
                    this.menu += "Physical Status: " + this.active1.fields["p_stat"] + "<br>";
                    this.menu += "Mental Status: " + this.active1.fields["m_stat"] + "<br>";
                }
                else
                {
                    this.menu += "<b>Record Lost!</b><br>";
                }
                this.menu += "<br>";
                this.menu += "<h4><img src=pda_cuffs.png> Security Data</h4>";

                if (GlobalVars.data_core.security.Contains(this.active3))
                {
                    this.menu += "Criminal Status: " + this.active3.fields["criminal"] + "<br>";
                    this.menu += "<BR>\nMinor Crimes:";
                    this.menu += @"<table style=""text-align:center;"" border=""1"" cellspacing=""0"" width=""100%"">
<tr>
<th>Crime</th>
<th>Details</th>
<th>Author</th>
<th>Time Added</th>
</tr>";

                    foreach (dynamic _h in Lang13.Enumerate(this.active3.fields["mi_crim"], typeof(Data_Crime)))
                    {
                        c = _h;

                        this.menu += "<tr><td>" + c.crimeName + "</td>";
                        this.menu += "<td>" + c.crimeDetails + "</td>";
                        this.menu += "<td>" + c.author + "</td>";
                        this.menu += "<td>" + c.time + "</td>";
                        this.menu += "</tr>";
                    }
                    this.menu += "</table>";
                    this.menu += "<BR>\nMajor Crimes:";
                    this.menu += @"<table style=""text-align:center;"" border=""1"" cellspacing=""0"" width=""100%"">
<tr>
<th>Crime</th>
<th>Details</th>
<th>Author</th>
<th>Time Added</th>
</tr>";

                    foreach (dynamic _i in Lang13.Enumerate(this.active3.fields["ma_crim"], typeof(Data_Crime)))
                    {
                        c2 = _i;

                        this.menu += "<tr><td>" + c2.crimeName + "</td>";
                        this.menu += "<td>" + c2.crimeDetails + "</td>";
                        this.menu += "<td>" + c2.author + "</td>";
                        this.menu += "<td>" + c2.time + "</td>";
                        this.menu += "</tr>";
                    }
                    this.menu += "</table>";
                    this.menu += "<BR>\nImportant Notes:<br>";
                    this.menu += "" + this.active3.fields["notes"];
                }
                else
                {
                    this.menu += "<b>Record Lost!</b><br>";
                }
                this.menu += "<br>";
                break;

            case 47:
                this.menu  = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>";
                this.menu += "<BR><B>Supply shuttle</B><BR>";
                this.menu += "Location: ";

                switch ((int)(GlobalVars.SSshuttle.supply.mode))
                {
                case 2:
                    this.menu += "Moving to ";

                    if (GlobalVars.SSshuttle.supply.z != 1)
                    {
                        this.menu += "station";
                    }
                    else
                    {
                        this.menu += "centcomm";
                    }
                    this.menu += " (" + GlobalVars.SSshuttle.supply.timeLeft(600) + " Mins)";
                    break;

                default:
                    this.menu += "At ";

                    if (GlobalVars.SSshuttle.supply.z != 1)
                    {
                        this.menu += "centcomm";
                    }
                    else
                    {
                        this.menu += "station";
                    }
                    break;
                }
                this.menu += "<BR>Current approved orders: <BR><ol>";

                foreach (dynamic _k in Lang13.Enumerate(GlobalVars.SSshuttle.shoppinglist))
                {
                    S3 = _k;

                    SO         = S3;
                    this.menu += "<li>#" + SO.id + " - " + SO.pack.name + " approved by " + SO.orderer + " " + (Lang13.Bool(SO.reason) ? "(" + SO.reason + ")" : "") + "</li>";
                }
                this.menu += "</ol>";
                this.menu += "Current requests: <BR><ol>";

                foreach (dynamic _l in Lang13.Enumerate(GlobalVars.SSshuttle.requestlist))
                {
                    S4 = _l;

                    SO2        = S4;
                    this.menu += "<li>#" + SO2.id + " - " + SO2.pack.name + " requested by " + SO2.orderer + "</li>";
                }
                this.menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management.";
                break;

            case 49:
                this.menu = "<h4><img src=pda_bucket.png> Persistent Custodial Object Locator</h4>";
                cl        = GlobalFuncs.get_turf(this);

                if (Lang13.Bool(cl))
                {
                    this.menu += "Current Orbital Location: <b>[" + cl.x + "," + cl.y + "]</b>";
                    this.menu += "<h4>Located Mops:</h4>";
                    ldat       = null;

                    foreach (dynamic _m in Lang13.Enumerate(typeof(Game13), typeof(Obj_Item_Weapon_Mop)))
                    {
                        M = _m;

                        ml = GlobalFuncs.get_turf(M);

                        if (Lang13.Bool(ml))
                        {
                            if (ml.z != cl.z)
                            {
                                continue;
                            }
                            direction = Map13.GetDistance(this, M);
                            ldat     += "Mop - <b>[" + ml.x + "," + ml.y + " (" + String13.ToUpper(GlobalFuncs.dir2text(direction)) + ")]</b> - " + (Lang13.Bool(M.reagents.total_volume) ? "Wet" : "Dry") + "<br>";
                        }
                    }

                    if (!Lang13.Bool(ldat))
                    {
                        this.menu += "None";
                    }
                    else
                    {
                        this.menu += "" + ldat;
                    }
                    this.menu += "<h4>Located Janitorial Cart:</h4>";
                    ldat       = null;

                    foreach (dynamic _n in Lang13.Enumerate(typeof(Game13), typeof(Obj_Structure_Janitorialcart)))
                    {
                        B = _n;

                        bl = GlobalFuncs.get_turf(B);

                        if (Lang13.Bool(bl))
                        {
                            if (bl.z != cl.z)
                            {
                                continue;
                            }
                            direction2 = Map13.GetDistance(this, B);
                            ldat      += "Cart - <b>[" + bl.x + "," + bl.y + " (" + String13.ToUpper(GlobalFuncs.dir2text(direction2)) + ")]</b> - Water level: " + B.reagents.total_volume + "/100<br>";
                        }
                    }

                    if (!Lang13.Bool(ldat))
                    {
                        this.menu += "None";
                    }
                    else
                    {
                        this.menu += "" + ldat;
                    }
                    this.menu += "<h4>Located Cleanbots:</h4>";
                    ldat       = null;

                    foreach (dynamic _o in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_SimpleAnimal_Bot_Cleanbot)))
                    {
                        B2 = _o;

                        bl2 = GlobalFuncs.get_turf(B2);

                        if (Lang13.Bool(bl2))
                        {
                            if (bl2.z != cl.z)
                            {
                                continue;
                            }
                            direction3 = Map13.GetDistance(this, B2);
                            ldat      += "Cleanbot - <b>[" + bl2.x + "," + bl2.y + " (" + String13.ToUpper(GlobalFuncs.dir2text(direction3)) + ")]</b> - " + (Lang13.Bool(B2.on) ? "Online" : "Offline") + "<br>";
                        }
                    }

                    if (!Lang13.Bool(ldat))
                    {
                        this.menu += "None";
                    }
                    else
                    {
                        this.menu += "" + ldat;
                    }
                }
                else
                {
                    this.menu += "ERROR: Unable to determine current location.";
                }
                this.menu += new Txt("<br><br><A href='byond://?src=").Ref(this).str(";choice=49'>Refresh GPS Locator</a>").ToString();
                break;

            case 53:
                this.menu  = "<h4><img src=pda_notes.png> Newscaster Access</h4>";
                this.menu += new Txt("<br> Current Newsfeed: <A href='byond://?src=").Ref(this).str(";choice=Newscaster Switch Channel'>").item((Lang13.Bool(this.current_channel) ? this.current_channel : "None")).str("</a> <br>").ToString();
                current    = null;

                foreach (dynamic _p in Lang13.Enumerate(GlobalVars.news_network.network_channels, typeof(Newscaster_FeedChannel)))
                {
                    chan = _p;


                    if (chan.channel_name == this.current_channel)
                    {
                        current = chan;
                    }
                }

                if (!(current != null))
                {
                    this.menu += "<h5> ERROR : NO CHANNEL FOUND </h5>";
                    return;
                }
                i = 1;

                foreach (dynamic _r in Lang13.Enumerate(current.messages, typeof(Newscaster_FeedMessage)))
                {
                    msg = _r;

                    this.menu += "-" + msg.returnBody(-1) + " <BR><FONT SIZE=1>[Story by <FONT COLOR='maroon'>" + msg.returnAuthor(-1) + "</FONT>]</FONT><BR>";
                    this.menu += "<b><font size=1>" + msg.comments.len + " comment" + (msg.comments.len > 1 ? "s" : "") + "</font></b><br>";

                    if (msg.img != null)
                    {
                        Interface13.CacheBrowseResource(user, msg.img, "tmp_photo" + i + ".png");
                        this.menu += "<img src='tmp_photo" + i + ".png' width = '180'><BR>";
                    }
                    i++;

                    foreach (dynamic _q in Lang13.Enumerate(msg.comments, typeof(Newscaster_FeedComment)))
                    {
                        comment = _q;

                        this.menu += "<font size=1><small>" + comment.body + "</font><br><font size=1><small><small><small>" + comment.author + " " + comment.time_stamp + "</small></small></small></small></font><br>";
                    }
                }
                this.menu += new Txt("<br> <A href='byond://?src=").Ref(this).str(";choice=Newscaster Message'>Post Message</a>").ToString();
                break;

            case 54:
                this.menu = "<h4><img src=pda_medbot.png> Bots Interlink</h4>";
                this.bot_control();
                break;
            }
            return;
        }
Ejemplo n.º 10
0
        // 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);
        }
Ejemplo n.º 11
0
        // Function from file: RPD.dm
        public bool show_menu(dynamic user = null)
        {
            string    dat          = null;
            Icon      preview      = null;
            string    datbuild     = null;
            dynamic   category     = null;
            dynamic   cat          = null;
            dynamic   label        = null;
            Base_Data I            = null;
            bool      found        = false;
            string    color_css    = null;
            string    color_picker = null;
            dynamic   color_name   = null;
            dynamic   color        = null;
            string    selected     = null;
            string    dirsel       = null;
            string    datsytle     = null;
            Browser   popup        = null;


            if (!Lang13.Bool(user) || !(this != null))
            {
                return(false);
            }
            dat = "<h2>Type</h2>\n<b>Utilities:</b>\n<ul>";

            if (this.p_class != -1)
            {
                dat += new Txt("<li><a href='?src=").Ref(this).str(";eatpipes=1;type=-1'>Eat Pipes</a></li>").ToString();
            }
            else
            {
                dat += "<li><span class='linkOn'>Eat Pipes</span></li>";
            }

            if (this.p_class != -2)
            {
                dat += new Txt("<li><a href='?src=").Ref(this).str(";paintpipes=1;type=-1'>Paint Pipes</a></li>").ToString();
            }
            else
            {
                dat += "<li><span class='linkOn'>Paint Pipes</span></li>";
            }
            dat += "</ul>";
            dat += "<b>Category:</b><ul>";

            if (this.screen == 0)
            {
                dat += new Txt("<span class='linkOn'>Atmospherics</span> <A href='?src=").Ref(this).str(";screen=").item(1).str(";dmake=0;type=0'>Disposals</A><BR>").ToString();
            }
            else if (this.screen == 1)
            {
                dat += new Txt("<A href='?src=").Ref(this).str(";screen=").item(0).str(";makepipe=0;dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>").ToString();
            }
            dat     += "</ul>";
            preview  = null;
            datbuild = "";

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.RPD_recipes))
            {
                category = _b;

                cat = GlobalVars.RPD_recipes[category];

                foreach (dynamic _a in Lang13.Enumerate(cat))
                {
                    label = _a;

                    I     = cat[label];
                    found = false;

                    if (((dynamic)I).id == this.p_type)
                    {
                        if ((this.p_class == 0 || this.p_class == 1) && (I.type == typeof(PipeInfo) || I.type == typeof(PipeInfo_Meter)))
                        {
                            found = true;
                        }
                        else if (this.p_class == 2 && I.type == typeof(PipeInfo_Disposal))
                        {
                            found = true;
                        }
                    }

                    if (found)
                    {
                        preview = new Icon(((dynamic)I).icon, ((dynamic)I).icon_state);
                    }

                    if (this.screen == Lang13.DoubleNullable(((dynamic)I).categoryId))
                    {
                        if (((dynamic)I).id == this.p_type && this.p_class >= 0)
                        {
                            datbuild += "<span class='linkOn'>" + label + "</span>";
                        }
                        else
                        {
                            datbuild += ((dynamic)I).Render(this, label);
                        }
                    }
                }

                if (Lang13.Length(datbuild) > 0)
                {
                    dat     += "<b>" + category + ":</b><ul>";
                    dat     += datbuild;
                    datbuild = "";
                }
                dat += "</ul>";
            }
            color_css    = "";
            color_picker = "";

            foreach (dynamic _c in Lang13.Enumerate(this.paint_colors))
            {
                color_name = _c;

                color      = this.paint_colors[color_name];
                color_css += "\n			a.color."+ color_name + " {\n				color: "+ color + ";\n			}\n			a.color."+ color_name + ":hover {\n				border:1px solid "+ color + ";\n			}\n			a.color."+ color_name + ".selected {\n				background-color: "+ color + ";\n			}\n		";
                selected   = "";

                if (color_name == this.paint_color)
                {
                    selected = " selected";
                }
                color_picker += new Txt("<a class=\"color ").item(color_name).item(selected).str("\" href=\"?src=").Ref(this).str(";set_color=").item(color_name).str("\">&bull;</a>").ToString();
            }
            dirsel = "<h2>Direction</h2>";

            switch ((int?)(this.p_conntype))
            {
            case -1:

                if (this.p_class == -2)
                {
                    dirsel = "<h2>Color</h2>" + color_picker;
                }
                else
                {
                    dirsel = "";
                }
                break;

            case 0:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTH), "vertical.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.EAST), "horizontal.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(1, "vertical.png", "Vertical");
                    dirsel += this.render_dir_img(4, "horizontal.png", "Horizontal");
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=1; flipped=0\" title=\"vertical\">&#8597;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=4; flipped=0\" title=\"horizontal\">&harr;</a>\n		</p>\n				").ToString();
                }
                break;

            case 1:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTH), "vertical.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.EAST), "horizontal.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTHWEST), "nw.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTHEAST), "ne.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTHWEST), "sw.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTHEAST), "se.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(1, "vertical.png", "Vertical");
                    dirsel += this.render_dir_img(4, "horizontal.png", "Horizontal");
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(9, "nw.png", "West to North");
                    dirsel += this.render_dir_img(5, "ne.png", "North to East");
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(10, "sw.png", "South to West");
                    dirsel += this.render_dir_img(6, "se.png", "East to South");
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=1; flipped=0\" title=\"vertical\">&#8597;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=4; flipped=0\" title=\"horizontal\">&harr;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=9; flipped=0\" title=\"West to North\">&#9565;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=5; flipped=0\" title=\"North to East\">&#9562;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=10; flipped=0\" title=\"South to West\">&#9559;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=6; flipped=0\" title=\"East to South\">&#9556;</a>\n		</p>\n				").ToString();
                }
                break;

            case 2:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTH), "s.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.EAST), "w.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTH), "n.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.WEST), "e.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(1, "s.png", "West South East");
                    dirsel += this.render_dir_img(4, "w.png", "North West South");
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(2, "n.png", "East North West");
                    dirsel += this.render_dir_img(8, "e.png", "South East North");
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=1; flipped=0\" title=\"West, South, East\">&#9574;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=4; flipped=0\" title=\"North, West, South\">&#9571;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=2; flipped=0\" title=\"East, North, West\">&#9577;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=8; flipped=0\" title=\"South, East, North\">&#9568;</a>\n		</p>\n				").ToString();
                }
                break;

            case 3:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTH), "s.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.EAST), "w.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTH), "n.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.WEST), "e.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTHEAST), "sm.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTHEAST), "wm.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTHWEST), "nm.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTHWEST), "em.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(1, "s.png", "West South East");
                    dirsel += this.render_dir_img(4, "w.png", "North West South");
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(2, "n.png", "East North West");
                    dirsel += this.render_dir_img(8, "e.png", "South East North");
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(6, "sm.png", "West South East", true);
                    dirsel += this.render_dir_img(5, "wm.png", "North West South", true);
                    dirsel += "<br />";
                    dirsel += this.render_dir_img(9, "nm.png", "East North West", true);
                    dirsel += this.render_dir_img(10, "em.png", "South East North", true);
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=1; flipped=0\" title=\"West, South, East\">&#9574;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=4; flipped=0\" title=\"North, West, South\">&#9571;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=2; flipped=0\" title=\"East, North, West\">&#9577;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=8; flipped=0\" title=\"South, East, North\">&#9568;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=6; flipped=1\" title=\"West, South, East\">&#9574;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=5; flipped=1\" title=\"North, West, South\">&#9571;</a>\n			<br />\n			<a href=\"?src=").Ref(this).str(";setdir=9; flipped=1\" title=\"East, North, West\">&#9577;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=10; flipped=1\" title=\"South, East, North\">&#9568;</a>\n		</p>\n				").ToString();
                }
                break;

            case 4:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.NORTH), "n.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.EAST), "e.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.SOUTH), "s.png");
                    Interface13.CacheBrowseResource(user, new Icon(preview, null, GlobalVars.WEST), "w.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(GlobalVars.NORTH, "n.png", "North");
                    dirsel += this.render_dir_img(GlobalVars.EAST, "e.png", "East");
                    dirsel += this.render_dir_img(GlobalVars.SOUTH, "s.png", "South");
                    dirsel += this.render_dir_img(GlobalVars.WEST, "w.png", "West");
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=").item(GlobalVars.NORTH).str("; flipped=0\" title=\"North\">&uarr;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=").item(GlobalVars.EAST).str("; flipped=0\" title=\"East\">&rarr;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=").item(GlobalVars.SOUTH).str("; flipped=0\" title=\"South\">&darr;</a>\n			<a href=\"?src=").Ref(this).str(";setdir=").item(GlobalVars.WEST).str("; flipped=0\" title=\"West\">&larr;</a>\n		</p>\n					").ToString();
                }
                break;

            case 5:

                if (preview != null)
                {
                    Interface13.CacheBrowseResource(user, new Icon(preview), "pipe.png");
                    dirsel += "<p>";
                    dirsel += this.render_dir_img(1, "pipe.png", "Pipe");
                    dirsel += "</p>";
                }
                else
                {
                    dirsel += new Txt("\n		<p>\n			<a href=\"?src=").Ref(this).str(";setdir=1; flipped=0\" title=\"Pipe\">&#8597;</a>\n		</p>\n				").ToString();
                }
                break;
            }
            datsytle = @"
<style type=""text/css"">
	a.imglink {
		padding: none;
		text-decoration:none;
		border-style:none;
		background:none;
		margin: 1px;
	}

	a.imglink:hover {
		background:none;
		color:none;
	}

	a.imglink.selected img {
		border: 1px solid #24722e;
		background: #2f943c;
	}

	a img {
		border: 1px solid #161616;
		background: #40628a;
	}

	a.color {
		padding: 5px 10px;
		font-size: large;
		font-weight: bold;
		border: 1px solid #161616;
	}

	a.selected img,
		a:hover {
			background: #0066cc;
			color: #ffffff;
		}
		"         + color_css + "\n</style>";
            dat      = datsytle + dirsel + dat;
            popup    = new Browser(user, "pipedispenser", this.name, 300, 550);
            popup.set_content(dat);
            popup.open();
            return(false);
        }