// Function from file: book.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            double? iconi     = null;
            dynamic biblename = null;
            dynamic B         = null;


            if (Lang13.Bool(href_list["seticon"]) && GlobalVars.ticker != null && !Lang13.Bool(GlobalVars.ticker.Bible_icon_state))
            {
                iconi        = String13.ParseNumber(href_list["seticon"]);
                biblename    = GlobalVars.biblenames[iconi];
                B            = Lang13.FindObj(href_list["src"]);
                B.icon_state = GlobalVars.biblestates[iconi];
                B.item_state = GlobalVars.bibleitemstates[iconi];
                this.setupbiblespecifics(B, Task13.User);

                if (GlobalVars.ticker != null)
                {
                    GlobalVars.ticker.Bible_icon_state = B.icon_state;
                    GlobalVars.ticker.Bible_item_state = B.item_state;
                }
                GlobalFuncs.feedback_set_details("religion_book", "" + biblename);
                Interface13.Browse(Task13.User, null, "window=editicon");
            }
            return(null);
        }
Esempio n. 2
0
        // Function from file: tgstation.dme
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            Mob user = null;

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

            if (!(Task13.User is Mob))
            {
                return(null);
            }
            user = Task13.User;

            if (!user.canUseTopic(user))
            {
                Interface13.Browse(Task13.User, null, "window=hscan");
                GlobalFuncs.onclose(Task13.User, "hscan");
                return(null);
            }

            if (Lang13.Bool(href_list["scanning"]))
            {
                this.toggle_scan();
            }

            if (Lang13.Bool(href_list["close"]))
            {
                Interface13.Browse(Task13.User, null, "window=hscan");
                return(null);
            }
            this.attack_self(user);
            return(null);
        }
Esempio n. 3
0
        // Function from file: laborstacker.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            dynamic dat = null;

            dat += "<b>Point Claim Console</b><br><br>";

            if (Lang13.Bool(this.emagged))
            {
                dat += "<b>QU&#t0A In%aL*D</b><br>";
            }
            else if (this.inserted_id is Obj_Item_Weapon_Card_Id_Prisoner)
            {
                dat += new Txt("ID: ").item(this.inserted_id.registered_name).str(" <A href='?src=").Ref(this).str(";choice=eject'>Eject ID.</A><br>").ToString();
                dat += "Points Collected:" + this.inserted_id.points + "<br>";
                dat += "Point Quota: " + this.inserted_id.goal + " - Reach your quota to earn your release<br>";
                dat += new Txt("Unclaimed Collection Points: ").item(this.machine.points).str(".  <A href='?src=").Ref(this).str(";choice=claim'>Claim points.</A><br>").ToString();
            }
            else
            {
                dat += new Txt("No ID inserted.  <A href='?src=").Ref(this).str(";choice=insert'>Insert ID.</A><br>").ToString();
            }

            if (this.check_auth())
            {
                dat += new Txt("<A href='?src=").Ref(this).str(";choice=station'>Proceed to Station.</A><br>").ToString();
                dat += new Txt("<A href='?src=").Ref(this).str(";choice=release'>Open release door.</A><br>").ToString();
            }

            if (Lang13.Bool(this.machine))
            {
                dat += "<HR><b>Mineral Value List:</b><BR>" + this.machine.get_ore_values();
            }
            Interface13.Browse(a, "" + dat, "window=console_stacking_machine");
            return(null);
        }
        // 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);
        }
Esempio n. 5
0
        // Function from file: soulstone.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string dat = null;
            Mob_Living_SimpleAnimal_Shade A = null;


            if (!(Map13.GetDistance(this, user) <= 1))
            {
                return(null);
            }

            if (!GlobalFuncs.iscultist(user) && !GlobalFuncs.iswizard(user) && !this.usability)
            {
                ((Mob)user).Paralyse(5);
                user.WriteMsg("<span class='userdanger'>Your body is wracked with debilitating pain!</span>");
                return(null);
            }
            ((Mob)user).set_machine(this);
            dat = "<TT><B>Soul Stone</B><BR>";

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Mob_Living_SimpleAnimal_Shade)))
            {
                A = _a;

                dat += "Captured Soul: " + A.name + "<br>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";choice=Summon'>Summon Shade</A>").ToString();
                dat += "<br>";
                dat += new Txt("<a href='byond://?src=").Ref(this).str(";choice=Close'>Close</a>").ToString();
            }
            Interface13.Browse(user, dat, "window=aicard");
            GlobalFuncs.onclose(user, "aicard");
            return(null);
        }
