Ejemplo n.º 1
0
        public void toggle_ghost_med_sec_diag_hud(  )
        {
            AtomHud H = null;


            if (this.data_hud_seen != 0)
            {
                H = GlobalVars.huds[this.data_hud_seen];
                H.remove_hud_from(this);
            }

            switch ((int)(this.data_hud_seen))
            {
            case 0:
                this.show_me_the_hud(1);
                this.WriteMsg("<span class='notice'>Security HUD set.</span>");
                break;

            case 1:
                this.show_me_the_hud(4);
                this.WriteMsg("<span class='notice'>Medical HUD set.</span>");
                break;

            case 4:
                this.show_me_the_hud(5);
                this.WriteMsg("<span class='notice'>Diagnostic HUD set.</span>");
                break;

            case 5:
                this.data_hud_seen = 0;
                this.WriteMsg("<span class='notice'>HUDs disabled.</span>");
                break;
            }
            return;
        }
Ejemplo n.º 2
0
        // Function from file: observer.dm
        public void show_me_the_hud(int hud_index = 0)
        {
            AtomHud H = null;

            H = GlobalVars.huds[hud_index];
            H.add_hud_to(this);
            this.data_hud_seen = hud_index;
            return;
        }
        // Function from file: guardian.dm
        public Mob_Living_SimpleAnimal_Hostile_Guardian_Healer(dynamic loc = null) : base((object)(loc))
        {
            AtomHud medsensor = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            medsensor = GlobalVars.huds[4];
            medsensor.add_hud_to(this);
            return;
        }
        // Function from file: hud.dm
        public override void equipped(Mob user = null, dynamic slot = null)
        {
            AtomHud H = null;


            if (Lang13.Bool(this.hud_type) && slot == 9)
            {
                H = GlobalVars.huds[this.hud_type];
                H.add_hud_to(user);
            }
            return;
        }
        // Function from file: hud.dm
        public override bool dropped(dynamic user = null)
        {
            AtomHud H = null;


            if (Lang13.Bool(this.hud_type) && user is Mob_Living_Carbon_Human && user.glasses == this)
            {
                H = GlobalVars.huds[this.hud_type];
                H.remove_hud_from(user);
            }
            return(false);
        }
Ejemplo n.º 6
0
        // Function from file: hardsuit.dm
        public override bool dropped(dynamic user = null)
        {
            AtomHud DHUD = null;

            base.dropped((object)(user));
            user.scanner.devices = Num13.MaxInt(0, Convert.ToInt32(user.scanner.devices - 1));

            if (this.onboard_hud_enabled && !(Lang13.Bool(user.glasses) && user.glasses is Obj_Item_Clothing_Glasses_Hud_Diagnostic))
            {
                DHUD = GlobalVars.huds[5];
                DHUD.remove_hud_from(user);
            }
            return(false);
        }
Ejemplo n.º 7
0
        // Function from file: odysseus.dm
        public override void go_out(bool?forced = null, Ent_Static newloc = null)
        {
            Ent_Static H = null;
            AtomHud    A = null;


            if (this.occupant is Mob_Living_Carbon_Human && this.builtin_hud_user)
            {
                H = this.occupant;
                A = GlobalVars.huds[4];
                A.remove_hud_from(H);
            }
            base.go_out(forced, newloc);
            return;
        }
Ejemplo n.º 8
0
        // Function from file: augments_eyes.dm
        public override void Insert(dynamic M = null, int?special = null)
        {
            special = special ?? 0;

            AtomHud H = null;

            base.Insert((object)(M), special);

            if (this.HUD_type != 0)
            {
                H = GlobalVars.huds[this.HUD_type];
                H.add_hud_to(M);
                M.permanent_huds.Or(H);
            }
            return;
        }
