Exemple #1
0
        // Function from file: robot.dm
        public Hud_Robot(Mob_Living_Silicon_Robot owner = null) : base(owner)
        {
            Mob        mymobR = null;
            Obj_Screen _using = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            mymobR            = this.mymob;
            _using            = new Obj_Screen_Robot_Radio();
            _using.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Robot_Module1();
            _using.screen_loc = "CENTER-2:16,SOUTH:5";
            this.static_inventory.Add(_using);
            ((dynamic)mymobR).inv1 = _using;
            _using            = new Obj_Screen_Robot_Module2();
            _using.screen_loc = "CENTER-1  :16,SOUTH:5";
            this.static_inventory.Add(_using);
            ((dynamic)mymobR).inv2 = _using;
            _using            = new Obj_Screen_Robot_Module3();
            _using.screen_loc = "CENTER  :16,SOUTH:5";
            this.static_inventory.Add(_using);
            ((dynamic)mymobR).inv3 = _using;
            _using            = new Obj_Screen_Ai_ImageTake();
            _using.screen_loc = "CENTER+3:21,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Ai_ImageView();
            _using.screen_loc = "CENTER+4:21,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Ai_Sensors();
            _using.screen_loc = "CENTER-3:16, SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Robot_Lamp();
            _using.screen_loc = "CENTER-4:16, SOUTH:5";
            this.static_inventory.Add(_using);
            ((dynamic)mymobR).lamp_button = _using;
            _using            = new Obj_Screen_Robot_Thrusters();
            _using.screen_loc = "CENTER-5:16, SOUTH:5";
            this.static_inventory.Add(_using);
            ((dynamic)mymobR).thruster_button = _using;
            _using            = new Obj_Screen_ActIntent_Robot();
            _using.icon_state = this.mymob.a_intent;
            this.static_inventory.Add(_using);
            this.action_intent = _using;
            this.healths       = new Obj_Screen_Healths_Robot();
            this.infodisplay.Add(this.healths);
            this.mymob.hands            = new Obj_Screen_Robot_Module();
            this.mymob.hands.screen_loc = "CENTER+1:16,SOUTH:5";
            this.static_inventory.Add(this.mymob.hands);
            this.module_store_icon            = new Obj_Screen_Robot_Store();
            this.module_store_icon.screen_loc = "CENTER+2:16,SOUTH:5";
            this.pull_icon      = new Obj_Screen_Pull();
            this.pull_icon.icon = "icons/mob/screen_cyborg.dmi";
            this.pull_icon.update_icon(this.mymob);
            this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.hotkeybuttons.Add(this.pull_icon);
            this.zone_select = new Obj_Screen_ZoneSel_Robot();
            this.zone_select.update_icon(this.mymob);
            this.static_inventory.Add(this.zone_select);
            return;
        }
Exemple #2
0
        // Function from file: tooltip.dm
        public bool show(Obj_Screen thing = null, string _params = null, string title = null, string content = null, string theme = null, string special = null)
        {
            theme   = theme ?? "default";
            special = special ?? "none";


            if (!(thing != null) || !Lang13.Bool(_params) || !Lang13.Bool(title) && !Lang13.Bool(content) || !(this.owner != null) || !Lang13.Bool(Lang13.IsNumber(Game13.icon_size)))
            {
                return(false);
            }

            if (!this.init)
            {
                this.init = true;
                Interface13.Output(this.owner, String13.MakeUrlParams(new ByTable(new object [] { Game13.icon_size, this.control })), "" + this.control + ":tooltip.init");
            }
            this.showing = true;

            if (Lang13.Bool(title) && Lang13.Bool(content))
            {
                title   = "<h1>" + title + "</h1>";
                content = "<p>" + content + "</p>";
            }
            else if (Lang13.Bool(title) && !Lang13.Bool(content))
            {
                title = "<p>" + title + "</p>";
            }
            else if (!Lang13.Bool(title) && Lang13.Bool(content))
            {
                content = "<p>" + content + "</p>";
            }
            _params = "{ \"cursor\": \"" + _params + "\", \"screenLoc\": \"" + thing.screen_loc + "\" }";
            Interface13.Output(this.owner, String13.MakeUrlParams(new ByTable(new object [] { _params, this.owner.view, "" + title + content, theme, special })), "" + this.control + ":tooltip.update");
            this.showing = false;

            if (this.queueHide)
            {
                this.hide();
            }
            return(true);
        }
Exemple #3
0
        // Function from file: hud.dm
        public override dynamic Destroy(  )
        {
            dynamic thing  = null;
            dynamic thing2 = null;
            dynamic thing3 = null;
            dynamic thing4 = null;
            dynamic thing5 = null;


            if (this.mymob.hud_used == this)
            {
                this.mymob.hud_used = null;
            }
            GlobalFuncs.qdel(this.hide_actions_toggle);
            this.hide_actions_toggle = null;
            GlobalFuncs.qdel(this.module_store_icon);
            this.module_store_icon = null;

            if (this.static_inventory.len != 0)
            {
                foreach (dynamic _a in Lang13.Enumerate(this.static_inventory))
                {
                    thing = _a;

                    GlobalFuncs.qdel(thing);
                }
                this.static_inventory.Cut();
            }
            this.r_hand_hud_object = null;
            this.l_hand_hud_object = null;
            this.action_intent     = null;
            this.zone_select       = null;
            this.pull_icon         = null;

            if (this.toggleable_inventory.len != 0)
            {
                foreach (dynamic _b in Lang13.Enumerate(this.toggleable_inventory))
                {
                    thing2 = _b;

                    GlobalFuncs.qdel(thing2);
                }
                this.toggleable_inventory.Cut();
            }

            if (this.hotkeybuttons.len != 0)
            {
                foreach (dynamic _c in Lang13.Enumerate(this.hotkeybuttons))
                {
                    thing3 = _c;

                    GlobalFuncs.qdel(thing3);
                }
                this.hotkeybuttons.Cut();
            }
            this.throw_icon = null;

            if (this.infodisplay.len != 0)
            {
                foreach (dynamic _d in Lang13.Enumerate(this.infodisplay))
                {
                    thing4 = _d;

                    GlobalFuncs.qdel(thing4);
                }
                this.infodisplay.Cut();
            }
            this.healths                = null;
            this.healthdoll             = null;
            this.internals              = null;
            this.lingchemdisplay        = null;
            this.lingstingdisplay       = null;
            this.blobpwrdisplay         = null;
            this.alien_plasma_display   = null;
            this.deity_power_display    = null;
            this.deity_follower_display = null;
            this.nightvisionicon        = null;

            if (this.screenoverlays.len != 0)
            {
                foreach (dynamic _e in Lang13.Enumerate(this.screenoverlays))
                {
                    thing5 = _e;

                    GlobalFuncs.qdel(thing5);
                }
                this.screenoverlays.Cut();
            }
            this.mymob = null;
            return(base.Destroy());
        }