Esempio n. 6
0
        // Function from file: antag_spawner.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string dat = null;

            ((Mob)user).set_machine(this);

            if (this.used)
            {
                dat = "<B>You have already summoned your apprentice.</B><BR>";
            }
            else
            {
                dat  = "<B>Contract of Apprenticeship:</B><BR>";
                dat += "<I>Using this contract, you may summon an apprentice to aid you on your mission.</I><BR>";
                dat += "<I>If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.</I><BR>";
                dat += "<B>Which school of magic is your apprentice studying?:</B><BR>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";school=destruction'>Destruction</A><BR>").ToString();
                dat += "<I>Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.</I><BR>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";school=bluespace'>Bluespace Manipulation</A><BR>").ToString();
                dat += "<I>Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.</I><BR>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";school=healing'>Healing</A><BR>").ToString();
                dat += "<I>Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.</I><BR>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";school=robeless'>Robeless</A><BR>").ToString();
                dat += "<I>Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.</I><BR>";
            }
            Interface13.Browse(user, dat, "window=radio");
            GlobalFuncs.onclose(user, "radio");
            return(null);
        }
Esempio n. 7
0
        // Function from file: secure.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string dat     = null;
            string message = null;

            ((Mob)user).set_machine(this);
            dat     = "<TT><B>" + this + "</B><BR>\n\nLock Status: " + (this.locked ? "LOCKED" : "UNLOCKED");
            message = "Code";

            if (!this.l_set && !this.emagged && !this.l_setshort)
            {
                dat += "<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>";
            }

            if (this.emagged)
            {
                dat += "<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>";
            }

            if (this.l_setshort)
            {
                dat += "<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>";
            }
            message = "" + this.code;

            if (!this.locked)
            {
                message = "*****";
            }
            dat += new Txt("<HR>\n>").item(message).str("<BR>\n<A href='?src=").Ref(this).str(";type=1'>1</A>-<A href='?src=").Ref(this).str(";type=2'>2</A>-<A href='?src=").Ref(this).str(";type=3'>3</A><BR>\n<A href='?src=").Ref(this).str(";type=4'>4</A>-<A href='?src=").Ref(this).str(";type=5'>5</A>-<A href='?src=").Ref(this).str(";type=6'>6</A><BR>\n<A href='?src=").Ref(this).str(";type=7'>7</A>-<A href='?src=").Ref(this).str(";type=8'>8</A>-<A href='?src=").Ref(this).str(";type=9'>9</A><BR>\n<A href='?src=").Ref(this).str(";type=R'>R</A>-<A href='?src=").Ref(this).str(";type=0'>0</A>-<A href='?src=").Ref(this).str(";type=E'>E</A><BR>\n</TT>").ToString();
            Interface13.Browse(user, dat, "window=caselock;size=300x280");
            return(null);
        }
Esempio n. 8
0
        // Function from file: lib_items.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            if (GlobalFuncs.is_blind(user) != 0)
            {
                return(null);
            }

            if (user is Mob_Living_Carbon_Monkey)
            {
                user.WriteMsg("<span class='notice'>You skim through the book but can't comprehend any of it.</span>");
                return(null);
            }

            if (Lang13.Bool(this.dat))
            {
                Interface13.Browse(user, "<TT><I>Penned by " + this.author + ".</I></TT> <BR>" + ("" + this.dat), "window=book" + (this.window_size != null ? ";size=" + this.window_size : ""));
                ((Ent_Static)user).visible_message("" + user + " opens a book titled \"" + this.title + "\" and begins reading intently.");
                GlobalFuncs.onclose(user, "book");
            }
            else
            {
                user.WriteMsg("<span class='notice'>This book is completely blank!</span>");
            }
            return(null);
        }
