// Function from file: corpse.dm public void createCorpse( ) { Mob_Living_Carbon_Human M = null; Obj_Item_Weapon_Card_Id W = null; dynamic jobdatum = null; dynamic jobtype = null; dynamic J = null; M = new Mob_Living_Carbon_Human(this.loc); M.real_name = this.name; M.death(); if (this.corpseuniform != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpseuniform, M), 14); } if (this.corpsesuit != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpsesuit, M), 13); } if (this.corpseshoes != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpseshoes, M), 12); } if (this.corpsegloves != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpsegloves, M), 10); } if (this.corpseradio != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpseradio, M), 8); } if (this.corpseglasses != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpseglasses, M), 9); } if (this.corpsemask != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpsemask, M), 2); } if (this.corpsehelmet != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpsehelmet, M), 11); } if (Lang13.Bool(this.corpsebelt)) { M.equip_to_slot_or_del(Lang13.Call(this.corpsebelt, M), 6); } if (this.corpsepocket1 != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpsepocket1, M), 16); } if (Lang13.Bool(this.corpsepocket2)) { M.equip_to_slot_or_del(Lang13.Call(this.corpsepocket2, M), 15); } if (this.corpseback != null) { M.equip_to_slot_or_del(Lang13.Call(this.corpseback, M), 1); } if (this.corpseid) { W = new Obj_Item_Weapon_Card_Id(M); foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Job)))) { jobtype = _a; J = Lang13.Call(jobtype); if (J.title == this.corpseidaccess) { jobdatum = J; break; } } if (Lang13.Bool(this.corpseidicon)) { W.icon_state = this.corpseidicon; } if (Lang13.Bool(this.corpseidaccess)) { if (Lang13.Bool(jobdatum)) { W.access = ((Job)jobdatum).get_access(); } else { W.access = new ByTable(); } } if (Lang13.Bool(this.corpseidjob)) { W.assignment = this.corpseidjob; } W.registered_name = M.real_name; W.update_label(); M.equip_to_slot_or_del(W, 7); } GlobalFuncs.qdel(this); return; }
// Function from file: objective.dm public override int check_completion( ) { double captured_amount = 0; dynamic A = null; Mob_Living_Carbon_Human M = null; Mob_Living_Carbon_Monkey M2 = null; Mob_Living_Carbon_Alien_Larva M3 = null; Mob_Living_Carbon_Alien_Humanoid M4 = null; captured_amount = 0; A = Lang13.FindObj(typeof(Zone_Centcom_Holding)); foreach (dynamic _a in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Human))) { M = _a; if (M.stat == 2) { captured_amount += 0.5; continue; } captured_amount += 1; } foreach (dynamic _b in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Monkey))) { M2 = _b; captured_amount += 0.1; } foreach (dynamic _c in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Alien_Larva))) { M3 = _c; if (M3.stat == 2) { captured_amount += 0.5; continue; } captured_amount += 1; } foreach (dynamic _d in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Alien_Humanoid))) { M4 = _d; if (M4 is Mob_Living_Carbon_Alien_Humanoid_Royal_Queen) { if (M4.stat == 2) { captured_amount += 1.5; } else { captured_amount += 3; } continue; } if (M4.stat == 2) { captured_amount += 1; continue; } captured_amount += 2; } if (captured_amount < Convert.ToDouble(this.target_amount)) { return(0); } return(1); }
// Function from file: weaponry.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(new Txt("<span class='suicide'>").item(user).str(" is inhaling the ").item(this.name).str("! It looks like ").he_she_it_they().str("'s trying to visit the astral plane.</span>").ToString()); return(8); }
// Function from file: tools.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(Rand13.Pick(new object [] { new Txt("<span class='suicide'>").item(user).str(" is stabbing the ").item(this.name).str(" into ").his_her_its_their().str(" temple! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString(), new Txt("<span class='suicide'>").item(user).str(" is stabbing the ").item(this.name).str(" into ").his_her_its_their().str(" heart! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString() })); return(1); }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static Mob_Living_Carbon_Human create_space_ninja( dynamic spawn_loc = null ) { Mob_Living_Carbon_Human new_ninja = null; Preferences A = null; new_ninja = new Mob_Living_Carbon_Human( spawn_loc ); A = new Preferences(); A.real_name = "" + Rand13.pick( GlobalVars.ninja_titles ) + " " + Rand13.pick( GlobalVars.ninja_names ); A.copy_to( new_ninja ); new_ninja.dna.update_dna_identity(); new_ninja.equip_space_ninja(); return new_ninja; }
// Function from file: RCD.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(new Txt("<span class='suicide'>").item(user).str(" sets the RCD to 'Wall' and points it down ").his_her_its_their().str(" throat! It looks like ").he_she_it_they().str("'s trying to commit suicide..</span>").ToString()); return(1); }
// Function from file: headcrab.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Mind M = null; ByTable organs = null; Obj_Item_Organ_Internal I = null; Mob_Living_Carbon_Human H = null; Mob_Living_Silicon S = null; dynamic turf = null; Mob_Living_SimpleAnimal_Hostile_Headcrab crab = null; Obj_Item_Organ_Internal I2 = null; M = user.mind; organs = user.getorganszone("head", true); foreach (dynamic _a in Lang13.Enumerate(organs, typeof(Obj_Item_Organ_Internal))) { I = _a; I.Remove(user, true); } GlobalFuncs.explosion(GlobalFuncs.get_turf(user), 0, 0, 2, 0, null, null, null, true); foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(user, 2), typeof(Mob_Living_Carbon_Human))) { H = _b; H.WriteMsg("<span class='userdanger'>You are blinded by a shower of blood!</span>"); H.Stun(1); H.blur_eyes(20); H.adjust_eye_damage(5); H.confused += 3; } foreach (dynamic _c in Lang13.Enumerate(Map13.FetchInRange(user, 2), typeof(Mob_Living_Silicon))) { S = _c; S.WriteMsg("<span class='userdanger'>Your sensors are disabled by a shower of blood!</span>"); S.Weaken(3); } turf = GlobalFuncs.get_turf(user); Task13.Schedule(5, (Task13.Closure)(() => { crab = new Mob_Living_SimpleAnimal_Hostile_Headcrab(turf); foreach (dynamic _d in Lang13.Enumerate(organs, typeof(Obj_Item_Organ_Internal))) { I2 = _d; I2.loc = crab; } crab.origin = M; if (crab.origin != null) { crab.origin.active = true; crab.origin.transfer_to(crab); crab.WriteMsg("<span class='warning'>You burst out of the remains of your former body in a shower of gore!</span>"); } return; })); user.gib(); GlobalFuncs.feedback_add_details("changeling_powers", "LR"); return(1); }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static void sql_report_death( Mob_Living_Carbon_Human H = null ) { dynamic T = null; dynamic placeofdeath = null; dynamic podname = null; string sqlname = null; string sqlkey = null; string sqlpod = null; string sqlspecial = null; string sqljob = null; string laname = null; string lakey = null; string sqltime = null; string coord = null; DBQuery query = null; string err = null; if ( !GlobalVars.config.sql_enabled ) { return; } if ( !( H != null ) ) { return; } if ( !Lang13.Bool( ((dynamic)H).key ) || !Lang13.Bool( H.mind ) ) { return; } T = ((dynamic)H).loc; placeofdeath = GlobalFuncs.get_area( T.loc ); podname = placeofdeath.name; sqlname = GlobalFuncs.sanitizeSQL( H.real_name ); sqlkey = GlobalFuncs.sanitizeSQL( ((dynamic)H).key ); sqlpod = GlobalFuncs.sanitizeSQL( podname ); sqlspecial = GlobalFuncs.sanitizeSQL( H.mind.special_role ); sqljob = GlobalFuncs.sanitizeSQL( H.mind.assigned_role ); if ( H.lastattacker != null ) { laname = GlobalFuncs.sanitizeSQL( H.lastattacker.real_name ); lakey = GlobalFuncs.sanitizeSQL( ((dynamic)H.lastattacker).key ); } sqltime = String13.formatTime( Game13.realtime, "YYYY-MM-DD hh:mm:ss" ); coord = "" + ((dynamic)H).x + ", " + ((dynamic)H).y + ", " + ((dynamic)H).z; GlobalFuncs.establish_db_connection(); if ( !GlobalVars.dbcon.IsConnected() ) { GlobalFuncs.log_game( "SQL ERROR during death reporting. Failed to connect." ); } else { query = GlobalVars.dbcon.NewQuery( "INSERT INTO " + GlobalFuncs.format_table_name( "death" ) + " (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('" + sqlname + "', '" + sqlkey + "', '" + sqljob + "', '" + sqlspecial + "', '" + sqlpod + "', '" + sqltime + "', '" + laname + "', '" + lakey + "', '" + ((dynamic)H).gender + "', " + H.getBruteLoss() + ", " + H.getFireLoss() + ", " + H.brainloss + ", " + H.getOxyLoss() + ", '" + coord + "')" ); if ( !query.Execute() ) { err = query.ErrorMsg(); GlobalFuncs.log_game( "SQL ERROR during death reporting. Error : [" + err + "]\n" ); } } return; }
// Function from file: misc.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(new Txt("<span class='suicide'>").item(user).str(" is strangling ").himself_herself_itself_themself().str(" with the ").item(this.name).str("! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString()); return(8); }
// Function from file: species_types.dm public override bool apply_damage(dynamic damage = null, dynamic damagetype = null, dynamic def_zone = null, double?blocked = null, Mob_Living_Carbon_Human H = null) { damagetype = damagetype ?? "brute"; bool _default = false; _default = base.apply_damage((object)(damage), (object)(damagetype), (object)(def_zone), blocked, H); this.handle_disguise(H); return(_default); }
// Function from file: hydroitemdefines.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(new Txt("<span class='suicide'>").item(user).str(" is chopping at ").himself_herself_itself_themself().str(" with the ").item(this.name).str("! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString()); GlobalFuncs.playsound(this.loc, "sound/weapons/bladeslice.ogg", 50, 1, -1); return(1); }
// Function from file: tools.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message(new Txt("<span class='suicide'>").item(user).str(" is cutting at ").his_her_its_their().str(" arteries with the ").item(this.name).str("! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString()); GlobalFuncs.playsound(this.loc, "sound/items/Wirecutter.ogg", 50, 1, -1); return(1); }
// Function from file: hydroitemdefines.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { Map13.FetchViewers(null, user).WriteMsg(new Txt("<span class='suicide'>").item(user).str(" is huffing the ").item(this.name).str("! It looks like ").he_she_it_they().str("'s trying to commit suicide.</span>").ToString()); return(4); }
// Function from file: bags.dm public override int suicide_act(Mob_Living_Carbon_Human user = null) { user.visible_message("<span class='suicide'>" + user + " puts the " + this.name + " over their head and starts chomping at the insides! Disgusting!</span>"); GlobalFuncs.playsound(this.loc, "sound/items/eatfood.ogg", 50, 1, -1); return(4); }
// Function from file: tables_racks.dm public override void attack_tk(Mob_Living_Carbon_Human user = null) { return; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static void Broadcast_SimpleMessage( dynamic source = null, dynamic frequency = null, dynamic text = null, int? data = null, Mob_Living_Carbon_Human M = null, dynamic compression = null, dynamic level = null ) { Mob_Living_Carbon_Human H = null; dynamic connection = null; int display_freq = 0; ByTable receive = null; Ent_Item_Device_Radio_Intercom R = null; dynamic position = null; Ent_Item_Device_Radio R2 = null; dynamic position2 = null; dynamic syndicateconnection = null; Ent_Item_Device_Radio R3 = null; dynamic position3 = null; Ent_Item_Device_Radio R4 = null; Ent_Item_Device_Radio R5 = null; dynamic position4 = null; ByTable heard_normal = null; ByTable heard_garbled = null; ByTable heard_gibberish = null; dynamic R6 = null; string part_a = null; string freq_text = null; string part_b_extra = null; Ent_Item_Device_Radio_Headset radio = null; dynamic part_b = null; string part_c = null; string part_blackbox_b = null; string blackbox_msg = null; string rendered = null; dynamic R7 = null; string quotedmsg = null; string rendered2 = null; dynamic R8 = null; string quotedmsg2 = null; string rendered3 = null; dynamic R9 = null; if ( !( M != null ) ) { H = new Mob_Living_Carbon_Human(); M = H; } connection = GlobalVars.SSradio.return_frequency( frequency ); display_freq = Lang13.Int( connection.frequency ); receive = new ByTable(); if ( data == 1 ) { R = null; foreach (dynamic _a in connection.devices["" + GlobalVars.RADIO_CHAT] ) { if ( !( _a is Ent_Item_Device_Radio_Intercom ) ) { continue; } R = _a; position = GlobalFuncs.get_turf( R ); if ( Lang13.Bool( position ) && position.z == level ) { receive |= R.send_hear( display_freq, level ); } }; } else if ( data == 2 ) { R2 = null; foreach (dynamic _b in connection.devices["" + GlobalVars.RADIO_CHAT] ) { if ( !( _b is Ent_Item_Device_Radio ) ) { continue; } R2 = _b; if ( R2.subspace_transmission ) { continue; } position2 = GlobalFuncs.get_turf( R2 ); if ( Lang13.Bool( position2 ) && position2.z == level ) { receive |= R2.send_hear( display_freq ); } }; } else if ( data == 3 ) { syndicateconnection = GlobalVars.SSradio.return_frequency( GlobalVars.SYND_FREQ ); R3 = null; foreach (dynamic _c in syndicateconnection.devices["" + GlobalVars.RADIO_CHAT] ) { if ( !( _c is Ent_Item_Device_Radio ) ) { continue; } R3 = _c; position3 = GlobalFuncs.get_turf( R3 ); if ( Lang13.Bool( position3 ) && position3.z == level ) { receive |= R3.send_hear( GlobalVars.SYND_FREQ ); } }; } else if ( data == 5 ) { R4 = null; foreach (dynamic _d in GlobalVars.all_radios["" + GlobalVars.RADIO_CHAT] ) { if ( !( _d is Ent_Item_Device_Radio ) ) { continue; } R4 = _d; if ( R4.centcom ) { receive |= R4.send_hear( GlobalVars.CENTCOM_FREQ ); } }; } else { R5 = null; foreach (dynamic _e in connection.devices["" + GlobalVars.RADIO_CHAT] ) { if ( !( _e is Ent_Item_Device_Radio ) ) { continue; } R5 = _e; position4 = GlobalFuncs.get_turf( R5 ); if ( Lang13.Bool( position4 ) && position4.z == level ) { receive |= R5.send_hear( display_freq ); } }; } heard_normal = new ByTable(); heard_garbled = new ByTable(); heard_gibberish = new ByTable(); R6 = null; foreach (dynamic _f in receive ) { R6 = _f; if ( Lang13.Bool( R6.client ) && !Lang13.Bool( R6.client.prefs.chat_toggles & 32 ) ) { continue; } if ( Lang13.Double( compression ) > 0 ) { heard_gibberish += R6; continue; } if ( Lang13.Bool( R6.languages & M.languages ) ) { heard_normal += R6; } else { heard_garbled += R6; } }; if ( heard_normal.Length != 0 || heard_garbled.Length != 0 || heard_gibberish.Length != 0 ) { part_a = "<span class='radio'><span class='name'>"; freq_text = null; dynamic _g = display_freq; // Was a switch-case, sorry for the mess. if ( _g==1213 ) { freq_text = "#unkn"; } else if ( _g==1353 ) { freq_text = "Command"; } else if ( _g==1351 ) { freq_text = "Science"; } else if ( _g==1355 ) { freq_text = "Medical"; } else if ( _g==1357 ) { freq_text = "Engineering"; } else if ( _g==1359 ) { freq_text = "Security"; } else if ( _g==1349 ) { freq_text = "Service"; } else if ( _g==1347 ) { freq_text = "Supply"; } else if ( _g==1447 ) { freq_text = "AI Private"; }; if ( !Lang13.Bool( freq_text ) ) { freq_text = GlobalFuncs.format_frequency( display_freq ); } part_b_extra = ""; if ( data == 3 ) { part_b_extra = " <i>(Intercepted)</i>"; } radio = new Ent_Item_Device_Radio_Headset(); part_b = ((dynamic)new Txt( /* Pruned args, no ctor exists. */ )).icon( radio ).str( "[" ).item( freq_text ).str( "]" ).item( part_b_extra ).str( "</b> <span class='message'>" ); part_c = "</span></span>"; if ( display_freq == GlobalVars.SYND_FREQ ) { part_a = "<span class='syndradio'><span class='name'>"; } else if ( display_freq == GlobalVars.COMM_FREQ ) { part_a = "<span class='comradio'><span class='name'>"; } else if ( display_freq == GlobalVars.SCI_FREQ ) { part_a = "<span class='sciradio'><span class='name'>"; } else if ( display_freq == GlobalVars.MED_FREQ ) { part_a = "<span class='medradio'><span class='name'>"; } else if ( display_freq == GlobalVars.ENG_FREQ ) { part_a = "<span class='engradio'><span class='name'>"; } else if ( display_freq == GlobalVars.SEC_FREQ ) { part_a = "<span class='secradio'><span class='name'>"; } else if ( display_freq == GlobalVars.SERV_FREQ ) { part_a = "<span class='servradio'><span class='name'>"; } else if ( display_freq == GlobalVars.SUPP_FREQ ) { part_a = "<span class='suppradio'><span class='name'>"; } else if ( display_freq == GlobalVars.CENTCOM_FREQ ) { part_a = "<span class='centcomradio'><span class='name'>"; } else if ( display_freq == GlobalVars.AIPRIV_FREQ ) { part_a = "<span class='aiprivradio'><span class='name'>"; } part_blackbox_b = "</span><b> [" + freq_text + "]</b> <span class='message'>"; blackbox_msg = "" + part_a + source + part_blackbox_b + "\"" + text + "\"" + part_c; if ( GlobalVars.blackbox is Ent_Machinery_BlackboxRecorder ) { dynamic _h = display_freq; // Was a switch-case, sorry for the mess. if ( _h==1459 ) { GlobalVars.blackbox.msg_common += blackbox_msg; } else if ( _h==1351 ) { GlobalVars.blackbox.msg_science += blackbox_msg; } else if ( _h==1353 ) { GlobalVars.blackbox.msg_command += blackbox_msg; } else if ( _h==1355 ) { GlobalVars.blackbox.msg_medical += blackbox_msg; } else if ( _h==1357 ) { GlobalVars.blackbox.msg_engineering += blackbox_msg; } else if ( _h==1359 ) { GlobalVars.blackbox.msg_security += blackbox_msg; } else if ( _h==1441 ) { GlobalVars.blackbox.msg_deathsquad += blackbox_msg; } else if ( _h==1213 ) { GlobalVars.blackbox.msg_syndicate += blackbox_msg; } else if ( _h==1349 ) { GlobalVars.blackbox.msg_service += blackbox_msg; } else if ( _h==1347 ) { GlobalVars.blackbox.msg_cargo += blackbox_msg; } else { GlobalVars.blackbox.messages += blackbox_msg; }; } if ( heard_normal.Length != 0 ) { rendered = "" + part_a + source + part_b + "\"" + text + "\"" + part_c; R7 = null; foreach (dynamic _i in heard_normal ) { R7 = _i; ((dynamic)R7).show_message( rendered, 2 ); }; } if ( heard_garbled.Length != 0 ) { quotedmsg = "\"" + GlobalFuncs.stars( text ) + "\""; rendered2 = "" + part_a + source + part_b + quotedmsg + part_c; R8 = null; foreach (dynamic _j in heard_garbled ) { R8 = _j; ((dynamic)R8).show_message( rendered2, 2 ); }; } if ( heard_gibberish.Length != 0 ) { quotedmsg2 = "\"" + GlobalFuncs.Gibberish( text, compression + 50 ) + "\""; rendered3 = "" + part_a + GlobalFuncs.Gibberish( source, compression + 50 ) + part_b + quotedmsg2 + part_c; R9 = null; foreach (dynamic _k in heard_gibberish ) { R9 = _k; ((dynamic)R9).show_message( rendered3, 2 ); }; } } return; }
// Function from file: shadowling_abilities.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; Mob_Living_Carbon_Human target = null; int?progress = null; Obj_Item_Weapon_Implant_Loyalty L = null; GlobalFuncs.listclearnulls(GlobalVars.ticker.mode.thralls); if (!GlobalVars.ticker.mode.shadows.Contains(thearea.mind)) { return(false); } if (thearea.dna.species.id != "shadowling") { if (GlobalVars.ticker.mode.thralls.len >= 5) { this.revert_cast(); return(false); } } foreach (dynamic _c in Lang13.Enumerate(targets, typeof(Mob_Living_Carbon_Human))) { target = _c; if (!(Map13.GetDistance(thearea, target) <= 1)) { thearea.WriteMsg("<span class='warning'>You need to be closer to enthrall " + target + "!</span>"); this.revert_cast(); return(false); } if (!Lang13.Bool(target.key) || !(target.mind != null)) { thearea.WriteMsg("<span class='warning'>The target has no mind!</span>"); this.revert_cast(); return(false); } if (target.stat != 0) { thearea.WriteMsg("<span class='warning'>The target must be conscious!</span>"); this.revert_cast(); return(false); } if (GlobalFuncs.is_shadow_or_thrall(target)) { thearea.WriteMsg("<span class='warning'>You can not enthrall allies!</span>"); this.revert_cast(); return(false); } if (!(target is Mob_Living_Carbon_Human)) { thearea.WriteMsg("<span class='warning'>You can only enthrall humans!</span>"); this.revert_cast(); return(false); } if (this.enthralling) { thearea.WriteMsg("<span class='warning'>You are already enthralling!</span>"); this.revert_cast(); return(false); } if (!(target.client != null)) { thearea.WriteMsg("<span class='warning'>" + target + "'s mind is vacant of activity.</span>"); } this.enthralling = true; thearea.WriteMsg("<span class='danger'>This target is valid. You begin the enthralling...</span>"); target.WriteMsg("<span class='userdanger'>" + thearea + " stares at you. You feel your head begin to pulse.</span>"); progress = null; progress = 0; while ((progress ?? 0) <= 3) { switch ((int?)(progress)) { case 1: thearea.WriteMsg("<span class='notice'>You place your hands to " + target + "'s head...</span>"); ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " places their hands onto the sides of " + target + "'s head!</span>"); break; case 2: thearea.WriteMsg("<span class='notice'>You begin preparing " + target + "'s mind as a blank slate...</span>"); ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + "'s palms flare a bright red against " + target + "'s temples!</span>"); target.WriteMsg("<span class='danger'>A terrible red light floods your mind. You collapse as conscious thought is wiped away.</span>"); target.Weaken(12); Task13.Sleep(20); if (GlobalFuncs.isloyal(target)) { thearea.WriteMsg("<span class='notice'>They are enslaved by Nanotrasen. You begin to shut down the nanobot implant - this will take some time.</span>"); ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " pauses, then dips their head in concentration!</span>"); target.WriteMsg("<span class='boldannounce'>You feel your loyalties begin to weaken!</span>"); Task13.Sleep(100); thearea.WriteMsg("<span class='notice'>The nanobots composing the loyalty implant have been rendered inert. Now to continue.</span>"); ((Ent_Static)thearea).visible_message("<span class='warning'>" + thearea + " relaxes again.</span>"); foreach (dynamic _a in Lang13.Enumerate(target, typeof(Obj_Item_Weapon_Implant_Loyalty))) { L = _a; if (L != null && Lang13.Bool(L.implanted)) { GlobalFuncs.qdel(L); } } target.WriteMsg("<span class='boldannounce'>Your unwavering loyalty to Nanotrasen unexpectedly falters, dims, dies.</span>"); } break; case 3: thearea.WriteMsg("<span class='notice'>You begin planting the tumor that will control the new thrall...</span>"); ((Ent_Static)thearea).visible_message("<span class='warning'>A strange energy passes from " + thearea + "'s hands into " + target + "'s head!</span>"); target.WriteMsg("<span class='boldannounce'>You feel your memories twisting, morphing. A sense of horror dominates your mind.</span>"); break; } if (!GlobalFuncs.do_mob(thearea, target, 70)) { thearea.WriteMsg("<span class='warning'>The enthralling has been interrupted - your target's mind returns to its previous state.</span>"); target.WriteMsg("<span class='userdanger'>You wrest yourself away from " + thearea + "'s hands and compose yourself</span>"); this.enthralling = false; return(false); } progress++; } this.enthralling = false; thearea.WriteMsg("<span class='shadowling'>You have enthralled <b>" + target.real_name + "</b>!</span>"); target.visible_message("<span class='big'>" + target + " looks to have experienced a revelation!</span>", "<span class='warning'>False faces all d<b>ark not real not real not--</b></span>"); target.setOxyLoss(0); target.mind.special_role = "thrall"; ((GameMode)GlobalVars.ticker.mode).add_thrall(target.mind); } return(false); }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static Mob_Living wabbajack( dynamic M = null ) { dynamic Robot = null; Ent_Item W = null; Mob_Living new_mob = null; dynamic randomize = null; dynamic robot = null; Mob_Living D = null; Mob_Living Robot2 = null; Mob_Living Slime = null; dynamic beast = null; dynamic animal = null; Preferences A = null; Mob_Living H = null; ByTable all_species = null; dynamic speciestype = null; dynamic S = null; if ( M is Mob_Living ) { if ( M is Mob_Living && Lang13.Int( M.stat ) != 2 ) { if ( Lang13.Bool( M.notransform ) ) { return null; } M.notransform = 1; M.canmove = 0; M.icon = null; ((dynamic)M.overlays).Cut(); M.invisibility = 101; if ( M is Mob_Living_Silicon_Robot ) { Robot = M; if ( Lang13.Bool( Robot.mmi ) ) { GlobalFuncs.qdel( Robot.mmi ); } ((dynamic)Robot).notify_ai( 1 ); } else { W = null; foreach (dynamic _a in M ) { if ( !( _a is Ent_Item ) ) { continue; } W = _a; if ( W is Ent_Item_Weapon_Implant ) { GlobalFuncs.qdel( W ); continue; } ((dynamic)W).layer = Temp13.initial( ((dynamic)W).layer ); ((dynamic)W).loc = M.loc; W.dropped( M ); }; } new_mob = null; randomize = Rand13.pick(new object [] { "monkey", "robot", "slime", "xeno", "humanoid", "animal" }); dynamic _f = randomize; // Was a switch-case, sorry for the mess. if ( _f=="monkey" ) { new_mob = new Mob_Living_Carbon_Monkey( M.loc ); new_mob.languages |= 1; } else if ( _f=="robot" ) { robot = Rand13.pick(new object [] { "cyborg", "syndiborg", "drone" }); dynamic _b = robot; // Was a switch-case, sorry for the mess. if ( _b=="cyborg" ) { new_mob = new Mob_Living_Silicon_Robot( M.loc ); } else if ( _b=="syndiborg" ) { new_mob = new Mob_Living_Silicon_Robot_Syndicate( M.loc ); } else if ( _b=="drone" ) { new_mob = new Mob_Living_SimpleAnimal_Drone( M.loc ); D = new_mob; ((dynamic)D).update_drone_hack(); }; if ( new_mob is Mob_Living_Silicon ) { ((dynamic)new_mob).gender = M.gender; new_mob.invisibility = 0; new_mob.job = "Cyborg"; Robot2 = new_mob; ((dynamic)Robot2).mmi = new Ent_Item_Device_Mmi( new_mob ); ((dynamic)((dynamic)Robot2).mmi).transfer_identity( M ); } else { new_mob.languages |= 1; } } else if ( _f=="slime" ) { new_mob = new Mob_Living_SimpleAnimal_Slime( M.loc ); if ( Rand13.percentChance( 50 ) ) { Slime = new_mob; ((dynamic)Slime).is_adult = 1; } new_mob.languages |= 1; } else if ( _f=="xeno" ) { if ( Rand13.percentChance( 50 ) ) { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Hunter( M.loc ); } else { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Sentinel( M.loc ); } new_mob.languages |= 1; } else if ( _f=="animal" ) { if ( Rand13.percentChance( 50 ) ) { beast = Rand13.pick(new object [] { "carp", "bear", "mushroom", "statue", "bat", "goat", "killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp" }); dynamic _c = beast; // Was a switch-case, sorry for the mess. if ( _c=="carp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp( M.loc ); } else if ( _c=="bear" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Bear( M.loc ); } else if ( _c=="mushroom" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Mushroom( M.loc ); } else if ( _c=="statue" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Statue( M.loc ); } else if ( _c=="bat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Bat( M.loc ); } else if ( _c=="goat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat( M.loc ); } else if ( _c=="killertomato" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Killertomato( M.loc ); } else if ( _c=="spiderbase" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider( M.loc ); } else if ( _c=="spiderhunter" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter( M.loc ); } else if ( _c=="blobbernaut" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Blob_Blobbernaut( M.loc ); } else if ( _c=="magicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged( M.loc ); } else if ( _c=="chaosmagicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged_Chaos( M.loc ); }; } else { animal = Rand13.pick(new object [] { "parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox", "butterfly" }); dynamic _d = animal; // Was a switch-case, sorry for the mess. if ( _d=="parrot" ) { new_mob = new Mob_Living_SimpleAnimal_Parrot( M.loc ); } else if ( _d=="corgi" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Corgi( M.loc ); } else if ( _d=="crab" ) { new_mob = new Mob_Living_SimpleAnimal_Crab( M.loc ); } else if ( _d=="pug" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Pug( M.loc ); } else if ( _d=="cat" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Cat( M.loc ); } else if ( _d=="mouse" ) { new_mob = new Mob_Living_SimpleAnimal_Mouse( M.loc ); } else if ( _d=="chicken" ) { new_mob = new Mob_Living_SimpleAnimal_Chicken( M.loc ); } else if ( _d=="cow" ) { new_mob = new Mob_Living_SimpleAnimal_Cow( M.loc ); } else if ( _d=="lizard" ) { new_mob = new Mob_Living_SimpleAnimal_Lizard( M.loc ); } else if ( _d=="fox" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Fox( M.loc ); } else if ( _d=="butterfly" ) { new_mob = new Mob_Living_SimpleAnimal_Butterfly( M.loc ); } else { new_mob = new Mob_Living_SimpleAnimal_Chick( M.loc ); }; } new_mob.languages |= 1; } else if ( _f=="humanoid" ) { new_mob = new Mob_Living_Carbon_Human( M.loc ); A = new Preferences(); new ByTable().set( 1, new_mob ).set( "icon_updates", 0 ).apply( A.GetType().GetMethod( "copy_to" ) ); H = new_mob; if ( Rand13.percentChance( 50 ) ) { all_species = new ByTable(); speciestype = null; foreach (dynamic _e in Lang13.get_all_types( typeof(Species) ) - typeof(Species) ) { speciestype = _e; S = Lang13.call( speciestype ); if ( !Lang13.Bool( S.dangerous_existence ) ) { all_species += speciestype; } }; new ByTable().set( 1, Rand13.pick( all_species ) ).set( "icon_update", 0 ).apply( H.GetType().GetMethod( "set_species" ) ); H.real_name = ((dynamic)((dynamic)H).dna.species).random_name( ((dynamic)H).gender, 1 ); } ((dynamic)H).update_body(); H.update_hair(); ((dynamic)H).update_mutcolor(); ((dynamic)((dynamic)H).dna).update_dna_identity(); } else { return null; }; new_mob.attack_log = M.attack_log; M.attack_log += "[" + GlobalFuncs.time_stamp() + "] <font color='orange'>" + M.real_name + " (" + M.ckey + ") became " + new_mob.real_name + ".</font>"; new_mob.a_intent = "harm"; if ( Lang13.Bool( M.mind ) ) { ((dynamic)M.mind).transfer_to( new_mob ); } else { ((dynamic)new_mob).key = M.key; } ((dynamic)new_mob).write( "<B>Your form morphs into that of a " + randomize + ".</B>" ); GlobalFuncs.qdel( M ); return new_mob; } } return null; }
// Function from file: implant.dm public virtual void trigger( string emote = null, Mob_Living_Carbon_Human source = null ) { return; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static Mob_Living_Carbon_Human makeBody( dynamic G_found = null ) { Mob_Living_Carbon_Human new_character = null; if ( !Lang13.Bool( G_found ) || !Lang13.Bool( G_found.key ) ) { return null; } new_character = new Mob_Living_Carbon_Human( Rand13.pick( GlobalVars.latejoin ) ); ((Preferences)G_found.client.prefs).copy_to( new_character ); new_character.dna.update_dna_identity(); ((dynamic)new_character).key = G_found.key; return new_character; }
// Function from file: departmentrevolt.dm public override bool start( ) { dynamic tidecolor = null; ByTable jobs_to_revolt = null; dynamic nation = null; ByTable citizens = null; Mob_Living_Carbon_Human H = null; Mind M = null; dynamic job = null; dynamic message = null; dynamic job2 = null; jobs_to_revolt = new ByTable(); citizens = new ByTable(); tidecolor = Rand13.Pick(new object [] { "grey", "white", "yellow", "purple", "brown", "whatevercolorrepresentstheservicepeople" }); dynamic _a = tidecolor; // Was a switch-case, sorry for the mess. if (_a == "grey") { jobs_to_revolt = new ByTable(new object [] { "Assistant" }); nation = Rand13.Pick(new object [] { "Assa", "Mainte", "Tunnel", "Gris", "Grey", "Liath", "Grigio", "Ass", "Assi" }); } else if (_a == "white") { jobs_to_revolt = new ByTable(new object [] { "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist" }); nation = Rand13.Pick(new object [] { "Mede", "Healtha", "Recova", "Chemi", "Geneti", "Viro", "Psych" }); } else if (_a == "yellow") { jobs_to_revolt = new ByTable(new object [] { "Chief Engineer", "Station Engineer", "Atmospheric Technician" }); nation = Rand13.Pick(new object [] { "Atomo", "Engino", "Power", "Teleco" }); } else if (_a == "purple") { jobs_to_revolt = new ByTable(new object [] { "Research Director", "Scientist", "Roboticist" }); nation = Rand13.Pick(new object [] { "Sci", "Griffa", "Explosi", "Mecha", "Xeno" }); } else if (_a == "brown") { jobs_to_revolt = new ByTable(new object [] { "Quartermaster", "Cargo Technician", "Shaft Miner" }); nation = Rand13.Pick(new object [] { "Cargo", "Guna", "Suppli", "Mule", "Crate", "Ore", "Mini", "Shaf" }); } else if (_a == "whatevercolorrepresentstheservicepeople") { jobs_to_revolt = new ByTable(new object [] { "Bartender", "Cook", "Botanist", "Clown", "Mime", "Janitor", "Chaplain" }); nation = Rand13.Pick(new object [] { "Honka", "Boozo", "Fatu", "Danka", "Mimi", "Libra", "Jani", "Religi" }); } nation += Rand13.Pick(new object [] { "stan", "topia", "land", "nia", "ca", "tova", "dor", "ador", "tia", "sia", "ano", "tica", "tide", "cis", "marea", "co", "taoide", "slavia", "stotzka" }); foreach (dynamic _c in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Carbon_Human))) { H = _c; if (H.mind != null) { M = H.mind; if (Lang13.Bool(M.assigned_role) && !GlobalVars.ticker.mode.traitors.Contains(M)) { foreach (dynamic _b in Lang13.Enumerate(jobs_to_revolt)) { job = _b; if (M.assigned_role == job) { citizens.Add(H); GlobalVars.ticker.mode.traitors.Add(M); M.special_role = "separatist"; H.attack_log.Add("[" + GlobalFuncs.time_stamp() + "] <font color='red'>Was made into a separatist, long live " + nation + "!</font>"); H.WriteMsg("<B>You are a separatist! " + nation + " forever! Protect the soverignty of your newfound land with your comrades in arms!</B>"); } } } } } if (citizens.len != 0) { message = null; foreach (dynamic _d in Lang13.Enumerate(jobs_to_revolt)) { job2 = _d; message += "" + job2 + ","; } GlobalFuncs.message_admins("The nation of " + nation + " has been formed. Affected jobs are " + message); } return(false); }