// Function from file: facehugger.dm
 public override bool HasProximity(dynamic AM = null)
 {
     if (GlobalFuncs.CanHug(AM) && this.Adjacent(AM))
     {
         return(this.Attach(AM));
     }
     return(false);
 }
Ejemplo n.º 2
0
        // Function from file: aliens.dm
        public void Burst(bool?kill = null)
        {
            kill = kill ?? true;

            dynamic child = null;
            dynamic M     = null;


            if (this.status == 3 || this.status == 2)
            {
                GlobalFuncs.remove_from_proximity_list(this, 1);
                this.icon_state = "egg_hatched";
                Icon13.Flick("egg_opening", this);
                this.status = 1;
                Task13.Schedule(15, (Task13.Closure)(() => {
                    this.status = 0;
                    child       = this.GetFacehugger();

                    if (Lang13.Bool(child))
                    {
                        child.loc = GlobalFuncs.get_turf(this);

                        if (kill == true && child is Obj_Item_Clothing_Mask_Facehugger)
                        {
                            ((Obj_Item_Clothing_Mask_Facehugger)child).Die();
                        }
                        else
                        {
                            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, 1)))
                            {
                                M = _a;


                                if (GlobalFuncs.CanHug(M))
                                {
                                    ((Obj_Item_Clothing_Mask_Facehugger)child).Attach(M);
                                    break;
                                }
                            }
                        }
                    }
                    return;
                }));
            }
            return;
        }
Ejemplo n.º 3
0
        // Function from file: aliens.dm
        public override bool HasProximity(dynamic AM = null)
        {
            dynamic C = null;


            if (this.status == 3)
            {
                if (!GlobalFuncs.CanHug(AM))
                {
                    return(false);
                }
                C = AM;

                if (Lang13.Bool(C.stat) == false && Lang13.Bool(((Mob)C).getorgan(typeof(Obj_Item_Organ_Internal_BodyEgg_AlienEmbryo))))
                {
                    return(false);
                }
                this.Burst(false);
            }
            return(false);
        }