Exemplo n.º 1
0
        // Function from file: particle_control.dm
        public override bool update_state(  )
        {
            Obj_Structure_ParticleAccelerator part = null;


            if (this.construction_state < 3)
            {
                this.use_power = 0;
                this.assembled = false;
                this.active    = false;

                foreach (dynamic _a in Lang13.Enumerate(this.connected_parts, typeof(Obj_Structure_ParticleAccelerator)))
                {
                    part = _a;

                    part.strength = null;
                    part.powered  = false;
                    part.update_icon();
                }
                this.connected_parts = new ByTable();
                return(false);
            }

            if (!this.part_scan())
            {
                this.use_power       = 1;
                this.active          = false;
                this.connected_parts = new ByTable();
            }
            return(false);
        }
Exemplo n.º 2
0
        // Function from file: particle_control.dm
        public void strength_change(  )
        {
            Obj_Structure_ParticleAccelerator part = null;


            foreach (dynamic _a in Lang13.Enumerate(this.connected_parts, typeof(Obj_Structure_ParticleAccelerator)))
            {
                part = _a;

                part.strength = this.strength;
                part.update_icon();
            }
            return;
        }
Exemplo n.º 3
0
        // Function from file: particle_control.dm
        public bool toggle_power(  )
        {
            Obj_Structure_ParticleAccelerator part  = null;
            Obj_Structure_ParticleAccelerator part2 = null;

            this.active = !this.active;
            this.investigate_log("turned " + (this.active ? "<font color='red'>ON</font>" : "<font color='green'>OFF</font>") + " by " + (Task13.User != null ? GlobalFuncs.key_name(Task13.User) : "outside forces"), "singulo");
            GlobalFuncs.message_admins(new Txt("PA Control Computer turned ").item((this.active ? "ON" : "OFF")).str(" by ").item((Task13.User != null ? GlobalFuncs.key_name_admin(Task13.User) : "outside forces")).str("(<A HREF='?_src_=holder;adminmoreinfo=").Ref(Task13.User).str("'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=").Ref(Task13.User).str("'>FLW</A>) in (").item(this.x).str(",").item(this.y).str(",").item(this.z).str(" - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=").item(this.x).str(";Y=").item(this.y).str(";Z=").item(this.z).str("'>JMP</a>)").ToString());
            GlobalFuncs.log_game("PA Control Computer turned " + (this.active ? "ON" : "OFF") + " by " + (Task13.User != null ? "" + GlobalFuncs.key_name(Task13.User) : "outside forces") + " in (" + this.x + "," + this.y + "," + this.z + ")");

            if (this.active)
            {
                this.use_power = 2;

                foreach (dynamic _a in Lang13.Enumerate(this.connected_parts, typeof(Obj_Structure_ParticleAccelerator)))
                {
                    part = _a;

                    part.strength = this.strength;
                    part.powered  = true;
                    part.update_icon();
                }
            }
            else
            {
                this.use_power = 1;

                foreach (dynamic _b in Lang13.Enumerate(this.connected_parts, typeof(Obj_Structure_ParticleAccelerator)))
                {
                    part2 = _b;

                    part2.strength = null;
                    part2.powered  = false;
                    part2.update_icon();
                }
            }
            return(true);
        }