示例#1
0
        // Function from file: species_types.dm
        public override void spec_life(Mob_Living H = null)
        {
            GasMixture environment = null;
            double     total_moles = 0;
            dynamic    P           = null;

            environment = H.loc.return_air();

            if (!(((dynamic)H).w_uniform is Obj_Item_Clothing_Under_Plasmaman) || !(((dynamic)H).head is Obj_Item_Clothing_Head_Helmet_Space_Plasmaman))
            {
                if (environment != null)
                {
                    total_moles = environment.total_moles();

                    if (total_moles != 0)
                    {
                        if (Lang13.Bool(environment.gases["o2"]) && Convert.ToDouble(environment.gases["o2"][1] / total_moles) >= 0.01)
                        {
                            H.adjust_fire_stacks(0.5);

                            if (!H.on_fire && H.fire_stacks > 0)
                            {
                                H.visible_message("<span class='danger'>" + H + "'s body reacts with the atmosphere and bursts into flames!</span>", "<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>");
                            }
                            H.IgniteMob();
                        }
                    }
                }
            }
            else if (H.fire_stacks != 0)
            {
                P = ((dynamic)H).w_uniform;

                if (P is Obj_Item_Clothing_Under_Plasmaman)
                {
                    P.Extinguish(H);
                }
            }
            H.update_fire();
            return;
        }