Esempio n. 9
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;
 }
Esempio n. 10
0
        // Function from file: medical_tools.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            TopicInput filter = null;

            base.Topic(href, href_list, (object)(hsrc));
            filter = new TopicInput(href, href_list);

            if (Lang13.Bool(filter.get("eject")))
            {
                this.go_out();
            }

            if (Lang13.Bool(filter.get("view_stats")))
            {
                Interface13.Browse(this.chassis.occupant, this.get_patient_stats(), "window=msleeper");
                GlobalFuncs.onclose(this.chassis.occupant, "msleeper");
                return(null);
            }

            if (Lang13.Bool(filter.get("inject")))
            {
                this.inject_reagent(filter.getType("inject", typeof(Reagent)), filter.getObj("source"));
            }
            return(null);
        }
Esempio n. 11
0
        // Function from file: sortingmachinery.dm
        public void openwindow(dynamic user = null)
        {
            string dat = null;
            int?   i   = null;

            dat  = "<tt><center><h1><b>TagMaster 2.2</b></h1></center>";
            dat += "<table style='width:100%; padding:4px;'><tr>";
            i    = null;
            i    = 1;

            while ((i ?? 0) <= GlobalVars.TAGGERLOCATIONS.len)
            {
                dat += new Txt("<td><a href='?src=").Ref(this).str(";nextTag=").item(i).str("'>").item(GlobalVars.TAGGERLOCATIONS[i]).str("</a></td>").ToString();

                if ((i ?? 0) % 4 == 0)
                {
                    dat += "</tr><tr>";
                }
                i++;
            }
            dat += "</tr></table><br>Current Selection: " + (Lang13.Bool(this.currTag) ? GlobalVars.TAGGERLOCATIONS[this.currTag] : "None") + "</tt>";
            Interface13.Browse(user, dat, "window=destTagScreen;size=450x350");
            GlobalFuncs.onclose(user, "destTagScreen");
            return;
        }
Esempio n. 12
0
        // Function from file: implantpad.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string dat = null;

            ((Mob)user).set_machine(this);
            dat = "<B>Implant Mini-Computer:</B><HR>";

            if (Lang13.Bool(this.v_case))
            {
                if (Lang13.Bool(this.v_case.imp))
                {
                    if (this.v_case.imp is Obj_Item_Weapon_Implant)
                    {
                        dat += this.v_case.imp.get_data();
                    }
                }
                else
                {
                    dat += "The implant casing is empty.";
                }
            }
            else
            {
                dat += "Please insert an implant casing!";
            }
            Interface13.Browse(user, dat, "window=implantpad");
            GlobalFuncs.onclose(user, "implantpad");
            return(null);
        }
Esempio n. 13
0
        // Function from file: browser.dm
        public virtual dynamic open(bool?use_onclose = null)
        {
            use_onclose = use_onclose ?? true;

            string window_size = null;
            double i           = 0;

            window_size = "";

            if (Lang13.Bool(this.width) && Lang13.Bool(this.height))
            {
                window_size = "size=" + this.width + "x" + this.height + ";";
            }
            Interface13.Browse(this.user, this.get_content(), "window=" + this.window_id + ";" + window_size + this.window_options);

            if (use_onclose == true)
            {
                Task13.Schedule(0, (Task13.Closure)(() => {
                    foreach (dynamic _a in Lang13.IterateRange(1, 10))
                    {
                        i = _a;


                        if (Lang13.Bool(this.user) && Interface13.WindowExists(this.user, this.window_id))
                        {
                            GlobalFuncs.onclose(this.user, this.window_id, this.v_ref);
                            break;
                        }
                    }
                    return;
                }));
            }
            return(null);
        }
        // Function from file: dog.dm
        public override void show_inv(Obj user = null)
        {
            string dat = null;

            ((Mob)user).set_machine(this);

            if (Lang13.Bool(((dynamic)user).stat))
            {
                return;
            }
            dat = "<div align='center'><b>Inventory of " + this.name + "</b></div><p>";

            if (Lang13.Bool(this.inventory_head))
            {
                dat += new Txt("<br><b>Head:</b> ").item(this.inventory_head).str(" (<a href='?src=").Ref(this).str(";remove_inv=head'>Remove</a>)").ToString();
            }
            else
            {
                dat += new Txt("<br><b>Head:</b> <a href='?src=").Ref(this).str(";add_inv=head'>Nothing</a>").ToString();
            }

            if (Lang13.Bool(this.inventory_back))
            {
                dat += new Txt("<br><b>Back:</b> ").item(this.inventory_back).str(" (<a href='?src=").Ref(this).str(";remove_inv=back'>Remove</a>)").ToString();
            }
            else
            {
                dat += new Txt("<br><b>Back:</b> <a href='?src=").Ref(this).str(";add_inv=back'>Nothing</a>").ToString();
            }
            Interface13.Browse(user, dat, "window=mob" + this.real_name + ";size=325x500");
            GlobalFuncs.onclose(user, "mob" + this.real_name);
            return;
        }
