Пример #1
0
 // Function from file: experimentor.dm
 public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
 {
     if (Lang13.Bool(this.revealed))
     {
         if (Lang13.Bool(this.cooldown))
         {
             user.WriteMsg("<span class='warning'>" + this + " does not react!</span>");
             return(null);
         }
         else if (this.loc == user)
         {
             this.cooldown = GlobalVars.TRUE;
             Lang13.Call(Lang13.BindFunc(this, this.realProc), user);
             Task13.Schedule(this.cooldownMax, (Task13.Closure)(() => {
                 this.cooldown = GlobalVars.FALSE;
                 return;
             }));
         }
     }
     else
     {
         user.WriteMsg("<span class='notice'>You aren't quite sure what to do with this, yet.</span>");
     }
     return(null);
 }
Пример #2
0
        // Function from file: html_interface.dm
        public void hide(dynamic hclient = null)
        {
            hclient = this.getClient(hclient);

            if (hclient is HtmlInterfaceClient)
            {
                if (this.clients != null)
                {
                    this.clients.Remove(hclient.client);

                    if (!(this.clients.len != 0))
                    {
                        this.clients = null;
                    }
                }
                hclient.client.hi_last_pos = Interface13.WindowGet(hclient.client, new Txt("browser_").Ref(this).ToString(), "pos");
                Interface13.WindowShow(hclient.client, new Txt("browser_").Ref(this).ToString(), GlobalVars.FALSE);
                Interface13.WindowSet(hclient.client, new Txt("browser_").Ref(this).ToString(), "parent=none");

                if (Lang13.HasCall(this.v_ref, "hiOnHide"))
                {
                    Lang13.Call(Lang13.BindFunc(this.v_ref, "hiOnHide"), hclient);
                }
            }
            return;
        }
Пример #3
0
        // Function from file: events.dm
        public void fireEvent(params object[] _)
        {
            ByTable _args = new ByTable(new object[] {  }).Extend(_);

            dynamic _event = null;
            Event   E      = null;

            _event = GlobalFuncs.listgetindex(this.events, _args[1]);

            if (_event is ByTable)
            {
                Task13.Schedule(0, (Task13.Closure)(() => {
                    foreach (dynamic _a in Lang13.Enumerate(_event, typeof(Event)))
                    {
                        E = _a;


                        if (!Lang13.Bool(_args.Copy(2).Apply(Lang13.BindFunc(E, "Fire"))))
                        {
                            this.clearEvent(_args[1], E);
                        }
                    }
                    return;
                }));
            }
            return;
        }
Пример #4
0
        // Function from file: clothing.dm
        public void weldingvisortoggle(  )
        {
            Mob C = null;


            if (!this.can_use(Task13.User))
            {
                return;
            }
            this.up          ^= 1;
            this.flags       ^= this.visor_flags;
            this.flags_inv   ^= this.visor_flags_inv;
            this.flags_cover ^= Lang13.Initial(this, "flags_cover");
            this.icon_state   = "" + Lang13.Initial(this, "icon_state") + (this.up != 0 ? "up" : "");
            Task13.User.WriteMsg(new Txt("<span class='notice'>You adjust ").the(this).item().str(" ").item((this.up != 0 ? "up" : "down")).str(".</span>").ToString());
            this.flash_protect ^= Convert.ToInt32(Lang13.Initial(this, "flash_protect"));
            this.tint          ^= Convert.ToInt32(Lang13.Initial(this, "tint"));

            if (Task13.User is Mob_Living_Carbon)
            {
                C = Task13.User;
                new ByTable().Set(1, this).Set("forced", 1).Apply(Lang13.BindFunc(C, "head_update"));
            }
            return;
        }
Пример #5
0
        // Function from file: observer.dm
        public override void DblClickOn(Ent_Static A = null, string _params = null)
        {
            if (this.client.click_intercept != null)
            {
                if (Lang13.Bool(Lang13.Call(Lang13.BindFunc(this.client.click_intercept, "ClickOn"), this, _params, A)))
                {
                    return;
                }
            }

            if (this.can_reenter_corpse == true && this.mind != null && Lang13.Bool(this.mind.current))
            {
                if (A == this.mind.current || Lang13.Bool(((dynamic)A).Contains(this.mind.current)))
                {
                    this.reenter_corpse();
                    return;
                }
            }

            if (A is Ent_Dynamic)
            {
                this.ManualFollow(A);
            }
            else if (A.loc != null)
            {
                this.loc = GlobalFuncs.get_turf(A);
            }
            return;
        }
Пример #6
0
        // Function from file: events.dm
        public bool Fire(params object[] _)
        {
            ByTable _args = new ByTable(new object[] {  }).Extend(_);


            if (this.listener != null)
            {
                _args.Apply(Lang13.BindFunc(this.listener, this.proc_name));
                return(true);
            }
            return(false);
        }
Пример #7
0
        // Function from file: action.dm
        public override bool Trigger(  )
        {
            if (!base.Trigger())
            {
                return(false);
            }

            if (Lang13.Bool(this.target) && Lang13.Bool(this.procname))
            {
                Lang13.Call(Lang13.BindFunc(this.target, this.procname), Task13.User);
            }
            return(true);
        }
Пример #8
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);
     }
 }