Exemple #4
0
        // Function from file: monkey.dm
        public Hud_Monkey(Mob_Living_Carbon_Monkey owner = null, string ui_style = null) : base(owner)
        {
            ui_style = ui_style ?? "icons/mob/screen_midnight.dmi";

            Obj_Screen           _using  = null;
            Obj_Screen_Inventory inv_box = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            _using            = new Obj_Screen_ActIntent();
            _using.icon       = ui_style;
            _using.icon_state = this.mymob.a_intent;
            _using.screen_loc = "EAST-3:24,SOUTH:5";
            this.static_inventory.Add(_using);
            this.action_intent = _using;
            _using             = new Obj_Screen_MovIntent();
            _using.icon        = ui_style;
            _using.icon_state  = (this.mymob.m_intent == "run" ? "running" : "walking");
            _using.screen_loc  = "EAST-2:26,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Drop();
            _using.icon       = ui_style;
            _using.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.static_inventory.Add(_using);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "r_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_r_inactive";

            if (this.mymob != null && !this.mymob.hand)
            {
                inv_box.icon_state = "hand_r_active";
            }
            inv_box.screen_loc     = "CENTER:-16,SOUTH:5";
            inv_box.slot_id        = 5;
            inv_box.layer          = 19;
            this.r_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "markus"));
            }
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "l_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_l_inactive";

            if (this.mymob != null && this.mymob.hand)
            {
                inv_box.icon_state = "hand_l_active";
            }
            inv_box.screen_loc     = "CENTER: 16,SOUTH:5";
            inv_box.slot_id        = 4;
            inv_box.layer          = 19;
            this.l_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "gabrielle"));
            }
            this.static_inventory.Add(inv_box);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_1_m";
            _using.screen_loc = "CENTER:-16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_2";
            _using.screen_loc = "CENTER: 16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "mask";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "mask";
            inv_box.screen_loc = "CENTER-3:14,SOUTH:5";
            inv_box.slot_id    = 2;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "head";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "head";
            inv_box.screen_loc = "CENTER-4:13,SOUTH:5";
            inv_box.slot_id    = 11;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "back";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "back";
            inv_box.screen_loc = "CENTER-2:14,SOUTH:5";
            inv_box.slot_id    = 1;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            this.throw_icon            = new Obj_Screen_ThrowCatch();
            this.throw_icon.icon       = ui_style;
            this.throw_icon.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.hotkeybuttons.Add(this.throw_icon);
            this.internals = new Obj_Screen_Internals();
            this.infodisplay.Add(this.internals);
            this.healths = new Obj_Screen_Healths();
            this.infodisplay.Add(this.healths);
            this.pull_icon      = new Obj_Screen_Pull();
            this.pull_icon.icon = ui_style;
            this.pull_icon.update_icon(this.mymob);
            this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.static_inventory.Add(this.pull_icon);
            this.lingchemdisplay = new Obj_Screen_Ling_Chems();
            this.infodisplay.Add(this.lingchemdisplay);
            this.lingstingdisplay = new Obj_Screen_Ling_Sting();
            this.infodisplay.Add(this.lingstingdisplay);
            this.zone_select      = new Obj_Screen_ZoneSel();
            this.zone_select.icon = ui_style;
            this.zone_select.update_icon(this.mymob);
            this.static_inventory.Add(this.zone_select);
            this.mymob.client.screen = new ByTable();
            _using            = new Obj_Screen_Resist();
            _using.icon       = ui_style;
            _using.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.hotkeybuttons.Add(_using);
            return;
        }
