Exemple #1
0
        // Function from file: alien_embryo.dm
        public override void egg_process(  )
        {
            Surgery S = null;


            if (this.stage < 5 && Rand13.PercentChance(3))
            {
                this.stage++;
                Task13.Schedule(0, (Task13.Closure)(() => {
                    this.RefreshInfectionImage();
                    return;
                }));
            }

            if (this.stage == 5 && Rand13.PercentChance(50))
            {
                foreach (dynamic _a in Lang13.Enumerate(this.owner.surgeries, typeof(Surgery)))
                {
                    S = _a;


                    if (S.location == "chest" && S.get_surgery_step() is SurgeryStep_ManipulateOrgans)
                    {
                        this.AttemptGrow(false);
                        return;
                    }
                }
                this.AttemptGrow();
            }
            return;
        }
Exemple #2
0
        // Function from file: Operating.dm
        public string get_patient_info(  )
        {
            string  dat          = null;
            Surgery procedure    = null;
            dynamic surgery_step = null;

            dat = "\n				<div class='statusLabel'>Patient:</div> "+ (this.patient.stat != 0 ? "<span class='bad'>Non-Responsive</span>" : "<span class='good'>Stable</span>") + "<BR>\n				<div class='statusLabel'>Blood Type:</div> "+ ((dynamic)this.patient).dna.blood_type + "\n\n				<BR>\n				<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.health), 0) + "%;' class='progressFill good'></div></div><div class='statusValue'>" + this.patient.health + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Brute Damage:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(((int)(this.patient.getBruteLoss())), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getBruteLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Resp. Damage:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.getOxyLoss()), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getOxyLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Toxin Content:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.getToxLoss()), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getToxLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Burn Severity:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(((int)(this.patient.getFireLoss())), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getFireLoss() + "%</div></div>\n\n				";

            if (this.patient.surgeries.len != 0)
            {
                dat += "<BR><BR><B>Initiated Procedures</B><div class='statusDisplay'>";

                foreach (dynamic _a in Lang13.Enumerate(this.patient.surgeries, typeof(Surgery)))
                {
                    procedure = _a;

                    dat         += "" + GlobalFuncs.capitalize(procedure.name) + "<BR>";
                    surgery_step = procedure.get_surgery_step();
                    dat         += "Next step: " + GlobalFuncs.capitalize(surgery_step.name) + "<BR>";
                }
                dat += "</div>";
            }
            return(dat);
        }
Exemple #3
0
        // Function from file: cavity_implant.dm
        public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Obj_Item I = null;


            foreach (dynamic _a in Lang13.Enumerate(((dynamic)target).internal_organs, typeof(Obj_Item)))
            {
                I = _a;


                if (!(I is Obj_Item_Organ))
                {
                    this.IC = I;
                    break;
                }
            }

            if (Lang13.Bool(tool))
            {
                ((Ent_Static)user).visible_message("" + user + " begins to insert " + tool + " into " + target + "'s " + target_zone + ".", "<span class='notice'>You begin to insert " + tool + " into " + target + "'s " + target_zone + "...</span>");
            }
            else
            {
                ((Ent_Static)user).visible_message("" + user + " checks for items in " + target + "'s " + target_zone + ".", "<span class='notice'>You check for items in " + target + "'s " + target_zone + "...</span>");
            }
            return(0);
        }
Exemple #4
0
        // Function from file: surgery_step.dm
        public void initiate(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            bool   advance     = false;
            double prob_chance = 0;

            surgery.step_in_progress = true;

            if (this.preop(user, target, target_zone, tool, surgery) == -1)
            {
                surgery.step_in_progress = false;
                return;
            }

            if (GlobalFuncs.do_after(user, this.time, null, target))
            {
                advance     = false;
                prob_chance = 100;

                if (Lang13.Bool(this.implement_type))
                {
                    prob_chance = Convert.ToDouble(this.implements[this.implement_type]);
                }
                prob_chance *= GlobalFuncs.get_location_modifier(target);

                if (Rand13.PercentChance(((int)(prob_chance))) || user is Mob_Living_Silicon_Robot)
                {
                    if (this.success(user, target, target_zone, tool, surgery))
                    {
                        advance = true;
                    }
                }
                else if (this.failure(user, target, target_zone, tool, surgery))
                {
                    advance = true;
                }

                if (advance)
                {
                    surgery.status++;

                    if (surgery.status > surgery.steps.len)
                    {
                        surgery.complete(target);
                    }
                }
            }
            surgery.step_in_progress = false;
            return;
        }
