示例#1
0
        public void stop(  )
        {
            dynamic T = null;


            if (!this.can_use(Task13.User))
            {
                return;
            }

            if (this.recording)
            {
                this.recording = false;
                this.mytape.timestamp.Add(this.mytape.used_capacity);
                this.mytape.storedinfo.Add("[" + String13.FormatTime(this.mytape.used_capacity * 10, "mm:ss") + "] Recording stopped.");
                Task13.User.WriteMsg("<span class='notice'>Recording stopped.</span>");
                return;
            }
            else if (this.playing)
            {
                this.playing = false;
                T            = GlobalFuncs.get_turf(this);
                ((Ent_Static)T).visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>");
            }
            this.update_icon();
            return;
        }
示例#2
0
        // Function from file: signaler.dm
        public void signal(  )
        {
            Signal  signal = null;
            string  time   = null;
            dynamic T      = null;


            if (!(this.radio_connection != null))
            {
                return;
            }
            signal                 = new Signal();
            signal.source          = this;
            signal.encryption      = this.code;
            signal.data["message"] = "ACTIVATE";
            this.radio_connection.post_signal(this, signal);
            time = String13.FormatTime(Game13.realtime, "hh:mm:ss");
            T    = GlobalFuncs.get_turf(this);

            if (Task13.User != null)
            {
                GlobalVars.lastsignalers.Add("" + time + " <B>:</B> " + Task13.User.key + " used " + this + " @ location (" + T.x + "," + T.y + "," + T.z + ") <B>:</B> " + GlobalFuncs.format_frequency(this.frequency) + "/" + this.code);
            }
            return;
        }
示例#3
0
 // Function from file: taperecorder.dm
 public override string Hear(string message = null, dynamic speaker = null, int message_langs = 0, dynamic raw_message = null, dynamic radio_freq = null, ByTable spans = null)
 {
     if (Lang13.Bool(this.mytape) && this.recording)
     {
         this.mytape.timestamp.Add(this.mytape.used_capacity);
         this.mytape.storedinfo.Add("[" + String13.FormatTime(this.mytape.used_capacity * 10, "mm:ss") + "] " + message);
     }
     return(null);
 }
示例#4
0
        public void record(  )
        {
            int used = 0;
            int max  = 0;


            if (!this.can_use(Task13.User))
            {
                return;
            }

            if (!Lang13.Bool(this.mytape) || Lang13.Bool(this.mytape.ruined))
            {
                return;
            }

            if (this.recording)
            {
                return;
            }

            if (this.playing)
            {
                return;
            }

            if (this.mytape.used_capacity < this.mytape.max_capacity)
            {
                Task13.User.WriteMsg("<span class='notice'>Recording started.</span>");
                this.recording = true;
                this.update_icon();
                this.mytape.timestamp.Add(this.mytape.used_capacity);
                this.mytape.storedinfo.Add("[" + String13.FormatTime(this.mytape.used_capacity * 10, "mm:ss") + "] Recording started.");
                used = this.mytape.used_capacity;
                max  = this.mytape.max_capacity;

                while (used < max)
                {
                    if (!this.recording)
                    {
                        break;
                    }
                    this.mytape.used_capacity++;
                    used++;
                    Task13.Sleep(10);
                }
                this.recording = false;
                this.update_icon();
            }
            else
            {
                Task13.User.WriteMsg("<span class='notice'>The tape is full.</span>");
            }
            return;
        }
 // Function from file: holidays.dm
 public override bool shouldCelebrate(double?dd = null, double?mm = null, double?yy = null)
 {
     if (dd == 13)
     {
         if (String13.FormatTime(Game13.timeofday, "DDD") == "Fri")
         {
             return(true);
         }
     }
     return(false);
 }
示例#6
0
        // Function from file: holidays.dm
        public override string greet(  )
        {
            double game_age = 0;
            string Fact     = null;

            game_age = (String13.ParseNumber(String13.FormatTime(Game13.timeofday, "YY")) ?? 0) - 3;

            switch ((int)(game_age))
            {
            case 16:
                Fact = " SS13 is now old enough to drive!";
                break;

            case 18:
                Fact = " SS13 is now legal!";
                break;

            case 21:
                Fact = " SS13 can now drink!";
                break;

            case 26:
                Fact = " SS13 can now rent a car!";
                break;

            case 30:
                Fact = " SS13 can now go home and be a family man!";
                break;

            case 40:
                Fact = " SS13 can now suffer a midlife crisis!";
                break;

            case 50:
                Fact = " Happy golden anniversary!";
                break;

            case 65:
                Fact = " SS13 can now start thinking about retirement!";
                break;

            case 96:
                Fact = " Please send a time machine back to pick me up, I need to update the time formatting for this feature!";
                break;
            }

            if (!Lang13.Bool(Fact))
            {
                Fact = " SS13 is now " + game_age + " years old!";
            }
            return("Say 'Happy Birthday' to Space Station 13, first publicly playable on February 16th, 2003!" + Fact);
        }
示例#7
0
        // Function from file: event.dm
        public dynamic runEvent(  )
        {
            dynamic E = null;


            if (!Lang13.Bool(((dynamic)this.typepath).IsSubclassOf(typeof(RoundEvent))))
            {
                return(26);
            }
            E         = Lang13.Call(this.typepath);
            E.control = this;
            GlobalFuncs.feedback_add_details("event_ran", "" + E);
            this.occurrences++;
            GlobalFuncs.testing("" + String13.FormatTime(Game13.time, "hh:mm:ss") + " " + E.type);
            return(E);
        }
