Exemple #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;
        }
        // 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);
        }
Exemple #3
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);
        }
Exemple #4
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;
        }
Exemple #5
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: 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);
        }