예제 #1
0
        // Function from file: ert.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            Obj_Item_Weapon_Implant_Loyalty L = null;
            Obj_Item_Device_Radio           R = null;
            Obj_Item_Weapon_Card_Id         W = null;


            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            L           = new Obj_Item_Weapon_Implant_Loyalty(H);
            L.imp_in    = H;
            L.implanted = 1;
            ((dynamic)H).sec_hud_set_implants();
            R = ((dynamic)H).ears;
            R.set_frequency(GlobalVars.CENTCOM_FREQ);
            R.freqlock        = true;
            W                 = ((dynamic)H).wear_id;
            W.registered_name = H.real_name;
            W.update_label(W.registered_name, W.assignment);
            return;
        }
예제 #2
0
        // Function from file: implantchair.dm
        public void add_implants(  )
        {
            int?i = null;
            Obj_Item_Weapon_Implant_Loyalty I = null;

            i = null;
            i = 0;

            while ((i ?? 0) < (this.max_implants ?? 0))
            {
                I = new Obj_Item_Weapon_Implant_Loyalty(this);
                this.implant_list.Add(I);
                i++;
            }
            return;
        }
예제 #3
0
        // Function from file: security.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            Obj_Item_Weapon_Implant_Loyalty L = null;

            base.post_equip(H, visualsOnly);

            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            L           = new Obj_Item_Weapon_Implant_Loyalty(H);
            L.imp_in    = H;
            L.implanted = 1;
            ((Mob_Living_Carbon_Human)H).sec_hud_set_implants();
            return;
        }
예제 #4
0
        // Function from file: security.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            dynamic cig = null;
            Obj_Item_Weapon_Implant_Loyalty L = null;

            base.post_equip(H, visualsOnly);
            cig = ((dynamic)H).wear_mask;
            cig.light("");

            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            L           = new Obj_Item_Weapon_Implant_Loyalty(H);
            L.imp_in    = H;
            L.implanted = 1;
            ((dynamic)H).sec_hud_set_implants();
            return;
        }
예제 #5
0
        // Function from file: captain.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            Obj_Item_Clothing_Under         U = null;
            Obj_Item_Weapon_Implant_Loyalty L = null;

            base.post_equip(H, visualsOnly);
            U = ((dynamic)H).w_uniform;
            U.attachTie(new Obj_Item_Clothing_Tie_Medal_Gold_Captain());

            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            L           = new Obj_Item_Weapon_Implant_Loyalty(H);
            L.imp_in    = H;
            L.implanted = 1;
            ((dynamic)H).sec_hud_set_implants();
            GlobalFuncs.minor_announce("Captain " + H.real_name + " on deck!");
            return;
        }
예제 #6
0
        // Function from file: implantchair.dm
        public void implant(dynamic M = null)
        {
            Obj_Item_Weapon_Implant_Loyalty imp = null;


            if (!(M is Mob_Living_Carbon))
            {
                return;
            }

            if (!(this.implant_list.len != 0))
            {
                return;
            }

            foreach (dynamic _a in Lang13.Enumerate(this.implant_list, typeof(Obj_Item_Weapon_Implant_Loyalty)))
            {
                imp = _a;


                if (!(imp != null))
                {
                    continue;
                }

                if (imp is Obj_Item_Weapon_Implant_Loyalty)
                {
                    ((Ent_Static)M).visible_message("<span class='warning'>" + M + " has been implanted by the " + this.name + ".</span>");

                    if (imp.implant(M) != 0)
                    {
                        this.implant_list.Remove(imp);
                    }
                    break;
                }
            }
            return;
        }
