예제 #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;
        }
예제 #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);
        }