예제 #1
0
        // Function from file: singularity.dm
        public virtual void eat(  )
        {
            ByTable         L    = null;
            Ent_Static      X    = null;
            int?            dist = null;
            Obj_Singularity S    = null;

            L = ((this.grav_pull ?? 0) > 8 ? GlobalFuncs.ultra_range(this.grav_pull, this, true) : Map13.FetchInRangeExcludeThis(this, this.grav_pull));

            foreach (dynamic _a in Lang13.Enumerate(L, typeof(Ent_Static)))
            {
                X = _a;

                dist = Map13.GetDistance(X, this);
                S    = this;

                if ((dist ?? 0) > (this.consume_range ?? 0))
                {
                    X.singularity_pull(S, this.current_size);
                }
                else if ((dist ?? 0) <= (this.consume_range ?? 0))
                {
                    this.consume(X);
                }
            }
            return;
        }