Пример #9
0
        // Function from file: species_types.dm
        public override void Activate(int?forced_state = null)
        {
            dynamic H = null;
            Reagent_Toxin_Slimejelly S           = null;
            Mob_Living_Carbon_Human  spare       = null;
            Action_Innate_SwapBody   callforward = null;
            Action_Innate_SwapBody   callback    = null;

            H = this.owner;
            H.WriteMsg("<span class='notice'>You focus intently on moving your body while standing perfectly still...</span>");
            H.notransform = 1;

            foreach (dynamic _a in Lang13.Enumerate(H.reagents.reagent_list, typeof(Reagent_Toxin_Slimejelly)))
            {
                S = _a;


                if (S.volume >= 200)
                {
                    spare           = new Mob_Living_Carbon_Human(H.loc);
                    spare.underwear = "Nude";
                    new ByTable().Set(1, spare).Set("transfer_SE", 1).Apply(Lang13.BindFunc(H.dna, "transfer_identity"));
                    H.dna.features["mcolor"] = Rand13.Pick(new object [] { "FFFFFF", "7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F" });
                    spare.real_name          = spare.dna.real_name;
                    spare.name = spare.dna.real_name;
                    spare.updateappearance(null, true);
                    spare.domutcheck();
                    spare.Move(Map13.GetStep(H.loc, Convert.ToInt32(Rand13.Pick(new object [] { GlobalVars.NORTH, GlobalVars.SOUTH, GlobalVars.EAST, GlobalVars.WEST }))));
                    S.volume         = 80;
                    H.notransform    = 0;
                    callforward      = new Action_Innate_SwapBody();
                    callback         = new Action_Innate_SwapBody();
                    callforward.body = spare;
                    callforward.Grant(H);
                    callback.body = H;
                    callback.Grant(spare);
                    ((Mind)H.mind).transfer_to(spare);
                    spare.WriteMsg("<span class='notice'>...and after a moment of disorentation, you're besides yourself!</span>");
                    return;
                }
            }
            H.WriteMsg("<span class='warning'>...but there is not enough of you to go around! You must attain more mass to split!</span>");
            H.notransform = 0;
            return;
        }
Пример #10
0
        // Function from file: observer.dm
        public override void ClickOn(Ent_Static A = null, string _params = null)
        {
            ByTable modifiers = null;


            if (this.client.click_intercept != null)
            {
                if (Lang13.Bool(Lang13.Call(Lang13.BindFunc(this.client.click_intercept, "ClickOn"), this, _params, A)))
                {
                    return;
                }
            }
            modifiers = String13.ParseUrlParams(_params);

            if (Lang13.Bool(modifiers["middle"]))
            {
                this.MiddleClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["shift"]))
            {
                this.ShiftClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["alt"]))
            {
                this.AltClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["ctrl"]))
            {
                this.CtrlClickOn(A);
                return;
            }

            if (Game13.time <= this.next_move)
            {
                return;
            }
            A.attack_ghost(this);
            return;
        }
Пример #11
0
        // Function from file: teleport.dm
        public virtual bool start(dynamic ateleatom = null, dynamic adestination = null, dynamic aprecision = null, dynamic afteleport = null, dynamic aeffectin = null, dynamic aeffectout = null, dynamic asoundin = null, dynamic asoundout = null, params object[] _)
        {
            ByTable _args = new ByTable(new object[] { ateleatom, adestination, aprecision, afteleport, aeffectin, aeffectout, asoundin, asoundout }).Extend(_);


            if (_args[3] == null)
            {
                _args[3] = 0;
            }

            if (_args[4] == null)
            {
                _args[4] = 1;
            }

            if (_args[5] == null)
            {
                _args[5] = null;
            }

            if (_args[6] == null)
            {
                _args[6] = null;
            }

            if (_args[7] == null)
            {
                _args[7] = null;
            }

            if (_args[8] == null)
            {
                _args[8] = null;
            }

            if (!Lang13.Bool(_args.Apply(Lang13.BindFunc(this, "initTeleport"))))
            {
                return(false);
            }
            return(true);
        }
Пример #12
0
        // Function from file: glasses.dm
        public void thermal_overload(  )
        {
            Ent_Static H = null;


            if (this.loc is Mob_Living_Carbon_Human)
            {
                H = this.loc;

                if (!Lang13.Bool(((dynamic)H).disabilities & 1))
                {
                    if (((dynamic)H).glasses == this)
                    {
                        ((dynamic)H).WriteMsg("<span class='danger'>The " + this + " overloads and blinds you!</span>");
                        new ByTable().Set("visual", 1).Apply(Lang13.BindFunc(H, "flash_eyes"));
                        ((dynamic)H).blind_eyes(3);
                        ((dynamic)H).blur_eyes(5);
                        ((dynamic)H).adjust_eye_damage(5);
                    }
                }
            }
            return;
        }
Пример #13
0
 // Function from file: timer.dm
 public void runevent(Timedevent _event = null)
 {
     _event.argList.Apply(Lang13.BindFunc(_event.thingToCall, _event.procToCall));
     return;
 }
        // Function from file: chronosuit.dm
        public void deactivate(bool?force = null, bool?silent = null)
        {
            force  = force ?? false;
            silent = silent ?? false;

            Ent_Static user = null;


            if (this.activated && (!this.teleporting || force == true))
            {
                this.activating = true;
                user            = this.loc;

                if (user != null && user is Mob_Living_Carbon_Human)
                {
                    if (((dynamic)user).wear_suit == this)
                    {
                        if (!(silent == true))
                        {
                            ((dynamic)user).WriteMsg("\nroot@ChronosuitMK4# chronowalk4 --stop\n");
                        }

                        if (this.camera != null)
                        {
                            if (!(silent == true))
                            {
                                ((dynamic)user).WriteMsg("[ <span style='color: #ff5500;'>ok</span> ] Sending TERM signal to chronowalk4-view");
                            }
                            GlobalFuncs.qdel(this.camera);
                        }

                        if (Lang13.Bool(this.helmet))
                        {
                            if (!(silent == true))
                            {
                                ((dynamic)user).WriteMsg("[ <span style='color: #ff5500;'>ok</span> ] Stopping ui display driver");
                                ((dynamic)user).WriteMsg("[ <span style='color: #ff5500;'>ok</span> ] Stopping brainwave scanner");
                                ((dynamic)user).WriteMsg("[ <span style='color: #ff5500;'>ok</span> ] Unmounting /dev/helmet");
                            }
                            this.helmet.flags &= 65533;
                            this.helmet.suit   = null;
                            this.helmet        = null;
                        }

                        if (!(silent == true))
                        {
                            ((dynamic)user).WriteMsg("logout");
                        }
                    }
                    this.teleport_now.Remove(user);
                }
                this.flags     &= 65533;
                this.cooldown   = Game13.time + this.cooldowntime * 1.5;
                this.activated  = false;
                this.activating = false;
                this.finish_chronowalk();

                if (this.teleporting && force == true)
                {
                    new ByTable().Set(1, 35).Set(2, this).Set("safety", 1).Apply(Lang13.BindFunc(user, "electrocute_act"));
                }
            }
            return;
        }
Пример #15
0
        // Function from file: imposter.dm
        public override bool start(  )
        {
            Mind    M                 = null;
            dynamic W                 = null;
            ByTable candidates        = null;
            dynamic C                 = null;
            Mob_Living_Carbon_Human I = null;
            Objective_Protect       protect_objective = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.ticker.mode.wizards, typeof(Mind)))
            {
                M = _a;


                if (!(M.current is Mob_Living_Carbon_Human))
                {
                    continue;
                }
                W          = M.current;
                candidates = GlobalFuncs.get_candidates("wizard");

                if (!(candidates != null))
                {
                    return(false);
                }
                C = Rand13.PickFromTable(candidates);
                GlobalFuncs.PoolOrNew(typeof(Obj_Effect_ParticleEffect_Smoke), W.loc);
                I = new Mob_Living_Carbon_Human(W.loc);
                new ByTable().Set(1, I).Set("transfer_SE", 1).Apply(Lang13.BindFunc(W.dna, "transfer_identity"));
                I.real_name = I.dna.real_name;
                I.name      = I.dna.real_name;
                I.updateappearance(null, true);
                I.domutcheck();

                if (Lang13.Bool(W.ears))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.ears.type), 8);
                }

                if (Lang13.Bool(W.w_uniform))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.w_uniform.type), 14);
                }

                if (Lang13.Bool(W.shoes))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.shoes.type), 12);
                }

                if (Lang13.Bool(W.wear_suit))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.wear_suit.type), 13);
                }

                if (Lang13.Bool(W.head))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.head.type), 11);
                }

                if (Lang13.Bool(W.back))
                {
                    I.equip_to_slot_or_del(Lang13.Call(W.back.type), 1);
                }
                I.key = C.key;
                I.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_AreaTeleport_Teleport(null));
                I.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_TurfTeleport_Blink(null));
                I.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_EtherealJaunt(null));
                GlobalVars.ticker.mode.apprentices.Add(I.mind);
                I.mind.special_role                = "imposter";
                protect_objective                  = new Objective_Protect();
                protect_objective.owner            = I.mind;
                protect_objective.target           = W.mind;
                protect_objective.explanation_text = "Protect " + W.real_name + ", the wizard.";
                I.mind.objectives.Add(protect_objective);
                ((GameMode)GlobalVars.ticker.mode).update_wiz_icons_added(I.mind);
                I.attack_log.Add("[" + GlobalFuncs.time_stamp() + "] <font color='red'>Is an imposter!</font>");
                I.WriteMsg("<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>");
                I.WriteMsg(new Sound("sound/effects/magic.ogg"));
            }
            return(false);
        }
 // Function from file: interactive.dm
 public void callfunction(dynamic Proc = null)
 {
     Lang13.Call(Lang13.BindFunc(this, Proc), this);
     return;
 }
Пример #17
0
        // Function from file: html_interface.dm
        public dynamic _getClient(dynamic hclient = null)
        {
            bool res = false;


            if (Lang13.Bool(hclient))
            {
                if (Lang13.Bool(hclient.client))
                {
                    res = hclient.client.inactivity <= 6000 && Lang13.Bool((Lang13.HasCall(this.v_ref, "hiIsValidClient") ? Lang13.Call(Lang13.BindFunc(this.v_ref, "hiIsValidClient"), hclient, this) : ((dynamic)(GlobalVars.TRUE))));

                    if (res)
                    {
                        if (!Lang13.Bool(hclient.active))
                        {
                            this.enableFor(hclient);
                        }
                    }
                    else if (Lang13.Bool(hclient.active))
                    {
                        this.disableFor(hclient);
                    }
                    return(hclient);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
            return(null);
        }
        // Function from file: dna_console.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            Mob     viable_occupant             = null;
            double? num                         = null;
            string  last_change                 = null;
            bool    epinephrine_amount          = false;
            int     can_add                     = 0;
            string  text                        = null;
            dynamic buffer_slot                 = null;
            ByTable buffer_slot2                = null;
            dynamic buffer_slot3                = null;
            Obj_Item_Weapon_Dnainjector_Timed I = null;
            Mutation_Human HM                   = null;
            int?           time_coeff           = null;
            Mutation_Human HM2                  = null;
            dynamic        buffer_slot4         = null;
            dynamic        locked_state         = null;
            int            len                  = 0;
            int            block                = 0;
            double         subblock             = 0;
            string         hex                  = null;
            int            len2                 = 0;
            int            block2               = 0;
            double         subblock2            = 0;
            string         hex2                 = null;


            if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc))))
            {
                return(null);
            }

            if (!(Task13.User.loc is Tile))
            {
                return(null);
            }

            if (!(this.loc is Tile && Map13.GetDistance(this, Task13.User) <= 1 || Task13.User is Mob_Living_Silicon))
            {
                return(null);
            }

            if (this.current_screen == "working")
            {
                return(null);
            }
            this.add_fingerprint(Task13.User);
            Task13.User.set_machine(this);
            viable_occupant = this.get_viable_occupant();
            num             = Num13.Floor(String13.ParseNumber(href_list["num"]) ?? 0);

            dynamic _f = href_list["task"];             // Was a switch-case, sorry for the mess.

            if (_f == "togglelock")
            {
                if (Lang13.Bool(this.connected))
                {
                    this.connected.locked = !Lang13.Bool(this.connected.locked);
                }
            }
            else if (_f == "toggleopen")
            {
                if (Lang13.Bool(this.connected))
                {
                    ((Obj_Machinery_DnaScannernew)this.connected).toggle_open(Task13.User);
                }
            }
            else if (_f == "setduration")
            {
                if (!Lang13.Bool(num))
                {
                    num = Num13.Floor(Convert.ToDouble(Interface13.Input(Task13.User, "Choose pulse duration:", "Input an Integer", null, null, InputType.Num | InputType.Null)));
                }

                if (Lang13.Bool(num))
                {
                    this.radduration = GlobalFuncs.Wrap(num, true, 31);
                }
            }
            else if (_f == "setstrength")
            {
                if (!Lang13.Bool(num))
                {
                    num = Num13.Floor(Convert.ToDouble(Interface13.Input(Task13.User, "Choose pulse strength:", "Input an Integer", null, null, InputType.Num | InputType.Null)));
                }

                if (Lang13.Bool(num))
                {
                    this.radstrength = GlobalFuncs.Wrap(num, true, 16);
                }
            }
            else if (_f == "screen")
            {
                this.current_screen = href_list["text"];
            }
            else if (_f == "rejuv")
            {
                if (viable_occupant != null && viable_occupant.reagents != null)
                {
                    epinephrine_amount = viable_occupant.reagents.get_reagent_amount("epinephrine");
                    can_add            = Num13.MaxInt(Num13.MinInt(90 - (epinephrine_amount ?1:0), 15), 0);
                    viable_occupant.reagents.add_reagent("epinephrine", can_add);
                }
            }
            else if (_f == "setbufferlabel")
            {
                text = GlobalFuncs.sanitize(Interface13.Input(Task13.User, "Input a new label:", "Input an Text", null, null, InputType.Str | InputType.Null));

                if (Lang13.Bool(num) && Lang13.Bool(text))
                {
                    num         = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    buffer_slot = this.buffer[num];

                    if (buffer_slot is ByTable)
                    {
                        buffer_slot["label"] = text;
                    }
                }
            }
            else if (_f == "setbuffer")
            {
                if (Lang13.Bool(num) && viable_occupant != null)
                {
                    num = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    this.buffer[num] = new ByTable()
                                       .Set("label", "Buffer" + num + ":" + viable_occupant.real_name)
                                       .Set("UI", ((dynamic)viable_occupant).dna.uni_identity)
                                       .Set("SE", ((dynamic)viable_occupant).dna.struc_enzymes)
                                       .Set("UE", ((dynamic)viable_occupant).dna.unique_enzymes)
                                       .Set("name", viable_occupant.real_name)
                                       .Set("blood_type", ((dynamic)viable_occupant).dna.blood_type)
                    ;
                }
            }
            else if (_f == "clearbuffer")
            {
                if (Lang13.Bool(num))
                {
                    num          = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    buffer_slot2 = this.buffer[num];

                    if (buffer_slot2 is ByTable)
                    {
                        buffer_slot2.Cut();
                    }
                }
            }
            else if (_f == "transferbuffer")
            {
                if (Lang13.Bool(num) && viable_occupant != null)
                {
                    dynamic _a = href_list["text"];                     // Was a switch-case, sorry for the mess.
                    if (_a == "se")
                    {
                        this.apply_buffer(1, num);
                    }
                    else if (_a == "ui")
                    {
                        this.apply_buffer(2, num);
                    }
                    else if (_a == "ue")
                    {
                        this.apply_buffer(3, num);
                    }
                    else if (_a == "mixed")
                    {
                        this.apply_buffer(4, num);
                    }
                }
            }
            else if (_f == "injector")
            {
                if (Lang13.Bool(num) && this.injectorready)
                {
                    num          = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    buffer_slot3 = this.buffer[num];

                    if (buffer_slot3 is ByTable)
                    {
                        I = null;

                        dynamic _d = href_list["text"];                         // Was a switch-case, sorry for the mess.
                        if (_d == "se")
                        {
                            if (Lang13.Bool(buffer_slot3["SE"]))
                            {
                                I = new Obj_Item_Weapon_Dnainjector_Timed(this.loc);

                                foreach (dynamic _b in Lang13.Enumerate(GlobalVars.good_mutations + GlobalVars.bad_mutations + GlobalVars.not_good_mutations, typeof(Mutation_Human)))
                                {
                                    HM = _b;


                                    if (HM.check_block_string(buffer_slot3["SE"]))
                                    {
                                        I.add_mutations.Add(HM);
                                    }
                                    else
                                    {
                                        I.remove_mutations.Add(HM);
                                    }
                                }
                                time_coeff = null;

                                foreach (dynamic _c in Lang13.Enumerate(I.add_mutations, typeof(Mutation_Human)))
                                {
                                    HM2 = _c;


                                    if (!Lang13.Bool(time_coeff))
                                    {
                                        time_coeff = HM2.time_coeff;
                                        continue;
                                    }
                                    time_coeff = Num13.MinInt(time_coeff ?? 0, HM2.time_coeff);
                                }

                                if (Lang13.Bool(this.connected))
                                {
                                    I.duration     = I.duration * (time_coeff ?? 0) * Convert.ToDouble(this.connected.damage_coeff);
                                    I.damage_coeff = Convert.ToDouble(this.connected.damage_coeff);
                                }
                            }
                        }
                        else if (_d == "ui")
                        {
                            if (Lang13.Bool(buffer_slot3["UI"]))
                            {
                                I        = new Obj_Item_Weapon_Dnainjector_Timed(this.loc);
                                I.fields = new ByTable().Set("UI", buffer_slot3["UI"]);

                                if (Lang13.Bool(this.connected))
                                {
                                    I.damage_coeff = Convert.ToDouble(this.connected.damage_coeff);
                                }
                            }
                        }
                        else if (_d == "ue")
                        {
                            if (Lang13.Bool(buffer_slot3["name"]) && Lang13.Bool(buffer_slot3["UE"]) && Lang13.Bool(buffer_slot3["blood_type"]))
                            {
                                I        = new Obj_Item_Weapon_Dnainjector_Timed(this.loc);
                                I.fields = new ByTable().Set("name", buffer_slot3["name"]).Set("UE", buffer_slot3["UE"]).Set("blood_type", buffer_slot3["blood_type"]);

                                if (Lang13.Bool(this.connected))
                                {
                                    I.damage_coeff = Convert.ToDouble(this.connected.damage_coeff);
                                }
                            }
                        }
                        else if (_d == "mixed")
                        {
                            if (Lang13.Bool(buffer_slot3["UI"]) && Lang13.Bool(buffer_slot3["name"]) && Lang13.Bool(buffer_slot3["UE"]) && Lang13.Bool(buffer_slot3["blood_type"]))
                            {
                                I        = new Obj_Item_Weapon_Dnainjector_Timed(this.loc);
                                I.fields = new ByTable().Set("UI", buffer_slot3["UI"]).Set("name", buffer_slot3["name"]).Set("UE", buffer_slot3["UE"]).Set("blood_type", buffer_slot3["blood_type"]);

                                if (Lang13.Bool(this.connected))
                                {
                                    I.damage_coeff = Convert.ToDouble(this.connected.damage_coeff);
                                }
                            }
                        }

                        if (I != null)
                        {
                            this.injectorready = false;
                            Task13.Schedule(100, (Task13.Closure)(() => {
                                this.injectorready = true;
                                return;
                            }));
                        }
                    }
                }
            }
            else if (_f == "loaddisk")
            {
                if (Lang13.Bool(num) && Lang13.Bool(this.diskette) && Lang13.Bool(this.diskette.fields))
                {
                    num = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    this.buffer[num] = this.diskette.fields.Copy();
                }
            }
            else if (_f == "savedisk")
            {
                if (Lang13.Bool(num) && Lang13.Bool(this.diskette) && !this.diskette.read_only)
                {
                    num          = Num13.MaxInt(1, Num13.MinInt(((int)(num ?? 0)), 3));
                    buffer_slot4 = this.buffer[num];

                    if (buffer_slot4 is ByTable)
                    {
                        this.diskette.name   = "data disk [" + buffer_slot4["label"] + "]";
                        this.diskette.fields = buffer_slot4.Copy();
                    }
                }
            }
            else if (_f == "ejectdisk")
            {
                if (Lang13.Bool(this.diskette))
                {
                    this.diskette.loc = GlobalFuncs.get_turf(this);
                    this.diskette     = null;
                }
            }
            else if (_f == "setdelayed")
            {
                if (Lang13.Bool(num))
                {
                    this.delayed_action = new ByTable().Set("action", String13.ParseNumber(href_list["delayaction"])).Set("buffer", num);
                }
            }
            else if (_f == "pulseui" || _f == "pulsese")
            {
                if (Lang13.Bool(num) && viable_occupant != null && Lang13.Bool(this.connected))
                {
                    this.radduration      = GlobalFuncs.Wrap(this.radduration, true, 31);
                    this.radstrength      = GlobalFuncs.Wrap(this.radstrength, true, 16);
                    locked_state          = this.connected.locked;
                    this.connected.locked = 1;
                    this.current_screen   = "working";
                    this.ShowInterface(Task13.User);
                    Task13.Sleep(((int)((this.radduration ?? 0) * 10)));
                    this.current_screen = "mainmenu";

                    if (viable_occupant != null && Lang13.Bool(this.connected) && this.connected.occupant == viable_occupant)
                    {
                        viable_occupant.radiation += (this.radduration ?? 0) * (this.radstrength ?? 0) * 0.2 / Math.Pow(Convert.ToDouble(this.connected.damage_coeff), 2);

                        dynamic _e = href_list["task"];                         // Was a switch-case, sorry for the mess.
                        if (_e == "pulseui")
                        {
                            len          = Lang13.Length(((dynamic)viable_occupant).dna.uni_identity);
                            num          = GlobalFuncs.Wrap(num, true, len + 1);
                            num          = this.randomize_radiation_accuracy(num, (this.radduration ?? 0) + Math.Pow(Convert.ToDouble(this.connected.precision_coeff), 2), len);
                            block        = Num13.Floor(((num ?? 0) - 1) / 3) + 1;
                            subblock     = (num ?? 0) - block * 3;
                            last_change  = "UI #" + block + "-" + subblock + "; ";
                            hex          = String13.SubStr(((dynamic)viable_occupant).dna.uni_identity, ((int)(num ?? 0)), ((int)((num ?? 0) + 1)));
                            last_change += "" + hex;
                            hex          = this.scramble(hex, this.radstrength, this.radduration);
                            last_change += "->" + hex;
                            ((dynamic)viable_occupant).dna.uni_identity = String13.SubStr(((dynamic)viable_occupant).dna.uni_identity, 1, ((int)(num ?? 0))) + hex + String13.SubStr(((dynamic)viable_occupant).dna.uni_identity, ((int)((num ?? 0) + 1)), 0);
                            new ByTable().Set("mutations_overlay_update", 1).Apply(Lang13.BindFunc(viable_occupant, "updateappearance"));
                        }
                        else if (_e == "pulsese")
                        {
                            len2         = Lang13.Length(((dynamic)viable_occupant).dna.struc_enzymes);
                            num          = GlobalFuncs.Wrap(num, true, len2 + 1);
                            num          = this.randomize_radiation_accuracy(num, (this.radduration ?? 0) + Math.Pow(Convert.ToDouble(this.connected.precision_coeff), 2), len2);
                            block2       = Num13.Floor(((num ?? 0) - 1) / 3) + 1;
                            subblock2    = (num ?? 0) - block2 * 3;
                            last_change  = "SE #" + block2 + "-" + subblock2 + "; ";
                            hex2         = String13.SubStr(((dynamic)viable_occupant).dna.struc_enzymes, ((int)(num ?? 0)), ((int)((num ?? 0) + 1)));
                            last_change += "" + hex2;
                            hex2         = this.scramble(hex2, this.radstrength, this.radduration);
                            last_change += "->" + hex2;
                            ((dynamic)viable_occupant).dna.struc_enzymes = String13.SubStr(((dynamic)viable_occupant).dna.struc_enzymes, 1, ((int)(num ?? 0))) + hex2 + String13.SubStr(((dynamic)viable_occupant).dna.struc_enzymes, ((int)((num ?? 0) + 1)), 0);
                            viable_occupant.domutcheck();
                        }
                    }
                    else
                    {
                        this.current_screen = "mainmenu";
                    }

                    if (Lang13.Bool(this.connected))
                    {
                        this.connected.locked = locked_state;
                    }
                }
            }
            this.ShowInterface(Task13.User, last_change);
            return(null);
        }
        // Function from file: dna_console.dm
        public void apply_buffer(int action = 0, double?buffer_num = null)
        {
            dynamic buffer_slot     = null;
            Mob     viable_occupant = null;

            buffer_num      = Num13.MaxInt(1, Num13.MinInt(((int)(buffer_num ?? 0)), 3));
            buffer_slot     = this.buffer[buffer_num];
            viable_occupant = this.get_viable_occupant();

            if (buffer_slot is ByTable)
            {
                viable_occupant.radiation += Rand13.Int(((int)(10 / Math.Pow(Convert.ToDouble(this.connected.damage_coeff), 2))), ((int)(25 / Math.Pow(Convert.ToDouble(this.connected.damage_coeff), 2))));

                switch ((int)(action))
                {
                case 1:

                    if (Lang13.Bool(buffer_slot["SE"]))
                    {
                        ((dynamic)viable_occupant).dna.struc_enzymes = buffer_slot["SE"];
                        viable_occupant.domutcheck();
                    }
                    break;

                case 2:

                    if (Lang13.Bool(buffer_slot["UI"]))
                    {
                        ((dynamic)viable_occupant).dna.uni_identity = buffer_slot["UI"];
                        new ByTable().Set("mutations_overlay_update", 1).Apply(Lang13.BindFunc(viable_occupant, "updateappearance"));
                    }
                    break;

                case 3:

                    if (Lang13.Bool(buffer_slot["name"]) && Lang13.Bool(buffer_slot["UE"]) && Lang13.Bool(buffer_slot["blood_type"]))
                    {
                        viable_occupant.real_name = buffer_slot["name"];
                        viable_occupant.name      = buffer_slot["name"];
                        ((dynamic)viable_occupant).dna.unique_enzymes = buffer_slot["UE"];
                        ((dynamic)viable_occupant).dna.blood_type     = buffer_slot["blood_type"];
                    }
                    break;

                case 4:

                    if (Lang13.Bool(buffer_slot["UI"]))
                    {
                        ((dynamic)viable_occupant).dna.uni_identity = buffer_slot["UI"];
                        new ByTable().Set("mutations_overlay_update", 1).Apply(Lang13.BindFunc(viable_occupant, "updateappearance"));
                    }

                    if (Lang13.Bool(buffer_slot["name"]) && Lang13.Bool(buffer_slot["UE"]) && Lang13.Bool(buffer_slot["blood_type"]))
                    {
                        viable_occupant.real_name = buffer_slot["name"];
                        viable_occupant.name      = buffer_slot["name"];
                        ((dynamic)viable_occupant).dna.unique_enzymes = buffer_slot["UE"];
                        ((dynamic)viable_occupant).dna.blood_type     = buffer_slot["blood_type"];
                    }
                    break;
                }
            }
            return;
        }