Ejemplo n.º 9
0
        // Function from file: augments_eyes.dm
        public override void Remove(dynamic M = null, bool?special = null)
        {
            special = special ?? false;

            AtomHud H = null;


            if (this.HUD_type != 0)
            {
                H = GlobalVars.huds[this.HUD_type];
                M.permanent_huds.Xor(H);
                H.remove_hud_from(M);
            }
            base.Remove((object)(M), special);
            return;
        }
        // Function from file: ed209bot.dm
        public Mob_Living_SimpleAnimal_Bot_Ed209(dynamic loc = null, string created_name = null, string created_lasercolor = null) : base((object)(loc))
        {
            Job_Detective J         = null;
            AtomHud       secsensor = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;

            if (Lang13.Bool(created_name))
            {
                this.name = created_name;
            }

            if (Lang13.Bool(created_lasercolor))
            {
                this.lasercolor = created_lasercolor;
            }
            this.icon_state = "" + this.lasercolor + "ed209" + this.on;
            this.set_weapon();
            Task13.Schedule(3, (Task13.Closure)(() => {
                J = new Job_Detective();
                this.access_card.access += J.get_access();
                this.prev_access         = this.access_card.access;

                if (Lang13.Bool(this.lasercolor))
                {
                    this.shot_delay          = 6;
                    this.check_records       = false;
                    this.arrest_type         = true;
                    this.bot_core.req_access = new ByTable(new object [] { GlobalVars.access_maint_tunnels, GlobalVars.access_theatre });
                    this.arrest_type         = true;

                    if (this.lasercolor == "b" && this.name == "ÿED-209 Security Robot")
                    {
                        this.name = Rand13.Pick(new object [] { "BLUE BALLER", "SANIC", "BLUE KILLDEATH MURDERBOT" });
                    }

                    if (this.lasercolor == "r" && this.name == "ÿED-209 Security Robot")
                    {
                        this.name = Rand13.Pick(new object [] { "RED RAMPAGE", "RED ROVER", "RED KILLDEATH MURDERBOT" });
                    }
                }
                return;
            }));
            secsensor = GlobalVars.huds[2];
            secsensor.add_hud_to(this);
            return;
        }
Ejemplo n.º 11
0
        // Function from file: secbot.dm
        public Mob_Living_SimpleAnimal_Bot_Secbot(dynamic loc = null) : base((object)(loc))
        {
            Job_Detective J         = null;
            AtomHud       secsensor = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.icon_state = "secbot" + this.on;
            Task13.Schedule(3, (Task13.Closure)(() => {
                J = new Job_Detective();
                this.access_card.access += J.get_access();
                this.prev_access         = this.access_card.access;
                return;
            }));
            secsensor = GlobalVars.huds[2];
            secsensor.add_hud_to(this);
            return;
        }
        // Function from file: hud.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            dynamic wearer = null;
            AtomHud H      = null;
            AtomHud H2     = null;


            if (!(user is Mob_Living_Carbon_Human))
            {
                return(null);
            }
            wearer = user;

            if (wearer.glasses != this)
            {
                return(null);
            }

            if (Lang13.Bool(this.hud_type))
            {
                H = GlobalVars.huds[this.hud_type];
                H.remove_hud_from(user);
            }

            if (this.hud_type == 4)
            {
                this.hud_type = null;
            }
            else if (this.hud_type == 2)
            {
                this.hud_type = 4;
            }
            else
            {
                this.hud_type = 2;
            }

            if (Lang13.Bool(this.hud_type))
            {
                H2 = GlobalVars.huds[this.hud_type];
                H2.add_hud_to(user);
            }
            return(null);
        }
Ejemplo n.º 13
0
        // Function from file: hardsuit.dm
        public override void equipped(Mob user = null, dynamic slot = null)
        {
            AtomHud DHUD = null;

            base.equipped(user, (object)(slot));
            user.scanner.Grant(user);
            user.scanner.devices += 1;

            if (Lang13.Bool(((dynamic)user).glasses) && ((dynamic)user).glasses is Obj_Item_Clothing_Glasses_Hud_Diagnostic)
            {
                user.WriteMsg("<span class='warning'>Your " + ((dynamic)user).glasses + " prevents you using " + this + "'s diagnostic visor HUD.</span>");
            }
            else
            {
                this.onboard_hud_enabled = true;
                DHUD = GlobalVars.huds[5];
                DHUD.add_hud_to(user);
            }
            return;
        }
Ejemplo n.º 14
0
        // Function from file: medbot.dm
        public Mob_Living_SimpleAnimal_Bot_Medbot(dynamic loc = null) : base((object)(loc))
        {
            Job_Doctor J         = null;
            AtomHud    medsensor = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.update_icon();
            Task13.Schedule(4, (Task13.Closure)(() => {
                if (Lang13.Bool(this.skin))
                {
                    this.overlays.Add(new Image("icons/obj/aibots.dmi", "medskin_" + this.skin));
                }
                J = new Job_Doctor();
                this.access_card.access += J.get_access();
                this.prev_access         = this.access_card.access;
                return;
            }));
            medsensor = GlobalVars.huds[4];
            medsensor.add_hud_to(this);
            return;
        }
Ejemplo n.º 15
0
        // Function from file: odysseus.dm
        public override bool moved_inside(Mob H = null)
        {
            AtomHud A = null;


            if (base.moved_inside(H))
            {
                if (Lang13.Bool(((dynamic)H).glasses) && ((dynamic)H).glasses is Obj_Item_Clothing_Glasses_Hud)
                {
                    this.occupant_message("<span class='warning'>Your " + ((dynamic)H).glasses + " prevent you from using the built-in medical hud.</span>");
                }
                else
                {
                    A = GlobalVars.huds[4];
                    A.add_hud_to(H);
                    this.builtin_hud_user = true;
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }