Exemplo n.º 1
0
        // Function from file: access_controller.dm
        public void cycleClose(Obj_Machinery_Door_Airlock A = null)
        {
            if (!(A != null) || !(this.exteriorAirlock != null) || !(this.interiorAirlock != null))
            {
                return;
            }

            if (this.exteriorAirlock.density == this.interiorAirlock.density || !A.density)
            {
                return;
            }
            this.busy = 3;
            this.update_icon();

            if (A == this.interiorAirlock)
            {
                if (this.closeDoor(this.exteriorAirlock))
                {
                    this.busy = 5;
                }
            }
            else if (this.closeDoor(this.interiorAirlock))
            {
                this.busy = 4;
            }
            return;
        }
Exemplo n.º 2
0
        // Function from file: laborstacker.dm
        public Obj_Machinery_Mineral_LaborClaimConsole(dynamic loc = null) : base((object)(loc))
        {
            string t = null;
            Obj_Machinery_Door_Airlock d = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.Radio           = new Obj_Item_Device_Radio(this);
            this.Radio.listening = false;
            Task13.Schedule(7, (Task13.Closure)(() => {
                this.machine = Lang13.FindIn(typeof(Obj_Machinery_Mineral_StackingMachine), Map13.GetStep(this, this.machinedir));

                foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, 5), typeof(Obj_Machinery_Door_Airlock)))
                {
                    d = _a;

                    t = d.id_tag;

                    if (t == this.door_tag)
                    {
                        this.release_door = d;
                    }
                }

                if (Lang13.Bool(this.machine) && this.release_door != null)
                {
                    this.machine.CONSOLE = this;
                }
                else
                {
                    GlobalFuncs.qdel(this);
                }
                return;
            }));
            return;
        }
Exemplo n.º 3
0
        // Function from file: access_controller.dm
        public void cycleOpen(Obj_Machinery_Door_Airlock A = null)
        {
            if (!(A != null))
            {
                this.goIdle(true);
            }

            if (A == this.exteriorAirlock)
            {
                if (this.interiorAirlock != null)
                {
                    if (!this.interiorAirlock.density || !this.interiorAirlock.locked)
                    {
                        return;
                    }
                }
            }
            else if (this.exteriorAirlock != null)
            {
                if (!this.exteriorAirlock.density || !this.exteriorAirlock.locked)
                {
                    return;
                }
            }

            if (this.busy != 2)
            {
                this.busy = 2;
                this.openDoor(A);
            }
            return;
        }
Exemplo n.º 4
0
        // Function from file: access_controller.dm
        public override void findObjsByTag(  )
        {
            Obj_Machinery_DoorButtons_AirlockController A = null;
            Obj_Machinery_Door_Airlock I = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_DoorButtons_AirlockController)))
            {
                A = _a;


                if (A.idSelf == this.idSelf)
                {
                    this.controller = A;
                    break;
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Door_Airlock)))
            {
                I = _b;


                if (I.id_tag == this.idDoor)
                {
                    this.door = I;
                    break;
                }
            }
            return;
        }
Exemplo n.º 5
0
        // Function from file: areas.dm
        public void burglaralert(Obj trigger = null)
        {
            ByTable cameras = null;
            dynamic RA      = null;
            Obj_Machinery_Door_Airlock DOOR    = null;
            Obj_Machinery_Camera       C       = null;
            Mob_Living_Silicon         SILICON = null;


            if (this.always_unpowered)
            {
                return;
            }
            cameras = new ByTable();

            foreach (dynamic _c in Lang13.Enumerate(this.related))
            {
                RA = _c;

                ((Zone)RA).set_fire_alarm_effect();

                foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door_Airlock)))
                {
                    DOOR = _a;

                    Task13.Schedule(0, (Task13.Closure)(() => {
                        DOOR.close();

                        if (DOOR.density)
                        {
                            DOOR.locked = true;
                            DOOR.update_icon();
                        }
                        return;
                    }));
                }

                foreach (dynamic _b in Lang13.Enumerate(RA, typeof(Obj_Machinery_Camera)))
                {
                    C = _b;

                    cameras.Add(C);
                }
            }

            foreach (dynamic _d in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon)))
            {
                SILICON = _d;


                if (SILICON.triggerAlarm("Burglar", this, cameras, trigger))
                {
                    Task13.Schedule(600, (Task13.Closure)(() => {
                        SILICON.cancelAlarm("Burglar", this, trigger);
                        return;
                    }));
                }
            }
            return;
        }