Esempio n. 15
0
        // Function from file: safe.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            string  dat = null;
            int?    i   = null;
            dynamic P   = null;

            ((Mob)a).set_machine(this);
            dat  = "<center>";
            dat += new Txt("<a href='?src=").Ref(this).str(";open=1'>").item((this.open ? "Close" : "Open")).str(" ").item(this).str("</a> | <a href='?src=").Ref(this).str(";decrement=1'>-</a> ").item(this.dial * 5).str(" <a href='?src=").Ref(this).str(";increment=1'>+</a>").ToString();

            if (this.open)
            {
                dat += "<table>";
                i    = null;
                i    = this.contents.len;

                while ((i ?? 0) >= 1)
                {
                    P    = this.contents[i];
                    dat += new Txt("<tr><td><a href='?src=").Ref(this).str(";retrieve=").Ref(P).str("'>").item(P.name).str("</a></td></tr>").ToString();
                    i--;
                }
                dat += "</table></center>";
            }
            Interface13.Browse(a, "<html><head><title>" + this.name + "</title></head><body>" + dat + "</body></html>", "window=safe;size=350x300");
            return(null);
        }
Esempio n. 16
0
        // Function from file: paper.dm
        public override dynamic attack_ai(dynamic user = null)
        {
            int dist = 0;


            if (user is Mob_Living_Silicon_Ai && Lang13.Bool(user.current))
            {
                dist = Map13.GetDistance(this, user.current);
            }
            else
            {
                dist = Map13.GetDistance(this, user);
            }

            if (dist < 2)
            {
                Interface13.Browse(Task13.User, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + this.info + "<HR>" + this.stamps + "</BODY></HTML>", "window=" + this.name);
                GlobalFuncs.onclose(Task13.User, "" + this.name);
            }
            else
            {
                Interface13.Browse(Task13.User, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + GlobalFuncs.stars(this.info) + "<HR>" + this.stamps + "</BODY></HTML>", "window=" + this.name);
                GlobalFuncs.onclose(Task13.User, "" + this.name);
            }
            return(null);
        }
Esempio n. 17
0
        // Function from file: paper.dm
        public override double examine(dynamic user = null)
        {
            dynamic assets = null;

            base.examine((object)(user));
            assets = GlobalFuncs.get_asset_datum(typeof(Asset_Simple_Paper));
            assets.send(user);

            if (Map13.GetDistance(user, this) <= 1 || user is Mob_Dead_Observer)
            {
                if (!(user is Mob_Living_Carbon_Human || user is Mob_Dead_Observer || user is Mob_Living_Silicon))
                {
                    Interface13.Browse(user, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + GlobalFuncs.stars(this.info) + "<HR>" + this.stamps + "</BODY></HTML>", "window=" + this.name);
                    GlobalFuncs.onclose(user, "" + this.name);
                }
                else
                {
                    Interface13.Browse(user, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + this.info + "<HR>" + this.stamps + "</BODY></HTML>", "window=" + this.name);
                    GlobalFuncs.onclose(user, "" + this.name);
                }
            }
            else
            {
                user.WriteMsg("<span class='notice'>It is too far away.</span>");
            }
            return(0);
        }
