示例#1
0
        // Function from file: atoms_movable.dm
        public virtual bool forceMove(dynamic destination = null)
        {
            Ent_Static  oldloc   = null;
            dynamic     old_area = null;
            dynamic     destarea = null;
            Ent_Dynamic AM       = null;


            if (Lang13.Bool(destination))
            {
                oldloc = this.loc;

                if (oldloc != null)
                {
                    oldloc.Exited(this, destination);
                }
                this.loc = destination;
                ((Base_Static)destination).Entered(this, oldloc);
                old_area = GlobalFuncs.get_area(oldloc);
                destarea = GlobalFuncs.get_area(destination);

                if (old_area != destarea)
                {
                    ((Base_Static)destarea).Entered(this, null);
                }

                foreach (dynamic _a in Lang13.Enumerate(destination, typeof(Ent_Dynamic)))
                {
                    AM = _a;


                    if (AM == this)
                    {
                        continue;
                    }
                    AM.Crossed(this);
                }
                this.Moved(oldloc, 0);
                return(true);
            }
            return(false);
        }