Пример #20
0
        // Function from file: ticker.dm
        public bool declare_completion(  )
        {
            bool                     station_evacuated = false;
            int                      num_survivors     = 0;
            int                      num_escapees      = 0;
            dynamic                  Player            = null;
            StationState             end_state         = null;
            int                      station_integrity = 0;
            Mob_Living_Silicon_Ai    aiPlayer          = null;
            string                   robolist          = null;
            Mob_Living_Silicon_Robot robo              = null;
            Mob_Living_Silicon_Robot robo2             = null;
            dynamic                  handler           = null;
            ByTable                  total_antagonists = null;
            Mind                     Mind              = null;
            string                   temprole          = null;
            dynamic                  i      = null;
            string                   dellog = null;
            dynamic                  path   = null;


            if (GlobalVars.SSshuttle.emergency.mode >= 5)
            {
                station_evacuated = true;
            }
            num_survivors = 0;
            num_escapees  = 0;
            Game13.WriteMsg("<BR><BR><BR><FONT size=3><B>The round has ended.</B></FONT>");

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.mob_list))
            {
                Player = _a;


                if (Lang13.Bool(Player.mind) && !(Player is Mob_NewPlayer))
                {
                    if (Convert.ToInt32(Player.stat) != 2 && !(Player is Mob_Living_Carbon_Brain))
                    {
                        num_survivors++;

                        if (station_evacuated)
                        {
                            if (!((Ent_Static)Player).onCentcom() && !((Ent_Static)Player).onSyndieBase())
                            {
                                Player.WriteMsg("<font color='blue'><b>You managed to survive, but were marooned on " + GlobalFuncs.station_name() + "...</b></FONT>");
                            }
                            else
                            {
                                num_escapees++;
                                Player.WriteMsg("<font color='green'><b>You managed to survive the events on " + GlobalFuncs.station_name() + " as " + Player.real_name + ".</b></FONT>");
                            }
                        }
                        else
                        {
                            Player.WriteMsg("<font color='green'><b>You managed to survive the events on " + GlobalFuncs.station_name() + " as " + Player.real_name + ".</b></FONT>");
                        }
                    }
                    else
                    {
                        Player.WriteMsg("<font color='red'><b>You did not survive the events on " + GlobalFuncs.station_name() + "...</b></FONT>");
                    }
                }
            }
            end_state = new StationState();
            end_state.count();
            station_integrity = Num13.MinInt(((int)(Num13.Round(GlobalVars.start_state.score(end_state) * 100, 0.1))), 100);
            Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Shift Duration: <B>" + Num13.Floor(Game13.time / 36000) + ":" + GlobalFuncs.add_zero("" + Game13.time / 600 % 60, 2) + ":" + Game13.time / 100 % 6 + Game13.time / 100 % 10 + "</B>");
            Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Station Integrity: <B>" + (this.mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "" + station_integrity + "%") + "</B>");

            if (GlobalVars.joined_player_list.len != 0)
            {
                Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Total Population: <B>" + GlobalVars.joined_player_list.len + "</B>");

                if (station_evacuated)
                {
                    Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Evacuation Rate: <B>" + num_escapees + " (" + Num13.Round(num_escapees / GlobalVars.joined_player_list.len * 100, 0.1) + "%)</B>");
                }
                Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Survival Rate: <B>" + num_survivors + " (" + Num13.Round(num_survivors / GlobalVars.joined_player_list.len * 100, 0.1) + "%)</B>");
            }
            Game13.WriteMsg("<BR>");

            foreach (dynamic _c in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon_Ai)))
            {
                aiPlayer = _c;


                if (aiPlayer.stat != 2 && aiPlayer.mind != null)
                {
                    Game13.WriteMsg("<b>" + aiPlayer.name + " (Played by: " + aiPlayer.mind.key + ")'s laws at the end of the round were:</b>");
                    aiPlayer.show_laws(true);
                }
                else if (aiPlayer.mind != null)
                {
                    Game13.WriteMsg("<b>" + aiPlayer.name + " (Played by: " + aiPlayer.mind.key + ")'s laws when it was deactivated were:</b>");
                    aiPlayer.show_laws(true);
                }
                Game13.WriteMsg("<b>Total law changes: " + aiPlayer.law_change_counter + "</b>");

                if (aiPlayer.connected_robots.len != 0)
                {
                    robolist = "<b>" + aiPlayer.real_name + "'s minions were:</b> ";

                    foreach (dynamic _b in Lang13.Enumerate(aiPlayer.connected_robots, typeof(Mob_Living_Silicon_Robot)))
                    {
                        robo = _b;


                        if (robo.mind != null)
                        {
                            robolist += "" + robo.name + (robo.stat != 0 ? " (Deactivated) (Played by: " + robo.mind.key + "), " : " (Played by: " + robo.mind.key + "), ");
                        }
                    }
                    Game13.WriteMsg("" + robolist);
                }
            }

            foreach (dynamic _d in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon_Robot)))
            {
                robo2 = _d;


                if (!Lang13.Bool(robo2.connected_ai) && robo2.mind != null)
                {
                    if (robo2.stat != 2)
                    {
                        Game13.WriteMsg("<b>" + robo2.name + " (Played by: " + robo2.mind.key + ") survived as an AI-less borg! Its laws were:</b>");
                    }
                    else
                    {
                        Game13.WriteMsg("<b>" + robo2.name + " (Played by: " + robo2.mind.key + ") was unable to survive the rigors of being a cyborg without an AI. Its laws were:</b>");
                    }

                    if (robo2 != null)
                    {
                        robo2.laws.show_laws(typeof(Game13));
                    }
                }
            }
            this.mode.declare_completion();

            foreach (dynamic _e in Lang13.Enumerate(Lang13.GetTypes("/datum/game_mode/proc")))
            {
                handler = _e;


                if (String13.FindIgnoreCase("" + handler, "auto_declare_completion_", 1, 0) != 0)
                {
                    Lang13.Call(Lang13.BindFunc(this.mode, handler), this.force_ending);
                }
            }
            total_antagonists = new ByTable();

            foreach (dynamic _f in Lang13.Enumerate(this.minds, typeof(Mind)))
            {
                Mind = _f;

                temprole = Mind.special_role;

                if (Lang13.Bool(temprole))
                {
                    if (total_antagonists.Contains(temprole))
                    {
                        total_antagonists[temprole] += ", " + Mind.name + "(" + Mind.key + ")";
                    }
                    else
                    {
                        total_antagonists.Add(temprole);
                        total_antagonists[temprole] += ": " + Mind.name + "(" + Mind.key + ")";
                    }
                }
            }
            GlobalFuncs.log_game("Antagonists at round end were...");

            foreach (dynamic _g in Lang13.Enumerate(total_antagonists))
            {
                i = _g;

                GlobalFuncs.log_game("" + i + "s" + total_antagonists[i] + ".");
            }

            if (GlobalVars.SSgarbage.didntgc.len != 0)
            {
                dellog = "";

                foreach (dynamic _h in Lang13.Enumerate(GlobalVars.SSgarbage.didntgc))
                {
                    path = _h;

                    dellog += "Path : " + path + " \n";
                    dellog += "Failures : " + GlobalVars.SSgarbage.didntgc[path] + " \n";
                }
                Game13.log.WriteMsg(dellog);
            }
            return(true);
        }