Exemple #5
0
 // Function from file: surgery_step.dm
 public virtual bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " succeeds!", "<span class='notice'>You succeed.</span>");
     return(true);
 }
Exemple #6
0
        // Function from file: remove_embedded_object.dm
        public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            this.L = surgery.organ;

            if (Lang13.Bool(this.L))
            {
                ((Ent_Static)user).visible_message("" + user + " looks for objects embedded in " + target + "'s " + GlobalFuncs.parse_zone(user.zone_selected) + ".", "<span class='notice'>You look for objects embedded in " + target + "'s " + GlobalFuncs.parse_zone(user.zone_selected) + "...</span>");
            }
            else
            {
                ((Ent_Static)user).visible_message("" + user + " looks for " + target + "'s " + GlobalFuncs.parse_zone(user.zone_selected) + ".", "<span class='notice'>You look for " + target + "'s " + GlobalFuncs.parse_zone(user.zone_selected) + "...</span>");
            }
            return(0);
        }
Exemple #7
0
        // Function from file: generic_steps.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob H = null;


            if (target is Mob_Living_Carbon_Human)
            {
                H = target;
                ((dynamic)H).apply_damage(50, "brute", "" + target_zone);
            }
            ((Ent_Static)user).visible_message("" + user + " saws " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + " open!", "<span class='notice'>You saw " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + " open.</span>");
            return(true);
        }
Exemple #8
0
        // Function from file: lipoplasty.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            double removednutriment = 0;
            Obj_Item_Weapon_ReagentContainers_Food_Snacks_Meat_Slab_Human newmeat  = null;
            Obj_Item_Weapon_ReagentContainers_Food_Snacks_Meat_Slab_Human meatslab = null;

            ((Ent_Static)user).visible_message("" + user + " extracts " + target + "'s fat!", "<span class='notice'>You extract " + target + "'s fat.</span>");
            target.overeatduration = 0;
            removednutriment       = target.nutrition;
            target.nutrition       = 450;
            removednutriment      -= 450;
            newmeat      = new Obj_Item_Weapon_ReagentContainers_Food_Snacks_Meat_Slab_Human();
            newmeat.name = "fatty meat";
            newmeat.desc = "Extremely fatty tissue taken from a patient.";
            newmeat.reagents.add_reagent("nutriment", removednutriment / 15);
            meatslab     = newmeat;
            meatslab.loc = target.loc;
            return(true);
        }
Exemple #9
0
 // Function from file: generic_steps.dm
 public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " drills into " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + "!", "<span class='notice'>You drill into " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + ".</span>");
     return(true);
 }
Exemple #10
0
        // Function from file: abduction_surgery.dm
        public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Obj_Item I = null;


            foreach (dynamic _a in Lang13.Enumerate(((dynamic)target).internal_organs, typeof(Obj_Item)))
            {
                I = _a;


                if (this.organ_types.Contains(I.type))
                {
                    this.IC = I;
                    break;
                }
            }
            ((Ent_Static)user).visible_message("" + user + " starts to remove " + target + "'s organs.", "<span class='notice'>You start to remove " + target + "'s organs...</span>");
            return(0);
        }
Exemple #11
0
 // Function from file: abduction_surgery.dm
 public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     if (this.IC != null)
     {
         ((Ent_Static)user).visible_message("" + user + " pulls " + this.IC + " out of " + target + "'s " + target_zone + "!", "<span class='notice'>You pull " + this.IC + " out of " + target + "'s " + target_zone + ".</span>");
         ((Mob)user).put_in_hands(this.IC);
         new ByTable().Set(1, target).Set("special", 1).Apply(Lang13.BindFunc(this.IC, "Remove"));
         return(true);
     }
     else
     {
         user.WriteMsg("<span class='warning'>You don't find anything in " + target + "'s " + target_zone + "!</span>");
         return(false);
     }
 }