Exemplo n.º 6
0
 // Function from file: access_controller.dm
 public override void removeMe(Obj_Machinery_Door_Airlock O = null)
 {
     if (O == this.door)
     {
         this.door = null;
     }
     return;
 }
Exemplo n.º 7
0
 // Function from file: access_controller.dm
 public void onlyClose(Obj_Machinery_Door_Airlock A = null)
 {
     if (A != null)
     {
         this.busy = 1;
         this.closeDoor(A);
     }
     return;
 }
Exemplo n.º 8
0
 // Function from file: access_controller.dm
 public void onlyOpen(Obj_Machinery_Door_Airlock A = null)
 {
     if (A != null)
     {
         this.busy = 1;
         this.update_icon();
         this.openDoor(A);
     }
     return;
 }
        // Function from file: doorcontrol.dm
        public override bool activate(  )
        {
            Obj_Machinery_Door_Airlock D = null;

            this.cooldown = 1;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.airlocks, typeof(Obj_Machinery_Door_Airlock)))
            {
                D = _a;


                if (D.id_tag == this.id)
                {
                    if ((this.specialfunctions & 1) != 0)
                    {
                        if (D.density)
                        {
                            D.open();
                        }
                        else
                        {
                            D.close();
                        }
                    }

                    if ((this.specialfunctions & 2) != 0)
                    {
                        D.aiDisabledIdScanner = !D.aiDisabledIdScanner;
                    }

                    if ((this.specialfunctions & 4) != 0)
                    {
                        if (!((Wires)D.wires).is_cut("bolts") && D.hasPower())
                        {
                            D.locked = !D.locked;
                            D.update_icon();
                        }
                    }

                    if ((this.specialfunctions & 8) != 0)
                    {
                        D.secondsElectrified = (D.secondsElectrified != 0 ? 0 : -1);
                    }

                    if ((this.specialfunctions & 16) != 0)
                    {
                        D.safe = !D.safe;
                    }
                }
            }
            Task13.Sleep(10);
            this.cooldown = 0;
            return(false);
        }
Exemplo n.º 10
0
 // Function from file: access_controller.dm
 public override void removeMe(Obj_Machinery_Door_Airlock O = null)
 {
     if (O == this.interiorAirlock)
     {
         this.interiorAirlock = null;
     }
     else if (O == this.exteriorAirlock)
     {
         this.exteriorAirlock = null;
     }
     return;
 }
        // Function from file: Hallucination.dm
        public Obj_Effect_Hallucination_Bolts(dynamic loc = null, Mob_Living_Carbon T = null, int?door_number = null) : base((object)(loc))
        {
            door_number = door_number ?? -1;

            Image I     = null;
            int?  count = null;
            Obj_Machinery_Door_Airlock A = null;
            Image B = null;

            this.target = T;
            I           = null;
            count       = 0;

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this.target, 7), typeof(Obj_Machinery_Door_Airlock)))
            {
                A = _a;


                if ((count ?? 0) > (door_number ?? 0) && (door_number ?? 0) > 0)
                {
                    break;
                }
                count++;
                I = new Image(A.icon, A, "door_locked", A.layer + 0.1);
                this.doors.Add(I);

                if (Lang13.Bool(((dynamic)this.target).client))
                {
                    ((dynamic)this.target).client.images.Or(I);
                }
                Task13.Sleep(2);
            }
            Task13.Sleep(100);

            foreach (dynamic _b in Lang13.Enumerate(this.doors, typeof(Image)))
            {
                B = _b;


                if (Lang13.Bool(((dynamic)this.target).client))
                {
                    ((dynamic)this.target).client.images.Remove(B);
                }
            }
            GlobalFuncs.qdel(this);
            return;
        }