Пример #21
0
        // Function from file: scanners.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            Ent_Static location             = null;
            GasMixture environment          = null;
            double     pressure             = 0;
            double     total_moles          = 0;
            ByTable    env_gases            = null;
            dynamic    o2_concentration     = null;
            dynamic    n2_concentration     = null;
            double     co2_concentration    = 0;
            double     plasma_concentration = 0;
            dynamic    id = null;
            dynamic    gas_concentration = null;

            this.add_fingerprint(user);

            if (Lang13.Bool(user.stat) || user.eye_blind != 0)
            {
                return(null);
            }
            location = user.loc;

            if (!(location is Tile))
            {
                return(null);
            }
            environment = location.return_air();
            pressure    = environment.return_pressure();
            total_moles = environment.total_moles();
            user.WriteMsg("<span class='info'><B>Results:</B></span>");

            if (Math.Abs(pressure - 101.32499694824219) < 10)
            {
                user.WriteMsg("<span class='info'>Pressure: " + Num13.Round(pressure, 0.1) + " kPa</span>");
            }
            else
            {
                user.WriteMsg("<span class='alert'>Pressure: " + Num13.Round(pressure, 0.1) + " kPa</span>");
            }

            if (total_moles != 0)
            {
                env_gases = environment.gases;
                GlobalVars.hardcoded_gases.Apply(Lang13.BindFunc(environment, "assert_gases"));
                o2_concentration     = env_gases["o2"][1] / total_moles;
                n2_concentration     = env_gases["n2"][1] / total_moles;
                co2_concentration    = Convert.ToDouble(env_gases["co2"][1] / total_moles);
                plasma_concentration = Convert.ToDouble(env_gases["plasma"][1] / total_moles);
                environment.garbage_collect();

                if (Math.Abs(Convert.ToDouble(n2_concentration - 0.79)) < 20)
                {
                    user.WriteMsg("<span class='info'>Nitrogen: " + Num13.Floor(Convert.ToDouble(n2_concentration * 100)) + " %</span>");
                }
                else
                {
                    user.WriteMsg("<span class='alert'>Nitrogen: " + Num13.Floor(Convert.ToDouble(n2_concentration * 100)) + " %</span>");
                }

                if (Math.Abs(Convert.ToDouble(o2_concentration - 0.01)) < 2)
                {
                    user.WriteMsg("<span class='info'>Oxygen: " + Num13.Floor(Convert.ToDouble(o2_concentration * 100)) + " %</span>");
                }
                else
                {
                    user.WriteMsg("<span class='alert'>Oxygen: " + Num13.Floor(Convert.ToDouble(o2_concentration * 100)) + " %</span>");
                }

                if (co2_concentration > 0.01)
                {
                    user.WriteMsg("<span class='alert'>CO2: " + Num13.Floor(co2_concentration * 100) + " %</span>");
                }
                else
                {
                    user.WriteMsg("<span class='info'>CO2: " + Num13.Floor(co2_concentration * 100) + " %</span>");
                }

                if (plasma_concentration > 0.01)
                {
                    user.WriteMsg("<span class='info'>Plasma: " + Num13.Floor(plasma_concentration * 100) + " %</span>");
                }

                foreach (dynamic _a in Lang13.Enumerate(env_gases))
                {
                    id = _a;


                    if (GlobalVars.hardcoded_gases.Contains(id))
                    {
                        continue;
                    }
                    gas_concentration = env_gases[id][1] / total_moles;
                    user.WriteMsg("<span class='alert'>" + env_gases[id][3][2] + ": " + Num13.Floor(Convert.ToDouble(gas_concentration * 100)) + " %</span>");
                }
                user.WriteMsg("<span class='info'>Temperature: " + Num13.Floor(Convert.ToDouble(environment.temperature - 273.41)) + " &deg;C</span>");
            }
            return(null);
        }