Exemple #5
0
        // Function from file: ticker.dm
        public void station_explosion_cinematic(dynamic station_missed = null, dynamic _override = null)
        {
            station_missed = station_missed ?? 0;

            HtmlInterface     hi          = null;
            Obj_Structure_Bed temp_buckle = null;
            dynamic           M           = null;
            dynamic           M2          = null;
            dynamic           T           = null;


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

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.html_interfaces, typeof(HtmlInterface)))
            {
                hi = _a;

                hi.closeAll();
            }
            this.cinematic = new Obj_Screen(this)
            {
                icon          = "icons/effects/station_explosion.dmi",
                icon_state    = "station_intact",
                layer         = 20,
                mouse_opacity = 0,
                screen_loc    = "1,0"
            };
            temp_buckle = new Obj_Structure_Bed(this);

            if (Lang13.Bool(station_missed))
            {
                foreach (dynamic _b in Lang13.Enumerate(GlobalVars.mob_list))
                {
                    M = _b;

                    M.buckled = temp_buckle;

                    if (Lang13.Bool(M.client))
                    {
                        M.client.screen += this.cinematic;
                    }
                }
            }
            else
            {
                foreach (dynamic _c in Lang13.Enumerate(GlobalVars.mob_list))
                {
                    M2 = _c;

                    M2.buckled = temp_buckle;

                    if (Lang13.Bool(M2.client))
                    {
                        M2.client.screen += this.cinematic;
                    }

                    if (Convert.ToInt32(M2.stat) != 2)
                    {
                        T = GlobalFuncs.get_turf(M2);

                        if (Lang13.Bool(T) && Lang13.Bool(T.z) == true)
                        {
                            ((Mob)M2).death(false);
                        }
                    }
                }
            }

            dynamic _f = station_missed;             // Was a switch-case, sorry for the mess.

            if (_f == 1)
            {
                if (Lang13.Bool(this.mode) && !Lang13.Bool(_override))
                {
                    _override = this.mode.name;
                }

                dynamic _d = _override;                 // Was a switch-case, sorry for the mess.
                if (_d == "nuclear emergency")
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                    Icon13.Flick("station_intact_fade_red", this.cinematic);
                    this.cinematic.icon_state = "summary_nukefail";
                }
                else if (_d == "gang war")
                {
                    this.cinematic.icon_state = "intro_malf_still";
                    Icon13.Flick("intro_malf", this.cinematic);
                    Task13.Sleep(70);
                }
                else if (_d == "fake")
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Game13.WriteMsg(new Sound("sound/items/bikehorn.ogg"));
                    Icon13.Flick("summary_selfdes", this.cinematic);
                }
                else
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                }
            }
            else if (_f == 2)
            {
                Task13.Sleep(50);
                Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
            }
            else
            {
                if (Lang13.Bool(this.mode) && !Lang13.Bool(_override))
                {
                    _override = this.mode.name;
                }

                dynamic _e = _override;                 // Was a switch-case, sorry for the mess.
                if (_e == "nuclear emergency")
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Icon13.Flick("station_explode_fade_red", this.cinematic);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                    this.cinematic.icon_state = "summary_nukewin";
                }
                else if (_e == "AI malfunction")
                {
                    Icon13.Flick("intro_malf", this.cinematic);
                    Task13.Sleep(76);
                    Icon13.Flick("station_explode_fade_red", this.cinematic);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                    this.cinematic.icon_state = "summary_malf";
                }
                else if (_e == "blob")
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Icon13.Flick("station_explode_fade_red", this.cinematic);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                    this.cinematic.icon_state = "summary_selfdes";
                }
                else if (_e == "no_core")
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Icon13.Flick("station_intact", this.cinematic);
                    Game13.WriteMsg(new Sound("sound/ambience/signal.ogg"));
                    Task13.Sleep(100);

                    if (this.cinematic != null)
                    {
                        GlobalFuncs.qdel(this.cinematic);
                        this.cinematic = null;
                    }

                    if (temp_buckle != null)
                    {
                        GlobalFuncs.qdel(temp_buckle);
                    }
                    return;
                }
                else
                {
                    Icon13.Flick("intro_nuke", this.cinematic);
                    Task13.Sleep(35);
                    Icon13.Flick("station_explode_fade_red", this.cinematic);
                    Game13.WriteMsg(new Sound("sound/effects/explosionfar.ogg"));
                    this.cinematic.icon_state = "summary_selfdes";
                }
            }
            Task13.Schedule(300, (Task13.Closure)(() => {
                if (this.cinematic != null)
                {
                    GlobalFuncs.qdel(this.cinematic);
                }

                if (temp_buckle != null)
                {
                    GlobalFuncs.qdel(temp_buckle);
                }
                return;
            }));
            return;
        }