示例#8
0
        // Function from file: events.dm
        public void getHoliday(  )
        {
            double? YY      = null;
            double? MM      = null;
            double? DD      = null;
            dynamic H       = null;
            dynamic holiday = null;


            if (!GlobalVars.config.allow_holidays)
            {
                return;
            }
            YY = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "YY"));
            MM = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "MM"));
            DD = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "DD"));

            foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Holiday)) - typeof(Holiday)))
            {
                H = _a;

                holiday = Lang13.Call(H);

                if (((Holiday)holiday).shouldCelebrate(DD, MM, YY))
                {
                    ((Holiday)holiday).celebrate();

                    if (!Lang13.Bool(this.holidays))
                    {
                        this.holidays = new ByTable();
                    }
                    this.holidays[holiday.name] = holiday;
                }
            }

            if (Lang13.Bool(this.holidays))
            {
                this.holidays = GlobalFuncs.shuffle(this.holidays);
                Game13.update_status();
            }
            return;
        }
        // Function from file: message_server.dm
        public void round_end_data_gathering(  )
        {
            int pda_msg_amt = 0;
            int rc_msg_amt  = 0;
            Obj_Machinery_MessageServer MS = null;

            pda_msg_amt = 0;
            rc_msg_amt  = 0;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.message_servers, typeof(Obj_Machinery_MessageServer)))
            {
                MS = _a;


                if (MS.pda_msgs.len > pda_msg_amt)
                {
                    pda_msg_amt = MS.pda_msgs.len;
                }

                if (MS.rc_msgs.len > rc_msg_amt)
                {
                    rc_msg_amt = MS.rc_msgs.len;
                }
            }
            GlobalFuncs.feedback_set_details("radio_usage", "");
            GlobalFuncs.feedback_add_details("radio_usage", "COM-" + this.msg_common.len);
            GlobalFuncs.feedback_add_details("radio_usage", "SCI-" + this.msg_science.len);
            GlobalFuncs.feedback_add_details("radio_usage", "HEA-" + this.msg_command.len);
            GlobalFuncs.feedback_add_details("radio_usage", "MED-" + this.msg_medical.len);
            GlobalFuncs.feedback_add_details("radio_usage", "ENG-" + this.msg_engineering.len);
            GlobalFuncs.feedback_add_details("radio_usage", "SEC-" + this.msg_security.len);
            GlobalFuncs.feedback_add_details("radio_usage", "DTH-" + this.msg_deathsquad.len);
            GlobalFuncs.feedback_add_details("radio_usage", "SYN-" + this.msg_syndicate.len);
            GlobalFuncs.feedback_add_details("radio_usage", "SRV-" + this.msg_service.len);
            GlobalFuncs.feedback_add_details("radio_usage", "CAR-" + this.msg_cargo.len);
            GlobalFuncs.feedback_add_details("radio_usage", "OTH-" + this.messages.len);
            GlobalFuncs.feedback_add_details("radio_usage", "PDA-" + pda_msg_amt);
            GlobalFuncs.feedback_add_details("radio_usage", "RC-" + rc_msg_amt);
            GlobalFuncs.feedback_set_details("round_end", "" + String13.FormatTime(Game13.realtime, null));
            return;
        }
示例#10
0
        // Function from file: master.dm
        public void Recover(  )
        {
            string    msg     = null;
            dynamic   varname = null;
            dynamic   varval  = null;
            Base_Data D       = null;

            msg = "## DEBUG: " + String13.FormatTime(Game13.timeofday, null) + " MC restarted. Reports:\n";

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.Master.vars))
            {
                varname = _b;


                dynamic _a = varname;                 // Was a switch-case, sorry for the mess.
                if (_a == "name" || _a == "tag" || _a == "bestF" || _a == "type" || _a == "parent_type" || _a == "vars" || _a == "statclick")
                {
                    continue;
                }
                else
                {
                    varval = GlobalVars.Master.vars[varname];

                    if (varval is Game_Data)
                    {
                        D    = varval;
                        msg += "	 "+ varname + " = " + D.type + "\n";
                    }
                    else
                    {
                        msg += "	 "+ varname + " = " + varval + "\n";
                    }
                }
            }
            Game13.log.WriteMsg(msg);
            this.subsystems = GlobalVars.Master.subsystems;
            return;
        }
        // Function from file: tgstation.dme
        public void send_signal(string message = null)
        {
            message = message ?? "ACTIVATE";

            string  time   = null;
            dynamic T      = null;
            Signal  signal = null;


            if (this.last_transmission != 0 && Game13.time < this.last_transmission + 5)
            {
                return;
            }
            this.last_transmission = Game13.time;
            time = String13.FormatTime(Game13.realtime, "hh:mm:ss");
            T    = GlobalFuncs.get_turf(this);
            GlobalVars.lastsignalers.Add("" + time + " <B>:</B> " + Task13.User.key + " used " + this + " @ location (" + T.x + "," + T.y + "," + T.z + ") <B>:</B> " + GlobalFuncs.format_frequency(this.frequency) + "/" + this.code);
            signal                 = new Signal();
            signal.source          = this;
            signal.encryption      = this.code;
            signal.data["message"] = message;
            this.radio_connection.post_signal(this, signal);
            return;
        }