Esempio n. 18
0
        // Function from file: tgui.dm
        public void open(  )
        {
            string window_size = null;
            bool   debugable   = false;


            if (!Lang13.Bool(this.user.client))
            {
                return;
            }
            this.update_status(false);

            if (this.status < 1)
            {
                return;
            }

            if (!(this.initial_data != null))
            {
                this.set_initial_data(this.src_object.ui_data(this.user));
            }
            window_size = "";

            if (Lang13.Bool(this.width) && Lang13.Bool(this.height))
            {
                window_size = "size=" + this.width + "x" + this.height + ";";
            }
            debugable = GlobalFuncs.check_rights_for(this.user.client, 32);
            Interface13.Browse(this.user, this.get_html(debugable), "window=" + this.window_id + ";" + window_size + String13.MakeUrlParams(this.window_options));
            Interface13.WindowSet(this.user, this.window_id, new Txt("on-close=\"uiclose ").Ref(this).str("\"").ToString());
            GlobalVars.SStgui.on_open(this);
            return;
        }
Esempio n. 19
0
        // Function from file: filingcabinet.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            string  dat = null;
            int     i   = 0;
            dynamic P   = null;


            if (this.contents.len <= 0)
            {
                a.WriteMsg("<span class='notice'>" + this + " is empty.</span>");
                return(null);
            }
            ((Mob)a).set_machine(this);
            dat = "<center><table>";
            i   = this.contents.len;

            while (i >= 1)
            {
                P    = this.contents[i];
                dat += new Txt("<tr><td><a href='?src=").Ref(this).str(";retrieve=").Ref(P).str("'>").item(P.name).str("</a></td></tr>").ToString();
                i--;
            }
            dat += "</table></center>";
            Interface13.Browse(a, "<html><head><title>" + this.name + "</title></head><body>" + dat + "</body></html>", "window=filingcabinet;size=350x300");
            return(null);
        }
 // Function from file: turbine.dm
 public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
 {
     if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc))))
     {
         return(null);
     }
     else if (Lang13.Bool(href_list["str"]))
     {
         if (Lang13.Bool(this.compressor) && Lang13.Bool(this.compressor.turbine))
         {
             this.compressor.starter = !this.compressor.starter;
         }
     }
     else if (Lang13.Bool(href_list["close"]))
     {
         Interface13.Browse(Task13.User, null, "window=turbinecomputer");
         Task13.User.unset_machine(  );
         return(null);
     }
     else if (Lang13.Bool(href_list["search"]))
     {
         this.locate_machinery();
     }
     this.updateUsrDialog();
     return(null);
 }
Esempio n. 21
0
        // Function from file: ai_slipper.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            if ((this.stat & 3) != 0)
            {
                return(null);
            }

            if (user is Mob_Living_Silicon)
            {
                return(this.attack_hand(user));
            }
            else if (this.allowed(Task13.User))
            {
                this.locked = !this.locked;
                user.WriteMsg("<span class='notice'>You " + (this.locked ? "lock" : "unlock") + " the device.</span>");

                if (this.locked)
                {
                    if (user.machine == this)
                    {
                        ((Mob)user).unset_machine();
                        Interface13.Browse(user, null, "window=ai_slipper");
                    }
                }
                else if (user.machine == this)
                {
                    this.attack_hand(Task13.User);
                }
            }
            else
            {
                user.WriteMsg("<span class='danger'>Access denied.</span>");
            }
            return(null);
        }