Exemple #6
0
        // Function from file: human.dm
        public Hud_Human(Mob_Living_Carbon_Human owner = null, string ui_style = null) : base(owner)
        {
            ui_style = ui_style ?? "icons/mob/screen_midnight.dmi";

            Obj_Screen           _using  = null;
            Obj_Screen_Inventory inv_box = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            _using            = new Obj_Screen_ActIntent();
            _using.icon_state = this.mymob.a_intent;
            this.static_inventory.Add(_using);
            this.action_intent = _using;
            _using             = new Obj_Screen_MovIntent();
            _using.icon        = ui_style;
            _using.icon_state  = (this.mymob.m_intent == "run" ? "running" : "walking");
            _using.screen_loc  = "EAST-2:26,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Drop();
            _using.icon       = ui_style;
            _using.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.static_inventory.Add(_using);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "i_clothing";
            inv_box.icon       = ui_style;
            inv_box.slot_id    = 14;
            inv_box.icon_state = "uniform";
            inv_box.screen_loc = "WEST:6,SOUTH+1:7";
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "o_clothing";
            inv_box.icon       = ui_style;
            inv_box.slot_id    = 13;
            inv_box.icon_state = "suit";
            inv_box.screen_loc = "WEST+1:8,SOUTH+1:7";
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "r_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_r_inactive";

            if (this.mymob != null && !this.mymob.hand)
            {
                inv_box.icon_state = "hand_r_active";
            }
            inv_box.screen_loc     = "CENTER:-16,SOUTH:5";
            inv_box.slot_id        = 5;
            inv_box.layer          = 19;
            this.r_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "markus"));
            }
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "l_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_l_inactive";

            if (this.mymob != null && this.mymob.hand)
            {
                inv_box.icon_state = "hand_l_active";
            }
            inv_box.screen_loc     = "CENTER: 16,SOUTH:5";
            inv_box.slot_id        = 4;
            inv_box.layer          = 19;
            this.l_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "gabrielle"));
            }
            this.static_inventory.Add(inv_box);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_1";
            _using.screen_loc = "CENTER:-16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_2";
            _using.screen_loc = "CENTER: 16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "id";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "id";
            inv_box.screen_loc = "CENTER-4:12,SOUTH:5";
            inv_box.slot_id    = 7;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "mask";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "mask";
            inv_box.screen_loc = "WEST+1:8,SOUTH+2:9";
            inv_box.slot_id    = 2;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "back";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "back";
            inv_box.screen_loc = "CENTER-2:14,SOUTH:5";
            inv_box.slot_id    = 1;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "storage1";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "pocket";
            inv_box.screen_loc = "CENTER+1:18,SOUTH:5";
            inv_box.slot_id    = 15;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "storage2";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "pocket";
            inv_box.screen_loc = "CENTER+2:20,SOUTH:5";
            inv_box.slot_id    = 16;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "suit storage";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "suit_storage";
            inv_box.screen_loc = "CENTER-5:10,SOUTH:5";
            inv_box.slot_id    = 17;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            _using            = new Obj_Screen_Resist();
            _using.icon       = ui_style;
            _using.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.hotkeybuttons.Add(_using);
            _using            = new Obj_Screen_Human_Toggle();
            _using.icon       = ui_style;
            _using.screen_loc = "WEST:6,SOUTH:5";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Human_Equip();
            _using.icon       = ui_style;
            _using.screen_loc = "CENTER:-16,SOUTH+1:5";
            this.static_inventory.Add(_using);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "gloves";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "gloves";
            inv_box.screen_loc = "WEST+2:10,SOUTH+1:7";
            inv_box.slot_id    = 10;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "eyes";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "glasses";
            inv_box.screen_loc = "WEST:6,SOUTH+2:9";
            inv_box.slot_id    = 9;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "ears";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "ears";
            inv_box.screen_loc = "WEST+2:10,SOUTH+2:9";
            inv_box.slot_id    = 8;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "head";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "head";
            inv_box.screen_loc = "WEST+1:8,SOUTH+3:11";
            inv_box.slot_id    = 11;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "shoes";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "shoes";
            inv_box.screen_loc = "WEST+1:8,SOUTH:5";
            inv_box.slot_id    = 12;
            inv_box.layer      = 19;
            this.toggleable_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "belt";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "belt";
            inv_box.screen_loc = "CENTER-3:14,SOUTH:5";
            inv_box.slot_id    = 6;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            this.throw_icon            = new Obj_Screen_ThrowCatch();
            this.throw_icon.icon       = ui_style;
            this.throw_icon.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.hotkeybuttons.Add(this.throw_icon);
            this.internals = new Obj_Screen_Internals();
            this.infodisplay.Add(this.internals);
            this.healths = new Obj_Screen_Healths();
            this.infodisplay.Add(this.healths);
            this.healthdoll = new Obj_Screen_Healthdoll();
            this.infodisplay.Add(this.healthdoll);
            this.pull_icon      = new Obj_Screen_Pull();
            this.pull_icon.icon = ui_style;
            this.pull_icon.update_icon(this.mymob);
            this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.static_inventory.Add(this.pull_icon);
            this.lingchemdisplay = new Obj_Screen_Ling_Chems();
            this.infodisplay.Add(this.lingchemdisplay);
            this.lingstingdisplay = new Obj_Screen_Ling_Sting();
            this.infodisplay.Add(this.lingstingdisplay);
            this.zone_select      = new Obj_Screen_ZoneSel();
            this.zone_select.icon = ui_style;
            this.zone_select.update_icon(this.mymob);
            this.static_inventory.Add(this.zone_select);
            this.inventory_shown = false;
            return;
        }
