// Function from file: transit_tube_pod.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            Obj_Structure_TransitTube_Station T = null;
            Obj_Structure_CTransitTubePod     R = null;


            if (A is Obj_Item_Weapon_Crowbar)
            {
                if (!this.moving)
                {
                    foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Obj_Structure_TransitTube_Station)))
                    {
                        T = _a;

                        return(null);
                    }

                    if (this.contents.len != 0)
                    {
                        ((Ent_Static)user).visible_message(new Txt().item(user).str(" empties ").the(this).item().str(".").ToString(), new Txt("<span class='notice'>You empty ").the(this).item().str(".</span>").ToString());
                        this.empty();
                        return(null);
                    }
                    else
                    {
                        user.WriteMsg(new Txt("<span class='notice'>You free ").the(this).item().str(".</span>").ToString());
                        R = new Obj_Structure_CTransitTubePod(this.loc);
                        this.transfer_fingerprints_to(R);
                        R.add_fingerprint(user);
                        GlobalFuncs.qdel(this);
                    }
                }
            }
            return(null);
        }
Example #2
0
        // Function from file: transit_tube_construction.dm
        public override Obj_Structure_TransitTube buildtube(  )
        {
            Obj_Structure_TransitTube_Station R = null;

            R     = new Obj_Structure_TransitTube_Station(this.loc);
            R.dir = this.dir;
            R.init_dirs();
            return(R);
        }
        // Function from file: tgstation.dme
        public override bool relaymove(Mob user = null, int?direction = null)
        {
            Obj_Structure_TransitTube_Station station = null;
            Obj_Structure_TransitTube         tube    = null;


            if (user is Mob && user.client != null)
            {
                if (!Lang13.Bool(Lang13.FindIn(typeof(Obj_Structure_TransitTube), this.loc)))
                {
                    user.loc = this.loc;
                    user.client.Move(Map13.GetStep(this.loc, direction ?? 0), direction ?? 0);
                    user.reset_perspective(null);
                }

                if (!this.moving)
                {
                    foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Obj_Structure_TransitTube_Station)))
                    {
                        station = _a;


                        if (station.directions().Contains(this.dir))
                        {
                            if (!station.pod_moving)
                            {
                                if (direction == station.dir)
                                {
                                    if (station.icon_state == "open")
                                    {
                                        user.loc = this.loc;
                                        user.client.Move(Map13.GetStep(this.loc, direction ?? 0), direction ?? 0);
                                        user.reset_perspective(null);
                                    }
                                    else
                                    {
                                        station.open_animation();
                                    }
                                }
                                else if (station.directions().Contains(direction))
                                {
                                    this.dir = direction ?? 0;
                                    station.launch_pod();
                                }
                            }
                            return(false);
                        }
                    }

                    foreach (dynamic _b in Lang13.Enumerate(this.loc, typeof(Obj_Structure_TransitTube)))
                    {
                        tube = _b;


                        if (tube.directions().Contains(this.dir))
                        {
                            if (tube.has_exit(direction))
                            {
                                this.dir = direction ?? 0;
                                return(false);
                            }
                        }
                    }
                }
            }
            return(false);
        }