Ejemplo n.º 1
0
        // Function from file: cart.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            Ent_Static pda = null;
            Obj_Item_Radio_Integrated_Signal S  = null;
            Obj_Item_Radio_Integrated_Signal S2 = null;
            double new_frequency = 0;
            Obj_Item_Radio_Integrated_Signal S3 = null;
            double?pnum                    = null;
            string pda_owner_name          = null;
            string message                 = null;
            Newscaster_FeedChannel current = null;
            Newscaster_FeedChannel chan    = null;

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

            if (!Task13.User.canmove || Task13.User.stat != 0 || Task13.User.restrained() || !(Map13.GetDistance(this.loc, Task13.User) <= 1))
            {
                Task13.User.unset_machine();
                Interface13.Browse(Task13.User, null, "window=pda");
                return(null);
            }
            pda = this.loc;

            dynamic _c = href_list["choice"];             // Was a switch-case, sorry for the mess.

            if (_c == "Medical Records")
            {
                this.active1 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.general);

                if (this.active1 != null)
                {
                    this.active2 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.medical);
                }
                ((dynamic)pda).mode = 441;
                this.mode           = 441;

                if (!(this.active2 != null))
                {
                    this.active1 = null;
                }
            }
            else if (_c == "Security Records")
            {
                this.active1 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.general);

                if (this.active1 != null)
                {
                    this.active3 = GlobalFuncs.find_record("id", href_list["target"], GlobalVars.data_core.security);
                }
                ((dynamic)pda).mode = 451;
                this.mode           = 451;

                if (!(this.active3 != null))
                {
                    this.active1 = null;
                }
            }
            else if (_c == "Send Signal")
            {
                Task13.Schedule(0, (Task13.Closure)(() => {
                    S = this.radio;
                    S.send_signal("ACTIVATE");
                    return;

                    return;
                }));
            }
            else if (_c == "Signal Frequency")
            {
                S2            = this.radio;
                new_frequency = GlobalFuncs.sanitize_frequency(S2.frequency + (String13.ParseNumber(href_list["sfreq"]) ?? 0));
                S2.set_frequency(new_frequency);
            }
            else if (_c == "Signal Code")
            {
                S3       = this.radio;
                S3.code += String13.ParseNumber(href_list["scode"]) ?? 0;
                S3.code  = Num13.Floor(S3.code);
                S3.code  = Num13.MinInt(100, ((int)(S3.code)));
                S3.code  = Num13.MaxInt(1, ((int)(S3.code)));
            }
            else if (_c == "Status")
            {
                dynamic _a = href_list["statdisp"];                 // Was a switch-case, sorry for the mess.
                if (_a == "message")
                {
                    this.post_status("message", this.message1, this.message2);
                }
                else if (_a == "alert")
                {
                    this.post_status("alert", href_list["alert"]);
                }
                else if (_a == "setmsg1")
                {
                    this.message1 = GlobalFuncs.reject_bad_text(Interface13.Input("Line 1", "Enter Message Text", this.message1, null, null, InputType.Str | InputType.Null), 40);
                    this.updateSelfDialog();
                }
                else if (_a == "setmsg2")
                {
                    this.message2 = GlobalFuncs.reject_bad_text(Interface13.Input("Line 2", "Enter Message Text", this.message2, null, null, InputType.Str | InputType.Null), 40);
                    this.updateSelfDialog();
                }
                else
                {
                    this.post_status(href_list["statdisp"]);
                }
            }
            else if (_c == "Power Select")
            {
                pnum                = String13.ParseNumber(href_list["target"]);
                this.powmonitor     = this.powermonitors[pnum];
                ((dynamic)pda).mode = 433;
                this.mode           = 433;
            }
            else if (_c == "Supply Orders")
            {
                ((dynamic)pda).mode = 47;
                this.mode           = 47;
            }
            else if (_c == "Newscaster Access")
            {
                this.mode = 53;
            }
            else if (_c == "Newscaster Message")
            {
                pda_owner_name = (Lang13.Bool(((dynamic)pda).id) ? "" + ((dynamic)pda).id.registered_name + " (" + ((dynamic)pda).id.assignment + ")" : "Unknown");
                message        = ((Obj_Item_Device_Pda)pda).msg_input();
                current        = null;

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


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

                if (current.locked && current.author != pda_owner_name)
                {
                    ((dynamic)pda).cart += "<h5> ERROR : NOT AUTHORIZED " + (Lang13.Bool(((dynamic)pda).id) ? "" : "- ID SLOT EMPTY") + " </h5>";
                    pda.Topic(null, new ByTable().Set("choice", "Refresh"));
                    return(null);
                }
                GlobalVars.news_network.SubmitArticle(message, ((dynamic)pda).owner, this.current_channel);
                pda.Topic(null, new ByTable().Set("choice", String13.NumberToString(this.mode)));
                return(null);
            }
            else if (_c == "Newscaster Switch Channel")
            {
                this.current_channel = ((Obj_Item_Device_Pda)pda).msg_input();
                pda.Topic(null, new ByTable().Set("choice", String13.NumberToString(this.mode)));
                return(null);
            }

            if (Lang13.Bool(href_list["op"]))
            {
                dynamic _d = href_list["op"];                 // Was a switch-case, sorry for the mess.
                if (_d == "control")
                {
                    this.active_bot = Lang13.FindObj(href_list["bot"]);
                }
                else if (_d == "botlist")
                {
                    this.active_bot = null;
                }
                else if (_d == "summon")
                {
                    ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control("summon", null, GlobalFuncs.get_turf(Task13.User), ((dynamic)pda).GetAccess());
                }
                else
                {
                    ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control(href_list["op"], Task13.User);
                }
            }

            if (Lang13.Bool(href_list["mule"]))
            {
                ((Mob_Living_SimpleAnimal_Bot)this.active_bot).bot_control(href_list["mule"], Task13.User);
            }
            this.generate_menu(Task13.User);
            this.print_to_host(this.menu);
            return(null);
        }
Ejemplo n.º 2
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;
        }