Exemple #7
0
        // Function from file: alien.dm
        public Hud_Alien(Mob_Living_Carbon_Alien_Humanoid owner = null) : base(owner)
        {
            Obj_Screen           _using  = null;
            Obj_Screen_Inventory inv_box = null;
            Mob H = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "r_hand";
            inv_box.icon       = "icons/mob/screen_alien.dmi";
            inv_box.icon_state = "hand_r_inactive";

            if (this.mymob != null && !this.mymob.hand)
            {
                inv_box.icon_state = "hand_r_active";
            }
            inv_box.screen_loc     = "CENTER:-16,SOUTH:5";
            inv_box.layer          = 19;
            inv_box.slot_id        = 5;
            this.r_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "markus"));
            }
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "l_hand";
            inv_box.icon       = "icons/mob/screen_alien.dmi";
            inv_box.icon_state = "hand_l_inactive";

            if (this.mymob != null && this.mymob.hand)
            {
                inv_box.icon_state = "hand_l_active";
            }
            inv_box.screen_loc     = "CENTER: 16,SOUTH:5";
            inv_box.layer          = 19;
            inv_box.slot_id        = 4;
            this.l_hand_hud_object = inv_box;

            if (Lang13.Bool(owner.handcuffed))
            {
                inv_box.overlays.Add(new Image("icons/mob/screen_gen.dmi", null, "gabrielle"));
            }
            this.static_inventory.Add(inv_box);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = "icons/mob/screen_alien.dmi";
            _using.icon_state = "swap_1";
            _using.screen_loc = "CENTER:-16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = "icons/mob/screen_alien.dmi";
            _using.icon_state = "swap_2";
            _using.screen_loc = "CENTER: 16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_ActIntent_Alien();
            _using.icon_state = this.mymob.a_intent;
            this.static_inventory.Add(_using);
            this.action_intent = _using;

            if (this.mymob is Mob_Living_Carbon_Alien_Humanoid_Hunter)
            {
                H = this.mymob;
                ((dynamic)H).leap_icon            = new Obj_Screen_Alien_Leap();
                ((dynamic)H).leap_icon.screen_loc = "CENTER+1:18,SOUTH:5";
                this.static_inventory.Add(((dynamic)H).leap_icon);
            }
            _using            = new Obj_Screen_Drop();
            _using.icon       = "icons/mob/screen_alien.dmi";
            _using.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Resist();
            _using.icon       = "icons/mob/screen_alien.dmi";
            _using.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.hotkeybuttons.Add(_using);
            this.throw_icon            = new Obj_Screen_ThrowCatch();
            this.throw_icon.icon       = "icons/mob/screen_alien.dmi";
            this.throw_icon.screen_loc = "EAST-1:28,SOUTH+1:7";
            this.hotkeybuttons.Add(this.throw_icon);
            this.pull_icon      = new Obj_Screen_Pull();
            this.pull_icon.icon = "icons/mob/screen_alien.dmi";
            this.pull_icon.update_icon(this.mymob);
            this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7";
            this.static_inventory.Add(this.pull_icon);
            this.healths = new Obj_Screen_Healths_Alien();
            this.infodisplay.Add(this.healths);
            this.nightvisionicon = new Obj_Screen_Alien_Nightvision();
            this.infodisplay.Add(this.nightvisionicon);
            this.alien_plasma_display = new Obj_Screen_Alien_PlasmaDisplay();
            this.infodisplay.Add(this.alien_plasma_display);
            this.zone_select = new Obj_Screen_ZoneSel_Alien();
            this.zone_select.update_icon(this.mymob);
            this.static_inventory.Add(this.zone_select);
            return;
        }