Exemplo n.º 12
0
        // Function from file: access_controller.dm
        public override void findObjsByTag(  )
        {
            Obj_Machinery_Door_Airlock A = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Door_Airlock)))
            {
                A = _a;


                if (A.id_tag == this.idInterior)
                {
                    this.interiorAirlock = A;
                }
                else if (A.id_tag == this.idExterior)
                {
                    this.exteriorAirlock = A;
                }
            }
            return;
        }
Exemplo n.º 13
0
 // Function from file: access_controller.dm
 public virtual void removeMe(Obj_Machinery_Door_Airlock O = null)
 {
     return;
 }
        public override bool f_action(dynamic target = null)
        {
            dynamic W  = null;
            dynamic F  = null;
            dynamic S  = null;
            dynamic F2 = null;
            Obj_Machinery_Door_Airlock T = null;


            if (target is Tile_Space_Transit)
            {
                return(false);
            }

            if (!(target is Tile) && !(target is Obj_Machinery_Door_Airlock))
            {
                target = GlobalFuncs.get_turf(target);
            }

            if (!this.action_checks(target) || Map13.GetDistance(this.chassis, target) > 3)
            {
                return(false);
            }
            GlobalFuncs.playsound(this.chassis, "sound/machines/click.ogg", 50, 1);

            switch ((int?)(this.mode))
            {
            case 0:

                if (target is Tile_Simulated_Wall)
                {
                    W = target;
                    this.occupant_message("Deconstructing " + W + "...");

                    if (this.do_after_cooldown(W))
                    {
                        this.chassis.spark_system.start();
                        ((Tile)W).ChangeTurf(typeof(Tile_Simulated_Floor_Plating));
                        GlobalFuncs.playsound(W, "sound/items/Deconstruct.ogg", 50, 1);
                    }
                }
                else if (target is Tile_Simulated_Floor)
                {
                    F = target;
                    this.occupant_message("Deconstructing " + F + "...");

                    if (this.do_after_cooldown(target))
                    {
                        this.chassis.spark_system.start();
                        ((Tile)F).ChangeTurf(F.baseturf);
                        GlobalFuncs.playsound(F, "sound/items/Deconstruct.ogg", 50, 1);
                    }
                }
                else if (target is Obj_Machinery_Door_Airlock)
                {
                    this.occupant_message("Deconstructing " + target + "...");

                    if (this.do_after_cooldown(target))
                    {
                        this.chassis.spark_system.start();
                        GlobalFuncs.qdel(target);
                        GlobalFuncs.playsound(target, "sound/items/Deconstruct.ogg", 50, 1);
                    }
                }
                break;

            case 1:

                if (target is Tile_Space)
                {
                    S = target;
                    this.occupant_message("Building Floor...");

                    if (this.do_after_cooldown(S))
                    {
                        ((Tile)S).ChangeTurf(typeof(Tile_Simulated_Floor_Plating));
                        GlobalFuncs.playsound(S, "sound/items/Deconstruct.ogg", 50, 1);
                        this.chassis.spark_system.start();
                    }
                }
                else if (target is Tile_Simulated_Floor)
                {
                    F2 = target;
                    this.occupant_message("Building Wall...");

                    if (this.do_after_cooldown(F2))
                    {
                        ((Tile)F2).ChangeTurf(typeof(Tile_Simulated_Wall));
                        GlobalFuncs.playsound(F2, "sound/items/Deconstruct.ogg", 50, 1);
                        this.chassis.spark_system.start();
                    }
                }
                break;

            case 2:

                if (target is Tile_Simulated_Floor)
                {
                    this.occupant_message("Building Airlock...");

                    if (this.do_after_cooldown(target))
                    {
                        this.chassis.spark_system.start();
                        T           = new Obj_Machinery_Door_Airlock(target);
                        T.autoclose = true;
                        GlobalFuncs.playsound(target, "sound/items/Deconstruct.ogg", 50, 1);
                        GlobalFuncs.playsound(target, "sound/effects/sparks2.ogg", 50, 1);
                    }
                }
                break;
            }
            return(false);
        }