示例#12
0
        // Function from file: recaller.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string  dat          = null;
            bool    isboss       = false;
            int     points       = 0;
            string  gangtooltext = null;
            Browser popup        = null;


            if (!this.can_use(user))
            {
                return(null);
            }

            if (!Lang13.Bool(this.gang))
            {
                dat += "This device is not registered.<br><br>";

                if (((GameMode)GlobalVars.ticker.mode).get_gang_bosses().Contains(user.mind))
                {
                    if (this.promotable && user.mind.gang_datum.bosses.len < 3)
                    {
                        dat += "Give this device to another member of your organization to use to promote them to Lieutenant.<br><br>";
                        dat += "If this is meant as a spare device for yourself:<br>";
                    }
                    dat += new Txt("<a href='?src=").Ref(this).str(";register=1'>Register Device as Spare</a><br>").ToString();
                }
                else if (this.promotable)
                {
                    if (user.mind.gang_datum.bosses.len < 3)
                    {
                        dat += "You have been selected for a promotion!<br>";
                        dat += new Txt("<a href='?src=").Ref(this).str(";register=1'>Accept Promotion</a><br>").ToString();
                    }
                    else
                    {
                        dat += "No promotions available: All positions filled.<br>";
                    }
                }
                else
                {
                    dat += "This device is not authorized to promote.<br>";
                }
            }
            else
            {
                if (Lang13.Bool(Lang13.IsNumber(this.gang.dom_timer)))
                {
                    dat += "<center><font color='red'>Takeover In Progress:<br><B>" + this.gang.dom_timer + " seconds remain</B></font></center>";
                }
                isboss = user.mind == this.gang.bosses[1];
                points = Convert.ToInt32(this.gang.points);
                dat   += "Registration: <B>" + this.gang.name + " Gang " + (isboss ? "Boss" : "Lieutenant") + "</B><br>";
                dat   += "Organization Size: <B>" + (this.gang.gangsters.len + this.gang.bosses.len) + "</B> | Station Control: <B>" + Num13.Round(this.gang.territory.len / GlobalVars.start_state.num_territories * 100, 1) + "%</B><br>";
                dat   += "Gang Influence: <B>" + points + "</B><br>";
                dat   += "Time until Influence grows: <B>" + (points >= 999 ? "--:--" : String13.FormatTime(GlobalVars.ticker.mode.gang_points.next_point_time - Game13.time, "mm:ss")) + "</B><br>";
                dat   += "<hr>";
                dat   += "<B>Gangtool Functions:</B><br>";
                dat   += new Txt("<a href='?src=").Ref(this).str(";choice=ping'>Send Message to Gang</a><br>").ToString();

                if (this.outfits > 0)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";choice=outfit'>Create Armored Gang Outfit</a><br>").ToString();
                }
                else
                {
                    dat += "<b>Create Gang Outfit</b> (Restocking)<br>";
                }

                if (isboss)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";choice=recall'>Recall Emergency Shuttle</a><br>").ToString();
                }
                dat += "<br>";
                dat += "<B>Purchase Weapons:</B><br>";

                if (this.gang.fighting_style == "normal")
                {
                    dat += "(10 Influence) ";

                    if (points >= 10)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=switchblade'>Switchblade</a><br>").ToString();
                    }
                    else
                    {
                        dat += "Switchblade<br>";
                    }
                    dat += "(25 Influence) ";

                    if (points >= 25)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=pistol'>10mm Pistol</a><br>").ToString();
                    }
                    else
                    {
                        dat += "10mm Pistol<br>";
                    }
                    dat += "&nbsp;&#8627;(10 Influence) ";

                    if (points >= 10)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=10mmammo'>10mm Ammo</a><br>").ToString();
                    }
                    else
                    {
                        dat += "10mm Ammo<br>";
                    }
                    dat += "(60 Influence) ";

                    if (points >= 60)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=uzi'>Uzi SMG</a><br>").ToString();
                    }
                    else
                    {
                        dat += "Uzi SMG<br>";
                    }
                    dat += "&nbsp;&#8627;(40 Influence) ";

                    if (points >= 40)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=9mmammo'>Uzi Ammo</a><br>").ToString();
                    }
                    else
                    {
                        dat += "Uzi Ammo<br>";
                    }
                    dat += "(1 Influence) ";

                    if (points >= 1)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=necklace'>Dope Necklace</a><br>").ToString();
                    }
                    else
                    {
                        dat += "Dope Necklace<br>";
                    }
                    dat += "<br>";
                }
                dat += "<B>Purchase Equipment:</B><br>";
                dat += "(5 Influence) ";

                if (points >= 5)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";purchase=spraycan'>Territory Spraycan</a><br>").ToString();
                }
                else
                {
                    dat += "Territory Spraycan<br>";
                }
                dat += "(10 Influence) ";

                if (points >= 10)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";purchase=C4'>C4 Explosive</a><br>").ToString();
                }
                else
                {
                    dat += "C4 Explosive<br>";
                }
                dat += "(15 Influence) ";

                if (points >= 15)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";purchase=implant'>Implant Breaker</a><br>").ToString();
                }
                else
                {
                    dat += "Implant Breaker<br>";
                }

                if (this.free_pen)
                {
                    dat += "(GET ONE FREE) ";
                }
                else
                {
                    dat += "(50 Influence) ";
                }

                if (points >= 50 || this.free_pen)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";purchase=pen'>Recruitment Pen</a><br>").ToString();
                }
                else
                {
                    dat += "Recruitment Pen<br>";
                }
                gangtooltext = "Spare Gangtool";

                if (isboss && this.gang.bosses.len < 3)
                {
                    gangtooltext = "Promote a Gangster";
                }
                dat += "(10 Influence) ";

                if (points >= 10)
                {
                    dat += new Txt("<a href='?src=").Ref(this).str(";purchase=gangtool'>").item(gangtooltext).str("</a><br>").ToString();
                }
                else
                {
                    dat += "" + gangtooltext + "<br>";
                }

                if (!(this.gang.dom_attempts != 0))
                {
                    dat += "(Out of stock) Station Dominator<br>";
                }
                else
                {
                    dat += "(30 Influence) ";

                    if (points >= 30)
                    {
                        dat += new Txt("<a href='?src=").Ref(this).str(";purchase=dominator'><b>Station Dominator</b></a><br>").ToString();
                    }
                    else
                    {
                        dat += "<b>Station Dominator</b><br>";
                    }
                    dat += "<i>(Estimated Takeover Time: " + Num13.Round(GlobalFuncs.get_domination_time(this.gang) / 60, 0.1) + " minutes)</i><br>";
                }
            }
            dat  += "<br>";
            dat  += new Txt("<a href='?src=").Ref(this).str(";choice=refresh'>Refresh</a><br>").ToString();
            popup = new Browser(user, "gangtool", "Welcome to GangTool v3.2", 340, 625);
            popup.set_content(dat);
            popup.open();
            return(null);
        }
