// Function from file: Hallucination.dm public Obj_Effect_Hallucination_FakeFlood(dynamic loc = null, Mob_Living_Carbon T = null) : base((object)(loc)) { Obj_Machinery_Atmospherics_Components_Unary_VentPump U = null; // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; this.target = T; foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(this.target, 7), typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { U = _a; if (!(U.welded == true)) { this.loc = U.loc; break; } } this.image_state = Rand13.Pick(new object [] { "plasma", "nitrous_oxide" }); this.flood_images.Add(new Image(this.image_icon, this, this.image_state, GlobalVars.MOB_LAYER)); this.flood_turfs.Add(GlobalFuncs.get_turf(this.loc)); if (Lang13.Bool(((dynamic)this.target).client)) { ((dynamic)this.target).client.images.Or(this.flood_images); } this.next_expand = Game13.time + 30; GlobalVars.SSobj.processing.Or(this); return; }
// Function from file: blueprints.dm public void set_area_machinery_title(Ent_Static A = null, string title = null, string oldtitle = null) { dynamic RA = null; Obj_Machinery_Airalarm M = null; Obj_Machinery_Power_Apc M2 = null; Obj_Machinery_Atmospherics_Components_Unary_VentScrubber M3 = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump M4 = null; Obj_Machinery_Door M5 = null; if (!Lang13.Bool(oldtitle)) { return; } foreach (dynamic _f in Lang13.Enumerate(((dynamic)A).related)) { RA = _f; foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Airalarm))) { M = _a; M.name = GlobalFuncs.replacetext(M.name, oldtitle, title); } foreach (dynamic _b in Lang13.Enumerate(RA, typeof(Obj_Machinery_Power_Apc))) { M2 = _b; M2.name = GlobalFuncs.replacetext(M2.name, oldtitle, title); } foreach (dynamic _c in Lang13.Enumerate(RA, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentScrubber))) { M3 = _c; M3.name = GlobalFuncs.replacetext(M3.name, oldtitle, title); } foreach (dynamic _d in Lang13.Enumerate(RA, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { M4 = _d; M4.name = GlobalFuncs.replacetext(M4.name, oldtitle, title); } foreach (dynamic _e in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door))) { M5 = _e; M5.name = GlobalFuncs.replacetext(M5.name, oldtitle, title); } } return; }
// Function from file: spider_infestation.dm public override bool start( ) { ByTable vents = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump temp_vent = null; Pipeline temp_vent_parent = null; dynamic vent = null; Obj_Effect_Spider_Spiderling S = null; vents = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(typeof(Game13), typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { temp_vent = _a; if (temp_vent.loc.z == 1 && !(temp_vent.welded == true)) { temp_vent_parent = temp_vent.parents[1]; if (temp_vent_parent.other_atmosmch.len > 20) { vents.Add(temp_vent); } } } while (this.spawncount >= 1 && vents.len != 0) { vent = Rand13.PickFromTable(vents); S = new Obj_Effect_Spider_Spiderling(vent.loc); if (Rand13.PercentChance(66)) { S.grow_as = typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Nurse); } vents.Remove(vent); this.spawncount--; } return(false); }
// Function from file: Hallucination.dm public Obj_Effect_Hallucination_XenoAttack(dynamic loc = null, Mob_Living_Carbon T = null) : base((object)(loc)) { Obj_Machinery_Atmospherics_Components_Unary_VentPump U = null; string xeno_name = null; this.target = T; foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(this.target, 7), typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { U = _a; if (!(U.welded == true)) { this.pump = U; break; } } if (this.pump != null) { this.xeno = new Obj_Effect_Hallucination_Simple_Xeno(this.pump.loc, this.target); Task13.Sleep(10); this.xeno.update_icon("alienh_leap", "icons/mob/alienleap.dmi", -32, -32); this.xeno.throw_at(this.target, 7, 1, null, false, true); Task13.Sleep(10); this.xeno.update_icon("alienh_leap", "icons/mob/alienleap.dmi", -32, -32); this.xeno.throw_at(this.pump, 7, 1, null, false, true); Task13.Sleep(10); xeno_name = this.xeno.name; ((dynamic)this.target).WriteMsg("<span class='notice'>" + xeno_name + " begins climbing into the ventilation system...</span>"); Task13.Sleep(10); GlobalFuncs.qdel(this.xeno); ((dynamic)this.target).WriteMsg("<span class='notice'>" + xeno_name + " scrambles into the ventilation ducts!</span>"); } GlobalFuncs.qdel(this); return; }
// Function from file: alien_infestation.dm public bool get_alien(bool?end_if_fail = null) { end_if_fail = end_if_fail ?? false; ByTable vents = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump temp_vent = null; Pipeline temp_vent_parent = null; ByTable candidates = null; Ent_Static vent = null; dynamic C = null; Mob_Living_Carbon_Alien_Larva new_xeno = null; vents = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { temp_vent = _a; if (Lang13.Bool(GlobalFuncs.qdeleted(temp_vent))) { continue; } if (temp_vent.loc.z == 1 && !(temp_vent.welded == true)) { temp_vent_parent = temp_vent.parents[1]; if (temp_vent_parent.other_atmosmch.len > 20) { vents.Add(temp_vent); } } } if (!(vents.len != 0)) { GlobalFuncs.message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down."); this.kill(); return(false); } candidates = GlobalFuncs.get_candidates("xenomorph", GlobalVars.ALIEN_AFK_BRACKET, "alien candidate"); if (!(candidates.len != 0)) { if (end_if_fail == true) { return(false); } this.find_alien(); return(false); } while (this.spawncount > 0 && vents.len != 0 && candidates.len != 0) { vent = GlobalFuncs.pick_n_take(vents); C = GlobalFuncs.pick_n_take(candidates); new_xeno = new Mob_Living_Carbon_Alien_Larva(vent.loc); new_xeno.key = C.key; this.spawncount--; this.successSpawn = true; GlobalFuncs.message_admins("" + new_xeno.key + " has been made into an alien by an event."); GlobalFuncs.log_game("" + new_xeno.key + " was spawned as an alien by an event."); } if (this.successSpawn) { return(true); } return(false); }
// Function from file: spiders.dm public override int?process(dynamic seconds = null) { ByTable vents = null; Pipeline entry_vent_parent = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump temp_vent = null; dynamic exit_vent = null; int travel_time = 0; dynamic new_area = null; ByTable nearby = null; dynamic target_atom = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump v = null; dynamic S = null; if (this.travelling_in_vent) { if (this.loc is Tile) { this.travelling_in_vent = false; this.entry_vent = null; } } else if (this.entry_vent != null) { if (Map13.GetDistance(this, this.entry_vent) <= 1) { vents = new ByTable(); entry_vent_parent = this.entry_vent.parents[1]; foreach (dynamic _a in Lang13.Enumerate(entry_vent_parent.other_atmosmch, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { temp_vent = _a; vents.Add(temp_vent); } if (!(vents.len != 0)) { this.entry_vent = null; return(null); } exit_vent = Rand13.PickFromTable(vents); if (Rand13.PercentChance(50)) { this.visible_message("<B>" + this + " scrambles into the ventillation ducts!</B>", "<span class='italics'>You hear something scampering through the ventilation ducts.</span>"); } Task13.Schedule(Rand13.Int(20, 60), (Task13.Closure)(() => { this.loc = exit_vent; travel_time = Num13.Floor(Map13.GetDistance(this.loc, exit_vent.loc) / 2); Task13.Schedule(travel_time, (Task13.Closure)(() => { if (!Lang13.Bool(exit_vent) || Lang13.Bool(exit_vent.welded)) { this.loc = this.entry_vent; this.entry_vent = null; return; } if (Rand13.PercentChance(50)) { this.audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>"); } Task13.Sleep(travel_time); if (!Lang13.Bool(exit_vent) || Lang13.Bool(exit_vent.welded)) { this.loc = this.entry_vent; this.entry_vent = null; return; } this.loc = exit_vent.loc; this.entry_vent = null; new_area = GlobalFuncs.get_area(this.loc); if (Lang13.Bool(new_area)) { ((Base_Static)new_area).Entered(this, null); } return; })); return; })); } } else if (Rand13.PercentChance(33)) { nearby = Map13.FetchInViewExcludeThis(this, 10); if (nearby.len != 0) { target_atom = Rand13.PickFromTable(nearby); Map13.WalkTowards(this, target_atom, 0, 0); if (Rand13.PercentChance(40)) { this.visible_message(new Txt("<span class='notice'>").The(this).item().str(" skitters").item(Rand13.Pick(new object [] { " away", " around", "" })).str(".</span>").ToString()); } } } else if (Rand13.PercentChance(10)) { foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInView(this, 7), typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { v = _b; if (!(v.welded == true)) { this.entry_vent = v; Map13.WalkTowards(this, this.entry_vent, 1, 0); break; } } } if (this.loc is Tile) { this.amount_grown += Rand13.Int(0, 2); if (this.amount_grown >= 100) { if (!Lang13.Bool(this.grow_as)) { this.grow_as = Rand13.PickFromTable(Lang13.GetTypes(typeof(Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider))); } S = Lang13.Call(this.grow_as, this.loc); S.poison_per_bite = this.poison_per_bite; S.poison_type = this.poison_type; S.faction = this.faction.Copy(); if (this.player_spiders) { S.playable_spider = GlobalVars.TRUE; GlobalFuncs.notify_ghosts("Spider " + S.name + " can be controlled", null, new Txt("<a href=?src=").Ref(S).str(";activate=1>(Click to play)</a>").ToString(), S, null, true); } GlobalFuncs.qdel(this); } } return(null); }
// Function from file: atmos_control.dm public void reconnect(Mob user = null) { ByTable IO = null; RadioFrequency freq = null; dynamic devices = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump U = null; ByTable text = null; Obj_Machinery_Atmospherics_Components_Unary_OutletInjector U2 = null; ByTable text2 = null; dynamic S = null; dynamic new_devices = null; Obj_Machinery_AirSensor U3 = null; ByTable text3 = null; Obj_Machinery_Atmospherics_Components_Unary_OutletInjector U4 = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump U5 = null; IO = new ByTable(); freq = GlobalVars.SSradio.return_frequency(1441); devices = freq.devices["_default"]; foreach (dynamic _a in Lang13.Enumerate(devices, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { U = _a; text = GlobalFuncs.splittext(U.id_tag, "_"); IO.Or(text[1]); } foreach (dynamic _b in Lang13.Enumerate(devices, typeof(Obj_Machinery_Atmospherics_Components_Unary_OutletInjector))) { U2 = _b; text2 = GlobalFuncs.splittext(U2.id, "_"); IO.Or(text2[1]); } if (!(IO.len != 0)) { user.WriteMsg("<span class='alert'>No machinery detected.</span>"); } S = Interface13.Input("Select the device set: ", "Selection", IO[1], null, IO, InputType.Any); if (this != null) { this.input_tag = "" + S + "_in"; this.output_tag = "" + S + "_out"; this.name = "" + String13.ToUpper(S) + " Supply Control"; new_devices = freq.devices["4"]; foreach (dynamic _c in Lang13.Enumerate(new_devices, typeof(Obj_Machinery_AirSensor))) { U3 = _c; text3 = GlobalFuncs.splittext(U3.id_tag, "_"); if (text3[1] == S) { this.sensors = new ByTable().Set("" + S + "_sensor", "Tank"); break; } } } foreach (dynamic _d in Lang13.Enumerate(devices, typeof(Obj_Machinery_Atmospherics_Components_Unary_OutletInjector))) { U4 = _d; U4.broadcast_status(); } foreach (dynamic _e in Lang13.Enumerate(devices, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { U5 = _e; U5.broadcast_status(); } return; }