// Function from file: tiny_prick.dm public override bool Click(dynamic loc = null, string control = null, string _params = null) { Mob user = null; Changeling changeling = null; user = Task13.User; changeling = user.mind.changeling; if (changeling.chosen_sting != null) { this.unset_sting(user); return(false); } this.selected_dna = changeling.select_dna("Select the target DNA: ", "Target DNA"); if (!(this.selected_dna != null)) { return(false); } if (this.selected_dna.dna.species.specflags.Contains(16384)) { user.WriteMsg("<span class = 'notice'>That DNA is not compatible with changeling retrovirus!"); return(false); } base.Click((object)(loc), control, _params); return(false); }
// Function from file: changeling.dm public Changelingprofile add_new_profile(dynamic H = null, Mob user = null, bool?protect = null) { protect = protect ?? false; Changelingprofile prof = null; prof = this.create_profile(H, protect); this.add_profile(prof); return(prof); }
// Function from file: changeling.dm public bool push_out_profile( ) { Changelingprofile removeprofile = null; removeprofile = this.get_profile_to_remove(); if (removeprofile != null) { this.stored_profiles.Remove(removeprofile); return(true); } return(false); }
// Function from file: changeling.dm public Changelingprofile create_profile(dynamic H = null, bool?user = null, bool?protect = null) { protect = protect ?? false; Changelingprofile prof = null; dynamic new_dna = null; ByTable slots = null; dynamic slot = null; Obj_Item I = null; prof = new Changelingprofile(); H.dna.real_name = H.real_name; new_dna = Lang13.Call(H.dna.type); ((Dna)H.dna).copy_dna(new_dna); prof.dna = new_dna; prof.name = H.real_name; prof.v_protected = protect; prof.underwear = H.underwear; prof.undershirt = H.undershirt; prof.socks = H.socks; slots = new ByTable(new object [] { "head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store" }); foreach (dynamic _a in Lang13.Enumerate(slots)) { slot = _a; if (H.vars.Contains(slot)) { I = H.vars[slot]; if (!(I != null)) { continue; } prof.name_list[slot] = I.name; prof.appearance_list[slot] = I.appearance; prof.flags_cover_list[slot] = I.flags_cover; prof.item_color_list[slot] = I.item_color; prof.item_state_list[slot] = I.item_state; prof.exists_list[slot] = 1; } else { continue; } } return(prof); }
// Function from file: transform.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Changeling changeling = null; Changelingprofile chosen_prof = null; changeling = user.mind.changeling; chosen_prof = changeling.select_dna("Select the target DNA: ", "Target DNA", user); if (!(chosen_prof != null)) { return(null); } GlobalFuncs.changeling_transform(user, chosen_prof); GlobalFuncs.feedback_add_details("changeling_powers", "TR"); return(1); }
// Function from file: hivemind.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Changeling changeling = null; ByTable names = null; Changelingprofile prof = null; dynamic S = null; Base_Data chosen_prof = null; dynamic downloaded_prof = null; changeling = user.mind.changeling; names = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(GlobalVars.hivemind_bank, typeof(Changelingprofile))) { prof = _a; if (!changeling.stored_profiles.Contains(prof)) { names[prof.name] = prof; } } if (names.len <= 0) { user.WriteMsg("<span class='notice'>There's no new DNA to absorb from the air.</span>"); return(null); } S = Interface13.Input("Select a DNA absorb from the air: ", "Absorb DNA", null, null, names, InputType.Null | InputType.Any); if (!Lang13.Bool(S)) { return(null); } chosen_prof = names[S]; if (!(chosen_prof != null)) { return(null); } downloaded_prof = Lang13.Call(chosen_prof.type); ((dynamic)chosen_prof).copy_profile(downloaded_prof); changeling.add_profile(downloaded_prof); user.WriteMsg("<span class='notice'>We absorb the DNA of " + S + " from the air.</span>"); GlobalFuncs.feedback_add_details("changeling_powers", "HD"); return(1); }
// Function from file: hivemind.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Changeling changeling = null; ByTable names = null; Changelingprofile prof = null; dynamic chosen_name = null; Changelingprofile chosen_dna = null; dynamic uploaded_dna = null; changeling = user.mind.changeling; names = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(changeling.stored_profiles, typeof(Changelingprofile))) { prof = _a; if (!GlobalVars.hivemind_bank.Contains(prof)) { names.Add(prof.name); } } if (names.len <= 0) { user.WriteMsg("<span class='notice'>The airwaves already have all of our DNA.</span>"); return(null); } chosen_name = Interface13.Input("Select a DNA to channel: ", "Channel DNA", null, null, names, InputType.Null | InputType.Any); if (!Lang13.Bool(chosen_name)) { return(null); } chosen_dna = changeling.get_dna(chosen_name); if (!(chosen_dna != null)) { return(null); } uploaded_dna = Lang13.Call(chosen_dna.type); chosen_dna.copy_profile(uploaded_dna); GlobalVars.hivemind_bank.Add(uploaded_dna); user.WriteMsg("<span class='notice'>We channel the DNA of " + chosen_name + " to the air.</span>"); GlobalFuncs.feedback_add_details("changeling_powers", "HU"); return(1); }
// Function from file: changeling.dm public Changelingprofile get_dna(dynamic dna_owner = null) { Changelingprofile prof = null; foreach (dynamic _a in Lang13.Enumerate(this.stored_profiles, typeof(Changelingprofile))) { prof = _a; if (dna_owner == prof.name) { return(prof); } } return(null); }
// Function from file: changeling.dm public bool has_dna(Dna tDNA = null) { Changelingprofile prof = null; foreach (dynamic _a in Lang13.Enumerate(this.stored_profiles, typeof(Changelingprofile))) { prof = _a; if (tDNA.is_same_as(prof.dna)) { return(true); } } return(false); }
// Function from file: changeling.dm public Changelingprofile get_profile_to_remove( ) { Changelingprofile prof = null; foreach (dynamic _a in Lang13.Enumerate(this.stored_profiles, typeof(Changelingprofile))) { prof = _a; if (!(prof.v_protected == true)) { return(prof); } } return(null); }
// Function from file: humanform.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Changeling changeling = null; ByTable names = null; Changelingprofile prof = null; dynamic chosen_name = null; Changelingprofile chosen_prof = null; dynamic newmob = null; changeling = user.mind.changeling; names = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(changeling.stored_profiles, typeof(Changelingprofile))) { prof = _a; names.Add("" + prof.name); } chosen_name = Interface13.Input("Select the target DNA: ", "Target DNA", null, null, names, InputType.Null | InputType.Any); if (!Lang13.Bool(chosen_name)) { return(null); } chosen_prof = changeling.get_dna(chosen_name); if (!(chosen_prof != null)) { return(null); } if (!(user != null) || Lang13.Bool(user.notransform)) { return(0); } user.WriteMsg("<span class='notice'>We transform our appearance.</span>"); changeling.purchasedpowers.Remove(this); newmob = ((dynamic)user).humanize(279); GlobalFuncs.changeling_transform(newmob, chosen_prof); GlobalFuncs.feedback_add_details("changeling_powers", "LFT"); return(1); }
// Function from file: transform.dm public Changelingprofile select_dna(string prompt = null, string title = null, Mob user = null) { ByTable names = null; Changelingprofile prof = null; dynamic chosen_name = null; dynamic slot = null; Changelingprofile prof2 = null; names = new ByTable(new object [] { "Drop Flesh Disguise" }); foreach (dynamic _a in Lang13.Enumerate(this.stored_profiles, typeof(Changelingprofile))) { prof = _a; names.Add("" + prof.name); } chosen_name = Interface13.Input(prompt, title, null, null, names, InputType.Null | InputType.Any); if (!Lang13.Bool(chosen_name)) { return(null); } if (chosen_name == "Drop Flesh Disguise") { foreach (dynamic _b in Lang13.Enumerate(GlobalVars.slots)) { slot = _b; if (Lang13.Bool(GlobalVars.slot2type[slot].IsInstanceOfType(user.vars[slot]))) { GlobalFuncs.qdel(user.vars[slot]); } } } prof2 = this.get_dna(chosen_name); return(prof2); }
// Function from file: changeling.dm public void remove_profile(Mob H = null, bool?force = null) { force = force ?? false; Changelingprofile prof = null; foreach (dynamic _a in Lang13.Enumerate(this.stored_profiles, typeof(Changelingprofile))) { prof = _a; if (H.real_name == prof.name) { if (prof.v_protected == true && !(force == true)) { continue; } this.stored_profiles.Remove(prof); GlobalFuncs.qdel(prof); } } return; }