示例#13
0
        // Function from file: AI_modules.dm
        public virtual bool install(Game_Data law_datum = null, dynamic user = null)
        {
            double? tot_laws = null;
            dynamic lawlist  = null;
            dynamic mylaw    = null;
            dynamic law2log  = null;
            string  time     = null;
            string  ainame   = null;
            string  aikey    = null;


            if (!this.bypass_law_amt_check && (!(this.laws.len != 0) || this.laws[1] == ""))
            {
                user.WriteMsg("<span class='warning'>ERROR: No laws found on board.</span>");
                return(false);
            }

            if (law_datum != null)
            {
                tot_laws = 0;

                foreach (dynamic _b in Lang13.Enumerate(new ByTable(new object [] { ((dynamic)law_datum).inherent, ((dynamic)law_datum).supplied, ((dynamic)law_datum).ion, this.laws })))
                {
                    lawlist = _b;


                    foreach (dynamic _a in Lang13.Enumerate(lawlist))
                    {
                        mylaw = _a;


                        if (mylaw != "")
                        {
                            tot_laws++;
                        }
                    }
                }

                if ((tot_laws ?? 0) > (GlobalVars.config.silicon_max_law_amount ?? 0) && !this.bypass_law_amt_check)
                {
                    user.WriteMsg("<span class='caution'>Not enough memory allocated to " + (Lang13.Bool(((dynamic)law_datum).owner) ? ((dynamic)law_datum).owner : "the AI core") + "'s law processor to handle this amount of laws.");
                    GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(user) + " tried to upload laws to " + (Lang13.Bool(((dynamic)law_datum).owner) ? GlobalFuncs.key_name_admin(((dynamic)law_datum).owner) : "an AI core") + " that would exceed the law cap.");
                    return(false);
                }
            }
            law2log = this.transmitInstructions(law_datum, user);

            if (Lang13.Bool(((dynamic)law_datum).owner))
            {
                user.WriteMsg("Upload complete. " + ((dynamic)law_datum).owner + "'s laws have been modified.");
                ((dynamic)law_datum).owner.show_laws();
                ((dynamic)law_datum).owner.law_change_counter++;
            }
            else
            {
                user.WriteMsg("Upload complete.");
            }
            time   = String13.FormatTime(Game13.realtime, "hh:mm:ss");
            ainame = (Lang13.Bool(((dynamic)law_datum).owner) ? ((dynamic)law_datum).owner.name : "empty AI core");
            aikey  = (Lang13.Bool(((dynamic)law_datum).owner) ? ((dynamic)law_datum).owner.ckey : "null");
            GlobalVars.lawchanges.Add("" + time + " <B>:</B> " + user.name + "(" + user.key + ") used " + this.name + " on " + ainame + "(" + aikey + ")." + (Lang13.Bool(law2log) ? " The law specified " + law2log : ""));
            GlobalFuncs.log_law("" + user.key + "/" + user.name + " used " + this.name + " on " + aikey + "/(" + ainame + ")." + (Lang13.Bool(law2log) ? " The law specified " + law2log : ""));
            GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(user) + " used " + this.name + " on " + GlobalFuncs.key_name_admin(((dynamic)law_datum).owner) + "." + (Lang13.Bool(law2log) ? " The law specified " + law2log : ""));
            return(false);
        }
