// Function from file: server.dm public override void receive_information(Signal signal = null, Obj_Machinery_Telecomms machine_from = null) { CommLogEntry log = null; string identifier = null; int? can_send = null; if (Lang13.Bool(signal.data["message"])) { if (this.is_freq_listening(signal)) { if (this.traffic > 0) { this.totaltraffic += this.traffic; } if (Convert.ToInt32(signal.data["type"]) != 4) { this.update_logs(); log = new CommLogEntry(); log.parameters["mobtype"] = signal.data["mobtype"]; log.parameters["job"] = signal.data["job"]; log.parameters["key"] = signal.data["key"]; log.parameters["message"] = signal.data["message"]; log.parameters["name"] = signal.data["name"]; log.parameters["realname"] = signal.data["realname"]; log.parameters["uspeech"] = signal.data["languages"] & 1; if (Convert.ToDouble(signal.data["compression"]) > 0) { log.parameters["message"] = GlobalFuncs.Gibberish(signal.data["message"], Convert.ToInt32(signal.data["compression"] + 50)); log.parameters["job"] = GlobalFuncs.Gibberish(signal.data["job"], Convert.ToInt32(signal.data["compression"] + 50)); log.parameters["name"] = GlobalFuncs.Gibberish(signal.data["name"], Convert.ToInt32(signal.data["compression"] + 50)); log.parameters["realname"] = GlobalFuncs.Gibberish(signal.data["realname"], Convert.ToInt32(signal.data["compression"] + 50)); log.input_type = "Corrupt File"; } this.log_entries.Add(log); if (!this.stored_names.Contains(signal.data["name"])) { this.stored_names.Add(signal.data["name"]); } this.logs++; signal.data["server"] = this; identifier = String13.NumberToString(Rand13.Int(-1000, 1000) + Game13.time); log.name = "data packet (" + Num13.Md5(identifier) + ")"; } can_send = this.relay_information(signal, "/obj/machinery/telecomms/hub"); if (!Lang13.Bool(can_send)) { this.relay_information(signal, "/obj/machinery/telecomms/broadcaster"); } } } return; }
// Function from file: server.dm public void add_entry(dynamic content = null, dynamic input = null) { CommLogEntry log = null; string identifier = null; log = new CommLogEntry(); identifier = String13.NumberToString(Rand13.Int(-1000, 1000) + Game13.time); log.name = "" + input + " (" + Num13.Md5(identifier) + ")"; log.input_type = input; log.parameters["message"] = content; this.log_entries.Add(log); this.update_logs(); return; }
// Function from file: dna.dm public string generate_unique_enzymes( ) { string _default = null; _default = ""; if (this.holder is Mob_Living_Carbon) { this.real_name = this.holder.real_name; _default += Num13.Md5(this.holder.real_name); } else { _default += GlobalFuncs.random_string(32, GlobalVars.hex_characters); } return(_default); }
// Function from file: artefact.dm public void update_targets( ) { Mob_Living_Carbon_Human H = null; this.possible = new ByTable(); if (!Lang13.Bool(this.link)) { return; } foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_Carbon_Human))) { H = _a; if (this.link.fingerprints.Contains(Num13.Md5(H.dna.uni_identity))) { this.possible.Or(H); } } return; }
// Function from file: cloning.dm public void scan_mob(Mob subject = null) { Data_Record R = null; dynamic imp = null; if (!(subject is Mob_Living_Carbon_Human)) { this.scantemp = "<font class='bad'>Unable to locate valid genetic data.</font>"; return; } if (!Lang13.Bool(subject.getorgan(typeof(Obj_Item_Organ_Internal_Brain)))) { this.scantemp = "<font class='bad'>No signs of intelligence detected.</font>"; return; } if (subject.suiciding == 1) { this.scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"; return; } if (Lang13.Bool(subject.disabilities & 128) && this.scanner.scan_level < 2) { this.scantemp = "<font class='bad'>Subject no longer contains the fundamental materials required to create a living clone.</font>"; return; } if (!Lang13.Bool(subject.ckey) || !(subject.client != null)) { this.scantemp = "<font class='bad'>Mental interface failure.</font>"; return; } if (GlobalFuncs.find_record("ckey", subject.ckey, this.records) != null) { this.scantemp = "<font class='average'>Subject already in database.</font>"; return; } R = new Data_Record(); if (Lang13.Bool(((dynamic)subject).dna.species)) { R.fields["mrace"] = ((dynamic)subject).dna.species.type; } else { R.fields["mrace"] = typeof(Species_Human); } R.fields["ckey"] = subject.ckey; R.fields["name"] = subject.real_name; R.fields["id"] = String13.SubStr(Num13.Md5(subject.real_name), 2, 6); R.fields["UE"] = ((dynamic)subject).dna.unique_enzymes; R.fields["UI"] = ((dynamic)subject).dna.uni_identity; R.fields["SE"] = ((dynamic)subject).dna.struc_enzymes; R.fields["blood_type"] = ((dynamic)subject).dna.blood_type; R.fields["features"] = ((dynamic)subject).dna.features; R.fields["factions"] = subject.faction; imp = Lang13.FindIn(typeof(Obj_Item_Weapon_Implant_Health), subject); if (!Lang13.Bool(imp)) { imp = new Obj_Item_Weapon_Implant_Health(subject); imp.implanted = subject; R.fields["imp"] = new Txt().Ref(imp).ToString(); } else { R.fields["imp"] = new Txt().Ref(imp).ToString(); } if (!(subject.mind == null)) { R.fields["mind"] = new Txt().Ref(subject.mind).ToString(); } this.records.Add(R); this.scantemp = "Subject successfully scanned."; return; }
// Function from file: datacore.dm public void manifest_inject(dynamic H = null) { dynamic assignment = null; string id = null; Icon image = null; Obj_Item_Weapon_Photo photo_front = null; Obj_Item_Weapon_Photo photo_side = null; Data_Record G = null; Data_Record M = null; Data_Record S = null; Data_Record L = null; if (Lang13.Bool(H.mind) && H.mind.assigned_role != H.mind.special_role) { if (Lang13.Bool(H.mind.assigned_role)) { assignment = H.mind.assigned_role; } else if (Lang13.Bool(H.job)) { assignment = H.job; } else { assignment = "Unassigned"; } id = GlobalFuncs.num2hex(GlobalVars.record_id_num++, 6); image = this.get_id_photo(H); photo_front = new Obj_Item_Weapon_Photo(); photo_side = new Obj_Item_Weapon_Photo(); photo_front.photocreate(null, new Icon(image, null, GlobalVars.SOUTH)); photo_side.photocreate(null, new Icon(image, null, GlobalVars.WEST)); G = new Data_Record(); G.fields["id"] = id; G.fields["name"] = H.real_name; G.fields["rank"] = assignment; G.fields["age"] = H.age; if (GlobalVars.config.mutant_races) { G.fields["species"] = H.dna.species.name; } G.fields["fingerprint"] = Num13.Md5(H.dna.uni_identity); G.fields["p_stat"] = "Active"; G.fields["m_stat"] = "Stable"; G.fields["sex"] = H.gender; G.fields["photo_front"] = photo_front; G.fields["photo_side"] = photo_side; this.general.Add(G); M = new Data_Record(); M.fields["id"] = id; M.fields["name"] = H.real_name; M.fields["blood_type"] = H.dna.blood_type; M.fields["b_dna"] = H.dna.unique_enzymes; M.fields["mi_dis"] = "None"; M.fields["mi_dis_d"] = "No minor disabilities have been declared."; M.fields["ma_dis"] = "None"; M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."; M.fields["alg"] = "None"; M.fields["alg_d"] = "No allergies have been detected in this patient."; M.fields["cdi"] = "None"; M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."; M.fields["notes"] = "No notes."; this.medical.Add(M); S = new Data_Record(); S.fields["id"] = id; S.fields["name"] = H.real_name; S.fields["criminal"] = "None"; S.fields["mi_crim"] = new ByTable(); S.fields["ma_crim"] = new ByTable(); S.fields["notes"] = "No notes."; this.security.Add(S); L = new Data_Record(); L.fields["id"] = Num13.Md5("" + H.real_name + H.mind.assigned_role); L.fields["name"] = H.real_name; L.fields["rank"] = H.mind.assigned_role; L.fields["age"] = H.age; L.fields["sex"] = H.gender; L.fields["blood_type"] = H.dna.blood_type; L.fields["b_dna"] = H.dna.unique_enzymes; L.fields["enzymes"] = H.dna.struc_enzymes; L.fields["identity"] = H.dna.uni_identity; L.fields["species"] = H.dna.species.type; L.fields["features"] = H.dna.features; L.fields["image"] = image; this.locked.Add(L); } return; }
// Function from file: scanner.dm public void scan(dynamic A = null, dynamic user = null) { ByTable fingerprints = null; ByTable blood = null; ByTable fibers = null; ByTable reagents = null; string target_name = null; dynamic H = null; Reagent R = null; dynamic blood_DNA = null; dynamic blood_type = null; bool found_something = false; dynamic finger = null; dynamic B = null; dynamic fiber = null; dynamic R2 = null; Ent_Static holder = null; if (!this.scanning) { if (!(Map13.GetDistance(A, user) <= 1) && !Map13.FetchInView(user, Game13.view).Contains(A)) { return; } if (this.loc != user) { return; } this.scanning = true; ((Ent_Static)user).visible_message(new Txt().The(user).item().str(" points the ").item(this.name).str(" at ").the(A).item().str(" and performs a forensic scan.").ToString()); user.WriteMsg(new Txt("<span class='notice'>You scan ").the(A).item().str(". The scanner is now analysing the results...</span>").ToString()); fingerprints = new ByTable(); blood = new ByTable(); fibers = new ByTable(); reagents = new ByTable(); target_name = A.name; if (A.blood_DNA != null && A.blood_DNA.len != 0) { blood = A.blood_DNA.Copy(); } if (A.suit_fibers != null && A.suit_fibers.len != 0) { fibers = A.suit_fibers.Copy(); } if (A is Mob_Living_Carbon_Human) { H = A; if (!Lang13.Bool(H.gloves)) { fingerprints.Add(Num13.Md5(H.dna.uni_identity)); } } else if (!(A is Mob)) { if (A.fingerprints != null && A.fingerprints.len != 0) { fingerprints = A.fingerprints.Copy(); } if (Lang13.Bool(A.reagents) && A.reagents.reagent_list.len != 0) { foreach (dynamic _a in Lang13.Enumerate(A.reagents.reagent_list, typeof(Reagent))) { R = _a; reagents[R.name] = R.volume; if (R is Reagent_Blood) { if (Lang13.Bool(R.data["blood_DNA"]) && Lang13.Bool(R.data["blood_type"])) { blood_DNA = R.data["blood_DNA"]; blood_type = R.data["blood_type"]; blood[blood_DNA] = blood_type; } } } } } Task13.Schedule(0, (Task13.Closure)(() => { found_something = false; this.add_log("<B>" + GlobalFuncs.worldtime2text() + GlobalFuncs.get_timestamp() + " - " + target_name + "</B>", false); if (fingerprints != null && fingerprints.len != 0) { Task13.Sleep(30); this.add_log("<span class='info'><B>Prints:</B></span>"); foreach (dynamic _b in Lang13.Enumerate(fingerprints)) { finger = _b; this.add_log("" + finger); } found_something = true; } if (blood != null && blood.len != 0) { Task13.Sleep(30); this.add_log("<span class='info'><B>Blood:</B></span>"); found_something = true; foreach (dynamic _c in Lang13.Enumerate(blood)) { B = _c; this.add_log("Type: <font color='red'>" + blood[B] + "</font> DNA: <font color='red'>" + B + "</font>"); } } if (fibers != null && fibers.len != 0) { Task13.Sleep(30); this.add_log("<span class='info'><B>Fibers:</B></span>"); foreach (dynamic _d in Lang13.Enumerate(fibers)) { fiber = _d; this.add_log("" + fiber); } found_something = true; } if (reagents != null && reagents.len != 0) { Task13.Sleep(30); this.add_log("<span class='info'><B>Reagents:</B></span>"); foreach (dynamic _e in Lang13.Enumerate(reagents)) { R2 = _e; this.add_log("Reagent: <font color='red'>" + R2 + "</font> Volume: <font color='red'>" + reagents[R2] + "</font>"); } found_something = true; } holder = null; if (this.loc is Mob) { holder = this.loc; } if (!found_something) { this.add_log("<I># No forensic traces found #</I>", false); if (holder != null) { ((dynamic)holder).WriteMsg(new Txt("<span class='warning'>Unable to locate any fingerprints, materials, fibers, or blood on ").the(target_name).item().str("!</span>").ToString()); } } else if (holder != null) { ((dynamic)holder).WriteMsg(new Txt("<span class='notice'>You finish scanning ").the(target_name).item().str(".</span>").ToString()); } this.add_log("---------------------------------------------------------", false); this.scanning = false; return; return; })); } return; }