Exemple #12
0
        // Function from file: tail_modification.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob L = null;
            Obj_Item_Organ_Severedtail S = null;

            L = target;
            ((Ent_Static)user).visible_message("" + user + " severs " + L + "'s tail!", "<span class='notice'>You sever " + L + "'s tail.</span>");

            if (((dynamic)L).dna.species.mutant_bodyparts.Contains("tail_lizard"))
            {
                ((dynamic)L).dna.species.mutant_bodyparts.Remove("tail_lizard");
            }
            else if (((dynamic)L).dna.species.mutant_bodyparts.Contains("waggingtail_lizard"))
            {
                ((dynamic)L).dna.species.mutant_bodyparts.Remove("waggingtail_lizard");
            }

            if (Lang13.Bool(((dynamic)L).dna.features.Contains("spines")))
            {
                ((dynamic)L).dna.features -= "spines";
            }
            S          = new Obj_Item_Organ_Severedtail(GlobalFuncs.get_turf(target));
            S.color    = "#" + ((dynamic)L).dna.features["mcolor"];
            S.markings = "" + ((dynamic)L).dna.features["tail"];
            ((Mob_Living_Carbon_Human)L).update_body();
            return(true);
        }
Exemple #13
0
 // Function from file: generic_steps.dm
 public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     if (Lang13.Bool(Lang13.FindIn(typeof(SurgeryStep_Saw), surgery.steps)))
     {
         ((dynamic)target).heal_organ_damage(45, 0);
     }
     return(base.success((object)(user), target, target_zone, (object)(tool), surgery));
 }
Exemple #14
0
 // Function from file: limb augmentation.dm
 public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " begins sawing the chainsaw off of " + target + "'s arms.", "<span class='notice'>You begin removing " + target + "'s chainsaw...</span>");
     return(0);
 }
Exemple #15
0
        // Function from file: limb augmentation.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            ByTable hands = null;
            Obj_Item_Weapon_MountedChainsaw V = null;

            hands = GlobalFuncs.get_both_hands(target);

            foreach (dynamic _a in Lang13.Enumerate(hands, typeof(Obj_Item_Weapon_MountedChainsaw)))
            {
                V = _a;

                GlobalFuncs.qdel(V);
                new Obj_Item_Weapon_Twohanded_Required_Chainsaw(GlobalFuncs.get_turf(target));
                ((Ent_Static)user).visible_message("" + user + " carefully saws " + target + "'s arm free of the chainsaw.", "<span class='notice'>You remove the chainsaw.</span>");
                return(true);
            }
            return(false);
        }
Exemple #16
0
        // Function from file: implant_removal.dm
        public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            this.I = Lang13.FindIn(typeof(Obj_Item_Weapon_Implant), target);

            if (Lang13.Bool(this.I))
            {
                ((Ent_Static)user).visible_message("" + user + " begins to extract " + this.I + " from " + target + "'s " + target_zone + ".", "<span class='notice'>You begin to extract " + this.I + " from " + target + "'s " + target_zone + "...</span>");
            }
            else
            {
                ((Ent_Static)user).visible_message("" + user + " looks for an implant in " + target + "'s " + target_zone + ".", "<span class='notice'>You look for an implant in " + target + "'s " + target_zone + "...</span>");
            }
            return(0);
        }
Exemple #17
0
 // Function from file: lipoplasty.dm
 public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " cuts " + target + "'s excess fat loose!", "<span class='notice'>You cut " + target + "'s excess fat loose.</span>");
     return(true);
 }
Exemple #18
0
        // Function from file: limb augmentation.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob H = null;
            Obj_Item_Organ_Internal I = null;


            if (Lang13.Bool(this.L))
            {
                if (target is Mob_Living_Carbon_Human)
                {
                    H = target;
                    ((Ent_Static)user).visible_message("" + user + " successfully augments " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + "!", "<span class='notice'>You successfully augment " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + ".</span>");
                    this.L.loc           = GlobalFuncs.get_turf(target);
                    ((dynamic)H).organs -= this.L;

                    switch ((string)(target_zone))
                    {
                    case "r_leg":
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_RLeg(this);
                        break;

                    case "l_leg":
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_LLeg(this);
                        break;

                    case "r_arm":
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_RArm(this);
                        break;

                    case "l_arm":
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_LArm(this);
                        break;

                    case "head":
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_Head(this);
                        break;

                    case "chest":

                        foreach (dynamic _a in Lang13.Enumerate(target.getorganszone(target_zone, true), typeof(Obj_Item_Organ_Internal)))
                        {
                            I = _a;


                            if (I.status == 1)
                            {
                                I.Remove(target, true);
                                GlobalFuncs.qdel(I);
                            }
                        }
                        ((dynamic)H).organs += new Obj_Item_Organ_Limb_Robot_Chest(this);
                        break;
                    }
                    user.drop_item();
                    GlobalFuncs.qdel(tool);
                    ((dynamic)H).update_damage_overlays(0);
                    ((dynamic)H).update_augments();
                    GlobalFuncs.add_logs(user, target, "augmented", null, "by giving him new " + GlobalFuncs.parse_zone(target_zone) + " INTENT: " + String13.ToUpper(user.a_intent));
                }
            }
            else
            {
                user.WriteMsg("<span class='warning'>" + target + " has no organic " + GlobalFuncs.parse_zone(target_zone) + " there!</span>");
            }
            return(true);
        }