예제 #7
0
        // Function from file: security.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            Obj_Item_Clothing_Under         U = null;
            Obj_Item_Weapon_Implant_Loyalty L = null;
            dynamic W        = null;
            bool    teleport = false;
            dynamic T        = null;
            int     safety   = 0;

            base.post_equip(H, visualsOnly);
            U = ((dynamic)H).w_uniform;

            if (this.tie != null)
            {
                U.attachTie(Lang13.Call(this.tie));
            }

            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            L           = new Obj_Item_Weapon_Implant_Loyalty(H);
            L.imp_in    = H;
            L.implanted = 1;
            ((dynamic)H).sec_hud_set_implants();
            W         = ((dynamic)H).wear_id;
            W.access |= this.dep_access;
            teleport  = false;

            if (!GlobalVars.config.sec_start_brig)
            {
                if (this.destination != null || Lang13.Bool(this.spawn_point))
                {
                    teleport = true;
                }
            }

            if (teleport)
            {
                if (Lang13.Bool(this.spawn_point))
                {
                    T = GlobalFuncs.get_turf(this.spawn_point);
                    H.Move(T);
                }
                else
                {
                    safety = 0;

                    while (safety < 25)
                    {
                        T = GlobalFuncs.safepick(GlobalFuncs.get_area_turfs(this.destination));

                        if (Lang13.Bool(T) && !H.Move(T))
                        {
                            safety += 1;
                            continue;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }

            if (Lang13.Bool(this.department))
            {
                H.WriteMsg("<b>You have been assigned to " + this.department + "!</b>");
            }
            else
            {
                H.WriteMsg("<b>You have not been assigned to any department. Patrol the halls and help where needed.</b>");
            }
            return;
        }
        // Function from file: shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            Mob_Living_Carbon_Human target = null;
            int?progress = null;
            Obj_Item_Weapon_Implant_Loyalty L = null;

            GlobalFuncs.listclearnulls(GlobalVars.ticker.mode.thralls);

            if (!GlobalVars.ticker.mode.shadows.Contains(thearea.mind))
            {
                return(false);
            }

            if (thearea.dna.species.id != "shadowling")
            {
                if (GlobalVars.ticker.mode.thralls.len >= 5)
                {
                    this.revert_cast();
                    return(false);
                }
            }

            foreach (dynamic _c in Lang13.Enumerate(targets, typeof(Mob_Living_Carbon_Human)))
            {
                target = _c;


                if (!(Map13.GetDistance(thearea, target) <= 1))
                {
                    thearea.WriteMsg("<span class='warning'>You need to be closer to enthrall " + target + "!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (!Lang13.Bool(target.key) || !(target.mind != null))
                {
                    thearea.WriteMsg("<span class='warning'>The target has no mind!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (target.stat != 0)
                {
                    thearea.WriteMsg("<span class='warning'>The target must be conscious!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (GlobalFuncs.is_shadow_or_thrall(target))
                {
                    thearea.WriteMsg("<span class='warning'>You can not enthrall allies!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (!(target is Mob_Living_Carbon_Human))
                {
                    thearea.WriteMsg("<span class='warning'>You can only enthrall humans!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (this.enthralling)
                {
                    thearea.WriteMsg("<span class='warning'>You are already enthralling!</span>");
                    this.revert_cast();
                    return(false);
                }

                if (!(target.client != null))
                {
                    thearea.WriteMsg("<span class='warning'>" + target + "'s mind is vacant of activity.</span>");
                }
                this.enthralling = true;
                thearea.WriteMsg("<span class='danger'>This target is valid. You begin the enthralling...</span>");
                target.WriteMsg("<span class='userdanger'>" + thearea + " stares at you. You feel your head begin to pulse.</span>");
                progress = null;
                progress = 0;

                while ((progress ?? 0) <= 3)
                {
                    switch ((int?)(progress))
                    {
                    case 1:
                        thearea.WriteMsg("<span class='notice'>You place your hands to " + target + "'s head...</span>");
                        ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " places their hands onto the sides of " + target + "'s head!</span>");
                        break;

                    case 2:
                        thearea.WriteMsg("<span class='notice'>You begin preparing " + target + "'s mind as a blank slate...</span>");
                        ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + "'s palms flare a bright red against " + target + "'s temples!</span>");
                        target.WriteMsg("<span class='danger'>A terrible red light floods your mind. You collapse as conscious thought is wiped away.</span>");
                        target.Weaken(12);
                        Task13.Sleep(20);

                        if (GlobalFuncs.isloyal(target))
                        {
                            thearea.WriteMsg("<span class='notice'>They are enslaved by Nanotrasen. You begin to shut down the nanobot implant - this will take some time.</span>");
                            ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " pauses, then dips their head in concentration!</span>");
                            target.WriteMsg("<span class='boldannounce'>You feel your loyalties begin to weaken!</span>");
                            Task13.Sleep(100);
                            thearea.WriteMsg("<span class='notice'>The nanobots composing the loyalty implant have been rendered inert. Now to continue.</span>");
                            ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " relaxes again.</span>");

                            foreach (dynamic _a in Lang13.Enumerate(target, typeof(Obj_Item_Weapon_Implant_Loyalty)))
                            {
                                L = _a;


                                if (L != null && Lang13.Bool(L.implanted))
                                {
                                    GlobalFuncs.qdel(L);
                                }
                            }
                            target.WriteMsg("<span class='boldannounce'>Your unwavering loyalty to Nanotrasen unexpectedly falters, dims, dies.</span>");
                        }
                        break;

                    case 3:
                        thearea.WriteMsg("<span class='notice'>You begin planting the tumor that will control the new thrall...</span>");
                        ((Ent_Static)thearea).visible_message("<span class='warning'>A strange energy passes from " + thearea + "'s hands into " + target + "'s head!</span>");
                        target.WriteMsg("<span class='boldannounce'>You feel your memories twisting, morphing. A sense of horror dominates your mind.</span>");
                        break;
                    }

                    if (!GlobalFuncs.do_mob(thearea, target, 70))
                    {
                        thearea.WriteMsg("<span class='warning'>The enthralling has been interrupted - your target's mind returns to its previous state.</span>");
                        target.WriteMsg("<span class='userdanger'>You wrest yourself away from " + thearea + "'s hands and compose yourself</span>");
                        this.enthralling = false;
                        return(false);
                    }
                    progress++;
                }
                this.enthralling = false;
                thearea.WriteMsg("<span class='shadowling'>You have enthralled <b>" + target.real_name + "</b>!</span>");
                target.visible_message("<span class='big'>" + target + " looks to have experienced a revelation!</span>", "<span class='warning'>False faces all d<b>ark not real not real not--</b></span>");
                target.setOxyLoss(0);
                target.mind.special_role = "thrall";
                ((GameMode)GlobalVars.ticker.mode).add_thrall(target.mind);
            }
            return(false);
        }