Пример #22
0
        // Function from file: simple_animal.dm
        public override void handle_environment(GasMixture environment = null)
        {
            bool       atmos_suitable = false;
            Ent_Static A        = null;
            Ent_Static T        = null;
            dynamic    areatemp = null;
            dynamic    diff     = null;
            Ent_Static ST       = null;
            ByTable    ST_gases = null;
            dynamic    tox      = null;
            dynamic    oxy      = null;
            dynamic    n2       = null;
            dynamic    co2      = null;

            atmos_suitable = true;
            A = this.loc;

            if (A is Tile)
            {
                T        = A;
                areatemp = this.get_temperature(environment);

                if (Math.Abs(Convert.ToDouble(areatemp - this.bodytemperature)) > 40)
                {
                    diff = areatemp - this.bodytemperature;
                    diff = diff / 5;
                    this.bodytemperature += diff;
                }

                if (T is Tile_Simulated)
                {
                    ST = T;

                    if (Lang13.Bool(((dynamic)ST).air))
                    {
                        ST_gases = ((dynamic)ST).air.gases;
                        GlobalVars.hardcoded_gases.Apply(Lang13.BindFunc(((dynamic)ST).air, "assert_gases"));
                        tox = ST_gases["plasma"][1];
                        oxy = ST_gases["o2"][1];
                        n2  = ST_gases["n2"][1];
                        co2 = ST_gases["co2"][1];
                        ((dynamic)ST).air.garbage_collect();

                        if (Lang13.Bool(this.atmos_requirements["min_oxy"]) && Convert.ToDouble(oxy) < Convert.ToDouble(this.atmos_requirements["min_oxy"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["max_oxy"]) && Convert.ToDouble(oxy) > Convert.ToDouble(this.atmos_requirements["max_oxy"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["min_tox"]) && Convert.ToDouble(tox) < Convert.ToDouble(this.atmos_requirements["min_tox"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["max_tox"]) && Convert.ToDouble(tox) > Convert.ToDouble(this.atmos_requirements["max_tox"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["min_n2"]) && Convert.ToDouble(n2) < Convert.ToDouble(this.atmos_requirements["min_n2"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["max_n2"]) && Convert.ToDouble(n2) > Convert.ToDouble(this.atmos_requirements["max_n2"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["min_co2"]) && Convert.ToDouble(co2) < Convert.ToDouble(this.atmos_requirements["min_co2"]))
                        {
                            atmos_suitable = false;
                        }
                        else if (Lang13.Bool(this.atmos_requirements["max_co2"]) && Convert.ToDouble(co2) > Convert.ToDouble(this.atmos_requirements["max_co2"]))
                        {
                            atmos_suitable = false;
                        }

                        if (!atmos_suitable)
                        {
                            this.adjustBruteLoss(this.unsuitable_atmos_damage);
                        }
                    }
                }
                else if (Lang13.Bool(this.atmos_requirements["min_oxy"]) || Lang13.Bool(this.atmos_requirements["min_tox"]) || Lang13.Bool(this.atmos_requirements["min_n2"]) || Lang13.Bool(this.atmos_requirements["min_co2"]))
                {
                    this.adjustBruteLoss(this.unsuitable_atmos_damage);
                }
            }
            this.handle_temperature_damage();
            return;
        }