Exemple #19
0
 // Function from file: lipoplasty.dm
 public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " begins to extract " + target + "'s loose fat!", "<span class='notice'>You begin to extract " + target + "'s loose fat...</span>");
     return(0);
 }
Exemple #20
0
        // Function from file: abduction_surgery.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            dynamic gland = null;

            ((Ent_Static)user).visible_message("" + user + " inserts " + tool + " into " + target + ".", "<span class ='notice'>You insert " + tool + " into " + target + ".</span>");
            user.drop_item();
            gland = tool;
            gland.Insert(target, 2);
            return(true);
        }
Exemple #21
0
 // Function from file: generic_steps.dm
 public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " begins to saw through the bone in " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + ".", "<span class='notice'>You begin to saw through the bone in " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + "...</span>");
     return(0);
 }
Exemple #22
0
 // Function from file: abduction_surgery.dm
 public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " starts to insert " + tool + " into " + target + ".", "<span class ='notice'>You start to insert " + tool + " into " + target + "...</span>");
     return(0);
 }
Exemple #23
0
        // Function from file: remove_embedded_object.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob      H       = null;
            int      objects = 0;
            Obj_Item I       = null;


            if (Lang13.Bool(this.L))
            {
                if (target is Mob_Living_Carbon_Human)
                {
                    H       = target;
                    objects = 0;

                    foreach (dynamic _a in Lang13.Enumerate(this.L.embedded_objects, typeof(Obj_Item)))
                    {
                        I = _a;

                        objects++;
                        I.loc = GlobalFuncs.get_turf(H);
                        this.L.embedded_objects.Remove(I);
                    }

                    if (objects > 0)
                    {
                        ((Ent_Static)user).visible_message("" + user + " sucessfully removes " + objects + " objects from " + H + "'s " + ((Obj_Item_Organ_Limb)this.L).getDisplayName() + "!", "<span class='notice'>You sucessfully remove " + objects + " objects from " + H + "'s " + ((Obj_Item_Organ_Limb)this.L).getDisplayName() + ".</span>");
                    }
                    else
                    {
                        user.WriteMsg("<span class='warning'>You find no objects embedded in " + H + "'s " + ((Obj_Item_Organ_Limb)this.L).getDisplayName() + "!</span>");
                    }
                }
            }
            else
            {
                user.WriteMsg("<span class='warning'>You can't find " + target + "'s " + GlobalFuncs.parse_zone(user.zone_selected) + ", let alone any objects embedded in it!</span>");
            }
            return(true);
        }
Exemple #24
0
        // Function from file: gender_reassignment.dm
        public override bool failure(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob H = null;

            H = target;
            ((dynamic)H).gender_ambiguous = 1;
            ((Ent_Static)user).visible_message("<span class='warning'>" + user + " accidentally mutilates " + target + "'s genitals beyond the point of recognition!</span>", "<span class='warning'>You accidentally mutilate " + target + "'s genitals beyond the point of recognition!</span>");
            target.gender = Rand13.Pick(new object [] { GlobalVars.MALE, GlobalVars.FEMALE });
            target.regenerate_icons();
            return(true);
        }
Exemple #25
0
 // Function from file: surgery_step.dm
 public virtual bool failure(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("<span class='warning'>" + user + " screws up!</span>", "<span class='warning'>You screw up!</span>");
     return(false);
 }