示例#14
0
        // Function from file: lighting.dm
        public override void Recover(  )
        {
            dynamic thing   = null;
            dynamic LS      = null;
            dynamic thing2  = null;
            dynamic T       = null;
            string  msg     = null;
            dynamic varname = null;
            string  varval1 = null;
            string  varval2 = null;


            if (!(GlobalVars.SSlighting.changed_turfs is ByTable))
            {
                GlobalVars.SSlighting.changed_turfs = new ByTable();
            }

            if (!(GlobalVars.SSlighting.changed_lights is ByTable))
            {
                GlobalVars.SSlighting.changed_lights = new ByTable();
            }

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.SSlighting.changed_lights))
            {
                thing = _a;

                LS = thing;
                Task13.Schedule(-1, (Task13.Closure)(() => {
                    ((LightSource)LS).check();
                    return;
                }));
            }

            foreach (dynamic _b in Lang13.Enumerate(this.changed_turfs))
            {
                thing2 = _b;

                T = thing2;

                if (T.lighting_changed)
                {
                    Task13.Schedule(-1, (Task13.Closure)(() => {
                        ((Tile)T).redraw_lighting();
                        return;
                    }));
                }
            }
            msg = "## DEBUG: " + String13.FormatTime(Game13.timeofday, null) + " " + this.name + " subsystem restarted. Reports:\n";

            foreach (dynamic _d in Lang13.Enumerate(GlobalVars.SSlighting.vars))
            {
                varname = _d;


                dynamic _c = varname;                 // Was a switch-case, sorry for the mess.
                if (_c == "tag" || _c == "bestF" || _c == "type" || _c == "parent_type" || _c == "vars")
                {
                    continue;
                }
                else
                {
                    varval1 = GlobalVars.SSlighting.vars[varname];
                    varval2 = this.vars[varname];

                    if (varval1 is ByTable)
                    {
                        varval1 = "/list(" + Lang13.Length(varval1) + ")";
                        varval2 = "/list(" + Lang13.Length(varval2) + ")";
                    }
                    msg += "	 "+ varname + " = " + varval1 + " -> " + varval2 + "\n";
                }
            }
            Game13.log.WriteMsg(msg);
            return;
        }
