Esempio n. 1
0
        // Function from file: blob.dm
        public void burst_blob(Mind blob = null, bool?warned = null)
        {
            warned = warned ?? false;

            Client  blob_client       = null;
            dynamic location          = null;
            dynamic C                 = null;
            Obj_Effect_Blob_Core core = null;

            blob_client = null;
            location    = null;

            if (blob.current is Mob_Living_Carbon)
            {
                C = blob.current;

                if (Lang13.Bool(GlobalVars.directory[String13.CKey(blob.key)]))
                {
                    blob_client = GlobalVars.directory[String13.CKey(blob.key)];
                    location    = GlobalFuncs.get_turf(C);

                    if (Lang13.Bool(location.z) != true || location is Tile_Space)
                    {
                        if (!(warned == true))
                        {
                            C.WriteMsg("<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place!  You must return to the station!</span>");
                            GlobalFuncs.message_admins("" + GlobalFuncs.key_name(C) + " was in space when the blobs burst, and will die if he doesn't return to the station.");
                            Task13.Schedule(300, (Task13.Closure)(() => {
                                this.burst_blob(blob, true);
                                return;
                            }));
                        }
                        else
                        {
                            this.burst++;
                            GlobalFuncs.log_admin("" + GlobalFuncs.key_name(C) + " was in space when attempting to burst as a blob.");
                            GlobalFuncs.message_admins("" + GlobalFuncs.key_name(C) + " was in space when attempting to burst as a blob.");
                            ((Mob)C).gib();
                            this.make_blobs(1);
                            this.check_finished();
                        }
                    }
                    else if (blob_client != null && Lang13.Bool(location))
                    {
                        this.burst++;
                        ((Mob)C).gib();
                        core = new Obj_Effect_Blob_Core(location, 200, blob_client, this.blob_point_rate);

                        if (core.overmind != null && core.overmind.mind != null)
                        {
                            core.overmind.mind.name = blob.name;
                            this.infected_crew.Remove(blob);
                            this.infected_crew.Add(core.overmind.mind);
                            core.overmind.mind.special_role = "Blob Overmind";
                        }
                    }
                }
            }
            return;
        }
Esempio n. 2
0
        // Function from file: blob.dm
        public override bool start(  )
        {
            dynamic T = null;
            int?    i = null;

            T = Rand13.PickFromTable(GlobalVars.blobstart);

            if (!Lang13.Bool(T))
            {
                this.kill(); return(false);
            }
            this.Blob = new Obj_Effect_Blob_Core(T, 200, null, this.new_rate);
            i         = null;
            i         = 1;

            while ((i ?? 0) < Rand13.Int(3, 6))
            {
                this.Blob.process();
                i++;
            }
            return(false);
        }