// Function from file: pod.dm
        public void alarm(  )
        {
            Obj_Machinery_Door_Poddoor M  = null;
            Obj_Machinery_MassDriver   M2 = null;
            Obj_Machinery_Door_Poddoor M3 = null;


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

            if (!(this.connected != null))
            {
                Map13.FetchViewers(null, null).WriteMsg("Cannot locate mass driver connector. Cancelling firing sequence!");
                return;
            }

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, this.range), typeof(Obj_Machinery_Door_Poddoor)))
            {
                M = _a;


                if (M.id == this.id)
                {
                    M.open();
                }
            }
            Task13.Sleep(20);

            foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this, this.range), typeof(Obj_Machinery_MassDriver)))
            {
                M2 = _b;


                if (M2.id == this.id)
                {
                    M2.power = this.connected.power;
                    M2.drive();
                }
            }
            Task13.Sleep(50);

            foreach (dynamic _c in Lang13.Enumerate(Map13.FetchInRange(this, this.range), typeof(Obj_Machinery_Door_Poddoor)))
            {
                M3 = _c;


                if (M3.id == this.id)
                {
                    M3.close();
                }
            }
            return;
        }
        // Function from file: doorcontrol.dm
        public override bool activate(  )
        {
            Obj_Machinery_Door_Poddoor M  = null;
            Obj_Machinery_MassDriver   M2 = null;
            Obj_Machinery_Door_Poddoor M3 = null;

            this.cooldown = 1;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Door_Poddoor)))
            {
                M = _a;


                if (M.id == this.id)
                {
                    Task13.Schedule(0, (Task13.Closure)(() => {
                        M.open();
                        return;
                    }));
                }
            }
            Task13.Sleep(10);

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


                if (M2.id == this.id)
                {
                    M2.drive();
                }
            }
            Task13.Sleep(60);

            foreach (dynamic _c in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Door_Poddoor)))
            {
                M3 = _c;


                if (M3.id == this.id)
                {
                    Task13.Schedule(0, (Task13.Closure)(() => {
                        M3.close();
                        return;
                    }));
                }
            }
            Task13.Sleep(10);
            this.cooldown = 0;
            return(false);
        }
        // Function from file: doorcontrol.dm
        public override bool activate(  )
        {
            bool?openclose = null;
            Obj_Machinery_Door_Poddoor M = null;

            this.cooldown = 1;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Door_Poddoor)))
            {
                M = _a;


                if (M.id == this.id)
                {
                    if (openclose == null)
                    {
                        openclose = M.density;
                    }
                    Task13.Schedule(0, (Task13.Closure)(() => {
                        if (M != null)
                        {
                            if (openclose == true)
                            {
                                M.open();
                            }
                            else
                            {
                                M.close();
                            }
                        }
                        return;

                        return;
                    }));
                }
            }
            Task13.Sleep(10);
            this.cooldown = 0;
            return(false);
        }
        // Function from file: pod.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            double?t  = null;
            double?tp = null;
            Obj_Machinery_Door_Poddoor M  = null;
            Obj_Machinery_MassDriver   M2 = null;


            if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc))))
            {
                return(null);
            }

            if (Task13.User.contents.Find(this) != 0 || Map13.GetDistance(this, Task13.User) <= 1 && this.loc is Tile || Task13.User is Mob_Living_Silicon)
            {
                Task13.User.set_machine(this);

                if (Lang13.Bool(href_list["power"]))
                {
                    t = String13.ParseNumber(href_list["power"]);
                    t = Num13.MinInt(Num13.MaxInt(((int)(0.25)), ((int)(t ?? 0))), 16);

                    if (this.connected != null)
                    {
                        this.connected.power = t;
                    }
                }

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

                if (Lang13.Bool(href_list["time"]))
                {
                    this.timing = String13.ParseNumber(href_list["time"]);
                }

                if (Lang13.Bool(href_list["tp"]))
                {
                    tp         = String13.ParseNumber(href_list["tp"]);
                    this.time += tp ?? 0;
                    this.time  = Num13.MinInt(Num13.MaxInt(Num13.Floor(this.time), 0), 120);
                }

                if (Lang13.Bool(href_list["door"]))
                {
                    foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, this.range), typeof(Obj_Machinery_Door_Poddoor)))
                    {
                        M = _a;


                        if (M.id == this.id)
                        {
                            if (M.density)
                            {
                                M.open();
                            }
                            else
                            {
                                M.close();
                            }
                        }
                    }
                }

                if (Lang13.Bool(href_list["drive"]))
                {
                    foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this, this.range), typeof(Obj_Machinery_MassDriver)))
                    {
                        M2 = _b;


                        if (M2.id == this.id)
                        {
                            M2.power = this.connected.power;
                            M2.drive();
                        }
                    }
                }
                this.updateUsrDialog();
            }
            return(null);
        }