示例#15
0
        // Function from file: configuration.dm
        public void load(string filename = null, string type = null)
        {
            type = type ?? "config";

            ByTable Lines      = null;
            dynamic t          = null;
            int     pos        = 0;
            string  name       = null;
            dynamic value      = null;
            double? ticklag    = null;
            File    newlog     = null;
            string  mode_name  = null;
            string  mode_name2 = null;
            int     prob_pos   = 0;
            string  prob_name  = null;
            string  prob_value = null;
            string  race_id    = null;
            dynamic species_id = null;
            double? BombCap    = null;

            Lines = GlobalFuncs.file2list(filename);

            foreach (dynamic _d in Lang13.Enumerate(Lines))
            {
                t = _d;


                if (!Lang13.Bool(t))
                {
                    continue;
                }
                t = GlobalFuncs.trim(t);

                if (Lang13.Length(t) == 0)
                {
                    continue;
                }
                else if (String13.SubStr(t, 1, 2) == "#")
                {
                    continue;
                }
                pos   = String13.FindIgnoreCase(t, " ", 1, 0);
                name  = null;
                value = null;

                if (pos != 0)
                {
                    name  = String13.ToLower(String13.SubStr(t, 1, pos));
                    value = String13.SubStr(t, pos + 1, 0);
                }
                else
                {
                    name = String13.ToLower(t);
                }

                if (!Lang13.Bool(name))
                {
                    continue;
                }

                if (type == "config")
                {
                    switch ((string)(name))
                    {
                    case "admin_legacy_system":
                        GlobalVars.config.admin_legacy_system = true;
                        break;

                    case "ban_legacy_system":
                        GlobalVars.config.ban_legacy_system = true;
                        break;

                    case "use_age_restriction_for_jobs":
                        GlobalVars.config.use_age_restriction_for_jobs = true;
                        break;

                    case "lobby_countdown":
                        GlobalVars.config.lobby_countdown = String13.ParseNumber(value);
                        break;

                    case "round_end_countdown":
                        GlobalVars.config.round_end_countdown = String13.ParseNumber(value);
                        break;

                    case "log_ooc":
                        GlobalVars.config.log_ooc = true;
                        break;

                    case "log_access":
                        GlobalVars.config.log_access = true;
                        break;

                    case "log_say":
                        GlobalVars.config.log_say = true;
                        break;

                    case "log_admin":
                        GlobalVars.config.log_admin = true;
                        break;

                    case "log_prayer":
                        GlobalVars.config.log_prayer = true;
                        break;

                    case "log_law":
                        GlobalVars.config.log_law = true;
                        break;

                    case "log_game":
                        GlobalVars.config.log_game = true;
                        break;

                    case "log_vote":
                        GlobalVars.config.log_vote = true;
                        break;

                    case "log_whisper":
                        GlobalVars.config.log_whisper = true;
                        break;

                    case "log_attack":
                        GlobalVars.config.log_attack = true;
                        break;

                    case "log_emote":
                        GlobalVars.config.log_emote = true;
                        break;

                    case "log_adminchat":
                        GlobalVars.config.log_adminchat = true;
                        break;

                    case "log_pda":
                        GlobalVars.config.log_pda = true;
                        break;

                    case "log_hrefs":
                        GlobalVars.config.log_hrefs = true;
                        break;

                    case "allow_admin_ooccolor":
                        GlobalVars.config.allow_admin_ooccolor = true;
                        break;

                    case "allow_vote_restart":
                        GlobalVars.config.allow_vote_restart = true;
                        break;

                    case "allow_vote_mode":
                        GlobalVars.config.allow_vote_mode = true;
                        break;

                    case "no_dead_vote":
                        GlobalVars.config.vote_no_dead = true;
                        break;

                    case "default_no_vote":
                        GlobalVars.config.vote_no_default = true;
                        break;

                    case "vote_delay":
                        GlobalVars.config.vote_delay = String13.ParseNumber(value);
                        break;

                    case "vote_period":
                        GlobalVars.config.vote_period = String13.ParseNumber(value);
                        break;

                    case "norespawn":
                        GlobalVars.config.respawn = false;
                        break;

                    case "servername":
                        GlobalVars.config.server_name = value;
                        break;

                    case "stationname":
                        GlobalVars.config.station_name = value;
                        break;

                    case "serversuffix":
                        GlobalVars.config.server_suffix = true;
                        break;

                    case "hostedby":
                        GlobalVars.config.hostedby = value;
                        break;

                    case "server":
                        GlobalVars.config.server = value;
                        break;

                    case "banappeals":
                        GlobalVars.config.banappeals = value;
                        break;

                    case "wikiurl":
                        GlobalVars.config.wikiurl = value;
                        break;

                    case "forumurl":
                        GlobalVars.config.forumurl = value;
                        break;

                    case "rulesurl":
                        GlobalVars.config.rulesurl = value;
                        break;

                    case "githuburl":
                        GlobalVars.config.githuburl = value;
                        break;

                    case "guest_jobban":
                        GlobalVars.config.guest_jobban = true;
                        break;

                    case "guest_ban":
                        GlobalVars.guests_allowed = false;
                        break;

                    case "usewhitelist":
                        GlobalVars.config.usewhitelist = true;
                        break;

                    case "allow_metadata":
                        GlobalVars.config.allow_Metadata = true;
                        break;

                    case "kick_inactive":

                        if (Convert.ToDouble(value) < 1)
                        {
                            value = 6000;
                        }
                        GlobalVars.config.kick_inactive = value;
                        break;

                    case "load_jobs_from_txt":
                        this.load_jobs_from_txt = true;
                        break;

                    case "forbid_singulo_possession":
                        this.forbid_singulo_possession = true;
                        break;

                    case "popup_admin_pm":
                        GlobalVars.config.popup_admin_pm = true;
                        break;

                    case "allow_holidays":
                        GlobalVars.config.allow_holidays = true;
                        break;

                    case "useircbot":
                        this.useircbot = true;
                        break;

                    case "ticklag":
                        ticklag = String13.ParseNumber(value);

                        if ((ticklag ?? 0) > 0)
                        {
                            this.fps = 10 / (ticklag ?? 0);
                        }
                        break;

                    case "fps":
                        this.fps = String13.ParseNumber(value);
                        break;

                    case "automute_on":
                        this.automute_on = true;
                        break;

                    case "comms_key":
                        GlobalVars.comms_key = value;

                        if (value != "default_pwd" && Lang13.Length(value) > 6)
                        {
                            GlobalVars.comms_allowed = true;
                        }
                        break;

                    case "see_own_notes":
                        GlobalVars.config.see_own_notes = true;
                        break;

                    case "soft_popcap":
                        GlobalVars.config.soft_popcap = String13.ParseNumber(value);
                        break;

                    case "hard_popcap":
                        GlobalVars.config.hard_popcap = String13.ParseNumber(value);
                        break;

                    case "extreme_popcap":
                        GlobalVars.config.extreme_popcap = String13.ParseNumber(value);
                        break;

                    case "soft_popcap_message":
                        GlobalVars.config.soft_popcap_message = value;
                        break;

                    case "hard_popcap_message":
                        GlobalVars.config.hard_popcap_message = value;
                        break;

                    case "extreme_popcap_message":
                        GlobalVars.config.extreme_popcap_message = value;
                        break;

                    case "panic_bunker":
                        GlobalVars.config.panic_bunker = true;
                        break;

                    case "notify_new_player_age":
                        GlobalVars.config.notify_new_player_age = String13.ParseNumber(value);
                        break;

                    case "irc_first_connection_alert":
                        GlobalVars.config.irc_first_connection_alert = true;
                        break;

                    case "aggressive_changelog":
                        GlobalVars.config.aggressive_changelog = true;
                        break;

                    case "log_runtimes":
                        newlog = new File("data/logs/runtimes/runtime-" + String13.FormatTime(Game13.realtime, "YYYY-MM-DD") + ".log");

                        if (Game13.log != newlog)
                        {
                            Game13.log.WriteMsg("Now logging runtimes to data/logs/runtimes/runtime-" + String13.FormatTime(Game13.realtime, "YYYY-MM-DD") + ".log");
                            Game13.log = newlog;
                        }
                        break;

                    case "autoconvert_notes":
                        GlobalVars.config.autoconvert_notes = true;
                        break;

                    case "allow_webclient":
                        GlobalVars.config.allowwebclient = true;
                        break;

                    case "webclient_only_byond_members":
                        GlobalVars.config.webclientmembersonly = true;
                        break;

                    case "announce_admin_logout":
                        GlobalVars.config.announce_admin_logout = true;
                        break;

                    case "announce_admin_login":
                        GlobalVars.config.announce_admin_login = true;
                        break;

                    case "maprotation":
                        GlobalVars.config.maprotation = true;
                        break;

                    case "maprotationchancedelta":
                        GlobalVars.config.maprotatechancedelta = String13.ParseNumber(value);
                        break;

                    case "autoadmin":
                        GlobalVars.protected_config.autoadmin = true;

                        if (Lang13.Bool(value))
                        {
                            GlobalVars.protected_config.autoadmin_rank = String13.CKeyPreserveCase(value);
                        }
                        break;

                    default:
                        GlobalVars.diary.WriteMsg("Unknown setting in configuration: '" + name + "'");
                        break;
                    }
                }
                else if (type == "game_options")
                {
                    switch ((string)(name))
                    {
                    case "health_threshold_crit":
                        GlobalVars.config.health_threshold_crit = String13.ParseNumber(value);
                        break;

                    case "health_threshold_dead":
                        GlobalVars.config.health_threshold_dead = String13.ParseNumber(value);
                        break;

                    case "revival_pod_plants":
                        GlobalVars.config.revival_pod_plants = String13.ParseNumber(value);
                        break;

                    case "revival_cloning":
                        GlobalVars.config.revival_cloning = String13.ParseNumber(value);
                        break;

                    case "revival_brain_life":
                        GlobalVars.config.revival_brain_life = String13.ParseNumber(value);
                        break;

                    case "rename_cyborg":
                        GlobalVars.config.rename_cyborg = true;
                        break;

                    case "ooc_during_round":
                        GlobalVars.config.ooc_during_round = true;
                        break;

                    case "emojis":
                        GlobalVars.config.emojis = true;
                        break;

                    case "run_delay":
                        GlobalVars.config.run_speed = String13.ParseNumber(value);
                        break;

                    case "walk_delay":
                        GlobalVars.config.walk_speed = String13.ParseNumber(value);
                        break;

                    case "human_delay":
                        GlobalVars.config.human_delay = String13.ParseNumber(value);
                        break;

                    case "robot_delay":
                        GlobalVars.config.robot_delay = String13.ParseNumber(value);
                        break;

                    case "monkey_delay":
                        GlobalVars.config.monkey_delay = String13.ParseNumber(value);
                        break;

                    case "alien_delay":
                        GlobalVars.config.alien_delay = String13.ParseNumber(value);
                        break;

                    case "slime_delay":
                        GlobalVars.config.slime_delay = String13.ParseNumber(value);
                        break;

                    case "animal_delay":
                        GlobalVars.config.animal_delay = String13.ParseNumber(value);
                        break;

                    case "alert_red_upto":
                        GlobalVars.config.alert_desc_red_upto = value;
                        break;

                    case "alert_red_downto":
                        GlobalVars.config.alert_desc_red_downto = value;
                        break;

                    case "alert_blue_downto":
                        GlobalVars.config.alert_desc_blue_downto = value;
                        break;

                    case "alert_blue_upto":
                        GlobalVars.config.alert_desc_blue_upto = value;
                        break;

                    case "alert_green":
                        GlobalVars.config.alert_desc_green = value;
                        break;

                    case "alert_delta":
                        GlobalVars.config.alert_desc_delta = value;
                        break;

                    case "no_intercept_report":
                        GlobalVars.config.intercept = false;
                        break;

                    case "assistants_have_maint_access":
                        GlobalVars.config.jobs_have_maint_access |= 1;
                        break;

                    case "security_has_maint_access":
                        GlobalVars.config.jobs_have_maint_access |= 2;
                        break;

                    case "everyone_has_maint_access":
                        GlobalVars.config.jobs_have_maint_access |= 4;
                        break;

                    case "sec_start_brig":
                        GlobalVars.config.sec_start_brig = true;
                        break;

                    case "gateway_delay":
                        GlobalVars.config.gateway_delay = String13.ParseNumber(value);
                        break;

                    case "continuous":
                        mode_name = String13.ToLower(value);

                        if (GlobalVars.config.modes.Contains(mode_name))
                        {
                            GlobalVars.config.continuous[mode_name] = 1;
                        }
                        else
                        {
                            GlobalVars.diary.WriteMsg("Unknown continuous configuration definition: " + mode_name + ".");
                        }
                        break;

                    case "midround_antag":
                        mode_name2 = String13.ToLower(value);

                        if (GlobalVars.config.modes.Contains(mode_name2))
                        {
                            GlobalVars.config.midround_antag[mode_name2] = 1;
                        }
                        else
                        {
                            GlobalVars.diary.WriteMsg("Unknown midround antagonist configuration definition: " + mode_name2 + ".");
                        }
                        break;

                    case "midround_antag_time_check":
                        GlobalVars.config.midround_antag_time_check = String13.ParseNumber(value);
                        break;

                    case "midround_antag_life_check":
                        GlobalVars.config.midround_antag_life_check = String13.ParseNumber(value);
                        break;

                    case "shuttle_refuel_delay":
                        GlobalVars.config.shuttle_refuel_delay = String13.ParseNumber(value);
                        break;

                    case "show_game_type_odds":
                        GlobalVars.config.show_game_type_odds = true;
                        break;

                    case "ghost_interaction":
                        GlobalVars.config.ghost_interaction = true;
                        break;

                    case "traitor_scaling_coeff":
                        GlobalVars.config.traitor_scaling_coeff = String13.ParseNumber(value);
                        break;

                    case "changeling_scaling_coeff":
                        GlobalVars.config.changeling_scaling_coeff = String13.ParseNumber(value);
                        break;

                    case "security_scaling_coeff":
                        GlobalVars.config.security_scaling_coeff = String13.ParseNumber(value);
                        break;

                    case "abductor_scaling_coeff":
                        GlobalVars.config.abductor_scaling_coeff = String13.ParseNumber(value);
                        break;

                    case "traitor_objectives_amount":
                        GlobalVars.config.traitor_objectives_amount = String13.ParseNumber(value);
                        break;

                    case "probability":
                        prob_pos   = String13.FindIgnoreCase(value, " ", 1, 0);
                        prob_name  = null;
                        prob_value = null;

                        if (prob_pos != 0)
                        {
                            prob_name  = String13.ToLower(String13.SubStr(value, 1, prob_pos));
                            prob_value = String13.SubStr(value, prob_pos + 1, 0);

                            if (GlobalVars.config.modes.Contains(prob_name))
                            {
                                GlobalVars.config.probabilities[prob_name] = String13.ParseNumber(prob_value);
                            }
                            else
                            {
                                GlobalVars.diary.WriteMsg("Unknown game mode probability configuration definition: " + prob_name + ".");
                            }
                        }
                        else
                        {
                            GlobalVars.diary.WriteMsg("Incorrect probability configuration definition: " + prob_name + "  " + prob_value + ".");
                        }
                        break;

                    case "protect_roles_from_antagonist":
                        GlobalVars.config.protect_roles_from_antagonist = true;
                        break;

                    case "protect_assistant_from_antagonist":
                        GlobalVars.config.protect_assistant_from_antagonist = true;
                        break;

                    case "enforce_human_authority":
                        GlobalVars.config.enforce_human_authority = true;
                        break;

                    case "allow_latejoin_antagonists":
                        GlobalVars.config.allow_latejoin_antagonists = true;
                        break;

                    case "allow_random_events":
                        GlobalVars.config.allow_random_events = true;
                        break;

                    case "minimal_access_threshold":
                        GlobalVars.config.minimal_access_threshold = String13.ParseNumber(value);
                        break;

                    case "jobs_have_minimal_access":
                        GlobalVars.config.jobs_have_minimal_access = true;
                        break;

                    case "humans_need_surnames":
                        this.humans_need_surnames = true;
                        break;

                    case "force_random_names":
                        GlobalVars.config.force_random_names = true;
                        break;

                    case "allow_ai":
                        GlobalVars.config.allow_ai = true;
                        break;

                    case "silent_ai":
                        GlobalVars.config.silent_ai = true;
                        break;

                    case "silent_borg":
                        GlobalVars.config.silent_borg = true;
                        break;

                    case "sandbox_autoclose":
                        GlobalVars.config.sandbox_autoclose = true;
                        break;

                    case "default_laws":
                        GlobalVars.config.default_laws = String13.ParseNumber(value);
                        break;

                    case "silicon_max_law_amount":
                        GlobalVars.config.silicon_max_law_amount = String13.ParseNumber(value);
                        break;

                    case "join_with_mutant_race":
                        GlobalVars.config.mutant_races = true;
                        break;

                    case "roundstart_races":

                        if (!this.cleared_default_races)
                        {
                            GlobalVars.roundstart_species = new ByTable();
                            this.cleared_default_races    = true;
                        }
                        race_id = String13.ToLower(value);

                        foreach (dynamic _b in Lang13.Enumerate(GlobalVars.species_list))
                        {
                            species_id = _b;


                            if (species_id == race_id)
                            {
                                GlobalVars.roundstart_species[species_id] = GlobalVars.species_list[species_id];
                            }
                        }
                        break;

                    case "join_with_mutant_humans":
                        GlobalVars.config.mutant_humans = true;
                        break;

                    case "assistant_cap":
                        GlobalVars.config.assistant_cap = String13.ParseNumber(value);
                        break;

                    case "starlight":
                        GlobalVars.config.starlight = true;
                        break;

                    case "grey_assistants":
                        GlobalVars.config.grey_assistants = true;
                        break;

                    case "no_summon_guns":
                        GlobalVars.config.no_summon_guns = true;
                        break;

                    case "no_summon_magic":
                        GlobalVars.config.no_summon_magic = true;
                        break;

                    case "no_summon_events":
                        GlobalVars.config.no_summon_events = true;
                        break;

                    case "reactionary_explosions":
                        GlobalVars.config.reactionary_explosions = true;
                        break;

                    case "bombcap":
                        BombCap = String13.ParseNumber(value);

                        if (!Lang13.Bool(BombCap))
                        {
                            continue;
                        }

                        if ((BombCap ?? 0) < 4)
                        {
                            BombCap = 4;
                        }

                        if ((BombCap ?? 0) > 128)
                        {
                            BombCap = 128;
                        }
                        GlobalVars.MAX_EX_DEVESTATION_RANGE = Num13.Floor((BombCap ?? 0) / 4);
                        GlobalVars.MAX_EX_HEAVY_RANGE       = Num13.Floor((BombCap ?? 0) / 2);
                        GlobalVars.MAX_EX_LIGHT_RANGE       = BombCap;
                        GlobalVars.MAX_EX_FLASH_RANGE       = BombCap;
                        GlobalVars.MAX_EX_FLAME_RANGE       = BombCap;
                        break;

                    default:
                        GlobalVars.diary.WriteMsg("Unknown setting in configuration: '" + name + "'");
                        break;
                    }
                }
            }
            this.fps = Num13.Floor(Convert.ToDouble(this.fps));

            if (Convert.ToDouble(this.fps) <= 0)
            {
                this.fps = Lang13.Initial(this, "fps");
            }
            return;
        }