Esempio n. 22
0
        // Function from file: portable_turret.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic M = null;


            if ((this.stat & 1) != 0)
            {
                return(null);
            }

            if (A is Obj_Item_Device_Multitool)
            {
                M = A;

                if (Lang13.Bool(M.buffer) && M.buffer is Obj_Machinery_PortaTurret)
                {
                    this.turrets.Or(M.buffer);
                    user.WriteMsg(new Txt("You link ").the(M.buffer).item().str(" with ").the(this).item().ToString());
                    return(null);
                }
            }

            if (user is Mob_Living_Silicon)
            {
                return(this.attack_hand(user));
            }

            if (Map13.GetDistance(this, user) == 0)
            {
                if (this.allowed(Task13.User))
                {
                    if (Lang13.Bool(this.emagged))
                    {
                        user.WriteMsg("<span class='notice'>The turret control is unresponsive.</span>");
                        return(null);
                    }
                    this.locked = !this.locked;
                    user.WriteMsg("<span class='notice'>You " + (this.locked ? "lock" : "unlock") + " the panel.</span>");

                    if (this.locked)
                    {
                        if (user.machine == this)
                        {
                            ((Mob)user).unset_machine();
                            Interface13.Browse(user, null, "window=turretid");
                        }
                    }
                    else if (user.machine == this)
                    {
                        this.attack_hand(user);
                    }
                }
                else
                {
                    user.WriteMsg("<span class='warning'>Access denied.</span>");
                }
            }
            return(null);
        }
Esempio n. 23
0
 // Function from file: stack.dm
 public override dynamic Destroy(  )
 {
     if (Task13.User != null && Task13.User.machine == this)
     {
         Interface13.Browse(Task13.User, null, "window=stack");
     }
     return(base.Destroy());
 }
 // Function from file: suit.dm
 public override dynamic Destroy(  )
 {
     if (Lang13.Bool(this.affecting))
     {
         Interface13.Browse(this.affecting, null, "window=hack spideros");
     }
     return(base.Destroy());
 }
Esempio n. 25
0
        // Function from file: paper.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            string  id       = null;
            dynamic t        = null;
            dynamic i        = null;
            bool?   iscrayon = null;

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

            if (Task13.User.stat != 0 || Task13.User.restrained())
            {
                return(null);
            }

            if (Lang13.Bool(href_list["write"]))
            {
                id = href_list["write"];
                t  = GlobalFuncs.stripped_multiline_input("Enter what you want to write:", "Write");

                if (!Lang13.Bool(t))
                {
                    return(null);
                }
                i        = Task13.User.get_active_hand();
                iscrayon = false;

                if (!(i is Obj_Item_Weapon_Pen))
                {
                    if (!(i is Obj_Item_Toy_Crayon))
                    {
                        return(null);
                    }
                    iscrayon = true;
                }

                if (!(Map13.GetDistance(this, Task13.User) <= 1) && this.loc != Task13.User && !(this.loc is Obj_Item_Weapon_Clipboard) && this.loc.loc != Task13.User && Task13.User.get_active_hand() != i)
                {
                    return(null);
                }
                t = this.parsepencode(t, i, Task13.User, iscrayon);

                if (t != null)
                {
                    if (id != "end")
                    {
                        this.addtofield(String13.ParseNumber(id), t);
                    }
                    else
                    {
                        this.info += t;
                        this.updateinfolinks();
                    }
                    Interface13.Browse(Task13.User, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + this.info_links + "<HR>" + this.stamps + "</BODY></HTML>", "window=" + this.name);
                    this.update_icon();
                }
            }
            return(null);
        }
