Пример #1
0
        // Function from file: MMI.dm
        public override double examine(dynamic user = null)
        {
            Mob_Living_Carbon_Brain B = null;

            base.examine((object)(user));

            if (this.brainmob != null)
            {
                B = this.brainmob;

                if (!Lang13.Bool(B.key) || !(B.mind != null) || B.stat == 2)
                {
                    user.WriteMsg("<span class='warning'>The MMI indicates the brain is completely unresponsive.</span>");
                }
                else if (!(B.client != null))
                {
                    user.WriteMsg("<span class='warning'>The MMI indicates the brain is currently inactive; it might change.</span>");
                }
                else
                {
                    user.WriteMsg("<span class='notice'>The MMI indicates the brain is active.</span>");
                }
            }
            return(0);
        }
Пример #2
0
 // Function from file: MMI.dm
 public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
 {
     if (!Lang13.Bool(this.brain))
     {
         this.radio.on = !Lang13.Bool(this.radio.on);
         user.WriteMsg("<span class='notice'>You toggle the MMI's radio system " + (this.radio.on == 1 ? "on" : "off") + ".</span>");
     }
     else
     {
         user.WriteMsg("<span class='notice'>You unlock and upend the MMI, spilling the brain onto the floor.</span>");
         this.brainmob.container  = null;
         this.brainmob.loc        = this.brain;
         this.brainmob.stat       = 2;
         this.brainmob.emp_damage = 0;
         this.brainmob.reset_perspective();
         GlobalVars.living_mob_list.Remove(this.brainmob);
         GlobalVars.dead_mob_list.Add(this.brainmob);
         this.brain.brainmob = this.brainmob;
         this.brainmob       = null;
         ((Mob)user).put_in_hands(this.brain);
         this.brain = null;
         this.update_icon();
         this.name = "Man-Machine Interface";
     }
     return(null);
 }
Пример #3
0
        // Function from file: brain_item.dm
        public void transfer_identity(dynamic L = null)
        {
            dynamic C = null;

            this.name                     = "" + L.name + "'s brain";
            this.brainmob                 = new Mob_Living_Carbon_Brain(this);
            this.brainmob.name            = L.real_name;
            this.brainmob.real_name       = L.real_name;
            this.brainmob.timeofhostdeath = L.timeofdeath;

            if (Lang13.Bool(L.has_dna()))
            {
                C = L;

                if (!(this.brainmob.dna != null))
                {
                    this.brainmob.dna = new Dna(this.brainmob);
                }
                ((Dna)C.dna).copy_dna(this.brainmob.dna);
            }

            if (Lang13.Bool(L.mind) && Lang13.Bool(L.mind.current) && Convert.ToInt32(L.mind.current.stat) == 2)
            {
                ((Mind)L.mind).transfer_to(this.brainmob);
            }
            this.brainmob.WriteMsg("<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>");
            return;
        }
Пример #4
0
 // Function from file: brain_item.dm
 public override dynamic Destroy(  )
 {
     if (this.brainmob != null)
     {
         GlobalFuncs.qdel(this.brainmob);
         this.brainmob = null;
     }
     return(base.Destroy());
 }
Пример #5
0
        // Function from file: MMI.dm
        public override dynamic Destroy(  )
        {
            Ent_Static borg = null;


            if (this.loc is Mob_Living_Silicon_Robot)
            {
                borg = this.loc;
                ((dynamic)borg).mmi = null;
            }

            if (this.brainmob != null)
            {
                GlobalFuncs.qdel(this.brainmob);
                this.brainmob = null;
            }
            return(base.Destroy());
        }
Пример #6
0
        // Function from file: MMI.dm
        public virtual void transfer_identity(Mob L = null)
        {
            Mob     C        = null;
            Mob     H        = null;
            dynamic newbrain = null;


            if (!(this.brainmob != null))
            {
                this.brainmob = new Mob_Living_Carbon_Brain(this);
            }
            this.brainmob.name      = L.real_name;
            this.brainmob.real_name = L.real_name;

            if (L.has_dna() != null)
            {
                C = L;

                if (!(this.brainmob.dna != null))
                {
                    this.brainmob.dna = new Dna(this.brainmob);
                }
                ((Dna)((dynamic)C).dna).copy_dna(this.brainmob.dna);
            }
            this.brainmob.container = this;

            if (L is Mob_Living_Carbon_Human)
            {
                H            = L;
                newbrain     = H.getorgan(typeof(Obj_Item_Organ_Internal_Brain));
                newbrain.loc = this;
                this.brain   = newbrain;
            }
            else if (!Lang13.Bool(this.brain))
            {
                this.brain      = new Obj_Item_Organ_Internal_Brain(this);
                this.brain.name = "" + L.real_name + "'s brain";
            }
            this.name = "Man-Machine Interface: " + this.brainmob.real_name;
            this.update_icon();
            return;
        }
Пример #7
0
        // Function from file: MMI.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic newbrain = null;
            Mob     B        = null;

            ((Mob)user).changeNext_move(8);

            if (A is Obj_Item_Organ_Internal_Brain)
            {
                newbrain = A;

                if (Lang13.Bool(this.brain))
                {
                    user.WriteMsg("<span class='warning'>There's already a brain in the MMI!</span>");
                    return(null);
                }

                if (!Lang13.Bool(newbrain.brainmob))
                {
                    user.WriteMsg("<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>");
                    return(null);
                }

                if (!((Mob)user).unEquip(A))
                {
                    return(null);
                }
                B = newbrain.brainmob;

                if (!Lang13.Bool(B.key))
                {
                    B.notify_ghost_cloning("Someone has put your brain in a MMI!", null, this);
                }
                this.visible_message(new Txt().item(user).str(" sticks ").a(newbrain).item().str(" into ").the(this).item().str(".").ToString());
                this.brainmob           = newbrain.brainmob;
                newbrain.brainmob       = null;
                this.brainmob.loc       = this;
                this.brainmob.container = this;

                if (!newbrain.damaged_brain)
                {
                    this.brainmob.stat = 0;
                    GlobalVars.dead_mob_list.Remove(this.brainmob);
                    GlobalVars.living_mob_list.Add(this.brainmob);
                }
                this.brainmob.reset_perspective();
                newbrain.loc = this;
                this.brain   = newbrain;
                this.name    = "Man-Machine Interface: " + this.brainmob.real_name;
                this.update_icon();
                GlobalFuncs.feedback_inc("cyborg_mmis_filled", 1);
                return(null);
            }
            else if (this.brainmob != null)
            {
                ((Obj_Item)A).attack(this.brainmob, user);
                return(null);
            }
            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            return(null);
        }