// Function from file: syndicatebomb.dm public override void on_cut(dynamic wire = null, int?mend = null) { Obj B = null; B = this.holder; dynamic _a = wire; // Was a switch-case, sorry for the mess. if (_a == "boom") { if (Lang13.Bool(mend)) { ((dynamic)B).defused = GlobalVars.FALSE; } else if (Lang13.Bool(((dynamic)B).active)) { this.holder.visible_message(new Txt("<span class='danger'>").icon(B).str(" An alarm sounds! It's go-</span>").ToString()); ((dynamic)B).timer = 0; } else { ((dynamic)B).defused = GlobalVars.TRUE; } } else if (_a == "unbolt") { if (!Lang13.Bool(mend) && Lang13.Bool(B.anchored)) { this.holder.visible_message(new Txt("<span class='notice'>").icon(B).str(" The bolts lift out of the ground!</span>").ToString()); GlobalFuncs.playsound(B, "sound/effects/stealthoff.ogg", 30, 1); B.anchored = 0; } } else if (_a == "proceed") { if (!Lang13.Bool(mend) && Lang13.Bool(((dynamic)B).active)) { this.holder.visible_message(new Txt("<span class='danger'>").icon(B).str(" An alarm sounds! It's go-</span>").ToString()); ((dynamic)B).timer = 0; } } else if (_a == "activate") { if (!Lang13.Bool(mend) && Lang13.Bool(((dynamic)B).active)) { this.holder.visible_message(new Txt("<span class='notice'>").icon(B).str(" The timer stops! The bomb has been defused!</span>").ToString()); ((dynamic)B).active = GlobalVars.FALSE; ((dynamic)B).defused = GlobalVars.TRUE; B.update_icon(); } } return; }
// Function from file: tgstation.dme public override void end( ) { dynamic A = null; Obj O = null; Obj temp = null; Obj temp2 = null; Obj temp3 = null; Obj temp4 = null; Obj temp5 = null; foreach (dynamic _b in Lang13.Enumerate(this.prisonAreas)) { A = _b; foreach (dynamic _a in Lang13.Enumerate(A, typeof(Obj))) { O = _a; if (O is Obj_Machinery_Power_Apc) { temp = O; ((Obj_Machinery_Power_Apc)temp).overload_lighting(); } else if (O is Obj_Structure_Closet_SecureCloset_Brig) { temp2 = O; ((dynamic)temp2).locked = 0; temp2.update_icon(); } else if (O is Obj_Machinery_Door_Airlock_Security) { temp3 = O; ((Obj_Machinery_Door_Airlock)temp3).prison_open(); } else if (O is Obj_Machinery_Door_Airlock_GlassSecurity) { temp4 = O; ((Obj_Machinery_Door_Airlock)temp4).prison_open(); } else if (O is Obj_Machinery_DoorTimer) { temp5 = O; ((Obj_Machinery_DoorTimer)temp5).timer_end(GlobalVars.TRUE); } } } return; }
// Function from file: gravitygenerator.dm public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null) { Obj O = null; base.update_icon((object)(new_state), (object)(new_icon), new_px, new_py); foreach (dynamic _a in Lang13.Enumerate(this.parts, typeof(Obj))) { O = _a; O.update_icon(); } return(false); }
// Function from file: syndicatebomb.dm public override void on_pulse(string wire = null) { Obj B = null; B = this.holder; switch ((string)(wire)) { case "boom": if (Lang13.Bool(((dynamic)B).active)) { this.holder.visible_message(new Txt("<span class='danger'>").icon(B).str(" An alarm sounds! It's go-</span>").ToString()); ((dynamic)B).timer = 0; } break; case "unbolt": this.holder.visible_message(new Txt("<span class='notice'>").icon(B).str(" The bolts spin in place for a moment.</span>").ToString()); break; case "delay": this.holder.visible_message(new Txt("<span class='notice'>").icon(B).str(" The bomb chirps.</span>").ToString()); GlobalFuncs.playsound(B, "sound/machines/chime.ogg", 30, 1); ((dynamic)B).timer += 10; break; case "proceed": this.holder.visible_message(new Txt("<span class='danger'>").icon(B).str(" The bomb buzzes ominously!</span>").ToString()); GlobalFuncs.playsound(B, "sound/machines/buzz-sigh.ogg", 30, 1); if (Convert.ToDouble(((dynamic)B).timer) >= 61) { ((dynamic)B).timer = 60; } else if (Convert.ToDouble(((dynamic)B).timer) >= 21) { ((dynamic)B).timer -= 10; } else if (Convert.ToDouble(((dynamic)B).timer) >= 11) { ((dynamic)B).timer = 10; } break; case "activate": if (!Lang13.Bool(((dynamic)B).active) && !Lang13.Bool(((dynamic)B).defused)) { this.holder.visible_message(new Txt("<span class='danger'>").icon(B).str(" You hear the bomb start ticking!</span>").ToString()); GlobalFuncs.playsound(B, "sound/machines/click.ogg", 30, 1); ((dynamic)B).active = GlobalVars.TRUE; B.update_icon(); } else { this.holder.visible_message(new Txt("<span class='notice'>").icon(B).str(" The bomb seems to hesitate for a moment.</span>").ToString()); ((dynamic)B).timer += 5; } break; } return; }
// Function from file: charge.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; Mob_Living L = null; ByTable hand_items = null; dynamic charged_item = null; bool burnt_out = false; dynamic M = null; Obj_Effect_ProcHolder_Spell S = null; Obj_Effect_ProcHolder_Spell S2 = null; Obj item = null; Obj I = null; Obj I2 = null; Obj W = null; Obj C = null; Obj I3 = null; Obj C2 = null; foreach (dynamic _e in Lang13.Enumerate(targets, typeof(Mob_Living))) { L = _e; hand_items = new ByTable(new object [] { L.get_active_hand(), L.get_inactive_hand() }); charged_item = null; burnt_out = false; if (Lang13.Bool(L.pulling) && L.pulling is Mob_Living) { M = L.pulling; if (M.mob_spell_list.len != 0 || Lang13.Bool(M.mind) && M.mind.spell_list.len != 0) { foreach (dynamic _a in Lang13.Enumerate(M.mob_spell_list, typeof(Obj_Effect_ProcHolder_Spell))) { S = _a; S.charge_counter = S.charge_max; } if (Lang13.Bool(M.mind)) { foreach (dynamic _b in Lang13.Enumerate(M.mind.spell_list, typeof(Obj_Effect_ProcHolder_Spell))) { S2 = _b; S2.charge_counter = S2.charge_max; } } M.WriteMsg("<span class='notice'>you feel raw magic flowing through you, it feels good!</span>"); } else { M.WriteMsg("<span class='notice'>you feel very strange for a moment, but then it passes.</span>"); burnt_out = true; } charged_item = M; break; } foreach (dynamic _d in Lang13.Enumerate(hand_items, typeof(Obj))) { item = _d; if (item is Obj_Item_Weapon_Spellbook) { if (item is Obj_Item_Weapon_Spellbook_Oneuse) { I = item; if (Rand13.PercentChance(80)) { L.visible_message("<span class='warning'>" + I + " catches fire!</span>"); GlobalFuncs.qdel(I); } else { ((dynamic)I).used = 0; charged_item = I; break; } } else { L.WriteMsg("<span class='caution'>Glowing red letters appear on the front cover...</span>"); L.WriteMsg("<span class='warning'>" + Rand13.Pick(new object [] { "NICE TRY BUT NO!", "CLEVER BUT NOT CLEVER ENOUGH!", "SUCH FLAGRANT CHEESING IS WHY WE ACCEPTED YOUR APPLICATION!", "CUTE!", "YOU DIDN'T THINK IT'D BE THAT EASY, DID YOU?" }) + "</span>"); burnt_out = true; } } else if (item is Obj_Item_Weapon_Gun_Magic) { I2 = item; if (Rand13.PercentChance(80) && !Lang13.Bool(((dynamic)I2).can_charge)) { ((dynamic)I2).max_charges--; } if (Convert.ToDouble(((dynamic)I2).max_charges) <= 0) { ((dynamic)I2).max_charges = 0; burnt_out = true; } ((dynamic)I2).charges = ((dynamic)I2).max_charges; if (item is Obj_Item_Weapon_Gun_Magic_Wand && Lang13.Bool(((dynamic)I2).max_charges) != false) { W = item; W.icon_state = Lang13.Initial(W, "icon_state"); } charged_item = I2; break; } else if (item is Obj_Item_Weapon_StockParts_Cell) { C = item; if (Rand13.PercentChance(80)) { ((dynamic)C).maxcharge -= 200; } if (Convert.ToDouble(((dynamic)C).maxcharge) <= 1) { ((dynamic)C).maxcharge = 1; burnt_out = true; } ((dynamic)C).charge = ((dynamic)C).maxcharge; charged_item = C; break; } else if (item.contents != null) { foreach (dynamic _c in Lang13.Enumerate(item.contents, typeof(Obj))) { I3 = _c; if (I3 is Obj_Item_Weapon_StockParts_Cell) { C2 = I3; if (Rand13.PercentChance(80)) { ((dynamic)C2).maxcharge -= 200; } if (Convert.ToDouble(((dynamic)C2).maxcharge) <= 1) { ((dynamic)C2).maxcharge = 1; burnt_out = true; } ((dynamic)C2).charge = ((dynamic)C2).maxcharge; item.update_icon(); charged_item = item; break; } } } } if (!Lang13.Bool(charged_item)) { L.WriteMsg("<span class='notice'>you feel magical power surging to your hands, but the feeling rapidly fades...</span>"); } else if (burnt_out) { L.WriteMsg("<span class='caution'>" + charged_item + " doesn't seem to be reacting to the spell...</span>"); } else { GlobalFuncs.playsound(GlobalFuncs.get_turf(L), "sound/magic/Charge.ogg", 50, 1); L.WriteMsg("<span class='notice'>" + charged_item + " suddenly feels very warm!</span>"); } } return(false); }