Esempio n. 26
0
        // Function from file: airlock_maker.dm
        public void interact(  )
        {
            ByTable leftcolumn  = null;
            ByTable rightcolumn = null;
            dynamic access      = null;
            dynamic option      = null;
            int?    length      = null;
            string  dat         = null;
            int?    i           = null;

            leftcolumn  = new ByTable();
            rightcolumn = new ByTable();
            leftcolumn.Add("<u><b>Required Access</b></u>");

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_all_accesses()))
            {
                access = _a;

                leftcolumn.Add(this.linkpretty("access=" + access, GlobalFuncs.get_access_desc(access), this.access_used.Contains(access)));
            }
            leftcolumn.Add("Require all listed accesses: " + this.linkpretty("reqall", null, this.require_all));
            rightcolumn.Add("<u><b>Paintjob</b></u>");

            foreach (dynamic _b in Lang13.Enumerate(new ByTable(new object [] { "none", "engineering", "atmos", "security", "command", "medical", "research", "mining", "maintenance", "external", "highsecurity" })))
            {
                option = _b;

                rightcolumn.Add(this.linkpretty("paint=" + option, option, option == this.paintjob));
            }
            rightcolumn.Add("Glass door: " + this.linkpretty("glass", null, this.glassdoor) + "<br><br>");
            length = Num13.MaxInt(leftcolumn.len, rightcolumn.len);
            dat    = "You may move the model airlock around.  A new airlock will be built in its space when you click done, below.<hr><br>";
            dat   += new Txt("<a href='?src=").Ref(this).str(";rename'>Door name</a>: \"").item(this.doorname).str("\"").ToString();
            dat   += "<table>";
            i      = null;
            i      = 1;

            while ((i ?? 0) <= (length ?? 0))
            {
                dat += "<tr><td>";

                if ((i ?? 0) <= leftcolumn.len)
                {
                    dat += leftcolumn[i];
                }
                dat += "</td><td>";

                if ((i ?? 0) <= rightcolumn.len)
                {
                    dat += rightcolumn[i];
                }
                dat += "</td></tr>";
                i++;
            }
            dat += new Txt("</table><hr><a href='?src=").Ref(this).str(";done'>Finalize Airlock Construction</a> | <a href='?src=").Ref(this).str(";cancel'>Cancel and Destroy Airlock</a>").ToString();
            Interface13.Browse(Task13.User, dat, "window=airlockmaker");
            return;
        }
Esempio n. 27
0
        // Function from file: pai.dm
        public void recruitWindow(Mob M = null)
        {
            PaiCandidate candidate = null;
            PaiCandidate c         = null;
            string       dat       = null;


            foreach (dynamic _a in Lang13.Enumerate(this.candidates, typeof(PaiCandidate)))
            {
                c = _a;


                if (c.key == M.key)
                {
                    candidate = c;
                }
            }

            if (!(candidate != null))
            {
                candidate     = new PaiCandidate();
                candidate.key = M.key;
                this.candidates.Add(candidate);
            }
            dat  = "";
            dat += @"
			<style type=""text/css"">

			p.top {
				background-color: #AAAAAA; color: black;
			}

			tr.d0 td {
				background-color: #CC9999; color: black;
			}
			tr.d1 td {
				background-color: #9999CC; color: black;
			}
			</style>
			"            ;
            dat += "<p class=\"top\">Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!</p>";
            dat += "<table>";
            dat += "<tr class=\"d0\"><td>Name:</td><td>" + candidate.name + "</td></tr>";
            dat += new Txt("<tr class=\"d1\"><td><a href='byond://?src=").Ref(this).str(";option=name;new=1;candidate=").Ref(candidate).str("'>[Edit]</a></td><td>What you plan to call yourself. Suggestions: Any character name you would choose for a station character OR an AI.</td></tr>").ToString();
            dat += "<tr class=\"d0\"><td>Description:</td><td>" + candidate.description + "</td></tr>";
            dat += new Txt("<tr class=\"d1\"><td><a href='byond://?src=").Ref(this).str(";option=desc;new=1;candidate=").Ref(candidate).str("'>[Edit]</a></td><td>What sort of pAI you typically play; your mannerisms, your quirks, etc. This can be as sparse or as detailed as you like.</td></tr>").ToString();
            dat += "<tr class=\"d0\"><td>Preferred Role:</td><td>" + candidate.role + "</td></tr>";
            dat += new Txt("<tr class=\"d1\"><td><a href='byond://?src=").Ref(this).str(";option=role;new=1;candidate=").Ref(candidate).str("'>[Edit]</a></td><td>Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.</td></tr>").ToString();
            dat += "<tr class=\"d0\"><td>OOC Comments:</td><td>" + candidate.comments + "</td></tr>";
            dat += new Txt("<tr class=\"d1\"><td><a href='byond://?src=").Ref(this).str(";option=ooc;new=1;candidate=").Ref(candidate).str("'>[Edit]</a></td><td>Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.</td></tr>").ToString();
            dat += "</table>";
            dat += "<br>";
            dat += new Txt("<h3><a href='byond://?src=").Ref(this).str(";option=submit;new=1;candidate=").Ref(candidate).str("'>Submit Personality</a></h3><br>").ToString();
            dat += new Txt("<a href='byond://?src=").Ref(this).str(";option=save;new=1;candidate=").Ref(candidate).str("'>Save Personality</a><br>").ToString();
            dat += new Txt("<a href='byond://?src=").Ref(this).str(";option=load;new=1;candidate=").Ref(candidate).str("'>Load Personality</a><br>").ToString();
            Interface13.Browse(M, dat, "window=paiRecruit");
            return;
        }