Exemple #26
0
        // Function from file: gender_reassignment.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Mob H = null;

            H = target;
            ((dynamic)H).gender_ambiguous = 0;

            if (target.gender == GlobalVars.FEMALE)
            {
                ((Ent_Static)user).visible_message("" + user + " has made a man of " + target + "!", "<span class='notice'>You made " + target + " a man.</span>");
                target.gender = GlobalVars.MALE;
            }
            else
            {
                ((Ent_Static)user).visible_message("" + user + " has made a woman of " + target + "!", "<span class='notice'>You made " + target + " a woman.</span>");
                target.gender = GlobalVars.FEMALE;
            }
            target.regenerate_icons();
            return(true);
        }
Exemple #27
0
 // Function from file: surgery_step.dm
 public virtual int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     ((Ent_Static)user).visible_message("" + user + " begins to perform surgery on " + target + ".", "<span class='notice'>You begin to perform surgery on " + target + "...</span>");
     return(0);
 }
Exemple #28
0
 // Function from file: gender_reassignment.dm
 public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
 {
     if (target.gender == GlobalVars.FEMALE)
     {
         ((Ent_Static)user).visible_message("" + user + " begins to reshape " + target + "'s genitals to look more masculine.", "<span class='notice'>You begin to reshape " + target + "'s genitals to look more masculine...</span>");
     }
     else
     {
         ((Ent_Static)user).visible_message("" + user + " begins to reshape " + target + "'s genitals to look more feminine.", "<span class='notice'>You begin to reshape " + target + "'s genitals to look more feminine...</span>");
     }
     return(0);
 }
Exemple #29
0
        // Function from file: surgery_step.dm
        public bool try_op(dynamic user = null, Mob_Living target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            bool    success = false;
            dynamic path    = null;

            success = false;

            if (this.accept_hand)
            {
                if (!Lang13.Bool(tool))
                {
                    success = true;
                }
            }

            if (this.accept_any_item)
            {
                if (Lang13.Bool(tool) && this.tool_check(user, tool))
                {
                    success = true;
                }
            }
            else
            {
                foreach (dynamic _a in Lang13.Enumerate(this.implements))
                {
                    path = _a;


                    if (Lang13.Bool(path.IsInstanceOfType(tool)))
                    {
                        this.implement_type = path;

                        if (this.tool_check(user, tool))
                        {
                            success = true;
                        }
                    }
                }
            }

            if (success)
            {
                if (target_zone == surgery.location)
                {
                    if (GlobalFuncs.get_location_accessible(target, target_zone) || surgery.ignore_clothes)
                    {
                        this.initiate(user, target, target_zone, tool, surgery);
                        return(true);
                    }
                    else
                    {
                        user.WriteMsg("<span class='warning'>You need to expose " + target + "'s " + GlobalFuncs.parse_zone(target_zone) + " to perform surgery on it!</span>");
                        return(true);
                    }
                }
            }

            if (user is Mob_Living_Silicon_Robot && user.a_intent != "harm")
            {
                return(true);
            }
            return(false);
        }
Exemple #30
0
        // Function from file: implant_removal.dm
        public override bool success(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            dynamic _case = null;


            if (Lang13.Bool(this.I))
            {
                ((Ent_Static)user).visible_message("" + user + " successfully removes " + this.I + " from " + target + "'s " + target_zone + "!", "<span class='notice'>You successfully remove " + this.I + " from " + target + "'s " + target_zone + ".</span>");
                ((Obj_Item_Weapon_Implant)this.I).removed(target);

                if (((Mob)user).get_item_by_slot(4) is Obj_Item_Weapon_Implantcase)
                {
                    _case = ((Mob)user).get_item_by_slot(4);
                }
                else if (((Mob)user).get_item_by_slot(5) is Obj_Item_Weapon_Implantcase)
                {
                    _case = ((Mob)user).get_item_by_slot(5);
                }
                else
                {
                    _case = Lang13.FindIn(typeof(Obj_Item_Weapon_Implantcase), GlobalFuncs.get_turf(target));
                }

                if (Lang13.Bool(_case) && !Lang13.Bool(_case.imp))
                {
                    _case.imp  = this.I;
                    this.I.loc = _case;
                    _case.update_icon();
                    ((Ent_Static)user).visible_message("" + user + " places " + this.I + " into " + _case + "!", "<span class='notice'>You place " + this.I + " into " + _case + ".</span>");
                }
                else
                {
                    GlobalFuncs.qdel(this.I);
                }
            }
            else
            {
                user.WriteMsg("<span class='warning'>You can't find anything in " + target + "'s " + target_zone + "!</span>");
            }
            return(true);
        }