Exemple #8
0
        // Function from file: overview.dm
        public void drawmap(Mob user = null)
        {
            int        icx         = 0;
            int        icy         = 0;
            int        xoff        = 0;
            int        yoff        = 0;
            int?       icount      = null;
            ByTable    imap        = null;
            int?       i           = null;
            int?       wx          = null;
            int?       wy          = null;
            Tile       T           = null;
            string     colour      = null;
            bool       sense       = false;
            GasMixture environment = null;
            double     turf_total  = 0;
            double     t1          = 0;
            Ent_Static AM          = null;
            Ent_Static A           = null;
            int        red         = 0;
            int        green       = 0;
            int        blue        = 0;
            int        ix          = 0;
            int        iy          = 0;
            double?    rx          = null;
            double?    ry          = null;
            Icon       I           = null;
            int?       i2          = null;
            Obj_Screen H           = null;
            dynamic    I2          = null;

            icx    = Num13.Floor(Game13.map_size_x / 16) + 1;
            icy    = Num13.Floor(Game13.map_size_y / 16) + 1;
            xoff   = Num13.Floor(icx * 16 - Game13.map_size_x - 2);
            yoff   = Num13.Floor(icy * 16 - Game13.map_size_y - 2);
            icount = icx * icy;
            imap   = new ByTable();
            i      = null;
            i      = 0;

            while ((i ?? 0) < (icount ?? 0))
            {
                imap.Add(new Icon("icons/misc/imap.dmi", "blank"));
                i++;
            }
            wx = null;
            wx = 1;

            while ((wx ?? 0) <= Game13.map_size_x)
            {
                wy = null;
                wy = 1;

                while ((wy ?? 0) <= Game13.map_size_y)
                {
                    T      = Map13.GetTile(wx ?? 0, wy ?? 0, this.z);
                    colour = null;

                    if (!(T != null))
                    {
                        colour = "#000000";
                    }
                    else
                    {
                        sense = true;

                        switch ((string)("" + T.type))
                        {
                        case "/turf/space":
                            colour = "#0a0a0a";
                            sense  = false;
                            break;

                        case "/turf/simulated/floor":
                        case "/turf/simulated/floor/engine":
                            environment = T.return_air();
                            turf_total  = environment.total_moles();
                            t1          = turf_total / 103.98379516601562 * 175;

                            if (t1 <= 100)
                            {
                                colour = String13.ColorCode(0, 0, ((int)(t1 * 2.41)));
                            }
                            else
                            {
                                t1     = Num13.MinInt(100, ((int)(t1 - 100)));
                                colour = String13.ColorCode(((int)(t1 * 2.41)), ((int)(t1 * 2.41)), 255);
                            }
                            break;

                        case "/turf/simulated/wall":
                            colour = "#606060";
                            break;

                        case "/turf/simulated/wall/r_wall":
                            colour = "#806060";
                            break;

                        default:
                            colour = "#002800";
                            break;
                        }

                        if (sense)
                        {
                            foreach (dynamic _b in Lang13.Enumerate(T.contents, typeof(Ent_Static)))
                            {
                                AM = _b;


                                if (AM is Obj_Machinery_Door && !(AM is Obj_Machinery_Door_Window))
                                {
                                    if (AM.density)
                                    {
                                        colour = "#0060c0";
                                    }
                                    else
                                    {
                                        colour = "#60c080";
                                    }
                                }

                                if (AM is Obj_Machinery_Airalarm)
                                {
                                    colour = "#00ff00";

                                    if (AM.icon_state == "alarm:1")
                                    {
                                        colour = "#ffff00";
                                    }
                                }

                                if (AM is Mob)
                                {
                                    if (Lang13.Bool(((dynamic)AM).client))
                                    {
                                        colour = "#ff0000";
                                    }
                                    else
                                    {
                                        colour = "#ff8080";
                                    }
                                }
                            }
                        }
                        A = T.loc;

                        if (Lang13.Bool(((dynamic)A).fire))
                        {
                            red    = GlobalFuncs.getr(colour);
                            green  = GlobalFuncs.getg(colour);
                            blue   = GlobalFuncs.getb(colour);
                            green  = Num13.MinInt(255, green + 40);
                            blue   = Num13.MinInt(255, blue + 40);
                            colour = String13.ColorCode(red, green, blue);
                        }
                    }
                    ix = Num13.Floor(((wx ?? 0) * 2 + xoff) / 32);
                    iy = Num13.Floor(((wy ?? 0) * 2 + yoff) / 32);
                    rx = ((wx ?? 0) * 2 + xoff) % 32 + 1;
                    ry = ((wy ?? 0) * 2 + yoff) % 32 + 1;
                    I  = imap[ix + icx * iy + 1];
                    I.DrawBox(colour, rx, ry, rx, ry);
                    wy++;
                }
                wx++;
            }
            user.clearmap();
            user.mapobjs = new ByTable();
            i2           = null;
            i2           = 0;

            while ((i2 ?? 0) < (icount ?? 0))
            {
                H            = new Obj_Screen();
                H.screen_loc = "" + ((i2 ?? 0) % icx + 5) + "," + (Num13.Floor((i2 ?? 0) / icx) + 6);
                H.name       = (i2 == 0 ? "maprefresh" : "map");
                I2           = imap[(i2 ?? 0) + 1];
                H.icon       = I2;
                GlobalFuncs.qdel(I2);
                H.layer = 25;
                Task13.User.mapobjs.Add(H);
                i2++;
            }
            user.client.screen.Add(user.mapobjs);
            this.close(user);
            return;
        }
