// Function from file: LINDA_fire.dm public bool perform_exposure( ) { Ent_Static location = null; GasMixture affected = null; dynamic A = null; dynamic item = null; location = this.loc; if (!(location is Tile_Simulated) || !Lang13.Bool(((dynamic)location).air)) { return(false); } if ((this.volume ?? 0) > 2375) { this.bypassing = true; } else { this.bypassing = false; } if (this.bypassing) { if (!this.just_spawned) { this.volume = ((dynamic)location).air.fuel_burnt * 40000; this.temperature = ((dynamic)location).air.temperature; } } else { affected = ((GasMixture)((dynamic)location).air).remove_ratio((this.volume ?? 0) / Convert.ToDouble(((dynamic)location).air.volume)); affected.temperature = this.temperature; affected.react(); this.temperature = affected.temperature; this.volume = affected.fuel_burnt * 40000; location.assume_air(affected); } foreach (dynamic _a in Lang13.Enumerate(this.loc)) { A = _a; item = A; if (Lang13.Bool(item) && item != this) { ((Ent_Static)item).fire_act(null, this.temperature, this.volume); } } return(false); }
// Function from file: pipes.dm public void releaseAirToTurf( ) { Ent_Static T = null; if (this.air_temporary != null) { T = this.loc; T.assume_air(this.air_temporary); this.air_update_turf(); } return; }
// Function from file: tanks.dm public override bool blob_act(dynamic severity = null) { Ent_Static location = null; if (Rand13.PercentChance(50)) { location = this.loc; if (!(location is Tile)) { GlobalFuncs.qdel(this); } if (this.air_contents != null) { location.assume_air(this.air_contents); } GlobalFuncs.qdel(this); } return(false); }
// Function from file: vent_scrubber.dm public bool scrub(Ent_Static tile = null) { GasMixture environment = null; dynamic air_contents = null; ByTable env_gases = null; int? should_we_scrub = null; dynamic id = null; double transfer_moles = 0; dynamic removed = null; ByTable removed_gases = null; GasMixture filtered_out = null; ByTable filtered_gases = null; double transfer_moles2 = 0; dynamic removed2 = null; if (!(tile is Tile_Simulated)) { return(false); } environment = tile.return_air(); air_contents = this.airs[1]; env_gases = environment.gases; if ((((int)(this.scrubbing ?? 0)) & 1) != 0) { should_we_scrub = GlobalVars.FALSE; foreach (dynamic _a in Lang13.Enumerate(env_gases)) { id = _a; if (id == "n2" || id == "o2") { continue; } if (Lang13.Bool(env_gases[id][1])) { should_we_scrub = GlobalVars.TRUE; break; } } if (Lang13.Bool(should_we_scrub)) { transfer_moles = Num13.MinInt(1, ((int)(this.volume_rate / (environment.volume ?? 0)))) * environment.total_moles(); removed = tile.remove_air(transfer_moles); removed_gases = removed.gases; if (removed == null) { return(false); } filtered_out = new GasMixture(); filtered_gases = filtered_out.gases; filtered_out.temperature = removed.temperature; if (Lang13.Bool(this.scrub_Toxins) && Lang13.Bool(removed_gases["plasma"])) { filtered_out.assert_gas("plasma"); filtered_gases["plasma"][1] = removed_gases["plasma"][1]; removed.gases["plasma"][1] = 0; } if (Lang13.Bool(this.scrub_CO2) && Lang13.Bool(removed_gases["co2"])) { filtered_out.assert_gas("co2"); filtered_out.gases["co2"][1] = removed_gases["co2"][1]; removed.gases["co2"][1] = 0; } if (Lang13.Bool(removed_gases["agent_b"])) { filtered_out.assert_gas("agent_b"); filtered_out.gases["agent_b"][1] = removed_gases["agent_b"][1]; removed.gases["agent_b"][1] = 0; } if (Lang13.Bool(this.scrub_N2O) && Lang13.Bool(removed_gases["n2o"])) { filtered_out.assert_gas("n2o"); filtered_out.gases["n2o"][1] = removed_gases["n2o"][1]; removed.gases["n2o"][1] = 0; } removed.garbage_collect(); air_contents.merge(filtered_out); tile.assume_air(removed); ((Tile)tile).air_update_turf(); } } else { if (Convert.ToDouble(air_contents.return_pressure()) >= 5066.25) { return(false); } transfer_moles2 = environment.total_moles() * (this.volume_rate / (environment.volume ?? 0)); removed2 = tile.remove_air(transfer_moles2); air_contents.merge(removed2); ((Tile)tile).air_update_turf(); } this.update_parents(); return(true); }