コード例 #1
0
        // Function from file: nuclear.dm
        public void failcheck(  )
        {
            Ent_Static M = null;


            if (!Rand13.PercentChance(((int)(this.reliability))) && this.loc is Mob_Living)
            {
                M = this.loc;

                dynamic _a = this.fail_tick;                 // Was a switch-case, sorry for the mess.
                if (0 <= _a && _a <= 200)
                {
                    this.fail_tick += (100 - this.reliability) * 2;
                    M.rad_act(40);
                    ((dynamic)M).WriteMsg("<span class='userdanger'>Your " + this.name + " feels warmer.</span>");
                }
                else if (201 <= _a && _a <= Double.PositiveInfinity)
                {
                    GlobalVars.SSobj.processing.Remove(this);
                    M.rad_act(80);
                    this.crit_fail = true;
                    ((dynamic)M).WriteMsg("<span class='userdanger'>Your " + this.name + "'s reactor overloads!</span>");
                }
            }
            return;
        }
コード例 #2
0
 // Function from file: particle.dm
 public void toxmob(Ent_Static M = null)
 {
     M.rad_act(this.energy * 6);
     ((Mob_Living)M).updatehealth();
     return;
 }