Esempio n. 28
0
 // Function from file: mecha.dm
 public override void Activate(int?forced_state = null)
 {
     if (!Lang13.Bool(this.owner) || !(this.chassis != null) || this.chassis.occupant != this.owner)
     {
         return;
     }
     Interface13.Browse(this.chassis.occupant, this.chassis.get_stats_html(), "window=exosuit");
     return;
 }
Esempio n. 29
0
        public void view_manifest(  )
        {
            dynamic dat = null;

            dat += "<h4>Crew Manifest</h4>";
            dat += GlobalVars.data_core.get_manifest();
            Interface13.Browse(this, dat, "window=manifest;size=387x420;can_close=1");
            return;
        }
        // Function from file: pipe_dispenser.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            this.add_fingerprint(user);

            if (A is Obj_Item_Pipe || A is Obj_Item_PipeMeter)
            {
                Task13.User.WriteMsg("<span class='notice'>You put " + A + " back into " + this + ".</span>");

                if (!Lang13.Bool(user.drop_item()))
                {
                    return(null);
                }
                GlobalFuncs.qdel(A);
                return(null);
            }
            else if (A is Obj_Item_Weapon_Wrench)
            {
                if (!Lang13.Bool(this.anchored) && !this.isinspace())
                {
                    GlobalFuncs.playsound(this.loc, "sound/items/ratchet.ogg", 50, 1);
                    user.WriteMsg(new Txt("<span class='notice'>You begin to fasten ").the(this).item().str(" to the floor...</span>").ToString());

                    if (GlobalFuncs.do_after(user, 40 / A.toolspeed, null, this))
                    {
                        this.add_fingerprint(user);
                        ((Ent_Static)user).visible_message(new Txt().item(user).str(" fastens ").the(this).item().str(".").ToString(), new Txt("<span class='notice'>You fasten ").the(this).item().str(". Now it can dispense pipes.</span>").ToString(), "<span class='italics'>You hear ratchet.</span>");
                        this.anchored = 1;
                        this.stat    &= 8;

                        if (Task13.User.machine == this)
                        {
                            Interface13.Browse(Task13.User, null, "window=pipedispenser");
                        }
                    }
                }
                else if (Lang13.Bool(this.anchored))
                {
                    GlobalFuncs.playsound(this.loc, "sound/items/ratchet.ogg", 50, 1);
                    user.WriteMsg(new Txt("<span class='notice'>You begin to unfasten ").the(this).item().str(" from the floor...</span>").ToString());

                    if (GlobalFuncs.do_after(user, 20 / A.toolspeed, null, this))
                    {
                        this.add_fingerprint(user);
                        ((Ent_Static)user).visible_message(new Txt().item(user).str(" unfastens ").the(this).item().str(".").ToString(), new Txt("<span class='notice'>You unfasten ").the(this).item().str(". Now it can be pulled somewhere else.</span>").ToString(), "<span class='italics'>You hear ratchet.</span>");
                        this.anchored = 0;
                        this.stat    |= 65527;
                        this.power_change();
                    }
                }
            }
            else
            {
                return(base.attackby((object)(A), (object)(user), _params, silent, replace_spent));
            }
            return(null);
        }