Exemple #9
0
        // Function from file: drones.dm
        public Hud_Drone(Mob_Living_SimpleAnimal_Drone owner = null, string ui_style = null) : base(owner)
        {
            ui_style = ui_style ?? "icons/mob/screen_midnight.dmi";

            Obj_Screen           _using  = null;
            Obj_Screen_Inventory inv_box = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            _using            = new Obj_Screen_Drop();
            _using.icon       = ui_style;
            _using.screen_loc = "CENTER+1:18,SOUTH:5";
            this.static_inventory.Add(_using);
            this.pull_icon      = new Obj_Screen_Pull();
            this.pull_icon.icon = ui_style;
            this.pull_icon.update_icon(this.mymob);
            this.pull_icon.screen_loc = "CENTER+2:2,SOUTH:5";
            this.static_inventory.Add(this.pull_icon);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "r_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_r_inactive";

            if (this.mymob != null && !this.mymob.hand)
            {
                inv_box.icon_state = "hand_r_active";
            }
            inv_box.screen_loc     = "CENTER:-16,SOUTH:5";
            inv_box.slot_id        = 5;
            inv_box.layer          = 19;
            this.r_hand_hud_object = inv_box;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "l_hand";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "hand_l_inactive";

            if (this.mymob != null && this.mymob.hand)
            {
                inv_box.icon_state = "hand_l_active";
            }
            inv_box.screen_loc     = "CENTER: 16,SOUTH:5";
            inv_box.slot_id        = 4;
            inv_box.layer          = 19;
            this.l_hand_hud_object = inv_box;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "internal storage";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "suit_storage";
            inv_box.screen_loc = "CENTER-2:14,SOUTH:5";
            inv_box.slot_id    = 20;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            inv_box            = new Obj_Screen_Inventory();
            inv_box.name       = "head/mask";
            inv_box.icon       = ui_style;
            inv_box.icon_state = "mask";
            inv_box.screen_loc = "CENTER-3:14,SOUTH:5";
            inv_box.slot_id    = 11;
            inv_box.layer      = 19;
            this.static_inventory.Add(inv_box);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_1_m";
            _using.screen_loc = "CENTER:-16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            _using            = new Obj_Screen_Inventory();
            _using.name       = "hand";
            _using.icon       = ui_style;
            _using.icon_state = "swap_2";
            _using.screen_loc = "CENTER: 16,SOUTH+1:5";
            _using.layer      = 19;
            this.static_inventory.Add(_using);
            this.zone_select      = new Obj_Screen_ZoneSel();
            this.zone_select.icon = ui_style;
            this.zone_select.update_icon(this.mymob);
            return;
        }