// Function from file: LINDA_turf_tile.dm public void merge_groups(ExcitedGroup E = null) { Tile_Simulated T = null; Tile_Simulated T2 = null; if (this.turf_list.len > E.turf_list.len) { GlobalVars.SSair.excited_groups.Remove(E); foreach (dynamic _a in Lang13.Enumerate(E.turf_list, typeof(Tile_Simulated))) { T = _a; T.excited_group = this; this.turf_list.Add(T); this.reset_cooldowns(); } } else { GlobalVars.SSair.excited_groups.Remove(this); foreach (dynamic _b in Lang13.Enumerate(this.turf_list, typeof(Tile_Simulated))) { T2 = _b; T2.excited_group = E; E.turf_list.Add(T2); E.reset_cooldowns(); } } return; }
// Function from file: air.dm public void process_excited_groups( ) { ExcitedGroup EG = null; foreach (dynamic _a in Lang13.Enumerate(this.excited_groups, typeof(ExcitedGroup))) { EG = _a; EG.breakdown_cooldown++; if (EG.breakdown_cooldown == 10) { EG.self_breakdown(); return; } if (EG.breakdown_cooldown > 20) { EG.dismantle(); } } return; }
// Function from file: LINDA_turf_tile.dm public void process_cell(int fire_count = 0) { bool remove = false; ByTable adjacent_turfs = null; ExcitedGroup our_excited_group = null; int? adjacent_turfs_length = null; dynamic t = null; dynamic enemy_tile = null; dynamic enemy_simulated = null; ExcitedGroup enemy_excited_group = null; ExcitedGroup EG = null; ExcitedGroup EG2 = null; dynamic difference = null; Ent_Dynamic item = null; if (this.archived_cycle < fire_count) { this.archive(); } this.current_cycle = fire_count; remove = true; adjacent_turfs = this.atmos_adjacent_turfs; our_excited_group = this.excited_group; adjacent_turfs_length = adjacent_turfs.len; foreach (dynamic _a in Lang13.Enumerate(adjacent_turfs)) { t = _a; enemy_tile = t; if (enemy_tile is Tile_Simulated) { enemy_simulated = enemy_tile; if (fire_count > Convert.ToDouble(enemy_simulated.current_cycle)) { ((Tile_Simulated)enemy_simulated).archive(); } if (enemy_simulated.excited) { enemy_excited_group = enemy_simulated.excited_group; if (our_excited_group != null) { if (enemy_excited_group != null) { if (our_excited_group != enemy_excited_group) { our_excited_group.merge_groups(enemy_excited_group); our_excited_group = this.excited_group; } this.share_air(enemy_simulated, fire_count, adjacent_turfs_length); } else if (this.recently_active && enemy_simulated.recently_active || Lang13.Bool(this.air.compare(enemy_simulated.air))) { our_excited_group.add_turf(enemy_simulated); this.share_air(enemy_simulated, fire_count, adjacent_turfs_length); } } else if (enemy_excited_group != null) { if (this.recently_active && enemy_simulated.recently_active || Lang13.Bool(this.air.compare(enemy_simulated.air))) { enemy_excited_group.add_turf(this); our_excited_group = this.excited_group; this.share_air(enemy_simulated, fire_count, adjacent_turfs_length); } } else if (this.recently_active && enemy_simulated.recently_active || Lang13.Bool(this.air.compare(enemy_simulated.air))) { EG = new ExcitedGroup(); EG.add_turf(this); EG.add_turf(enemy_simulated); our_excited_group = this.excited_group; this.share_air(enemy_simulated, fire_count, adjacent_turfs_length); } } else if (Lang13.Bool(this.air.compare(enemy_simulated.air))) { GlobalVars.SSair.add_to_active(enemy_simulated); if (our_excited_group != null) { this.excited_group.add_turf(enemy_simulated); } else { EG2 = new ExcitedGroup(); EG2.add_turf(this); EG2.add_turf(enemy_simulated); our_excited_group = this.excited_group; } this.share_air(enemy_simulated, fire_count, adjacent_turfs_length); } } else if (Lang13.Bool(this.air.check_turf(enemy_tile, adjacent_turfs_length))) { difference = this.air.mimic(enemy_tile, adjacent_turfs_length); if (Lang13.Bool(difference)) { if (Convert.ToDouble(difference) > 0) { this.consider_pressure_difference(enemy_tile, difference); } else { ((Tile)enemy_tile).consider_pressure_difference(this, -difference); } } remove = false; if (our_excited_group != null) { this.last_share_check(); } } } this.air.react(); this.update_visuals(); if (Convert.ToDouble(this.air.temperature) > 373.41) { this.hotspot_expose(this.air.temperature, 2500); foreach (dynamic _b in Lang13.Enumerate(this, typeof(Ent_Dynamic))) { item = _b; item.temperature_expose(this.air, this.air.temperature, 2500); } this.temperature_expose(this.air, this.air.temperature, 2500); if (Convert.ToDouble(this.air.temperature) > 493.41) { if (this.consider_superconductivity(true)) { remove = false; } } } if (!(our_excited_group != null) && remove) { GlobalVars.SSair.remove_from_active(this); } return; }